Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
sequencelengths
0
101
negative_scores
sequencelengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Below this comment, create a function named addNumbers, which accepts two parameters. The function should add the two parameters together and write the result to the element with the id resultadd
function addNumbers(num1, num2) { $('#result-add').text(num1 + num2) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNumbers(a, b) {\n\t/* Within the addNumbers() function, we will create a variable that will add the two above arguments together. */\n\tvar sum = a + b;\n\n\t/* Use a function \"return\" to send the \"sum\" variable outside of the function for other elements to use. */\n\treturn sum;\n}", "function addNumbers(number1, number2) {\n return number1 + number2\n}", "function addNumbers(number1, number2) {\r\n return number1 + number2;\r\n}", "function addNumbers(one, second){\n var returnRusult = \"Result is: \";\n \n function add (){\n return returnRusult + ( one + second);\n }\n return add();\n }", "function addNumbers(number1, number2){\r\n return number1 + number2;\r\n}", "function addNumbers(firstNumber, secondNumber) {\n // return firstNumber + secondNumber;\n return firstNumber + secondNumber;\n}", "function addNumbers() {\n var num1 = document.getElementById(\"num1\").value;\n num1 = Number(num1); // turn string into number\n var num2 = document.getElementById(\"num2\").value;\n num2 = Number(num2);\n \n var sum = num1 + num2\n \n document.getElementById(\"outputH3\").innerHTML = num1 + \" + \" + num2 + \"=\" + sum;\n} //end addNumbers()", "function addNums(p1, p2)\r\n{\r\n //p1 and p2 are sent to addNums... to do this:\r\n return p1+p2;\r\n}", "function addStuff(){\n//\t\tconsole.log(\"from addStuff\")\n\t\tconsole.log(num1.value);\n\t\tconsole.log(num2.value);\n\t\t\n\t\t var total = parseInt(num1.value) + parseInt(num2.value); //ParseInt converts string to integer\n\t\tconsole.log(total);\n\t\toutcome.innerHTML = total; //innerHTML goes into p tag and edits. like doc.write\n\t\n\t}", "function addNumbers(a, b) {\n return a + b;\n}", "function addNumbers(a, b) {\n return a + b;\n}", "function addNumbers(numberOne, numberTwo) {\n return numberOne + numberTwo;\n}", "function addNumbers(x, y) {\n return x+y;\n}", "function addNumbers(numberA, numberB) {\n console.log(numberA + numberB);\n}", "function addNumbers(num1, num2) {\n return num1 + num2;\n}", "function add(num){\n\tresults.value += num;\n}", "function addNumbers(numOne, numTwo) {\n return numOne + numTwo;\n}", "function addNumbers(num1, num2) { //create the function with 2 num arguments\n return num1 + num2 //add the two numbers and return the result\n}", "function addNumbers(num1, num2){\n console.log(num1 + num2);\n}", "function addNumbers(num1, num2) {\n return num1 + num2;\n}", "function addNumbers (num1, num2) {\n return num1 + num2;\n}", "static addNumbers(a, b){\n return a + b;\n }", "function add() {\n var a = parseInt(firstNum.value);\n var b = parseInt(secondNum.value);\n var sum = a + b;\n let resultDiv = document.getElementById(\"result\"); \n resultDiv.innerHTML = sum;\n}", "function add(nbr1, nbr2){\n\t\tresultat = Number(nbr1) + Number(nbr2);\n\t}", "function addNumbers(num1, num2, num3){\n return num1 + num2 + num3;\n }", "function addButton() {\n\tvar num1 = document.getElementById(\"first\").value;\n\tvar num2 = document.getElementById(\"second\").value;\n\tvar sum = addition(num1, num2);\n\tdocument.getElementById(\"additionResult\").innerHTML = sum;\n}", "function addNumbers(a,b) {\n\tconsole.log(a+b);\n}", "function addingNumbers() {\n // Get the value of the first number\n a = parseInt(document.getElementById('firstNumber').value);\n\n // Get the value of the second number\n b = parseInt(document.getElementById('secondNumber').value);\n\n var addedNumbersText = \"The sum of your numbers is: \";\n var addedNumbers = a + b;\n console.log(\"Adding 2 numbers together: a + b = answer below. \")\n console.log(a + b);\n document.getElementById(\"display-addNums\").innerHTML = addedNumbersText + addedNumbers;\n}", "function addNum(){\r\n var fNum=document.getElementById(\"firstNum\");\r\n var sNum=document.getElementById(\"secNum\");\r\n var result=parseInt(fNum.value) + parseInt(sNum.value)\r\n document.getElementById(\"result\").value=result\r\n}", "function addingNumbers (a, b) {\n\tvar answer = a + b;\n\talert(answer);\n}", "function add (num1, num2) {\n answer.innerHTML = Number(num1) + Number(num2);\n}", "function addValues(num1,num2){\r\n return num1 + num2;\r\n}", "function add(a, b) {\n // add numbers and return the result\n}", "function add()\n{\nlet firstNumber = document.getElementById(\"firstNumber\").value;\nfirstNumber = Number(firstNumber);\n\nlet secondNumber = document.getElementById(\"secondNumber\").value;\nsecondNumber = Number(secondNumber);\n\nlet answer = firstNumber + secondNumber;\n\ndocument.getElementById(\"answer\").value = answer;\n\n}", "function addValues(num1, num2){\r\n return num1+num2;\r\n}", "function addNums(firstNum, secondNum) {\n return firstNum + secondNum;\n}", "function addIt(numA,numB){\n\tvar total=numA+numB;\n\tconsole.log(text+total);\n}", "function addNumbers() {\n //+ in front of something coerces it into a number\n //not sure why we have \"+=\" in the assignment bc the answer variable is then treated as a string and it just concatenates if button is clicked more than once.\n answer = +answer + +( +document.getElementById('inputOne').value + +document.getElementById('inputTwo').value );\n \n alert(answer);\n }", "function addNums(num1, num2) {\n return num1 + num2\n}", "function addNumbers(num1, num2){\n var result = num1 + num2;\n // returns the value to the function call\n return result;\n}", "function Add_numbers_1() { //Created function Add_numbers_1().\n document.write(20 + X + \"<br>\"); //Writes in document sum of (20 + X + \"<br>\").\n}", "function add(num1, num2){\n     console.log(\"Summing Numbers!\");\n     console.log(\"num1 is: \" + num1);\n console.log(\"num2 is: \" + num2);\n     var sum = num1 + num2;\n     return sum;\n }", "function add(num1, num2){\r\n     console.log(\"Summing Numbers!\");\r\n     console.log(\"num1 is: \" + num1);\r\n console.log(\"num2 is: \" + num2);\r\n     var sum = num1 + num2;\r\n     console.log(sum);\r\n }", "function addNums(n1,n2) {\n alert(n1+n2)\n}", "function numAdd (num, number) {\nreturn num + number;\n}", "function addNumbers(num1=0,num2=0){\n return num1 + num2;\n}", "function addNums(num1, num2) {\n return num1 + num2;\n}", "function addNums(num1, num2) {\n return num1 + num2;\n}", "function addNumbers() {\n\tlet total = o;\n\tfor (const num of arguments) {\n\t\ttotal += num;\n\t}\n\treturn total;\n}", "function addition()\r\n {\r\n var num1,num2,sum;\r\n num1=Number(document.getElementById(\"firstnum\").value);\r\n num2=Number(document.getElementById(\"secnum\").value);\r\n sum=num1+num2;\r\n document.getElementById(\"result\").value=sum; \r\n }", "function addNums(num1, num2) {\n console.log(num1 + num2);\n}", "function add(firstNum, secondNum) {\n return firstNum + secondNum\n}", "function addNum(num1,num2) {\r\n console.log(num1 + num2)\r\n}", "function add (firstNum, secondNum) {\n\n return firstNum + secondNum;\n\n}", "function addTwoNumbers(firstNumber, secondNumber){\n return firstNumber + secondNumber;\n}", "function add2Numbers(num1, num2){\n return num1+num2\n}", "function Add(nb1,nb2){\n var resultat = nb1 + nb2;\n return(resultat);\n}", "function addNumber(a, b) {\n return a + b;\n}", "function addNumber(a,b,c){\n console.log(a+b+c);\n}", "function add(num1, num2) {\n return num1 + num2;\n }", "function addNums(num1, num2) {\n // function body\n let sum = num1 + num2;\n lg('addNums', `sudejus ${num1} ir ${num2}, gausime ${sum}`);\n}", "function add(num1, num2){//Function to add two numbers and display results per console.log\n console.log(\"Summing Numbers!\");\n console.log(\"num1 is: \" + num1);\n console.log(\"num2 is: \" + num2);\n var sum = num1 + num2;\n return sum;\n}", "function addNumbers(a, b) {\r\n var c = a+b;\r\n return c;\r\n}", "function addNum(Num1, Num2){\r\n console.log(Num1 + Num2);\r\n}", "function summation() {\r\n let num1 = document.getElementById(\"#num1\")[0].value);\r\nlet num2 = document.getElementById(\"#num2\")[0].value);\r\nlet sum = number(num1) + Number(num2);\r\ndocument.getElementById(\"sum\").value = sum;\r\n}", "function AddNumbers(a,b)\r\n{\r\n var sum = a+b;\r\n return sum;\r\n}", "function addFourNumberWithParameters(numberone, numbertwo, numberthree, numberfour){\n //function with four parameters to add four numbers\n\n var result = numberone + numbertwo + numberthree + numberfour;\n // declaring variable result and assigning it the sum of the four variables\n \n console.log(\"The result is: \" +result);\n //printing the total value to the console\n }", "static addNumbers(x, y) {\n return x + y;\n }", "function addTwoNumbers(firstNumber, secondNumber) {\n var total = firstNumber + secondNumber;\n\n console.log(total);\n}", "function addTwoNumbers(firstNumber, secondNumber) {\n var total = firstNumber + secondNumber;\n\n console.log(total);\n}", "function add2Numbers(num1, num2) {\n return num1 + num2;\n}", "function addNumbers(a,b,c,d){\n console.log(a+b+c+d); \n}", "function addOutput (firstValue,secondValue) {\n var output = parseInt(firstValue) + parseInt(secondValue);\n document.getElementById(\"answer\").innerHTML = output\n return output;\n}", "function addNumbers(a,b,c,d) {\n return this.firstName + \" just calculated \" + (a+b+c+d);\n}", "function addNumbers(a,b,c,d) {\n return this.firstName + \" just calculated \" + (a+b+c+d);\n}", "function addition() {\r\n let userInput1 = parseInt(document.getElementById('inputNbr1').value);\r\n let userInput2 = parseInt(document.getElementById('inputNbr2').value);\r\n document.getElementById('answer').textContent = (userInput1 + userInput2);\r\n}", "function addTwoNumbers(number1, number2){\n // Add the two numbers together\n var sumOfTwoNumbers = number1 + number2;\n // Need to output the sum of `two numbers`\n return sumOfTwoNumbers;\n}", "function addTwoNumbers(num1, num2) {\n\treturn num1 + num2;\n}", "function sumNumbers(num1 , num2) {\n\tvar result = num1 + num2;\n\tconsole.log(result);\n}", "function addNum(a, b) {\n return a + b;\n}", "function add(total, num) {\n return total + num;\n }", "function add(total, num) {\n return total + num;\n }", "function add(number1, number2) {\n\treturn number1 + number2;\n}", "function add2(numValue1, numValue2) {\n console.log(numValue1 + numValue2);\n}", "function add(num1,num2,num3)\n {\n\n console.log('sum = '+num1+num2+num3);\n }", "function add(num1,num2){\n return num1 + num2;\n}", "function addTwoNums(a,b){\n\treturn a + b;\n}", "function additionNumber() {\n var x = document.form1.firstInputValue.value;\n var y = document.form1.secondInputValue.value;\n validationForm();\n var sum;\n sum = Number(x) + Number(y);\n if (isNaN(sum)) {\n return 0;\n }\n return document.getElementById('result').value = sum;\n}", "function addNums2(num1, num2){\n return num1 + num2\n}", "function add2Numbers(a, b) {\n var addition = a + b;\n return addition;\n}", "function additionFunction () {\n var input1 = parseInt(document.getElementById(\"userInput1\").value);\n var input2 = parseInt(document.getElementById(\"userInput2\").value);\n var added = input1 + input2;\n console.log(\"User Input1 = \", input1);\n console.log(\"User Input2 = \", input2);\n console.log(\"input1 + input2 =\", added );\n resultsDiv.innerHTML = `${added}`\n return added;\n}", "function add(number1, number2) {\n return number1 + number2\n}", "function add(num1, num2){\n console.log(\"Summing Numbers!\");\n console.log(\"num1 is: \" + num1);\n console.log(\"num2 is: \" + num2);\n var sum = num1 + num2;\n return sum;\n}", "function add (num1, num2) {\n return num1 + num2;\n }", "function addNumbers() {\n for (var _len = arguments.length, numbers = Array(_len), _key = 0; _key < _len; _key++) {\n numbers[_key] = arguments[_key];\n }\n\n return numbers.reduce(function (accum, curr) {\n return accum + curr;\n });\n}", "function addTwoNumbers(num1, num2) {\n return num1 + num2;\n}", "function Addition(num1,num2){\r\n var result = num1 + num2;\r\n document.write(\"The sum of \"+num1+\" and \"+num2+\" is \"+result);\r\n}", "function add(number) {\n\t\treturn number + number;\n\t}", "function addTwoNumbers(arg1, arg2){\n return arg1 + arg2;\n}", "function addNumber (inputNum)\n{\n number += inputNum;\n displayF(number);\n}" ]
[ "0.77218115", "0.761139", "0.75727594", "0.7570341", "0.75699544", "0.75540084", "0.7514997", "0.7481818", "0.74782306", "0.74749494", "0.74749494", "0.7468673", "0.7467695", "0.7465843", "0.74373406", "0.7424583", "0.7419535", "0.73992944", "0.73965997", "0.73928785", "0.73879933", "0.7382987", "0.7332399", "0.73200953", "0.72993195", "0.72973704", "0.7252945", "0.7247705", "0.7224714", "0.71647435", "0.7158349", "0.7151185", "0.7129723", "0.7118247", "0.7075697", "0.70714676", "0.7069671", "0.70599985", "0.70495254", "0.7049146", "0.7046668", "0.70386297", "0.70314354", "0.70299035", "0.7022645", "0.7014187", "0.70099354", "0.70099354", "0.70081484", "0.69958186", "0.699494", "0.69838744", "0.6980149", "0.6976101", "0.6959148", "0.6957922", "0.69468635", "0.69463074", "0.69343364", "0.69294107", "0.69288975", "0.6916702", "0.69124585", "0.6910569", "0.69084436", "0.69072217", "0.6906074", "0.6900227", "0.68904245", "0.68904245", "0.6885544", "0.6881319", "0.6878469", "0.6855175", "0.6855175", "0.6848698", "0.68395704", "0.68390936", "0.6837852", "0.6833389", "0.6832694", "0.6832694", "0.6830734", "0.6823374", "0.68120897", "0.6803604", "0.68020004", "0.6796926", "0.6793669", "0.67935234", "0.6792002", "0.67886555", "0.67796695", "0.67793626", "0.6778013", "0.6776914", "0.67739713", "0.67720544", "0.67699885", "0.67665124" ]
0.80425704
0
Below this comment, create a function named multiplyNumbers, which accepts two parameters. The function should multiply the two parameters together and return the result.
function multiplyNumbers(num1, num2) { return num1 * num2 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function multiplyNumbers (firstNumber, secondNumber) {\n\treturn firstNumber * secondNumber;\n}", "function multiplyTwoNumbers(a, b) {\nreturn a * b\n}", "function multiplyingDemo(firstNumber, secondNumber) {\n var product = firstNumber * secondNumber;\n return product;\n}", "function multiplyTwoNumbs(a,b){\n return a *b;\n}", "function multiplyNums(a, b, c) {\n return c(a, b)\n }", "function multiply(number1, number2) {\n return number1 * number2;\n}", "function multiply(number1, number2) {\n return number1 * number2;\n}", "function multiply(num1, num2) {\r\n return num1 * num2;\r\n}", "function multiply(num1, num2) {\r\n return num1 * num2;\r\n}", "function multNums(a, b) {\n let product = a * b;\n return product\n}", "function multiply(num1, num2) {\n return num1 * num2; \n }", "function multiply (num1, num2) {\n return num1 * num2\n}", "function multiply(num1, num2) {\n return num1 * num2;\n}", "function multiply(num1, num2) {\n return num1 * num2;\n}", "function multiply(num1, num2) {\n return num1 * num2;\n}", "function multiply(num1, num2) {\n\n return num1 * num2;\n\n}", "function multNums(n1,n2) {\n return (n1*n2)\n}", "function multiplyNumbers (a, b) {\n\tvar answer = a * b;\n\talert(answer);\n}", "function multiplication(number1, number2) {\n return number1 * number2;\n}", "function calculateMultiply(num1, num2){\n return num1 * num2\n}", "function multiply(num1, num2) {\n var multiplyTotal = num1 * num2;\n return multiplyTotal;\n}", "function multiplyTwoNumbers(x,y){\n return x * y;\n}", "function multiply(num1, num2) { \n var sum = num1 * num2;\n return sum; \n}", "function calculateMultiply(num1, num2) {\n return num1 * num2;\n}", "function multiply() {\n return num1 * num2;\n}", "function multiply() {\n return num1 * num2;\n}", "function multiply(n1, n2){\n return n1 * n2;\n}", "function multiplication(num1, num2) {\n return num1 * num2;\n}", "function mul(firstNumber){\n return helperMul(firstNumber);\n}", "function multiply(n1,n2){\r\n return n1*n2;\r\n}", "function multiply(num1, num2){\n var result= num1*num2;\n return result;\n}", "function multipliesTwoNumbers(num1, num2) {\nlet product = num1 * num2;\nreturn (product);\n}", "function multiplicacion (numero1, numero2) {\n var resultado = numero1 * numero2\n console.log(resultado)\n}", "function multiply(n1, n2) {\n return n1 * n2;\n}", "function multiply(number, number2) {\n var multipliedNumber = number * number2;\n return multipliedNumber;\n}", "function multiplyNumbers(numberList){\n var multiplied = 1;\n for(i=0; i<numberList.length; i++){\n multiplied *= numberList[i]\n }\n return multiplied\n}", "function multiplica(numero, numero2)\n{\n return numero * numero2;\n}", "function productOfOtherNumbers(arg){\n\n}", "function multipleTwoNumbers(num1, num2){\n var result = num1 * num2;\n return result;\n\n}", "function multiply(nbr1, nbr2){\n\t\tresultat = nbr1 * nbr2;\n\t}", "function multiply(num1, num2) {\r\n console.log(num1 * num2);\r\n}", "function calculateMultiply(num1, num2) {\n return num1 * num2; //multiplication operation\n}", "function multiplier(multiplyBy, num) {\n return num * multiplyBy;\n}", "function multipleNum(a, b) {\n\tconsole.log(a*b);\n}", "function multiply(n1, n2) {\n return n1 * n2;\n }", "function multiply(numbers){\n return numbers.reduce((a,b) => a * b);\n}", "multiplyMany(...numbers) {\n\n }", "function multiplyThree(firstNumber, secondNumber, thirdNumber){\n return firstNumber * secondNumber * thirdNumber;\n}", "function multiple(num1, num2){\n let result = num1 * num2;\n return result;\n}", "function multiplication_Function(a, b) { //Function returns a multiplied b\n return a * b;\n}", "function mul(num1,num2)\n{\n return num1 * num2;\n}", "function mult(num1, num2){\n return num1*num2;\n}", "function multiply(first, second) {\n return first * second;\n}", "function multiply(a,b) { \n return a * b\n}", "function mul(num1, num2) {\n return num1 * num2;\n}", "function multiply(a, b){\n return a * b;\n }", "function toMultiplication(num1, num2){\n let product = num1 * num2;\n output(product)\n}", "function multiplyThree(num0, num1, num2){\n let answer = num0 * num1 * num2;\n return answer;\n}", "function multiplyByTwo(number) {return number * 2;}", "function multiply(a, b){\n return a * b\n}", "function calculateMultiply(a, b) {\n return a * b\n}", "function product(num1, num2) {\r\n return num1 * num2\r\n}", "function multiply(a, b) {\n return a * b;\n}", "function multiply(a, b) {\n return a * b;\n}", "function multiply(a, b) {\n return a * b;\n}", "function multiply(a, b) {\n return a * b;\n}", "function multiply(a, b) {\n return a * b;\n}", "function multiply(a, b) {\n return a * b;\n}", "function mul(n1, n2){\n return n1 * n2;\n}", "function multiplication(a, b) {\r\n\treturn a * b;\r\n}", "function multiply(a,b){\n return a * b\n}", "function multiply(a, b) {\n\treturn a*b;\n}", "function multiply(a, b) {\n\treturn a*b;\n}", "function multiply(a,b) {\n return a*b;\n}", "function multiply(a,b) {\n return a*b;\n}", "function multiply(a,b) {\n return a*b;\n}", "function multiply(a, b){\n return a * b;\n}", "function mul(n1,n2) {\n return n1*n2; \n}", "function multiplyNums(a,b) {\n sum = a * b;\n console.log(\"This is the Answer to Task D ----> \" + sum);\n}", "function multipli(num1, num2) {\nreturn num1*num2 + \"<br>\";\n}", "function multiply(a,b){\n return a * b;\n}", "function multiply (a, b) {\n\treturn a * b;\n}", "function multiply (a, b) {\n\treturn a * b;\n}", "function multiply(a, b) {\n return a * b;\n}", "function multiply(a, b) {\n return a * b;\n}", "function multiply(a, b) {\n return a*b;\n}", "function multiply(a, b) {\n return a*b;\n}", "function multiply (a, b) {\n return a * b;\n}", "function Multiply(value1, value2){\n var answer = value1 * value2;\n return answer;\n}", "function multiply(first_operand , second_operand){\n return first_operand * second_operand\n}", "function multiply(a,b) {\n return a*b;\n}", "multiply(times) {\n\n }", "function multiplyEm(num1, num2) {\n var product = num1 * num2;\n return product\n}", "function Multinum(numbers){\n this.numbers= 5;\n this.numbers= 6;\n this.numbers= numbers * numbers ;\n this.multiply= function(){\n return number * number;\n console.log(); \n }\n\n}", "function multiply(n1,n2) {\n var result = n1*n2;\n // console.log(result);\n return result;\n}", "function mul(n1, n2) {\n return n1 * n2;\n}", "multiply(a, b) {\n return a * b\n }", "function multiplyBoth (num1, num2) {\n return num1 * num2;\n}", "function multiply(num1, num2) {\n const a = toInteger(num1);\n const b = toInteger(num2);\n return (a.num * b.num) / (a.times * b.times);\n}", "function multiply(parameter1, parameter2) {\n return parameter1 * parameter2;\n}" ]
[ "0.87625736", "0.8323231", "0.8177905", "0.8046964", "0.8020497", "0.8019717", "0.8019717", "0.7984211", "0.7984211", "0.7974034", "0.7952212", "0.7936247", "0.79324836", "0.79324836", "0.79324836", "0.7925046", "0.79035467", "0.7876551", "0.7863656", "0.7816884", "0.7812884", "0.78032887", "0.7777617", "0.77773523", "0.77585185", "0.77585185", "0.7727918", "0.7720916", "0.77101564", "0.77079105", "0.76947635", "0.76818734", "0.7680123", "0.7675014", "0.76722264", "0.7658617", "0.7652568", "0.7642416", "0.76260954", "0.76216185", "0.76124644", "0.76062536", "0.7570088", "0.7554658", "0.7544368", "0.75362164", "0.75161964", "0.7495202", "0.7494144", "0.74929", "0.7489323", "0.7487387", "0.7474724", "0.7468414", "0.7448212", "0.7446797", "0.7441386", "0.7423357", "0.74180776", "0.7415541", "0.74138314", "0.73991364", "0.7398046", "0.7398046", "0.7398046", "0.7398046", "0.7398046", "0.7398046", "0.7398029", "0.7390996", "0.7390824", "0.7390321", "0.7390321", "0.73853964", "0.73853964", "0.73853964", "0.7380005", "0.7368826", "0.7368629", "0.73604095", "0.7357689", "0.7355597", "0.7355597", "0.7352559", "0.7352559", "0.7341009", "0.7341009", "0.73408926", "0.7340415", "0.73368573", "0.7333724", "0.7327966", "0.73212206", "0.7315574", "0.73124266", "0.7294532", "0.7288411", "0.72734857", "0.7254053", "0.72433287" ]
0.86278033
1
Below this comment, create a function named clear, which accepts no parameters. The function should clear the contents of the elements with the ids of resultadd and resultmult
function clear() { $('#result-add').text(""); $('#result-mult').text(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear(){\n firstNumber = \"\";\n secondNumber = \"\";\n result = 0;\n operator = \"\";\n operatorClicked = false;\n $(\"#first-number\").empty();\n $(\"#second-number\").empty();\n $(\"#operator\").empty();\n $(\"#result\").empty();\n }", "function clearAll() {\r\n document.getElementById('num1').innerHTML = '';\r\n document.getElementById('num3').innerHTML = '';\r\n document.getElementById('operador').innerHTML = '';\r\n document.getElementById('resultado').innerHTML = '0';\r\n}", "function clear() {\n\tconsole.log('clear function')\n\tdocument.getElementById('input-1').value = ''\n\tdocument.getElementById('input-2').value = ''\n\tdocument.getElementById('input-3').value = ''\n\n\tdocument.getElementById('result-1').innerHTML = ''\n\tdocument.getElementById('result-2').innerHTML = ''\n\tdocument.getElementById('result-3').innerHTML = ''\n}", "function clearResult() {\n $(\"#resultEl\").html(\"\");\n }", "function clearCalc() {\n clearNum();\n clearOp();\n}", "function clear(){\n var node = document.getElementById(\"results\");\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n}", "function clearResults() {\n \"use strict\";\n document.getElementById(\"resultNumberCount\").value = \"\";\n document.getElementById(\"resultNumberTotal\").value = \"\";\n document.getElementById(\"resultWordCount\").value = \"\";\n}", "function clearAll() {\n opChain = [0];\n display.innerHTML = \"0\";\n displaySub.innerHTML = \"\";\n}", "function clear() {\n screen.textContent = \"0\";\n firstOperand = \"\";\n secondOperand = \"\";\n currentOperation = null;\n}", "function allClearFunction() {\n expression = \"\";\n result =\"\";\n document.querySelector('#expression').innerHTML = expression;\n document.querySelector('#result').innerHTML = result;\n}", "function clearResults() {\r\n\t$('.card-query-result').each(function() {\r\n\t\tthis.remove();\r\n\t});\r\n}", "function clearData() {\n var number1 = document.getElementById('num1').value = '';\n var number2 = document.getElementById('num2').value = '';\n result.innerHTML = 'Result: ';\n}", "function clearAll () {\n lastNum = \"\";\n theNum = \"\";\n result = \"\";\n viewer.innerHTML = \"\";\n }", "function clearvar(name =''){\r\n dis1Num += dis2Num+ ' ' + name + ' '\r\n display1Ele.innerText = dis1Num\r\n display2Ele.innerText = ''\r\n dis2Num = ''\r\n tempResultEle.innerText = result\r\n}", "function clear() {\n\t//this function will clear all stored data for the following varible\n //allowing the user to start fresh and NOT conintue with the same 1st equation\n calDisplay.value = 0;\n\t\tnum1 = null;\n num2 = null;\n operator = undefined;\n}", "function clear() {\n $(\"#main\").empty();\n $(\"#question\").empty();\n $(\".btn\").empty();\n $(\"#results\").empty();\n $('#button1').addClass(\"hide\")\n $('#button2, #button3, #button4').removeClass(\"hide\", \"clear\");\n}", "function clearCalculator() {\n $('#operator').empty();\n $('#answer').empty();\n $('#x').empty();\n $('#y').empty();\n // document.getElementById('xAndY').reset(); //needed for base mode\n console.log('calculator cleared');\n}", "function clearVar(name = \"\") {\n dis1Num += dis2Num + \" \" + name + \" \";\n display1El.innerText = dis1Num;\n display2El.innerText = \"\";\n dis2Num = \"\";\n tempResultEl.innerText = result;\n}", "function reset(){\n var resultContentsId = [\"result-title\", \"wins\", \"losses\", \"unanswered\", \"restart\"];\n for (var ele in resultContentsId){\n document.querySelector(\"#\"+resultContentsId[ele]).remove();\n }\n\n right = 0;\n wrong = 0;\n unanswered = 0;\n seconds = 30;\n qNum = 1;\n addQuestion();\n\n}", "function clearResults() {\n document.getElementById(\"results\").innerHTML = \"\";\n}", "function clearAll() {\n clearInputs();\n num1 = '';\n num2 = '';\n inputOperator = '';\n updateCalculatorDisplay();\n}", "function clearAll() {\n tempNumber = '';\n firstNumber = '';\n secondNumber = '';\n displayNum = '';\n opperator = '';\n display.textContent = 0;\n subDisplay.textContent = \"\";\n}", "function clear(){\n\n\tdisplay.textContent = '';\n\tcalculation['operand'] = '';\n\tcalculation['operand2'] = '';\n\tcalculation['operator'] = '';\n\tcalculation['operator2'] = '';\n}", "function clearAll() {\r\r\n calcNum = [];\r\r\n currentNum = \"\";\r\r\n lastButton = \"\";\r\r\n lastNum = \"\";\r\r\n lastOper = \"\";\r\r\n isPercentage = false;\r\r\n isDecimal = false;\r\r\n $(\".viewport\").html(\"\");\r\r\n}", "function clearAll() {\n calculation.textContent = \"\";\n calcDisplay.textContent = 0;\n return;\n}", "function resetResult(idName) {\n document.getElementById(idName).innerText = \"\"\n}", "function clearUp() {\n todoList.innerHTML=\"\";\n display1El.innerHTML = '0';\n display2El.innerHTML = '0';\n dis1Num = '';\n dis2Num = '';\n result = '';\n tempResultEl.innerText = '0';\n priceDiv.innerText = '0.00';\n}", "function clearExercise(){\n var exerciseDiv = document.getElementById(\"exercise\")\n var equipmentDiv = document.getElementById(\"equipmentResult\");\n var bpDiv = document.getElementById(\"bpResult\");\n exerciseDiv.innerHTML = \"\";\n equipmentDiv.innerHTML = \"\";\n bpDiv.innerHTML = \"\";\n return clearExercise\n}", "function clearAll() {\n\tdocument.getElementById(\"r1c1\").innerHTML = \"\";\n\tdocument.getElementById(\"r1c2\").innerHTML = \"\";\n\tdocument.getElementById(\"r1c3\").innerHTML = \"\";\n\tdocument.getElementById(\"r2c1\").innerHTML = \"\";\n\tdocument.getElementById(\"r2c2\").innerHTML = \"\";\n\tdocument.getElementById(\"r2c3\").innerHTML = \"\";\n\tdocument.getElementById(\"r3c1\").innerHTML = \"\";\n\tdocument.getElementById(\"r3c2\").innerHTML = \"\";\n\tdocument.getElementById(\"r3c3\").innerHTML = \"\";\n}", "function clearAll(){\n $(\"#transactions\").empty()\n $(\"#variables\").empty()\n}", "function clearResults() {\n\t$('.results').text('');\n}", "function allClear () {\n calcDisplay.displayValue = '0';\n calcDisplay.firstOperand = null;\n calcDisplay.waitForSecondOperand = false;\n calcDisplay.operator = null;\n console.log('All Cleared');\n}", "function clear() {\n num1 = '';\n num2 = '';\n operand = '';\n displayWindow.innerHTML = 0;\n equalTemp = undefined;\n eqPress = false;\n}", "function clearResults() {\n\t\t// Re-display loading icons\n\t\tdocument.getElementById(\"loadingmeaning\").style.display = \"inline\";\n\t\tdocument.getElementById(\"loadinggraph\").style.display = \"inline\";\n\t\tdocument.getElementById(\"loadingcelebs\").style.display = \"inline\";\n\t\t\n\t\t// Clear old results\n\t\tdocument.getElementById(\"meaning\").innerHTML = \"\";\n\t\tdocument.getElementById(\"graph\").innerHTML = \"\";\n\t\tdocument.getElementById(\"celebs\").innerHTML = \"\";\n\t\t\n\t\t// Hide \"no results\" error message\n\t\tdocument.getElementById(\"norankdata\").style.display = \"none\";\n\t}", "function clear() {\n op = '';\n a = '';\n b = '';\n displayValue = '0';\n}", "function clearButton(){\n \tnumbers = [];\n calc = []\n result = 0;\n var display = $('.display');\n display.text(\"\");\n\tconsole.log(numbers);\n}", "function clearResult(){\r\n var input = document.getElementById(\"calc\");\r\n input.value = \" \";\r\n}", "function resetResultDisplay() {\n\n document.getElementById(\"result1\").value = \" \";\n document.getElementById(\"result2\").value = \" \";\n document.getElementById(\"result3\").value = \" \";\n document.getElementById(\"result4\").value = \" \";\n}", "function clearDisplay() {\n result = 0;\n recentOp = \"\";\n keySelect.display.value = \"\";\n newNum = true;\n }", "function deleteAll(){\n\t\n\tanimateButtons('deleteAll');\n\t\n\tresText=\"\";\n\tresNum=0;\n\tnumberInstMemo=0;\n\tdocument.getElementById(\"resNum\").innerHTML = resNum;\n\n\tprevTypeOperator='sum';\n\toperations('z');\n\tprevTypeOperator='sum';\n\n\tdocument.getElementById(\"resText\").innerHTML = \"___\";\n}", "function clearElements() {\n\tconsole.log(\"Executed clearHtmlDivs() --> \");\n\n\t$(\"#start-button\").empty();\n\t$(\"#time-remaining\").empty();\n\t$(\"#answers-buttons\").empty();\n\t$(\"#question-status\").empty();\n\t$(\"#answer-text\").empty();\n\t$(\"#answer-image\").empty();\n\t$(\"#stats\").empty();\n\t$(\"#restart-button\").empty();\n}", "function resetResultContent(){\r\n document.getElementById(\"result\").innerHTML = \"\";\r\n}", "function clearDisplay()\n{\n const clear = document.querySelector(`#clear`);\n\n clear.addEventListener(`click`, function()\n {\n resetArray();\n resetTotal();\n resetOperator();\n\n updateDisplay(inputArray);\n });\n}", "function clearTables() {\n /* Remove all elements from id answer-list\n * in ANSWERS LIST PAGE */\n $(\"#answer-list\").empty();\n \n /* Remove all elements from id result-list\n * in RESULT PAGE */\n $(\"#result-list\").empty();\n}", "function clearResults(){\n $(\"#current-conditions\").empty();\n $(\".forecast-card\").empty();\n}", "function cAllClear() {\n // AC\n zeroValues();\n document.getElementById(\"total\").textContent = \"0\";\n document.getElementById(\"outputTyped\").textContent = \"0\";\n oldTotal = 0;\n}", "function clearLists()\n\t\t\n\t\t{\n\t\t\n\t document.getElementById('question').getElementsByTagName('img')[0].style.display = \"none\";\n\t document.getElementById('list1').innerHTML = \"\";\n\t document.getElementById('list2').innerHTML = \"\";\n\t document.getElementById('list3').innerHTML = \"\";\n\t document.getElementById('forQuantComparision').innerHTML =\"\";\n\t\n\n\t\t\n\t\t}", "function clearValues(){\n let resultsBox = document.querySelector(\".results\");\n resultsBox.value = \"\";\n}", "function clearAll(val){\n document.getElementById(\"calc\").value = \"\";\n}", "function clears(){\n console.log(\"Inside clear\");\n currentValue = \"\";\n //inside of html doc find the element with an id value \"\"\n document.getElementById(\"result\").value = \"\";\n}", "function clearLists()\n\t\t\n\t\t{\n\t\t\n\n\t document.getElementById('question').getElementsByTagName('img')[0].style.display = \"none\";\n\t document.getElementById('list1').innerHTML = \"\";\n\t document.getElementById('list2').innerHTML = \"\";\n\t document.getElementById('list3').innerHTML = \"\";\n\t document.getElementById('forQuantComparision').innerHTML = \"\";\n\t\n $('#directsubmit').css({\"display\":\"none\"});\n\t\t\t\t \t $('#withanswer').css({\"display\":\"none\"});\n \n\t\t\n\t\t}", "function clearPressed(){\n inputs = [\"\"];\n $(\"#displayScreen p\").text(0);\n i = 0;\n num1 = null;\n num2 = null;\n operator = null;\n totalInt1= null;\n totalInt2 = null;\n storeNum2 = null;\n equalFire = false;\n\n}", "function clear() {\n\n }", "function clearAllHandler() {\n\theldValue = null;\n\theldOperation = null;\n\tnextValue = null;\n\t$(\".next-operation\").text(\"\");\n\tupdateDisplay();\n}", "function resetResult() {\n $('#results').empty();\n $('#result').replaceWith('<div id=\"result\">Result = Well you have to calculate something dummy ;P</div>')\n}", "function clearScreen()\n{\n\tdocument.calculator.resultbox.value=\"\";\n}", "function clearMemory(){\n $values.innerText=0;\n numberIsClicked=false;\n operatorIsClicked=false;\n equalsToIsClicked=false;\n myoperator=\"\";\n numberOfOperand=0;\n}", "function clearElements(elementID)\n{\n console.log(\"clearing '\" + elementID + \"'\");\n document.getElementById(elementID).innerHTML = \"\";\n}", "function clear()\r\n{\r\n\tfor ( var i = 0; i < 4; i++ ){\r\n\t\tdocument.getElementById(i+'').innerHTML = '';\r\n\t}\r\n}", "function clearForm()\n {\n document.getElementById(\"operand1\").value = \"\";\n document.getElementById(\"operand1error\").innerHTML = \"\";\n document.getElementById(\"add\").checked = false;\n document.getElementById(\"subtract\").checked = false;\n document.getElementById(\"multiply\").checked = false;\n document.getElementById(\"divide\").checked = false;\n document.getElementById(\"operatorerror\").innerHTML =\"\";\n document.getElementById(\"operand2\").value = \"\";\n document.getElementById(\"operand2error\").innerHTML=\"\";\n document.getElementById(\"result\").innerHTML = \"\";\n }", "function clearQuestionSelectionBoxes() {\n let updateSelectionBox = document.getElementById(\"ivc-question-select-update\");\n let deleteSelectionBox = document.getElementById(\"ivc-question-select-delete\");\n\n updateSelectionBox.innerHTML = \"\";\n deleteSelectionBox.innerHTML = \"\";\n}", "function clear(operation = '') {\r\n history += current+ ' ' + operation + ' ';\r\n historyDisplay.innerText = history;\r\n currentDisplay.innerText = '';\r\n current = '';\r\n tempDisplay.innerText = result;\r\n}", "function _clear() {\n\n // Only clear if call is async. Clearing has no effect for synchronous calls and is also known to cause\n // issues with components that use async set value mechanisms (bug #20770935).\n if ( !lSync ) {\n lAffectedElements$.each(function () {\n $s(this, \"\", null, true);\n });\n }\n }", "function clearOldResults() {\n const res = document.getElementById('res');\n const child = res.firstElementChild;\n if (child !== null) {\n res.removeChild(child); \n }\n}", "function clearScreen(){\n calculator.displayValue='0';\n calculator.firstOperand=null;\n calculator.waitingForSecondOperand=true;\n calculator.operator=null;\n \n}", "function DisplayClearAll() {\n document.getElementById('FormulaDisplay').getElementsByTagName('span')[0].innerHTML = \"Formula\";\n document.getElementById('ResultDisplay').getElementsByTagName('span')[0].innerHTML = \"Result\";\n}", "function clearScreen(resultDivName) {\n const resultsNode = document.getElementById(resultDivName);\n while (resultsNode.firstChild) {\n resultsNode.firstChild.remove();\n }\n}", "function calcClear() {\n firstNumb = null;\n secondNumb = null;\n totalSum = 0;\n operator = null;\n calcHistory = ''\n inputHistory.textContent = '';\n clearDisplay();\n}", "function onClickClearAll() {\n strDisplay = \"\";\n opHidden = [];\n opHiddenIndex = 0;\n operandoType = 0;\n openParIndex = 0;\n closeParIndex = 0;\n refreshDisplay();\n}", "function clear() {\n\t$('.answerbox').remove();\n}", "function clearResultsDiv() {\n \"use strict\";\n document.getElementById('results').style.display = 'none';\n}", "function clearAllDynamicElements()\n{\n div1.innerHTML = \"\";\n div2.innerHTML = \"\";\n div3.innerHTML = \"\";\n}", "function getClear() {\n document.getElementById('result').innerHTML = \"\";\n document.getElementById('error').innerHTML = \"\";\n document.getElementById('course').innerHTML = \"\";\n}", "function reset(){\n //resets original variable back to \"\"\n finalOperator = \"\";\n firstVal = \"\";\n currentValue = \"\";\n secondVal = \"\";\n console.log(\"inside reset\")\n //inside of html doc find the element with an id value \"\"\n document.getElementById(\"result\").value = \"\";\n}", "function clearCalculations() {\n $('.field').val('');\n }", "function clear() {\n operActual = \"\";\n operAnterior = \"\";\n operacion = undefined;\n}", "clear() {\n this._clear();\n this._clearPlus();\n }", "function clearAll() {\n clearEntry();\n previousValue = 0;\n currentValue = 0;\n operatorPressed = \"\";\n result = 0;\n hasDoneMath = false;\n hasPrevValue = false;\n hasTooManyDigits = false;\n showBreadcrumbs(\"\");\n showNumberInDisplay(currentValue);\n}", "function clearResults() {\n const previousItems = document.querySelectorAll(\".search__result\");\n previousItems.forEach(node => {\n node.parentNode.removeChild(node);\n })\n}", "function clearScreen(){\n currentOperand='';\n previousOperand='';\n operation=undefined;\n}", "function clearResultSec() {\n resultSec.html(\"\");\n searchMsg.html(\"\");\n }", "function allClear() {\r\n\tdocument.getElementById(\"questionForm\").reset();\r\n }", "function clear_question_result () {\n document.getElementById(\"question_result\").innerText = \"\";\n}", "function clearAnswer() {\n $(\"#result\").empty();\n $(\"#info\").empty();\n $(\"#answerImg\").empty();\n $(\"#nextQuestionTime\").hide();\n}", "function clearList(){\n $('#results-list').empty();\n}", "function clearResult(){\n const searchResults = document.getElementById('companies');\n searchResults.innerHTML = '';\n \n}", "function betterClear(idName, idName2 = \"\", idName3 = \"\", idName4 = \"\"){\n var field = document.getElementById(idName);\n field.innerHTML = '';\n if (idName2){\n var field2 = document.getElementById(idName2);\n field2.innerHTML = '';\n if (idName3){\n var field3 = document.getElementById(idName3);\n field3.innerHTML = '';\n if (idName4){\n var field4 = document.getElementById(idName4);\n field4.innerHTML = '';\n }\n }\n }\n}", "function betterClear(idName, idName2 = \"\", idName3 = \"\", idName4 = \"\"){\n var field = document.getElementById(idName);\n field.innerHTML = '';\n if (idName2){\n var field2 = document.getElementById(idName2);\n field2.innerHTML = '';\n if (idName3){\n var field3 = document.getElementById(idName3);\n field3.innerHTML = '';\n if (idName4){\n var field4 = document.getElementById(idName4);\n field4.innerHTML = '';\n }\n }\n }\n}", "function clearAll() {\n \"use strict\";\n var clear_inputs = confirm( \"Are you sure you want clear all fields?\" );\n if ( clear_inputs ){\n first_num.value = null;\n second_num.value = null;\n symbol.value = null;\n result_num.value = null;\n sign_used = 0;\n\n }\n}", "function clear() {\n current = null;\n previous = null;\n operant = null;\n rePrint = true;\n updateDisplay('0');\n}", "function clearUnitDetails() {\n\n // Set the current Name\n $(\"#txtName\").val(\"\");\n\n // Set the current description\n $(\"#txtDescription\").val(\"\");\n\n // Clear the dimension check boxes\n $('#checkboxCollection input').each(function (index, value) {\n // reset the current checkbox\n $(value).prop('checked', false);\n });\n\n // Clear the Natural Unit and Dimension boxes\n// $(\"#NaturalUnitList\").empty();\n// $(\"#checkboxCollection\").empty();\n\n // Update the active flag\n $(\"#activeFlag\").prop('checked', false);\n\n }", "function clear() {\n\n}", "clearAll() {\n this._operation = [];\n this._lastNumber = 0;\n this._lastOperator = '';\n this.setLastNumberToDisplay();\n }", "function clearAll() {\n shouldAutoClear = false;\n expressionElm.empty();\n tokensElm.empty();\n treeElm.empty();\n resultElm.empty();\n }", "function resetDisplay() {\n\n $(\"#display-results\").empty();\n\n}", "function clear() {\n document.getElementById(\"input\").value = \"\";\n document.getElementById(\"result\").textContent = \"\";\n}", "function onClearClick()\n {\n //Reset all the variables back to their initial state.\n runningTotal = 0;\n currentOperand = 0;\n currentOperator = \"\";\n hasPressedOperand = false;\n hasPressedOperator = false;\n \n //Update the display to show the changes.\n updateDisplay();\n }", "function clearDisplay() {\n rmNodes(document.getElementById('wolframAlphaResponses'));\n rmNodes(document.getElementById('progressDisplay'));\n}", "function clearCalc() {\n document.getElementById(\"calcDisplay\").innerHTML = 0;\n currentValue = \"\";\n saveNumber = \"\";\n useOperator = \"\";\n}", "function clearEverything() {\n document.getElementById(\"previous\").innerText = \"\";\n previousValue = \"\";\n document.getElementById(\"current\").innerText = \"\";\n currentValue = \"\";\n output = \"\";\n operationSymbol = \"\";\n}" ]
[ "0.75346893", "0.73496157", "0.7225813", "0.7215812", "0.71783274", "0.7126384", "0.7084642", "0.7084585", "0.6995309", "0.6990193", "0.6964122", "0.69453734", "0.69334906", "0.69297093", "0.6915465", "0.6910099", "0.68822855", "0.6826975", "0.6822776", "0.6818518", "0.68149287", "0.68130225", "0.6809766", "0.67926145", "0.6778628", "0.67659175", "0.67499864", "0.67498153", "0.67470425", "0.67428833", "0.67284596", "0.6718159", "0.6713622", "0.67117715", "0.67114", "0.6705439", "0.669733", "0.66872627", "0.66872525", "0.6681418", "0.6672205", "0.6656417", "0.66536", "0.6645991", "0.6645847", "0.66264194", "0.6618124", "0.66064715", "0.6605701", "0.66011626", "0.6581781", "0.6579494", "0.65725034", "0.65705824", "0.6567842", "0.6560259", "0.65506303", "0.65497774", "0.6548441", "0.65436274", "0.6528364", "0.6524273", "0.6517649", "0.6514328", "0.6513245", "0.65061283", "0.6501028", "0.6500466", "0.6498398", "0.6497967", "0.6497553", "0.6485679", "0.64853305", "0.64833474", "0.6482316", "0.64707845", "0.6468908", "0.6455734", "0.6443682", "0.6443505", "0.6438897", "0.6435141", "0.64322734", "0.6428601", "0.6425997", "0.6423069", "0.6410902", "0.6410902", "0.641042", "0.64092124", "0.6408162", "0.6404953", "0.64020985", "0.6398952", "0.63975626", "0.6396122", "0.63870823", "0.6384539", "0.638226", "0.6369027" ]
0.797155
0
Helper function to correctly set up the prototype chain, for subclasses.
function extendClass(protoProps, staticProps) { var parent = this , child , _proto ; // Short for extendClass({constructor: function(){...}}) -> extendClass(function(){...}) if ( typeof protoProps == 'function' ) { protoProps = { constructor: protoProps }; } else if(Array.isArray(protoProps)) { protoProps = assign.apply(undefined, [{}].concat(protoProps)); } // The constructor function for the new subclass is either defined by you // (the "constructor" property in your `extend` definition), or defaulted // by us to simply call the parent's constructor. if ( !protoProps || !hop.call(protoProps, 'constructor') || !(child = protoProps.constructor) || child === Object ) { child = function() { if ( this.__super__ ) { return this.__super__('constructor', arguments); } else { return parent.apply(this, arguments); } }; } // Add static properties to the constructor function, if supplied. assign(child, parent, staticProps); // Set the prototype chain to inherit from `parent`, without calling // `parent`'s constructor function. var _super = parent.prototype; child.prototype = _proto = objCreate(_super); _proto.constructor = child; // Add prototype properties (instance properties) to the subclass, // if supplied. assign(_proto, protoProps); // parent's prototype child.__super__ = _super; return child; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ensurePrototypeTraversal(prototype) {\n if (!Object.__proto__) {\n var ancestor = Object.getPrototypeOf(prototype);\n prototype.__proto__ = ancestor;\n if (isBase(ancestor)) {\n ancestor.__proto__ = Object.getPrototypeOf(ancestor);\n }\n }\n }", "function ensurePrototypeTraversal(prototype) {\n if (!Object.__proto__) {\n var ancestor = Object.getPrototypeOf(prototype);\n prototype.__proto__ = ancestor;\n if (isBase(ancestor)) {\n ancestor.__proto__ = Object.getPrototypeOf(ancestor);\n }\n }\n }", "function ensurePrototypeTraversal(prototype) {\n if (!Object.__proto__) {\n var ancestor = Object.getPrototypeOf(prototype);\n prototype.__proto__ = ancestor;\n if (isBase(ancestor)) {\n ancestor.__proto__ = Object.getPrototypeOf(ancestor);\n }\n }\n }", "constructor() {\n super(...arguments);\n var prototype = Object.getPrototypeOf(this);\n }", "constructor() {\n super(...arguments);\n var prototype = Object.getPrototypeOf(this);\n }", "set prototype(value) {}", "function applyPrototype(parent,child){\n\tchild.prototype = Object.create(parent.prototype);\n\tchild.prototype.constructor = child;\n}", "function selfsubclass(self, tmpparent) {\n\tfor (var key in self.prototype) {\n\t\ttmpparent.prototype[key] = self.prototype[key];\n\t}\n self.prototype.super = tmpparent.prototype;\n}", "function inheritPrototype(subType, superType) {\t // 0\n\t \t\t\t\tvar prototype = object(superType.prototype); // 1 \n\t \t\t\t\tprototype.constructor = subType; \t\t\t\t // 2\n\t \t\t\t\tsubType.prototype = prototype;\t\t\t\t\t // 3\n\t \t\t\t}", "function prototypeInheritance() {\n function Workshop(teacher) {\n this.teacher = teacher\n }\n \n Workshop.prototype.ask = function ask(question) {\n console.log(this.teacher, question)\n }\n \n function AnotherWorkshop(teacher) {\n Workshop.call(this, teacher)\n }\n \n AnotherWorkshop.prototype = Object.create(Workshop.prototype)\n \n AnotherWorkshop.prototype.speakUp = function(msg) {\n this.ask(msg.toUpperCase())\n }\n \n const JSRecentParts = new AnotherWorkshop('Bruno')\n JSRecentParts.speakUp('is this inherirance?')\n}", "function prototypeChain() {\n function Workshop(teacher) {\n this.teacher = teacher\n }\n \n Workshop.prototype.ask = function ask(question) {\n console.log(this.teacher, question)\n }\n \n const deepJS = new Workshop('Bruno')\n const react = new Workshop('Kyle')\n \n deepJS.ask('why the sky is blue')\n react.ask('whats the meaning of life?')\n console.log(deepJS.teacher)\n}", "function inheritPrototype(subType, superType){\n var prototype = object(superType.prototype); //create object\n prototype.constructor = subType; //augment object\n subType.prototype = prototype; //assign object\n}", "constructor() {\n var prototype = Object.getPrototypeOf(this);\n }", "function PrototypeBasedClass () {\n}", "function Prototype() {\n }", "function prototypeCheck()\n{\n let car = new protoCar(567);\n\n protoCar.prototype.startCar = function()\n {\n console.log('starting proto '+ this.carId);\n };\n\n car.startCar();\n let car2 = new protoCar(342);\n console.log(car.__proto__); //for object instances, need to use __proto__ than prototype. same as protoCar.prototype. refers same prototype instance\n car.__proto__.speed = 60; //same as protoCar.prototype.speed = 60 //adds new property to prototype, so gets applied to all teh object insatces created using protoCar function.\n protoCar.prototype.avarage = 75; //updates property for existing prototype instance and so all instances created till now and in future will have this property with value 75.\n //if the property is not available on instance, then js cehcks teh proto instance for default value and returns.\n console.log(car.speed, car.__proto__.speed, car.avarage, car.__proto__.avarage);//60 60 75 75\n \n //This set property on object instance and does not update prototype.\n car.speed = 70; \n console.log(car.speed, car.__proto__.speed,car2.speed, car.avarage, car2.avarage); //70 60 60 75 75\n\n //This will create a new instance of ptotoype which will be attached to the new objects created hereafter, but does not affect instances created before this line.\n protoCar.prototype = {avarage: 80};\n let car3 = new protoCar(555);\n console.log(car.__proto__.avarage,car.avarage, car2.__proto__.avarage,car2.avarage,car3.avarage, car3.__proto__.avarage); //75 75 75 75 80 80\n console.log(protoCar.prototype);\n\n car.__proto__ = protoCar.prototype;// this will update teh prototype reference for old object to new prototype\n console.log(car.__proto__.avarage,car.avarage, car2.__proto__.avarage,car2.avarage,car3.avarage, car3.__proto__.avarage); //80 80 75 75 80 80\n\n \n\n //prototype chains: achieves inheritance. classes should be used for cleaner code. classes does not display __proto__ and __proto__.__proto__\n protoCar2.prototype = Object.create(protoVehicle.prototype); //Object.create does not call the constructor method. it links the prototype instance of protovehicle with protoCar.\n protoCar2.prototype.constructor = protoCar2; //this makes sure the type of cosntructor remains that of protoCar2\n\n let car4 = new protoCar2(111);\n console.log(car4); //protoCar2 {type: \"Car\", carId: 111}\n console.log('Protos');\n console.log(car4.__proto__,car4.__proto__.__proto__);//protoCar2 protoVehicle\n\n\n //create object using object.create()\n // let car1 = Object.create(Object.prototype,{name: 'car1',color='blue'});\n // console.log(car1);\n\n}", "function PROTOTYPE(){\n console.log(\"Inheriting from \" + this.prototype + \" to \" + config.name);\n }", "function inheritPrototype(subType, superType){\n var copyOfSuperType = Object.create(superType.prototype) // create object\n copyOfSuperType.constructor = subType // augment object\n subType.prototype = copyOfSuperType // assign object\n}", "function extend(protoProps) {\n var parent = this;\n var child;\n var args = [].slice.call(arguments);\n var prop, item;\n\n // The constructor function for the new subclass is either defined by you\n // (the \"constructor\" property in your `extend` definition), or defaulted\n // by us to simply call the parent's constructor.\n if (protoProps && protoProps.hasOwnProperty('constructor')) {\n child = protoProps.constructor;\n } else {\n child = function () {\n return parent.apply(this, arguments);\n };\n }\n\n // Add static properties to the constructor function from parent\n _.extend(child, parent);\n\n // Set the prototype chain to inherit from `parent`, without calling\n // `parent`'s constructor function.\n var Surrogate = function () { this.constructor = child; };\n Surrogate.prototype = parent.prototype;\n child.prototype = new Surrogate();\n\n // set prototype level objects\n child.prototype._derived = _.extend({}, parent.prototype._derived);\n child.prototype._deps = _.extend({}, parent.prototype._deps);\n child.prototype._definition = _.extend({}, parent.prototype._definition);\n child.prototype._collections = _.extend({}, parent.prototype._collections);\n child.prototype._children = _.extend({}, parent.prototype._children);\n child.prototype._dataTypes = _.extend({}, parent.prototype._dataTypes || dataTypes);\n\n // Mix in all prototype properties to the subclass if supplied.\n if (protoProps) {\n args.forEach(function processArg(def) {\n var omitFromExtend = [\n 'dataTypes', 'props', 'session', 'derived', 'collections', 'children'\n ];\n if (def.dataTypes) {\n _.each(def.dataTypes, function (def, name) {\n child.prototype._dataTypes[name] = def;\n });\n }\n if (def.props) {\n _.each(def.props, function (def, name) {\n createPropertyDefinition(child.prototype, name, def);\n });\n }\n if (def.session) {\n _.each(def.session, function (def, name) {\n createPropertyDefinition(child.prototype, name, def, true);\n });\n }\n if (def.derived) {\n _.each(def.derived, function (def, name) {\n createDerivedProperty(child.prototype, name, def);\n });\n }\n if (def.collections) {\n _.each(def.collections, function (constructor, name) {\n child.prototype._collections[name] = constructor;\n });\n }\n if (def.children) {\n _.each(def.children, function (constructor, name) {\n child.prototype._children[name] = constructor;\n });\n }\n _.extend(child.prototype, _.omit(def, omitFromExtend));\n });\n }\n\n var toString = Object.prototype.toString;\n\n // Set a convenience property in case the parent's prototype is needed\n // later.\n child.__super__ = parent.prototype;\n\n return child;\n}", "function inheritPrototype(A, B) {\n var F = function () {};\n F.prototype = B.prototype;\n A.prototype = new F();\n A.prototype.constructor = A;\n }", "get prototype() {}", "function extend(protoProps) {\n var parent = this;\n var child;\n var args = [].slice.call(arguments);\n\n // The constructor function for the new subclass is either defined by you\n // (the \"constructor\" property in your `extend` definition), or defaulted\n // by us to simply call the parent's constructor.\n if (protoProps && protoProps.hasOwnProperty('constructor')) {\n child = protoProps.constructor;\n } else {\n child = function () {\n return parent.apply(this, arguments);\n };\n }\n\n // Add static properties to the constructor function from parent\n assign(child, parent);\n\n // Set the prototype chain to inherit from `parent`, without calling\n // `parent`'s constructor function.\n var Surrogate = function () { this.constructor = child; };\n Surrogate.prototype = parent.prototype;\n child.prototype = new Surrogate();\n\n // set prototype level objects\n child.prototype._derived = assign({}, parent.prototype._derived);\n child.prototype._deps = assign({}, parent.prototype._deps);\n child.prototype._definition = assign({}, parent.prototype._definition);\n child.prototype._collections = assign({}, parent.prototype._collections);\n child.prototype._children = assign({}, parent.prototype._children);\n child.prototype._dataTypes = assign({}, parent.prototype._dataTypes || dataTypes);\n\n // Mix in all prototype properties to the subclass if supplied.\n if (protoProps) {\n var omitFromExtend = [\n 'dataTypes', 'props', 'session', 'derived', 'collections', 'children'\n ];\n args.forEach(function processArg(def) {\n if (def.dataTypes) {\n forEach(def.dataTypes, function (def, name) {\n child.prototype._dataTypes[name] = def;\n });\n }\n if (def.props) {\n forEach(def.props, function (def, name) {\n createPropertyDefinition(child.prototype, name, def);\n });\n }\n if (def.session) {\n forEach(def.session, function (def, name) {\n createPropertyDefinition(child.prototype, name, def, true);\n });\n }\n if (def.derived) {\n forEach(def.derived, function (def, name) {\n createDerivedProperty(child.prototype, name, def);\n });\n }\n if (def.collections) {\n forEach(def.collections, function (constructor, name) {\n child.prototype._collections[name] = constructor;\n });\n }\n if (def.children) {\n forEach(def.children, function (constructor, name) {\n child.prototype._children[name] = constructor;\n });\n }\n assign(child.prototype, omit(def, omitFromExtend));\n });\n }\n\n // Set a convenience property in case the parent's prototype is needed\n // later.\n child.__super__ = parent.prototype;\n\n return child;\n}", "function peg$subclass(child,parent){function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor}", "function superClass(...args) {}", "function peg$subclass(child,parent){function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();}", "function fixInheritance(subclass, superclass) {\n var proto = subclass.prototype;\n inherits(subclass, superclass);\n subclass.prototype.parent = superclass.prototype;\n for (var mn in proto) {\n subclass.prototype[mn] = proto[mn];\n }\n}", "function __() { this.constructor = subClass; }", "function extend(protoProps) {\n /*jshint validthis:true*/\n var parent = this;\n var child;\n\n // The constructor function for the new subclass is either defined by you\n // (the \"constructor\" property in your `extend` definition), or defaulted\n // by us to simply call the parent's constructor.\n if (protoProps && protoProps.hasOwnProperty('constructor')) {\n child = protoProps.constructor;\n } else {\n child = function () {\n return parent.apply(this, arguments);\n };\n }\n\n // Add static properties to the constructor function from parent\n assign(child, parent);\n\n // Set the prototype chain to inherit from `parent`, without calling\n // `parent`'s constructor function.\n var Surrogate = function () { this.constructor = child; };\n Surrogate.prototype = parent.prototype;\n child.prototype = new Surrogate();\n\n // set prototype level objects\n child.prototype._derived = assign({}, parent.prototype._derived);\n child.prototype._deps = assign({}, parent.prototype._deps);\n child.prototype._definition = assign({}, parent.prototype._definition);\n child.prototype._collections = assign({}, parent.prototype._collections);\n child.prototype._children = assign({}, parent.prototype._children);\n child.prototype._dataTypes = assign({}, parent.prototype._dataTypes || dataTypes);\n\n // Mix in all prototype properties to the subclass if supplied.\n if (protoProps) {\n var omitFromExtend = [\n 'dataTypes', 'props', 'session', 'derived', 'collections', 'children'\n ];\n for(var i = 0; i < arguments.length; i++) {\n var def = arguments[i];\n if (def.dataTypes) {\n forOwn(def.dataTypes, function (def, name) {\n child.prototype._dataTypes[name] = def;\n });\n }\n if (def.props) {\n forOwn(def.props, function (def, name) {\n createPropertyDefinition(child.prototype, name, def);\n });\n }\n if (def.session) {\n forOwn(def.session, function (def, name) {\n createPropertyDefinition(child.prototype, name, def, true);\n });\n }\n if (def.derived) {\n forOwn(def.derived, function (def, name) {\n createDerivedProperty(child.prototype, name, def);\n });\n }\n if (def.collections) {\n forOwn(def.collections, function (constructor, name) {\n child.prototype._collections[name] = constructor;\n });\n }\n if (def.children) {\n forOwn(def.children, function (constructor, name) {\n child.prototype._children[name] = constructor;\n });\n }\n assign(child.prototype, omit(def, omitFromExtend));\n }\n }\n\n // Set a convenience property in case the parent's prototype is needed\n // later.\n child.__super__ = parent.prototype;\n\n return child;\n}", "function inherts(child , parent) {\n child.prototype = Object.create(parent.prototype);\n child.prototype.constructor = child;\n}", "function fixInheritance(subclass, superclass) {\n var proto = subclass.prototype;\n inherits(subclass, superclass);\n subclass.prototype.parent = superclass.prototype;\n for (var mn in proto) {\n subclass.prototype[mn] = proto[mn];\n }\n}", "function fixInheritance(subclass, superclass) {\n var proto = subclass.prototype;\n inherits(subclass, superclass);\n subclass.prototype.parent = superclass.prototype;\n for (var mn in proto) {\n subclass.prototype[mn] = proto[mn];\n }\n}", "function initialize_morph_prototypes()\r\n{\r\n\tregisterControlDicts();\r\n\t//tasks = new TaskServer(script, 100);\r\n\t//flash = new FlashTask();\r\n\t//tasks.addTask(flash.update, null, 1, true, 'Flash');\r\n \t//host.scheduleTask(flush, null, 100);\r\n\thost.scheduleTask(doObject(this, morphFlush), 100);\r\n}", "function AddN3Util(parent, toPrototype) {\n for (var name in N3Util)\n if (!toPrototype)\n parent[name] = N3Util[name];\n else\n parent.prototype[name] = ApplyToThis(N3Util[name]);\n\n return parent;\n}", "function addN3Util(parent, toPrototype) {\n for (var name in N3Util)\n if (!toPrototype)\n parent[name] = N3Util[name];\n else\n parent.prototype[name] = applyToThis(N3Util[name]);\n\n return parent;\n}", "function addN3Util(parent, toPrototype) {\n for (var name in N3Util)\n if (!toPrototype)\n parent[name] = N3Util[name];\n else\n parent.prototype[name] = applyToThis(N3Util[name]);\n\n return parent;\n}", "initialize() {\n // Needs to be implemented by derived classes.\n }", "function p(e,t){function n(){this.constructor=e}N(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "function inheritPrototype(childObject, parentObject) {\n var copyOfParent = Object.create(parentObject.prototype); //ECMA5 compatible\n copyOfParent.constructor = childObject;\n childObject.prototype = copyOfParent;\n}", "function lisp_add_superclass(c, sc) {\n lisp_assert(lisp_is_instance(c, Lisp_Class));\n lisp_assert(lisp_is_instance(sc, Lisp_Class));\n if (!lisp_native_array_contains(c.lisp_superclasses, sc)) {\n c.lisp_superclasses.push(sc);\n }\n return lisp_void;\n}", "function hobbitPrototype(){}", "function defineOnPrototype(ctor, methods) {\n var proto = ctor.prototype;\n forEachProperty(methods, function(val, key) {\n proto[key] = val;\n });\n }", "function extend(cls, name, props) {\n // This does that same thing as Object.create, but with support for IE8\n var F = function() {};\n F.prototype = cls.prototype;\n var prototype = new F();\n\n var fnTest = /xyz/.test(function(){ xyz; }) ? /\\bparent\\b/ : /.*/;\n props = props || {};\n\n for(var k in props) {\n var src = props[k];\n var parent = prototype[k];\n\n if(typeof parent == \"function\" &&\n typeof src == \"function\" &&\n fnTest.test(src)) {\n prototype[k] = (function (src, parent) {\n return function() {\n // Save the current parent method\n var tmp = this.parent;\n\n // Set parent to the previous method, call, and restore\n this.parent = parent;\n var res = src.apply(this, arguments);\n this.parent = tmp;\n\n return res;\n };\n })(src, parent);\n }\n else {\n prototype[k] = src;\n }\n }\n\n prototype.typename = name;\n\n var new_cls = function() { \n if(prototype.init) {\n prototype.init.apply(this, arguments);\n }\n };\n\n new_cls.prototype = prototype;\n new_cls.prototype.constructor = new_cls;\n\n new_cls.extend = function(name, props) {\n if(typeof name == \"object\") {\n props = name;\n name = \"anonymous\";\n }\n return extend(new_cls, name, props);\n };\n\n return new_cls;\n}", "function uf(e,t){function i(){this.constructor=e}Af(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}", "function inheritsFrom(child, parent){\nchild.prototype = Object.create(parent.prototype);\n}", "function setElementProto$1(elm, def) {\n setPrototypeOf$2(elm, def.bridge.prototype);\n } // Typescript is inferring the wrong function type for this particular", "function n(e,t){e.prototype.__proto__=t&&t.prototype,e.__proto__=t}", "function extend(parent, child){\n child.prototype= Object.create(parent.prototype)\n child.prototype.constructor=child\n }", "function a(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function r(e,t){s(e,t),Object.getOwnPropertyNames(t.prototype).forEach(function(o){s(e.prototype,t.prototype,o)}),Object.getOwnPropertyNames(t).forEach(function(o){s(e,t,o)})}", "function SuperclassBare() {}", "function SuperclassBare() {}", "function inherit_protoLess(_class, _base, _extends, original) {\n\t\t\t if (_base != null) {\n\t\t\t var tmp = function () { };\n\t\t\t tmp.prototype = _base.prototype;\n\t\t\t _class.prototype = new tmp();\n\t\t\t _class.prototype.constructor = _class;\n\t\t\t }\n\t\t\t if (_extends != null) {\n\t\t\t arr_each(_extends, function (x) {\n\t\t\t delete x.constructor;\n\t\t\t proto_extend(_class, x);\n\t\t\t });\n\t\t\t }\n\t\t\t proto_extend(_class, original);\n\t\t\t}", "function a(t,e){function a(){}a.prototype=e.prototype,t.superClass_=e.prototype,t.prototype=new a,t.prototype.constructor=t}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function e(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "constructor(){\n super(...arguments);\n if(typeof define === 'function'){\n //define func for this extention.\n //it is called in context of the defineHandle and with the single arg, the same one passed\n //to the constructor at system class instantiation.\n //so, if system class is a composite of extensions, each define func will get the same arg\n //and use just the parameters it needs. the only caveat - dont use same names between extensions\n define.call(this.defineHandle,this);\n }else{\n //another option is a structure of nodes.\n const {defineHandle}=this;\n (function climbTree({myParent,myParentName,me,myName,myMonkey}){\n let me=my;\n if(myParentName){\n me=myParent[myName];\n if(me.connector) myMonkey({\n fromSymColName:myParentName,\n linkDef:_.extend(linkDef,{\n toColName:myName\n })\n });\n return;\n };\n _.each(me,(myKid,myKidName)=>{\n if(typeof myKid !== 'object') return;\n climbTree({\n myParent:me,\n myParentName:myName,\n me:myKid,\n myName:myKidName,\n myMonkey\n })\n });\n })({\n me:define,\n myMonkey:({fromSymColName,linkDef})=>{\n //the monkey gets to build the ass system\n if(!defineHandle[fromSymColName]){\n //create new node\n defineHandle.newCol(fromSymColName);\n }else{\n //we met that guy before. introduce him to a new friend\n defineHandle[fromSymColName].link(linkDef)\n }\n }\n })\n }\n }", "function task1 () {\n \n function Animal(name) {\n this.name = name;\n }\n\n Animal.prototype.walk = function() {\n console.log( \"ходит \" + this.name );\n };\n\n function Rabbit(name) {\n this.name = name;\n }\n Rabbit.prototype = Animal.prototype;\n\n Rabbit.prototype.walk = function() {\n console.log( \"прыгает! и ходит: \" + this.name );\n };\n\n var a = new Animal('a')\n\n var r = new Rabbit('r')\n\n a.walk() // прыгает и ходит????\n r.walk()\n}", "function m(a){var b=function(){};return b.prototype=a,new b}", "function Spriteset_Base() {\n this.initialize.apply(this, arguments);\n}", "function restorePrototype(obj) {\n if (obj != null && obj.type != undefined) {\n obj.__proto__ = findPrototype(obj.type);\n for (var entry in obj) {\n restorePrototype(obj[entry]);\n \n // Deal with the fact arrays don't have names when transferred over JSON\n // Need to restore the name \n if (entry == \"otherLinks\") {\n var otherLinks = obj[entry];\n if (otherLinks == null)\n continue;\n for (var i = 0; i < otherLinks.length; i++) {\n if (isArray(otherLinks[i]))\n otherLinks[i].name = otherLinks[i][0];\n }\n }\n }\n }\n else if (isArray(obj) || isObject(obj)) {\n for (var entry in obj) {\n restorePrototype(obj[entry]);\n }\n }\n return obj;\n}", "function extend(parent) {\n\t\tthis.prototype = Object.create(parent.prototype);\n\t\tthis.prototype.constructor = parent;\n\n\t\tvar d = 0, p = this.prototype;\n\n\t\tthis.prototype.uber = function(args) {\n\t\t\tvar f = d;\n\t\t\tvar t = d;\n\t\t\tvar v = parent.prototype;\n\t\t\tif (t) {\n\t\t\t\twhile (t) {\n\t\t\t\t\tv = v.constructor.prototype;\n\t\t\t\t\tt -= 1;\n\t\t\t\t}\n\t\t\t\tf = v.constructor;\n\t\t\t} else {\n\t\t\t\tf = p.constructor;\n\t\t\t}\n\t\t\td += 1;\n\t\t\tf.apply(v, arguments);\n\t\t\t// hoist the base properties from v into this\n\t\t\tfor ( var prop in v) {\n\t\t\t\tif (typeof v[prop] != \"function\") {\n\t\t\t\t\tthis[prop] = v[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t\td -= 1;\n\t\t\treturn this;\n\t\t};\n\n\t\treturn this;\n\t}", "function findPrototype(type) {\n if (type == \"Instructor\")\n return Instructor.prototype;\n else if (type == \"Folder\")\n return Folder.prototype;\n else if (type == \"Document\")\n return Document.prototype;\n else if (type == \"Assignment\")\n return Assignment.prototype;\n else if (type == \"Course\")\n return Course.prototype;\n else if (type == \"Announcement\")\n return Announcement.prototype;\n else if (type == \"Material\")\n return Material.prototype;\n else if (type == \"Tool\")\n return Tool.prototype;\n else {\n return Object.prototype;\n }\n}", "function extend2(Child, Parent) {\n var p = Parent.prototype;\n var c = Child.prototype;\n for (var i in p) {\n c[i] = p[i]; }\n }", "function subclass(child, parent) {\n child.prototype.__proto__ = parent.prototype;\n}", "function init() {\n setObjectFactory(FluxObjectFactory);\n\n ClassRegistry.initialize();\n ClassRegistry.set('shr.base', 'Entry', EntryFix);\n ClassRegistry.set('shr.encounter', 'Encounter', EncounterFix);\n ClassRegistry.set('shr.core', 'Coding', CodingFix);\n ClassRegistry.set('shr.core', 'CodeableConcept', CodeableConceptFix);\n ClassRegistry.set('shr.base', 'Reason', ReasonFix);\n ClassRegistry.set('shr.medication', 'MedicationRequested', MedicationRequestedFix);\n ClassRegistry.set('shr.base', 'FindingResult', FindingResultFix);\n}", "function theBigBang() {\n\t\tinitLibs();\n\t\tinitFuncs();\n\t\tObject.setPrototypeOf(Universe.prototype, universe.kjsclasses._primitive_prototype);\n\t\tObject.setPrototypeOf(Object.prototype, universe); // [0]\n\t}", "function inherit(subClass, baseClass, opt_prototype) {\r\n function SurrogateClass(){}\r\n SurrogateClass.prototype = baseClass.prototype;\r\n extend(subClass.prototype = new SurrogateClass(), { constructor: subClass, superClass: baseClass }, Object(opt_prototype));\r\n return subClass;\r\n }", "function test2(){ \n var p2 = new Perro();\n /*\n Perro.prototype = new Animal(); \n Perro.prototype.constructor = Perro; \n -- con esto heredamos todos los metodos --\n */\n p2.dormir();\n p2.ladrar();\n p2.jugar();\n p2.morder();\n}", "function Powerup(subclass) {\n\t\t// Merge Entity defaults with subclasses\n\t\tEntity._merge(Powerup, subclass.defaults, Powerup.defaults, subclass.defaults);\n\t}", "function l(t,e){function o(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}", "function ef(e,t){function n(){this.constructor=e}Jd(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "function inherbit( fn1, fn2 ){\n var prototype = Object.create( fn1.prototype );\n prototype.constructor = fn2;\n fn2.prototype = prototype;\n }", "function inderit(C, P) {\n function F() {};\n F.prototype = P.prototype;\n C.prototype = new F();\n}", "function stripPrototypes(obj, seen = new WeakSet) {\n if (typeof obj !== 'object' || obj === null || seen.has(obj)) {\n return obj;\n }\n seen.add(obj);\n Object.setPrototypeOf(obj, null);\n for (const name of Reflect.ownKeys(obj)) {\n stripPrototypes(obj[name], seen);\n }\n return obj;\n}", "function a(t,e){o(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){o(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){o(t,e,n)}))}", "function repeatProtoypes() {\n let Person = function (name, yearOfBirth) {\n this.name = name;\n this.yearOfBirth = yearOfBirth;\n };\n Person.prototype.calculateAge = function () {\n console.log(2019 - this.yearOfBirth);\n };\n Person.prototype.job = 'developer';\n\n // Inherits from constructor prototype property\n let jakub = new Person('Jakub', 1993);\n let martin = new Person('Martin', 1992);\n\n jakub.calculateAge(); // 23\n martin.calculateAge(); // 24\n console.log(jakub.job); // developer\n console.log(jakub.__proto__ === Person.prototype); // true\n console.log(jakub.hasOwnProperty('job')); // false\n console.log(jakub instanceof Person); // true\n console.info([1, 2, 3]); // (3) [1, 2, 3]\n console.dir([1, 2, 3]); // Array(3)\n}", "function e(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}", "function extend( child, parent )\r\n{\r\n\tfor( prop in parent )\r\n\t{\r\n\t\tif( !(prop in child ) && prop != 'prototype' )\r\n\t\t{\r\n\t\t\tchild[prop] = parent[prop];\t\r\n\t\t}\r\n\t}\r\n\t\r\n\tfor( prop in parent.prototype )\r\n\t{\r\n\t\tif( !(prop in child.prototype ) )\r\n\t\t{\r\n\t\t\tchild.prototype[prop] = parent.prototype[prop];\t\r\n\t\t}\r\n\t}\r\n}", "function Hn(e,t){function n(){this.constructor=e}Vn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "function extendNatives(prototypes) {\n prototypes === true && (prototypes = [\"make\", \"beget\", \"extend\"]);\n\n if (!Object.getOwnPropertyDescriptors) {\n Object.defineProperty(Object, \"getOwnPropertyDescriptors\", {\n value: pd,\n configurable: true\n });\n }\n if (!Object.extend) {\n Object.defineProperty(Object, \"extend\", {\n value: pd.extend,\n configurable: true\n });\n }\n if (!Object.make) {\n Object.defineProperty(Object, \"make\", {\n value: pd.make,\n configurable: true\n });\n }\n if (!Object.beget) {\n Object.defineProperty(Object, \"beget\", {\n value: beget,\n configurable: true\n })\n }\n if (!Object.prototype.beget && prototypes.indexOf(\"beget\") !== -1) {\n Object.defineProperty(Object.prototype, \"beget\", {\n value: operateOnThis(beget), \n configurable: true\n });\n }\n if (!Object.prototype.make && prototypes.indexOf(\"make\") !== -1) {\n Object.defineProperty(Object.prototype, \"make\", {\n value: operateOnThis(make),\n configurable: true\n });\n }\n if (!Object.prototype.extend && prototypes.indexOf(\"extend\") !== -1) {\n Object.defineProperty(Object.prototype, \"extend\", {\n value: operateOnThis(extend),\n configurable: true\n });\n }\n if (!Object.Name) {\n Object.defineProperty(Object, \"Name\", {\n value: Name,\n configurable: true\n });\n }\n return pd; \n }", "function createPrototype(allTruths) {\n\n // FOR EACH LOOP til hver student, der skal printes til eget array - PROTOTYPE\n \n allTruths.forEach(truth => {\n\n // CREATE Prototype object og lav til variable - Uppercase er prototype og lowercase student object\n let truthProto = Object.create(Truth);\n \n // Tager funktionen/method fra min prototype array, der sætter data\n truthProto.setDATA(truth);\n \n \n // PUSH TIL eget array med prototype \n arrayOfTruths.push(truthProto);\n\n \n });\n\n console.log(\"Manipulation array: \",arrayOfTruths);\n\n}", "_init() {\n throw new Error('_init not implemented in child class');\n }", "function _e(e,t){function r(){this.constructor=e}ke(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}", "function Subclass(derivedConstructor, baseConstructor)\n{\n protoConstructor.prototype = baseConstructor.prototype;\n protoConstructor.prototype.constructor = baseConstructor;\n function protoConstructor()\n {\n }\n \n derivedConstructor.prototype = new protoConstructor();\n derivedConstructor.prototype.constructor = derivedConstructor;\n}", "function inheritFrom(subfn,superfn) {\n\tvar r = function () {}\n\tr.prototype = superfn.prototype;\n\tsubfn.prototype = new r();\n}", "function hintSuper(prototype) {\n // tag functions with their prototype name to optimize\n // super call invocations\n for (var n in prototype) {\n var pd = Object.getOwnPropertyDescriptor(prototype, n);\n if (pd && typeof pd.value === 'function') {\n pd.value.nom = n;\n }\n }\n }", "function hintSuper(prototype) {\n // tag functions with their prototype name to optimize\n // super call invocations\n for (var n in prototype) {\n var pd = Object.getOwnPropertyDescriptor(prototype, n);\n if (pd && typeof pd.value === 'function') {\n pd.value.nom = n;\n }\n }\n }", "function l(e,t){function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}", "function super(_type, _object) {\n //TODO: Validar que sea una instancia a subclase del tipo dado\n //TODO: soportar distintos tipos incluso el mismo tipo de la base que le pase el primero de __bases__\n var obj = {};\n if (type(_object) == Function) {\n if (_type && issubclass(_object, _type))\n var base = _type.__base__;\n else if (!_type)\n var base = window.object;\n else\n var base = _type;\n } else {\n if (isinstance(_object, _type))\n var base = _type.prototype;\n else\n throw new TypeError('Nonno');\n }\n var object = _object;\n obj.__noSuchMethod__ = function(name, args) {\n if (args[args.length - 1] && args[args.length - 1] instanceof Arguments)\n return base[name].apply(_object, args.slice(0, -1).concat(args[args.length -1].argskwargs));\n else\n return base[name].apply(_object, args);\n };\n return obj;\n }", "function i(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){a(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){a(t,e,n)}))}", "function i(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){a(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){a(t,e,n)}))}", "function inherit(){}", "function hintSuper(prototype) {\r\n // tag functions with their prototype name to optimize\r\n // super call invocations\r\n for (var n in prototype) {\r\n var pd = Object.getOwnPropertyDescriptor(prototype, n);\r\n if (pd && typeof pd.value === 'function') {\r\n pd.value.nom = n;\r\n }\r\n }\r\n }", "function a(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?RS(t):(i.prototype=t.prototype,new i)}", "function initClassAndMetaclass (klass) {\n initClass(klass);\n initClass(klass.a$cls);\n }", "function i(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach(function(n){a(t.prototype,e.prototype,n)}),Object.getOwnPropertyNames(e).forEach(function(n){a(t,e,n)})}", "function i(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach(function(n){a(t.prototype,e.prototype,n)}),Object.getOwnPropertyNames(e).forEach(function(n){a(t,e,n)})}", "function extend(prototype, api) {\n if (prototype && api) {\n // use only own properties of 'api'\n Object.getOwnPropertyNames(api).forEach(function(n) {\n // acquire property descriptor\n var pd = Object.getOwnPropertyDescriptor(api, n);\n if (pd) {\n // clone property via descriptor\n Object.defineProperty(prototype, n, pd);\n // cache name-of-method for 'super' engine\n if (typeof pd.value == 'function') {\n // hint the 'super' engine\n pd.value.nom = n;\n }\n }\n });\n }\n return prototype;\n }", "function extend(prototype, api) {\n if (prototype && api) {\n // use only own properties of 'api'\n Object.getOwnPropertyNames(api).forEach(function(n) {\n // acquire property descriptor\n var pd = Object.getOwnPropertyDescriptor(api, n);\n if (pd) {\n // clone property via descriptor\n Object.defineProperty(prototype, n, pd);\n // cache name-of-method for 'super' engine\n if (typeof pd.value == 'function') {\n // hint the 'super' engine\n pd.value.nom = n;\n }\n }\n });\n }\n return prototype;\n }" ]
[ "0.6313063", "0.6313063", "0.6313063", "0.6218673", "0.6218673", "0.62085706", "0.6169029", "0.6086806", "0.60661626", "0.59716296", "0.5958745", "0.5922943", "0.5864225", "0.5810853", "0.5806519", "0.57948834", "0.5777991", "0.5721786", "0.564515", "0.56209916", "0.5598791", "0.55970234", "0.5574186", "0.5563324", "0.5554986", "0.55327034", "0.5516711", "0.55109763", "0.5508229", "0.5421318", "0.5421318", "0.5413642", "0.53933346", "0.53656125", "0.53656125", "0.5348937", "0.53478944", "0.53451043", "0.5323955", "0.53165865", "0.5297031", "0.52949584", "0.5253491", "0.5236495", "0.5215421", "0.52135545", "0.5213456", "0.5203752", "0.52027744", "0.5174162", "0.5174162", "0.5163893", "0.5156471", "0.5140976", "0.5140976", "0.5140976", "0.5132065", "0.5129675", "0.51288515", "0.51124686", "0.5103316", "0.510103", "0.5091133", "0.50888884", "0.5085088", "0.50781286", "0.50736547", "0.5069448", "0.50668126", "0.5065774", "0.50552547", "0.5047473", "0.5041948", "0.5041128", "0.5031605", "0.5024363", "0.50227433", "0.50195533", "0.49969846", "0.4991842", "0.49706027", "0.4969911", "0.49564618", "0.4953875", "0.49454415", "0.49352586", "0.4935239", "0.49344128", "0.49344128", "0.49272943", "0.49260113", "0.49251175", "0.49251175", "0.49129498", "0.49120846", "0.49006593", "0.49000743", "0.48957238", "0.48957238", "0.48953375", "0.48953375" ]
0.0
-1
This function is intended for debug only!
function funcName(f) { var n = f.displayName || f.name; if(!n) { n = (f+'').match(/function\s+([^\(]*)/); if(n) { n = n[1]; } else n = undefined; } return n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "function devDebug(){\n\n}", "transient private protected internal function m182() {}", "function debug(v){return false;}", "static private protected internal function m118() {}", "static final private internal function m106() {}", "debug() {}", "function dBug(s) {\n\t// uncomment out for debug\n\t//console.log(s);\n}", "static private internal function m121() {}", "transient private internal function m185() {}", "transient final protected internal function m174() {}", "transient protected internal function m189() {}", "static transient final protected internal function m47() {}", "transient final private protected internal function m167() {}", "function debug() {document.write('<div style=\"background:red;color:white;\">'+ this.buildExpandedUrl() +'</div>');}", "static private protected public internal function m117() {}", "function StupidBug() {}", "function kp() {\n $log.debug(\"TODO\");\n }", "static transient final private internal function m43() {}", "function showDebugInfo() {\n\t\t\tconsole.log();\n\t\t}", "debug()\n {\n for (let i = 0; i < this.canvases.length; i++)\n {\n const canvas = this.canvases[i]\n console.log('yy-rendersheet: Sheet #' + (i + 1) + ' | size: ' + canvas.width + 'x' + canvas.height + ' | resolution: ' + this.resolution)\n }\n }", "static transient private protected internal function m55() {}", "static transient final private protected internal function m40() {}", "function xxxdebugProperties(jo){\n\tconsole.log('\\n\\n' + jo.data['xath' ] + '\\n\\n' + jo.data['cod']\n\t + '\\n\\n' + jo.data['idn' ] + '\\n\\n' + jo.data['pk' ]\n\t + '\\n\\n' + jo.data['textQr'] + '\\n\\n');\n}", "function JavaDebug() {\r\n}", "function debugging() {\r\n\tvar setup = x2.loadPERPacket('/home/eyalc/x2-tests/test1-singlecell-HCANR-goodERFCAN/setup.per', true);\r\n\tvar deletep = x2.loadPERPacket('/home/eyalc/x2-tests/test1-singlecell-HCANR-goodERFCAN/delete_cell.per', true);\r\n\tvar add = x2.loadPERPacket('/home/eyalc/x2-tests/test1-singlecell-HCANR-goodERFCAN/add_cells.per', true);\r\n\tvar setupHelper = new ASNPathHelper(setup);\r\n\tvar addHelper = new ASNPathHelper(add);\r\n\tvar deleteHelper = new ASNPathHelper(deletep);\r\n\t\r\n\tprint('setup.per');\r\n\tprint(setupHelper.printSubtree());\r\n\tprint('add.per');\r\n\tprint(addHelper.printSubtree());\t\r\n\tprint('delete.per');\r\n\tprint(deleteHelper.printSubtree());\r\n}", "function testToDebug() {\n console.log(\"\\ntesting toDebug...\");\n \n console.log(\"a\");\n let lis = list(1,2,3,list(4,5));\n console.log(\"b\");\n let lis2 = \"nil\";\n console.log(\"c\");\n console.log(toDebug(null));\n console.log(\"cc\");\n console.log(cons(1,\"nil\").toString());\n console.log(\"ccc\");\n console.log(list(1).toString());\n console.log(\"cccc\");\n console.log(toDebug(lis));\n console.log(\"d\");\n //console.log(toDebug(lis2));\n console.log(\"e\");\n \n console.log();\n console.log();\n}", "transient final private internal function m170() {}", "function debug()\n {\n var i;\n \n if (debugging)\n {\n for (i = 0; i < arguments.length; i++)\n {\n HTMLDebugInfo.innerHTML += arguments[i].toString() + \"<br>\";\n }\n } \n }", "static transient final protected public internal function m46() {}", "function debugCallback(err) {\n if (err) {\n debug(err);\n }\n }", "function InternalBreakpointState() { }", "static transient private protected public internal function m54() {}", "function debug_reset(){\n debug_executed = false\n debug[\"debug object.self\"][1] ? console.log(\"ready\") : \"\"\n }", "printDebugLog() {\n this.printMemoryForDebug(this.memory, this.pointer);\n console.debug(`pointer is at ${this.pointer}`);\n console.debug(`relative base is ${this.base}`);\n console.debug(`flags: J:${this.flags.jumped ? 'X' : '-'}`);\n console.debug(`input queue: ${this.input}`);\n console.debug(`output queue: ${this.output}`);\n console.debug('');\n }", "function RainbowDebug() {\r\n}", "function debug(msg){\n\n \t// comment out the below line while debugging\n \t \t//console.log(msg);\n }", "function myDebug(){\n if(window.console) console.info(arguments);\n}", "function logbs(data) {\n chrome.storage.sync.get('debugMode', function(response) {\n if (response.debugMode) {\n console.log(data);\n }\n });\n}", "function debugLog(data){\n\t if(DEBUG !== 1) return false;\n\n\tconsole.log(data);\n}", "transient private protected public internal function m181() {}", "function debugInfo(){\n\tif(!debug) return;\n\tvar s = '', min, max;\n\n\tfor(min=posActual; link[min-1]!==undefined; min--) continue;\n\ts+= mostrarLinks(min, min+3);\n\tif(min+4 < posActual-3) s+= '...\\n' + mostrarLinks(posActual-3, posActual+3);\n\telse s+= mostrarLinks(min+4, posActual+3);\n\n\tfor(max=posActual; link[max+1]!==undefined; max++) continue;\n\tif(posActual+4 < max-3) s+= '...\\n' + mostrarLinks(max-3, max);\n\telse s+= mostrarLinks(posActual+4, max);\n\n\talert(s);\n}", "function _debug(str) {\n\tif (window.console && window.console.log) window.console.log(str);\n }", "function debug(){\r\n\t\tvar arr = [],\r\n\t\tl = arguments.length;\r\n\t\tif(l >1){\r\n\t\t\tif(!test.debug){\r\n\t\t\t\ttest.debug = {};\r\n\t\t\t}\r\n\t\t\twhile(--l){\r\n\t\t\t\tarr.push(arguments[l]);\r\n\t\t\t}\r\n\t\t\ttest.debug[arguments[0]] = arr;\r\n\t\t}\r\n\t}", "function DebugStyling() { }", "function DebugStyling(){}", "function InternalBreakpointState() {}", "function InternalBreakpointState() {}", "function jessica() {\n $log.debug(\"TODO\");\n }", "function debug() {\n if (attrs.isDebug) {\n //stringify func\n var stringified = scope + \"\";\n \n // parse variable names\n var groupVariables = stringified\n //match var x-xx= {};\n .match(/var\\s+([\\w])+\\s*=\\s*{\\s*}/gi)\n //match xxx\n .map(d => d.match(/\\s+\\w*/gi).filter(s => s.trim()))\n //get xxx\n .map(v => v[0].trim());\n \n //assign local variables to the scope\n groupVariables.forEach(v => {\n main[\"P_\" + v] = eval(v);\n });\n }\n }", "function DWRUtil() { }", "static final private protected internal function m103() {}", "debug() {\n console.log(this.get_all().map(x => `${x}`).join(\"; \"));\n }", "function _____SHARED_functions_____(){}", "function debug(obj) {\n\t\tif (window.console && window.console.log) {\n\t\t\twindow.console.log('pageIndicator selection count: ' + obj.size());\n\t\t}\n\t}", "_renderDebugInfo() {\n if (this.DEBUGMODE) {\n this.DEBUGDATA.CARD = this.card_title\n this.DEBUGDATA.API.updateIntervall = msToTime(this.update_interval)\n this.DEBUGDATA.API.elapsed_total = msToTime(performance.now() - this.APISTART)\n this.DEBUGDATA.API.datainfo = this.dataInfo\n this.DEBUGDATA.DATA_ENTITIES = this.entity_items.items\n this.DEBUGDATA.LOVELACE_CONFIG = this._config\n this.DEBUGDATA.LOCALEINFO = window.localeNames\n if (this.DEBUGDATA.PROFILER) {\n if (this.DEBUGDATA.PROFILER.GETHASSDATA) delete this.DEBUGDATA.PROFILER.GETHASSDATA.start\n if (this.DEBUGDATA.PROFILER.GETBUCKETDATA) delete this.DEBUGDATA.PROFILER.GETBUCKETDATA.start\n if (this.DEBUGDATA.PROFILER.GETSTATEDATA) delete this.DEBUGDATA.PROFILER.GETSTATEDATA.start\n if (this.DEBUGDATA.PROFILER.CHART && this.DEBUGDATA.PROFILER.CHART.start) delete this.DEBUGDATA.PROFILER.CHART.start\n if (this.DEBUGDATA.PROFILER.DATAPROVIDER) delete this.DEBUGDATA.PROFILER.DATAPROVIDER.start\n //if (this.DEBUGDATA.PROFILER.INFLUXDB) delete this.DEBUGDATA.PROFILER.INFLUXDB.start\n }\n console.info(\n `%cDEBUGDATA ${this.chart_type.toUpperCase()} ${appinfo.name} ${appinfo.version}:`,\n \"color:white;background:#cc283a;padding:4px\",\n this.DEBUGDATA\n )\n }\n }", "_renderDebugInfo() {\n if (this.DEBUGMODE) {\n this.DEBUGDATA.CARD = this.card_title\n this.DEBUGDATA.API.updateIntervall = msToTime(this.update_interval)\n this.DEBUGDATA.API.elapsed_total = msToTime(performance.now() - this.APISTART)\n this.DEBUGDATA.API.datainfo = this.dataInfo\n this.DEBUGDATA.DATA_ENTITIES = this.entity_items.items\n this.DEBUGDATA.LOVELACE_CONFIG = this._config\n this.DEBUGDATA.LOCALEINFO = window.localeNames\n if (this.DEBUGDATA.PROFILER) {\n if (this.DEBUGDATA.PROFILER.GETHASSDATA) delete this.DEBUGDATA.PROFILER.GETHASSDATA.start\n if (this.DEBUGDATA.PROFILER.GETBUCKETDATA) delete this.DEBUGDATA.PROFILER.GETBUCKETDATA.start\n if (this.DEBUGDATA.PROFILER.GETSTATEDATA) delete this.DEBUGDATA.PROFILER.GETSTATEDATA.start\n if (this.DEBUGDATA.PROFILER.CHART && this.DEBUGDATA.PROFILER.CHART.start) delete this.DEBUGDATA.PROFILER.CHART.start\n if (this.DEBUGDATA.PROFILER.DATAPROVIDER) delete this.DEBUGDATA.PROFILER.DATAPROVIDER.start\n //if (this.DEBUGDATA.PROFILER.INFLUXDB) delete this.DEBUGDATA.PROFILER.INFLUXDB.start\n }\n console.info(\n `%cDEBUGDATA ${this.chart_type.toUpperCase()} ${appinfo.name} ${appinfo.version}:`,\n \"color:white;background:#cc283a;padding:4px\",\n this.DEBUGDATA\n )\n }\n }", "function DebugStyling() {}", "static protected internal function m125() {}", "isDebug() {\n return nativeTools.debug;\n }", "function DebugConsole() {\n}", "function DebugConsole() {\n}", "function DebugConsole() {\n}", "setupDebugTip () {\n // debug in a running dev process.\n process.stdin\n && process.stdin.on('data', chunk => {\n const parsed = chunk.toString('utf-8').trim()\n if (parsed === '*') {\n console.log(Object.keys(this.context))\n }\n if (this.context[parsed]) {\n console.log(this.context[parsed])\n }\n })\n }", "function debug() {\n if(IS_DEBUG) {\n let text = '';\n for(let i in arguments) {\n text += ' ' + arguments[i];\n }\n console.log(text);\n }\n}", "async 'after sunbath' () {\n console.log( 'see? I appear here because of the first custom above' )\n }", "static transient private internal function m58() {}", "_dumpFrame()\n {\n const objects = {'@': this._droidPos};\n this._grid.dump(' ', objects);\n console.log(`springdroid position: [${this._droidPos}]`);\n console.log('');\n }", "function DebugView() { }", "debug() {\n console.log(\"inputFile: \"+this.inputFile,'\\n',\"outputFile: \"+outputFile.uri,'\\n')\n }", "static transient final protected function m44() {}", "transient final private protected public internal function m166() {}", "function debug() {\n\t\t\tconsole.log()\n\t\t\ttheInterface.emit('ui:startDebug');\n\t\t}", "function checkUnamedArguments(){\n\t\tvar arg = arguments; \n\t\tdebugger;\n\t}", "static private public function m119() {}", "static Debug() { \n RSA.isDebugging = true; \n RSA.Encrypt(\"Alec Greene Wade\",13);\n RSA.isDebugging = false;\n }", "debugLog() {\n\t\t\tthis.get().then((data) => {\n\t\t\t\tlet text = JSON.stringify(data, null, 2);\n\t\t\t\t// Hide 'token' and 'sessionID' values if available\n\t\t\t\ttext = Util.hideStringInText(data.token, text);\n\t\t\t\ttext = Util.hideStringInText(data.sessionID, text);\n\n\t\t\t\tconsole.info(`chrome.storage.${this.namespace} = ${text}`);\n\t\t\t});\n\t\t}", "debug(...theArgs) { return this._log('DEBUG', {}, theArgs); }", "function potentiallyBuggyCode() {\n debugger; // 디버거를 돌리면(개발자 모드를 연 상태에서 실행을 시키면) 여기서 멈춘다.\n // do potentially buggy stuff to examine, step through, etc.\n var x = 10;\n console.log('x: ' + x);\n var y = 10;\n console.log('y: ' + y);\n var z = 10;\n console.log('z: ' + z);\n}", "get debug(){\n if ( isUndefined(this._debug) ) return this.parent.debug\n return this._debug\n }", "function showDebug(name){\r\n\t\t//fill the debug div\r\n\t\tvar $debug = $('#debug_content'),\r\n\t\tl, arr, i = 0;\r\n\t\t$debug.html('');\r\n\t\tif(test.debug && test.debug[name].length){\r\n\t\t\tarr = test.debug[name];\r\n\t\t\tl = arr.length;\r\n\t\t\twhile(i < l){\r\n\t\t\t\t$debug.append($('<div class=\"varDump\">').html('<pre>' + dump(arr[i]) + '</pre>'));\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$debug.show();\r\n\t}", "preset () { return false }", "function debug(arg) \n{ \n\tvar temp = \"\";\n\tfor(var i = 0; i < arg.length; i = i + 1)\n\t\t{ temp += arg[i] + '\\n'; }\n\t\t\n\ttemp = temp.replace(/</g,\"&lt;\");\n\ttemp = temp.replace(/>/g,\"&gt;\");\n\ttemp = temp.replace(/\\n/g,\"<br/>\");\n\ttemp += \"<br/>\";\n\t\t\n\tif( $(\"debug\") != null && $(\"debug\") != undefined ) { \n\t\t$(\"debug\").innerHTML += temp;\n\t}\n\telse {\n\t\ttemp = temp.replace(/<br\\/>/g, '\\n');\n\t\talert(temp);\n\t}\n}", "function debug(s) {\n if (!debugOn) {\n return;\n }\n console.log(s);\n}", "function f(e){const t={inspect:function(){return e}};return l.inspect.custom&&(t[l.inspect.custom]=t.inspect),t}", "function debug($obj) {\n\t\tif (window.console && window.console.log) {\n\t\t\twindow.console.log('Window Width: ' + $(window).width());\n\t\t\twindow.console.log('Window Height: ' + $(window).height());\n\t\t}\n\t}", "function debug(s) {\n var debug = document.getElementById('debug');\n if (debug) {\n debug.innerHTML = debug.innerHTML + '<br/>' + s;\n }\n }", "initialize() {\n this.updateDebugMode();\n }", "static dbg() {\n var str;\n if (!Util.debug) {\n return;\n }\n str = Util.toStrArgs('', arguments);\n Util.consoleLog(str);\n }", "function debug($obj) {\r\n if (window.console && window.console.log) {\r\n window.console.log($obj);\r\n }\r\n }", "function DebugLogPath(){\treturn UserTempDir() + \"\\\\SuperCopyDebug.txt\";}", "function DebugHeaderVisitor() {\n}", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", "debug() {\n\t\tthis.log(\"GameMode - \" + this.name + \" | Version: \" + this.version);\n\t\tthis.log(\"Number of Resources - \" + this.resources.size);\n\t\tthis.log(\"Number of Stages - \" + this.stages.length);\n\n\t\tfor (var i = 0; i < this.stages.length; i++) {\n\t\t\tthis.log(\"Stage (\" + i + \") - \" + this.stages[i].name);\n\t\t\tthis.stages[i].debug();\n\t\t}\n\t}", "function debug($obj) {\n\t\tif (window.console && window.console.log)\n\t\twindow.console.log('textarea count: ' + $obj.size());\n\t}", "function debug($obj) {\n\t\tif (window.console && window.console.log)\n\t\twindow.console.log('textarea count: ' + $obj.size());\n\t}", "function _setupDebugHelpers() {\n window.ld = LiveDevelopment;\n window.i = Inspector;\n window.report = function report(params) { window.params = params; console.info(params); };\n }", "debug() {\n console.log(\"method: \"+this.method,'\\n',\"uri: \"+this.uri,'\\n',\"headers: \"+JSON.stringify(this.headers),'\\n',\"body: \"+JSON.stringify(this.body))\n }" ]
[ "0.68376553", "0.6501064", "0.6235522", "0.61179686", "0.5982679", "0.5963744", "0.59347975", "0.5903419", "0.58887666", "0.5885437", "0.5879306", "0.5795816", "0.57918817", "0.5790841", "0.5762828", "0.5722841", "0.57203895", "0.57117516", "0.5695893", "0.56831133", "0.5620608", "0.56051207", "0.5566637", "0.5564443", "0.55127", "0.54941016", "0.54938495", "0.5488639", "0.546844", "0.5437364", "0.5418706", "0.5406748", "0.54057664", "0.53937906", "0.53677464", "0.53671014", "0.5365243", "0.5364712", "0.53581244", "0.53572583", "0.53560215", "0.5355791", "0.5347856", "0.5336755", "0.5309685", "0.53071934", "0.53065366", "0.5300712", "0.5294647", "0.5294647", "0.52673376", "0.52602524", "0.525287", "0.523181", "0.5228684", "0.5228195", "0.52212536", "0.52180463", "0.52180463", "0.5211901", "0.5209087", "0.52030116", "0.5202405", "0.5202405", "0.5202405", "0.51940393", "0.5193973", "0.5186394", "0.51859957", "0.51804584", "0.5163613", "0.51527625", "0.51487154", "0.51396346", "0.51253426", "0.51159596", "0.511422", "0.5103183", "0.5088724", "0.50832283", "0.5075043", "0.5074304", "0.5069671", "0.50676155", "0.50663793", "0.50633854", "0.50588393", "0.5057", "0.50497556", "0.50457203", "0.5042317", "0.5041814", "0.5037906", "0.50210947", "0.5018089", "0.5018089", "0.501791", "0.5016675", "0.5016675", "0.50163615", "0.5015814" ]
0.0
-1
assumming all handler required to make async call in sequence return err
function sequenceHandler(handlers) { const handling = async function handling(event) { let index = 0; while (index < handlers.length) { // eslint-disable-next-line no-await-in-loop const resp = await Promise.resolve(handlers[index](event)); if (resp && resp.statusCode === '401') index = handlers.length; else index++; } }; return handling; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n // Forward error to the global error handler\n next(error);\n }\n }\n }", "function asyncHandler(cb){\n return async(req, res, next) => {\n try{\n await cb(req, res, next)\n } catch(error){\n //res.status(500).send(error);\n next(error);\n }\n }\n}", "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n // Forward error to the global error handler\n next(error);\n }\n }\n }", "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n res.status(500).send(error);\n }\n }\n }", "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n res.status(500).send(error);\n }\n }\n}", "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n res.status(500).send(error);\n }\n }\n}", "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n next(error);\n }\n }\n}", "function asyncHandler(cb) {\n return async(req, res, next) => {\n try{\n await cb(req, res, next)\n } catch(error){\n return next();\n }\n }\n}", "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n // Forward error to the global error handler\n next(error);\n }\n }\n}", "function asyncHandler(cb) {\n\treturn async (req, res, next) => {\n\t\ttry {\n\t\t\tawait cb(req, res, next);\n\t\t} catch (error) {\n\t\t\tres.status(500).send(error);\n\t\t}\n\t};\n}", "function asyncHandler(cb) {\n\treturn async (req, res, next) => {\n\t\ttry {\n\t\t\tawait cb(req, res, next);\n\t\t} catch (error) {\n\t\t\tres.status(500).send(error);\n\t\t}\n\t};\n}", "function asyncHandler(cb) {\n return async (req, res, next) => {\n try {\n await cb(req, res, next)\n } catch (error) {\n console.log(error);\n res.status(500).send(error);\n }\n }\n}", "function makeHandlerAwareOfAsyncErrors(handler) {\n return async function (req, res, next) {\n try {\n await handler(req, res);\n } catch (error) {\n next(error);\n }\n };\n}", "function asyncHandler(cb) {\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(err) {\n res.status(500).send(err);\n }\n }\n}", "function asyncHandler(cb) {\n return async (req, res, next) => {\n try {\n await cb(req, res, next);\n } catch (error) {\n res.status(500).send(error);\n }\n };\n}", "function asyncHandler(cb) {\n return async (req, res, next) => {\n try {\n await cb(req, res, next);\n } catch (error) {\n // Forward error to the global error handler\n next(error);\n }\n }\n}", "function asyncHandler(fn) {\n return function(req, res, next) {\n return Promise.resolve(fn(req, res, next).catch(next));\n };\n}", "function asyncHandler(cb) {\n return async (req, res, next) => {\n try {\n await cb(req, res, next);\n } catch (error) {\n res.status(500).send(error);\n }\n }\n}", "function asyncHandler(cb) {\n return async (req, res, next) => {\n try {\n await cb(req, res, next)\n } catch (error) {\n if (error.name === 'SequelizeValidationError') {\n const errors = error.errors.map(err => err.message);\n res.status(400).json(errors);\n } else {\n return next(error) \n } \n }\n }\n}", "function tryCatch(handler){\n return async (req,res,next)=>{\n try{\n console.log(\"inside handler\");\n await handler(req,res);\n }catch(ex){\n console.log(\"iaide error\");\n handleError(ex ,res); // if exception then calling handleError middleware\n }\n }\n}", "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(err){\n err = new Error()\n err.status = 500;\n err.message = \"Oh No! The book you are looking for does not exist\"\n next(err)\n }\n }\n}", "function asyncHandler(cb) {\n\treturn async (req,res,next) => {\n\t\ttry {\n\t\t\tawait cb(req,res,next);\n\t\t} catch(err) {\n\t\t\tres.render('error', {error: err} );\n\t\t}\n\t}\n}", "static async _runReturnHandlers(handlers) {\n for (const handler of handlers) {\n await new Promise((resolve, reject) => {\n handler((err) => (err ? reject(err) : resolve()));\n });\n }\n }", "function errorWrap(handler) {\n return async (req, res, next) => {\n try {\n await handler(req, res, next);\n }\n catch (err) {\n next(err);\n }\n };\n}", "function errorWrap(handler) {\n return async (req, res, next) => {\n try {\n await handler(req, res, next);\n }\n catch (err) {\n next(err);\n }\n };\n}", "function errorWrap(handler) {\n return async (req, res, next) => {\n try {\n await handler(req, res, next);\n }\n catch (err) {\n next(err);\n }\n };\n}", "function asyncRouteHandler(handle){\n return async (request,response,next)=>{\n try {\n await handle(request,response);\n } catch (error) {\n next(error);\n }\n };\n}", "function catchAsync(fn) {\n return (req, res, next) => {\n fn(req, res, next).catch((err) => next(err));\n };\n}", "function runAsyncWrapper(callback) {\n\t/*\n return async (req, res, next) => {\n callback(req, res, next).catch(next);\n }\n */\n\treturn async (req, res, next) => {\n\t\ttry {\n\t\t\tawait callback(req, res, next);\n\t\t} catch (err) {\n\t\t\tconsole.log(err.message);\n\t\t\tres.send({ success: false, message: \"Error with asynchronous registration.\" });\n\t\t\tnext(err);\n\t\t}\n\t};\n}", "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n // res.render(\"error\", {error})\n res.status(404).render(\"books/page-not-found\", {error, title:\"ERROR\"})\n}}}", "async function commonHandler(req, res, next, query, params){\n const execParamQuery = require('./mysql').execParamQuery;\n\n try {\n //get result from db\n let result = await execParamQuery(query, params); \n\n //if no result from execParamQuery\n if(typeof result != \"undefined\") res.send(200, {data: result});\n //no data found in DB return 400 status code with error\n else res.send(400, {error: \"No Data found\"}); //ToDo Error Code\n //go to after handler\n return next();\n } catch (error) {\n log.error(\"consult.js, Handlers: commonHandler \" + error);\n //error while getting data from mysql DB\n res.send(400, {error: \"No Data found\"}); //ToDo Error Code\n }\n return next();\n}", "function asyncErrorWrapper (callback) {\n return function (req, res, next) {\n callback(req, res, next).catch(next)\n }\n}", "function asyncHelper () {\n\tlet f, r\n\tconst prm = new Promise((_f, _r)=>{f = _f, r = _r})\n\tfunction done(...x){\n\t\treturn x.length === 0 ? f() : r(x[0])\n\t}\n\tdone.then = prm.then.bind(prm)\n\tdone.catch = prm.catch.bind(prm)\n\tdone.finally = prm.finally.bind(prm)\n\treturn done\n}", "function wrapHandler(handler) {\n\treturn async function(req, res, next) {\n\t\ttry {\n\t\t\tif (req.body.result.action && req.body.result.action === handler.action) {\n\t\t\t\treq.log.info('ACTION: %s', handler.action);\n\t\t\t\treq.log.debug({ body: req.body });\n\t\t\t\tawait handler.handler(req, res, next);\n\t\t\t\treq.log.info('SUCCESS: %s', handler.action);\n\t\t\t\treturn next(false);\n\t\t\t}\n\t\t\treturn next();\n\t\t} catch(err) {\n\t\t\tlet errObj;\n\t\t\tif (err.response && err.response.status)\n\t\t\t\terrObj = errs.makeErrFromCode(err.response.status);\n\t\t\telse if (err.code && err.code === 'ECONNABORTED')\n\t\t\t\terrObj = new errs.RequestTimeoutError();\n\t\t\telse\n\t\t\t\terrObj = new errs.InternalServerError();\n\n\t\t\terrObj.message = 'req_id=' + req.id();\n\t\t\tres.send({\n\t\t\t\tfollowupEvent: {\n\t\t\t\t\tname: 'SERVER_ERROR',\n\t\t\t\t\tdata: {\n\t\t\t\t\t\terror: errObj\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tcontextOut: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'eventTriggered',\n\t\t\t\t\t\tlifespan: 1\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t});\n\t\t\treq.log.error(errObj);\n\t\t\treturn next(false);\n\t\t}\n\t};\n}", "setOnErrorHandler(handler) { return; }", "function promiseErrorHandler(next) {\n return err => next(err);\n}", "function call(handle, route, err, req, res, next) {\n var arity = handle.length;\n var error = err;\n var hasError = Boolean(err);\n\n debug('%s %s : %s', handle.name || '<anonymous>', route, req.originalUrl);\n\n try {\n if (hasError && arity === 4) {\n // error-handling middleware\n handle(err, req, res, next);\n return;\n } else if (!hasError && arity < 4) {\n // request-handling middleware\n handle(req, res, next);\n return;\n }\n } catch (e) {\n // replace the error\n error = e;\n }\n\n // continue\n next(error);\n}", "trap (err, res, cb) {\n if (!res.trap) res.trap = []\n res.trap.push(err)\n this.next(res, cb)\n }", "function completeRequest(err) {\n if (err) {\n // prepare error message\n res.error = {\n code: err.code || -32603,\n message: err.stack\n // return error-first and res with err\n };return onDone(err, res);\n }\n var returnHandlers = allReturnHandlers.filter(Boolean).reverse();\n onDone(null, { isComplete: isComplete, returnHandlers: returnHandlers });\n }", "handleError$(action) {\n // Although error may return immediately,\n // ensure observable takes some time,\n // as app likely assumes asynchronous response.\n return (error) => of(this.resultHandler.handleError(action)(error)).pipe(delay(this.responseDelay, this.scheduler || asyncScheduler));\n }", "async _processRequest(req, res) {\n const [error, isComplete, returnHandlers,] = await JsonRpcEngine._runAllMiddleware(req, res, this._middleware);\n // Throw if \"end\" was not called, or if the response has neither a result\n // nor an error.\n JsonRpcEngine._checkForCompletion(req, res, isComplete);\n // The return handlers should run even if an error was encountered during\n // middleware processing.\n await JsonRpcEngine._runReturnHandlers(returnHandlers);\n // Now we re-throw the middleware processing error, if any, to catch it\n // further up the call chain.\n if (error) {\n throw error;\n }\n }", "function _tryEachErrorHandler(next, ctx) {\n if (ctx.ix >= ctx.steps.length) return next(ctx.err2 || ctx.err, 'done'); else { ctx.next = next; _tryStepContext(ctx, _tryNext); }\n }", "function next(err) {\n if (err) return on500(req, res, err);\n handle();\n }", "function call(handle, route, err, req, res, next) {\n const arity = handle.length;\n const hasError = Boolean(err);\n let error = err;\n\n debug(`${handle.name || '<anonymous>'} ${route} : ${req.originalUrl}`);\n\n try {\n if (hasError && arity === 4) {\n // error-handling middleware\n handle(err, req, res, next);\n return;\n } else if (!hasError && arity < 4) {\n // request-handling middleware\n handle(req, res, next);\n return;\n }\n } catch (e) {\n // replace the error\n error = e;\n }\n\n // continue\n next(error);\n}", "handleErrors(templateFunc, dataCB){ // passing a templateFunc as an argument\n //than we return a middleware function which will be called repeatedly\n //next is a callback which tells that everything is okay continue processing this req\n return async (req, res, next) => {\n const errors = validationResult(req); // this will check if the req has any errors/\n\n //if we have errors\n if(!errors.isEmpty()){\n let data = {};// declaring a data variable as an empty obj in case we don't have any data callback\n //if data is provided\n if(dataCB){\n data = await dataCB(req); // we update the variable //storing data in data variable\n }\n return res.send(templateFunc({ errors, ...data })); //we return the template with the errors as arguments, and data\n }\n next();\n };\n }", "wrap(callback) {\n\t\t\treturn ((...args) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst res = callback.apply(null, [...args]);\n\t\t\t\t\tif (res instanceof Promise) {\n\t\t\t\t\t\tres.catch(this.handleBound);\n\t\t\t\t\t}\n\t\t\t\t\treturn res;\n\t\t\t\t} catch (err) {\n\t\t\t\t\tthis.handle(err);\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "function promiseErrorChaining(promise, resolutionHandler, rejectionHandler) {}", "function done(err) {\n if (err) return handle.error(err);\n\n // Evaluate all the attach methods\n for (const attachMethod of self.attachMethods) {\n attachMethod.call(handle);\n }\n\n // No match found, send 404\n if (match.handler === null) {\n err = new Error('Not Found');\n err.statusCode = 404;\n return handle.error(err);\n }\n\n // match found, relay to HandlerCollection\n match.handler(req.method, handle, match.params, match.splat);\n }", "function async_io_normal(cb) {\n\n}", "function completeRequest(err) {\n if (err) {\n // prepare error message\n res.error = new JsonRpcError.InternalError(err);\n // return error-first and res with err\n return onDone(err, res);\n }\n var returnHandlers = allReturnHandlers.filter(Boolean).reverse();\n onDone(null, { isComplete: isComplete, returnHandlers: returnHandlers });\n }", "callback (name, handler) {\n return async (next, ctx, msg) => {\n if (msg.name === name) {\n try {\n let response = await handler(ctx, ...msg.args);\n let message = {\n id: msg.id,\n response\n };\n this.socket.emit(`__${this.namespace}_return__`, message);\n } catch (err) {\n if (this.debug)\n return await next(err);\n else\n throw err;\n }\n } \n return await next();\n }\n }", "async callHandlers (handlers, req, res) {\n for (let handler of handlers) {\n // Stop the middleware chain if a response has been sent\n if (!res.response.headersSent) {\n await handler.call(this, req, res)\n }\n }\n }", "handleCriticalError(options) {\n const _this = this\n async.auto({\n // First we try and log to a JSON file\n logErrorToFile(callback) {\n if (!options.JSONFilePath)\n return callback(null, null)\n\n require('../Utils/ErrorUtils').errToJson(options.JSONFilePath, {\n error: err,\n errorType: err.errType,\n errorMessage: err.message,\n flightRequest: result.findFlightRequest.id,\n user: result.findFlightRequest.user\n }, {\n useBase: true\n }, function done (err) {\n if (err) {\n err.errType = 'SaveJsonFailiure'\n return callback(err, null)\n } else {\n return callback(null, true)\n }\n })\n },\n // Then we try and email the `admin` notifying that the users payment\n // status failed to update as an extra precaution\n sendEmailToAdmin(callback) {\n if (!options.emailAddresses || !options.emailTemplate ||\n !sails.config.email[options.emailTemplate])\n return callback(null, null)\n\n EmailService.sendEmailAsync(\n // Generate the email template using the supplied arguments.\n sails.config.email[options.emailTemplate].apply(\n null, options.templateArgs\n )\n ).then(function (info) {\n return callback(null, true)\n }).catch(function (err) {\n sails.log.error(err)\n err.errType = 'EmailSendFailiure'\n return callback(err, null)\n })\n }\n }, function (err, results) {\n if (err) {\n // Something went wrong with the two fail safes, display to the user\n // a way to contact us with the necessary information to\n // lodge an inquiry\n const flightRequestId = result.findFlightRequest.id\n const transactionId = result.chargeUserCreditCard.id\n const state = result.chargeUserCreditCard.state\n\n // Move these strings into an i18 file later\n\n switch (options.errorType) {\n // Now display to the user that we have recieved payment but failed to update database\n // and they can contact us to resolve the issue\n case 'UpdateUserPaymentStatus':\n sails.log.debug('update user payment status failiure')\n req.flash('criticalErrorTitle', 'We have recieved your payment but failed to update your payment status.')\n req.flash('criticalErrorMessage',\n 'Please contact us so we can fix this immediately. You can use the following transaction id as a reference : ' + trasactionId + ' along with this flight request id :' + flightRequestId)\n break\n case 'SendProviderPayment':\n case 'UpdateProviderPaymentStatus':\n sails.log.debug('send provider payment failiure')\n // Handle it in this way for now, obviously not ideal\n req.flash('criticalErrorTitle', 'We have failed to send payment to the provider of this flight.')\n req.flash('criticalErrorMessage',\n 'Please contact us so we can fix this issue immediately. You can use the following transaction id as a reference : ' + trasactionId + ' along with this flight request id :' + flightRequestId)\n // Do something here, users been charged,\n // we've attempted to email and\n sails.log.error(err)\n break\n default: // This shouldn't happen\n throw new Error('Programmer Error in verifycontroller.js')\n }(options.errorType)\n }\n })\n }", "function handle() {\n var args = _.toArray(arguments);\n var fn = args.shift();\n var result = fn.apply(this, args);\n if (result instanceof Promise) {\n return result;\n } else {\n return Promise.resolve(result);\n }\n}", "function retryIfServerError(fn) {\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__awaiter\"])(this, void 0, void 0, function () {\r\n var result;\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__generator\"])(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, fn()];\r\n case 1:\r\n result = _a.sent();\r\n if (result.status >= 500 && result.status < 600) {\r\n // Internal Server Error. Retry request.\r\n return [2 /*return*/, fn()];\r\n }\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n}", "function retryIfServerError(fn) {\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__awaiter\"])(this, void 0, void 0, function () {\r\n var result;\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__generator\"])(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, fn()];\r\n case 1:\r\n result = _a.sent();\r\n if (result.status >= 500 && result.status < 600) {\r\n // Internal Server Error. Retry request.\r\n return [2 /*return*/, fn()];\r\n }\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n}", "function handlerWrapper(handler, ...args) {\n try {\n handler.apply(this, args)\n } catch (error) {\n logger.error('caught error from api handler', handler.name, error.message, 'continuing', error)\n }\n}", "AsyncProcessResponse() {\n\n }", "static _runMiddleware(req, res, middleware, returnHandlers) {\n return new Promise((resolve) => {\n const end = (err) => {\n const error = err || res.error;\n if (error) {\n res.error = eth_rpc_errors_1.serializeError(error);\n }\n // True indicates that the request should end\n resolve([error, true]);\n };\n const next = (returnHandler) => {\n if (res.error) {\n end(res.error);\n }\n else {\n if (returnHandler) {\n if (typeof returnHandler !== 'function') {\n end(new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.internal, `JsonRpcEngine: \"next\" return handlers must be functions. ` +\n `Received \"${typeof returnHandler}\" for request:\\n${jsonify(req)}`, { request: req }));\n }\n returnHandlers.push(returnHandler);\n }\n // False indicates that the request should not end\n resolve([null, false]);\n }\n };\n try {\n middleware(req, res, next, end);\n }\n catch (error) {\n end(error);\n }\n });\n }", "async function middleware (ctx, next) {\n\n}", "wrap (cb) {\n return function () {\n var args = Array.prototype.slice.call(arguments)\n var next = args.pop()\n\n args.push(function () {\n // if (err) return next(err)\n var iargs = Array.prototype.slice.call(arguments)\n\n next.apply(this, iargs)\n })\n cb.apply(this, args)\n }\n }", "function gErrorHandler(cb) {\n return async (req, res, next) => {\n try {\n await cb(req, res, next)\n } catch (e) {\n // if error is a sequelize validation or constraint(unique) send 400(Bad Request) status code\n if (e.name == \"SequelizeValidationError\" || \"SequelizeUniqueConstraintError\") {\n let errorArray = [];\n for (let i=0; i<e.errors.length; i++) {\n errorArray.push(e.errors[i].message)\n }\n res.status(400).send(errorArray)\n // if error is anything else send 500(Internal Server Error) status code\n } else { \n res.status(500).send('ERROR: ' + e.message)\n }\n }\n }\n }", "function index_esm_async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n Promise.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}", "function handleHTTPError(res) {\n return function(error) { res.send(500, {error: error.message}); }\n}", "async handle(error, { response, request, auth }) {\n let data\n const defaults = {\n code: HS.UNPROCESSABLE_ENTITY,\n route: request.url(),\n error: undefined,\n message: 'process_failed'\n }\n\n // Si el parametro es un simple string que se use los defaults y se añada el mensaje\n if (typeof error.message === 'string') {\n data = Object.assign(defaults, { message: error.message })\n } else {\n // Mezclo los defaults con los que vienen del parametro\n data = Object.assign(defaults, error.message)\n }\n\n if (data.message === 'not_found') data.code = 404\n if (data.error) {\n if (Env.get('NODE_ENV') === 'development') {\n // En modo de desarrollo me interesa que los errores estén en consola\n Logger.transport('console').error(data.error)\n }\n\n await Logger.error({\n url: request.url(),\n user: auth.user ? auth.user.email : undefined,\n message: data.message,\n // Esto se permite que esté en undefined para que si\n // no se pasa como parametro no se logee\n error: data.error,\n organization: auth.user ? auth.user.organization_id : undefined\n })\n }\n return response.status(data.code).json(data)\n }", "function retryIfServerError(fn) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_2__[\"__awaiter\"])(this, void 0, void 0, function () {\n var result;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_2__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, fn()];\n case 1:\n result = _a.sent();\n if (result.status >= 500 && result.status < 600) {\n // Internal Server Error. Retry request.\n return [2 /*return*/, fn()];\n }\n return [2 /*return*/, result];\n }\n });\n });\n}", "async function fails () {\n throw new Error('Contrived Error');\n }", "function handleError (err) {\n\t\t\t\tvar ackfn = self.awaitingAck[packet.ackid]\n\n\t\t\t\tif (!err) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (ackfn) {\n\t\t\t\t\tackfn(err, packet);\n\t\t\t\t} else if (!ackfn) {\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\n\t\t\t\tself.emit('error', err, packet);\n\t\t\t}", "async function requestWrapper() {\n // ...\n expect(error).toBeDefined();\n expect(error.message).toBe('Server Error');\n done();\n }", "handleError (err) {\n if (isTruthy(err.handle)) {\n err.handle()\n }\n // console.log(err)\n }", "execute_async(command, handler) {\n\t\texec(command, (error, stdout, stderr) => {\n\t\t\tif (error) {\n\t\t\t\tconsole.log(`error: ${error.message}`);\n\t\t\t\thandler(null, error)\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (stderr) {\n\t\t\t\tconsole.log(`stderr: ${stderr}`);\n\t\t\t\thandler(stderr, null)\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.log(`stdout: ${stdout}`);\n\t\t\thandler(stdout, null)\n\t\t\treturn ;\n\t\t});\n\t}", "function handleCb(sharedData, cb) {\n var handleCbCalled = false;\n return function (err) {\n if (sharedData.done) {\n return;\n }\n if (err) {\n sharedData.done = true;\n return cb(err);\n }\n\n if (handleCbCalled) {\n sharedData.done = true;\n return cb(Error('Called asyncEach handle argument twice'));\n }\n handleCbCalled = true;\n\n sharedData.count--;\n if (sharedData.count === 0) {\n sharedData.done = true;\n cb(undefined);\n }\n };\n}", "handleRequest(payload, next, end) {\n return __awaiter(this, void 0, void 0, function* () {\n let message;\n let address;\n switch (payload.method) {\n case 'web3_clientVersion':\n try {\n const nodeVersion = yield this._web3Wrapper.getNodeVersionAsync();\n end(null, nodeVersion);\n }\n catch (err) {\n end(err);\n }\n return;\n case 'eth_accounts':\n try {\n const accounts = yield this._web3Wrapper.getAvailableAddressesAsync();\n end(null, accounts);\n }\n catch (err) {\n end(err);\n }\n return;\n case 'eth_sendTransaction':\n const [txParams] = payload.params;\n try {\n const txData = web3_wrapper_1.marshaller.unmarshalTxData(txParams);\n const txHash = yield this._web3Wrapper.sendTransactionAsync(txData);\n end(null, txHash);\n }\n catch (err) {\n end(err);\n }\n return;\n case 'eth_sign':\n [address, message] = payload.params;\n try {\n const signature = yield this._web3Wrapper.signMessageAsync(address, message);\n end(null, signature);\n }\n catch (err) {\n end(err);\n }\n return;\n case 'eth_signTypedData':\n [address, message] = payload.params;\n try {\n const signature = yield this._web3Wrapper.signTypedDataAsync(address, message);\n end(null, signature);\n }\n catch (err) {\n end(err);\n }\n return;\n default:\n next();\n return;\n }\n });\n }", "function retryIfServerError(fn) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__awaiter)(this, void 0, void 0, function () {\n var result;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__generator)(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, fn()];\n case 1:\n result = _a.sent();\n if (result.status >= 500 && result.status < 600) {\n // Internal Server Error. Retry request.\n return [2 /*return*/, fn()];\n }\n return [2 /*return*/, result];\n }\n });\n });\n}", "asMiddleware() {\n return async (req, res, next, end) => {\n try {\n const [middlewareError, isComplete, returnHandlers,] = await JsonRpcEngine._runAllMiddleware(req, res, this._middleware);\n if (isComplete) {\n await JsonRpcEngine._runReturnHandlers(returnHandlers);\n return end(middlewareError);\n }\n return next(async (handlerCallback) => {\n try {\n await JsonRpcEngine._runReturnHandlers(returnHandlers);\n }\n catch (error) {\n return handlerCallback(error);\n }\n return handlerCallback();\n });\n }\n catch (error) {\n return end(error);\n }\n };\n }", "handleCallError(errs, url, method) {\n // TODO: probably we need some logger, now it's just logging to console\n console.log(`Failed calling ${method} for URL:`, url);\n console.log(`Reason:`, errs);\n }", "function handleError(err) {\n\t\t\t\t\t\t// Log\n\t\t\t\t\t\tme.log('warn', 'Feedr === fetching [' + feed.url + '] to [' + feed.path + '], failed', err.stack);\n\n\t\t\t\t\t\t// Exit\n\t\t\t\t\t\tif (feed.cache) {\n\t\t\t\t\t\t\tviaCache(next);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tviaRequestComplete(err, opts.data, requestOptions.headers);\n\t\t\t\t\t}", "function handleError(err, client, done){\n // no error occurred, continue with the request\n if(!err) return false;\n // else close connection and hand back failure\n done(client);\n return true;\n}", "function Catch( onerr, ap ) {\r\n}", "_passToHandler(response) {\n if (this._task) {\n this._task.responseHandler(response, this._task.resolver);\n }\n // Errors other than FTPError always close the client. If there isn't an active task to handle the error,\n // the next one submitted will receive it using `_closingError`.\n // There is only one edge-case: If there is an FTPError while no task is active, the error will be dropped.\n // But that means that the user sent an FTP command with no intention of handling the result. So why should the\n // error be handled? Maybe log it at least? Debug logging will already do that and the client stays useable after\n // FTPError. So maybe no need to do anything here.\n }", "function defaultErrorHandler(error) {\n // Throw so we don't silently swallow async errors.\n throw error; // This error probably originated in a transition hook.\n}", "routeCallback(req, res) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n return yield this.callback(req, res);\n }\n catch (error) {\n this.handleError(error, res);\n }\n });\n }", "function async(fn, onError) {\n\t return function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i] = arguments[_i];\n\t }\n\t _promise.PromiseImpl.resolve(true).then(function () {\n\t fn.apply(void 0, args);\n\t }).catch(function (error) {\n\t if (onError) {\n\t onError(error);\n\t }\n\t });\n\t };\n\t}", "_handleApiCall(apiUrl, errorMessage) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const response = yield this.axios.get(encodeURI(apiUrl));\n return response.data;\n }\n catch (error) {\n console.log(error);\n throw new Error(`Diablo 3 Community Error :: ${errorMessage}`);\n }\n });\n }", "_handleApiCall(apiUrl, errorMessage) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const response = yield this.axios.get(encodeURI(apiUrl));\n return response.data;\n }\n catch (error) {\n console.log(error);\n throw new Error(`Starcraft 2 Game Data Error :: ${errorMessage}`);\n }\n });\n }", "validateHandler(req, res, next) {\n let errors = validationResult(req);\n if (errors.isEmpty()) {\n next();\n } else {\n res.status(400).send({ message: \"Validation Errors\", status: 0, errors: errors });\n }\n }", "function AsyncMapErrorCheck(err, result) {\n if (err) {\n return err;\n }\n const results = Unify(result);\n if (!results) {\n return err;\n }\n return results;\n}", "sendAsync(payload, callback) {\n void this.handleRequest(payload, \n // handleRequest has decided to not handle this, so fall through to the provider\n () => {\n const sendAsync = this._provider.sendAsync.bind(this._provider);\n sendAsync(payload, callback);\n }, \n // handleRequest has called end and will handle this\n (err, data) => {\n err ? callback(err) : callback(null, Object.assign(Object.assign({}, payload), { result: data }));\n });\n }", "function checkError() {\n if (err && !err.message.match(/response code/)) {\n return when().delay(1000); // chill for a second\n }\n }", "async function runHandlers(handlers) {\n try {\n await batchProcess(0, handlers)\n } catch (errs) {\n report('one or more errors occurred in change handlers', handlers, errs)\n }\n}", "async handleRequest (req, res) {\n try {\n // First run the handlers assigned with \"server.use\"\n await this.callHandlers(this.handlers, req, res)\n\n // Then run process the request for the provied route\n await this.handleRoute(req, res)\n } catch (err) {\n // Call the error listener if an error is thrown\n this.errorListener.call(this, err, req)\n\n // Return HTTP 500 if error is not caught within handlers\n res.error(err.message)\n }\n }", "function onerror (err) {\n debug('http.ClientRequest \"error\" event: %o', err.stack || err);\n fn(err);\n }", "async processFile(hndl) {\n }", "async processFile(hndl) {\n }", "async function fn() {\n throw Error(\"This is a mistake!\");\n}", "function callbackAsap(cb, err, res) {\n\t asap(function() { cb(err, res); });\n\t}", "async tryAsyncOp(errorType, op, ...params) {\n try {\n return await op(...params);\n }\n catch (e) {\n throw new this.errClass(errorType, e);\n }\n }", "function async(fn, onError) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n Promise.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n }", "error (err) {\n return function (res, cb) {\n _setImmediate(() => {\n res.value += 10\n cb(err, res)\n })\n }\n }", "function runMiddleware(req, res, fn) {\n return new Promise((resolve, reject) => {\n fn(req, res, (result) => {\n console.log(\"accepted\");\n if (result instanceof Error) {\n return reject(result);\n }\n return resolve(result);\n });\n });\n}" ]
[ "0.7059022", "0.70500934", "0.7037833", "0.7024228", "0.6941244", "0.6930722", "0.6925344", "0.68845373", "0.68727154", "0.6843286", "0.6843286", "0.6835614", "0.6751795", "0.6725149", "0.67213535", "0.67106134", "0.6702262", "0.66944975", "0.66045004", "0.6581339", "0.6534694", "0.6521116", "0.65008706", "0.64701897", "0.64701897", "0.64628154", "0.6380825", "0.63141155", "0.6254725", "0.6236884", "0.6153648", "0.6016848", "0.6016274", "0.5981582", "0.5949911", "0.5946476", "0.5888469", "0.5836282", "0.5815187", "0.57936776", "0.5789197", "0.5781737", "0.57683086", "0.5761695", "0.57541174", "0.5714232", "0.5700751", "0.56895214", "0.5685076", "0.56797045", "0.5662859", "0.5660684", "0.5632551", "0.5631379", "0.5628113", "0.5628113", "0.561701", "0.5613985", "0.5599469", "0.55359954", "0.5531227", "0.55267525", "0.55245036", "0.55223894", "0.55124605", "0.54769737", "0.54488736", "0.54350275", "0.54343414", "0.5431718", "0.54257166", "0.5419144", "0.54187053", "0.539871", "0.53977835", "0.5396431", "0.539573", "0.5389349", "0.5382653", "0.5371184", "0.5366531", "0.53564", "0.5352426", "0.5347479", "0.53459316", "0.5335779", "0.5325672", "0.5324686", "0.53225595", "0.53189796", "0.5316791", "0.5312436", "0.5298566", "0.5298566", "0.529693", "0.5296183", "0.52939594", "0.52918684", "0.52787256", "0.5278509" ]
0.6148936
31
due to the webpack build insert'use strict' directive for module prior babel transformation nodent which used by fastasync will raise function block scope hoisting syntax error reference to for description
async function displayEvtStatusQuo({accessToken, deviceToken}, data) { const {flHongbao, tjHongbao} = data; const noHongbao = {type: 'noHongbao'}; if (flHongbao) { flHongbao.type = 'flHongbao'; noHongbao.url = flHongbao.url; } if (tjHongbao) { tjHongbao.type = 'tjHongbao'; noHongbao.url = tjHongbao.url; } const eventStatus = [flHongbao, tjHongbao].map(getEventStatus); let pendingEvent = eventStatus.length; [flHongbao, tjHongbao].forEach((hbDateTime, index) => { if (hbDateTime) { const {isEventOngoing, isPostEvent} = eventStatus[index]; if (isEventOngoing) { --pendingEvent; renderHBDraw({accessToken, deviceToken}, hbDateTime); } else if (!isPostEvent) { initCountdown({accessToken, deviceToken}, hbDateTime); } } else --pendingEvent; }); if (pendingEvent) renderHBPlaceholder(); renderHbRuleBtn([flHongbao, tjHongbao, noHongbao]); if (accessToken) { const hbRank = await request.fetchHBRank(accessToken, deviceToken); updateRanking(hbRank); } else updateRanking(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addStrict(moduleMeta) {\n console.log(\"transform '\" + moduleMeta.name + \"'\");\n moduleMeta.configure({source: \"'use strict;'\\n\" + moduleMeta.source});\n}", "function run() {\n 'use strict';\n}", "function strictly() {\n 'use strict';\n\n}", "function foo() {\n \"use strict\";\n}", "function s(e){return e&&e.__esModule?e:{default:e}}", "function s(e){return e&&e.__esModule?e:{default:e}}", "function hooks() {\n \"use strict\";\n}", "function forUseStrict() {\n \"use strict\";\n // start coding from here\n console.log(\"hello world\");\n}", "function r(){throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\")}", "function a(e){return e&&e.__esModule?e:{default:e}}", "function strictMode() {\n 'use strict';\n\n //..\n //..\n }", "detectDynamicRequires(unit) {\n const src = `\\\nvar _sysreq = require;\n(function() {\nvar dmodules = []\nvar require = function(module) {\n dmodules.push(module)\n return _sysreq(module)\n};\n${unit.src}\nmodule.exports = dmodules;\n})()\\\n`;\n const tmpfile = unit.fpath + \".bna.js\";\n fs.writeFileSync(tmpfile, src);\n let dmodules = [];\n try {\n const _r = require; // prevent warning when fusing bna itself\n return dmodules = _.unique(_r(tmpfile));\n } catch (e) {\n return unit.warnings.push({\n node: { loc: { file: unit.fpath, line: '?' } },\n reason: 'dynamicResolveError',\n error: e\n });\n } finally {\n delete require.cache[tmpfile];\n fs.unlinkSync(tmpfile);\n return dmodules;\n }\n }", "function bar() {\n // this code is also strict mode.\n }", "function teste() {\n \"use strict\"\n let testando = 'teste';\n}", "function greet() {\n 'use strict';\n console.log('hi');\n}", "function lt(t,i){return t(i={exports:{}},i.exports),i.exports}", "function nomoduleloaderTranspiler() {\n // var allExports = {};\n // return through2.obj(function (file, enc, cb) {\n // var content = file.contents.toString();\n // var newContent = '';\n\n // var arr = content.split('\\n');\n // // abandon 'define' scope\n // var result = /function \\(require, exports(,\\s(\\w+?))*\\)/.exec(arr[0]);\n\n // for (var i = 1; i < arr.length - 1; i++) {\n // if (i == 2) continue;\n // arr[i] = arr[i].substr(4, arr[i].length - 4);\n // if (!arr[i].startsWith('exports.')) {\n // if (result[2] == undefined) {\n // newContent += arr[i] + '\\n';\n // }\n // else {\n // var exports = usedExports(result, arr[i]);\n // var s = arr[i];\n // exports.forEach(v => {\n // s = s.replace(v + '.', '');\n // });\n // newContent += s + '\\n';\n // }\n // }\n // }\n\n // file.contents = Buffer.from(newContent);\n // console.log(newContent);\n // console.log(content);\n // this.push(file);\n // cb();\n // });\n}", "function transform(/*loader*/) {\n return function(moduleMeta) {\n return moduleMeta;\n };\n }", "transform(program) {\n var options = AsxFormatter.options(this.file.ast);\n //DefaultFormatter.prototype.transform.apply(this, arguments);\n\n var locals = [];\n var definitions = [];\n var body = [];\n program.body.forEach(item=>{\n switch(item.type){\n case 'ExpressionStatement':\n var exp = item.expression;\n if(exp.type=='Literal' && exp.value.toLowerCase()=='use strict'){\n return;\n }\n break;\n case 'VariableDeclaration':\n item.declarations.forEach(d=>{\n locals.push(d.id);\n });\n break;\n case 'FunctionDeclaration':\n if(item.id.name=='module'){\n item.body.body.forEach(s=>{\n body.push(s);\n })\n return;\n }else\n if(item._class){\n item.id =t.identifier('c$'+item._class);\n body.push(t.expressionStatement(t.callExpression(\n t.memberExpression(\n t.identifier('asx'),\n t.identifier('c$')\n ),[item])));\n return;\n }else{\n locals.push(item.id);\n }\n break;\n }\n body.push(item);\n });\n\n var definer = [];\n\n\n\n if(Object.keys(this.imports).length){\n\n Object.keys(this.imports).forEach(key=>{\n var items = this.imports[key];\n if(items['*'] && typeof items['*']=='string'){\n this.imports[key]=items['*'];\n }\n });\n definer.push(t.property('init',\n t.identifier('imports'),\n t.valueToNode(this.imports)\n ))\n }\n var exports;\n if(this.exports['*']){\n exports = this.exports['*'];\n delete this.exports['*'];\n }\n if(Object.keys(this.exports).length){\n definer.push(t.property('init',\n t.identifier('exports'),\n t.valueToNode(this.exports)\n ))\n }\n if(body.length){\n if(exports){\n var ret = [];\n Object.keys(exports).forEach(key=>{\n var val = exports[key];\n if(typeof val=='string') {\n ret.push(t.property('init',\n t.literal(key), t.identifier(val == '*' ? key : val)\n ))\n }else{\n ret.push(t.property('init',\n t.literal(key), val\n ))\n }\n });\n body.push(t.returnStatement(\n t.objectExpression(ret)\n ));\n }\n var initializer = t.functionExpression(null, [t.identifier('asx')], t.blockStatement(body));\n definer.push(t.property('init',\n t.identifier('execute'),\n initializer\n ))\n }\n definitions.forEach(item=>{\n\n if(item._class){\n definer.push(t.property('init',\n t.literal('.'+item._class),\n item\n ))\n }else{\n definer.push(t.property('init',\n t.literal(':'+item.id.name),\n item\n ))\n }\n\n })\n definer = t.objectExpression(definer);\n\n\n\n /*\n var definer = t.functionExpression(null, [t.identifier(\"module\")], t.blockStatement(body));\n if(options.bind){\n definer = t.callExpression(\n t.memberExpression(\n definer,\n t.identifier(\"bind\")\n ),[\n t.callExpression(t.identifier(\"eval\"),[t.literal(\"this.global=this\")])\n ]\n );\n }*/\n var body = [];\n var definer = util.template(\"asx-module\",{\n MODULE_NAME: t.literal(this.getModuleName()),\n MODULE_BODY: definer\n });\n if(options.runtime){\n var rt = util.template(\"asx-runtime\")\n //rt._compact = true;\n body.push(t.expressionStatement(rt));\n }\n body.push(t.expressionStatement(definer))\n program.body = body;\n }", "function u(t,e){return t(e={exports:{}},e.exports),e.exports}", "function moduleDependency(code: string): string {\n return `@@MODULE_START@@${code}@@MODULE_END@@`;\n}", "function definition1() {\n\t\t\t\t\t\t\tlog('provide', '/app/js/example1', 'resolved', 'module');\n\n\t\t\t\t\t\t\treturn function appJsExample1() {\n\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}", "function defaultTranspilerTask() {\n return DEFAULT_TRANSPILER === 'traceur' ? 'js-traceur' : 'js-babel';\n}", "function defaultTranspilerTask() {\n return DEFAULT_TRANSPILER === 'traceur' ? 'js-traceur' : 'js-babel';\n}", "function catTalk() {\n \"use strict\"\n\n}", "function f(a,b){function c(){var f=a[d++];return f?void b.loadFile(f,function(a,d){if(a)return b.complete(a);var g=e(d,f,b);b.patched(f,g,function(a){return a?b.complete(a):void c()})}):b.complete()}\"string\"==typeof a&&(a=/*istanbul ignore start*/(0,g.parsePatch)(a));var d=0;c()}", "function isUseStrict(stmt) {\n return options.ecmaVersion >= 6 && stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"Literal\" && stmt.expression.value === \"use strict\";\n }", "function c(e,t,n){Array.isArray(e)?(n=t,t=e,e=void 0):\"string\"!=typeof e&&(n=e,e=t=void 0),t&&!Array.isArray(t)&&(n=t,t=void 0),t||(t=[\"require\",\"exports\",\"module\"]),\n//Set up properties for this module. If an ID, then use\n//internal cache. If no ID, then use the external variables\n//for this node module.\ne?\n//Put the module in deep freeze until there is a\n//require call for it.\nd[e]=[e,t,n]:l(e,t,n)}", "function babelTranspilerForAsyncAwaitCode(System, babel, filename, env) {\n // The function wrapper is needed b/c we need toplevel awaits and babel\n // converts \"this\" => \"undefined\" for modules\n return function (source, options) {\n options = Object.assign({\n sourceMap: undefined, // 'inline' || true || false\n inputSourceMap: undefined,\n filename: filename,\n code: true,\n ast: false\n }, options);\n var sourceForBabel = \"(async function(__rec) {\\n\" + source + \"\\n}).call(this);\",\n transpiled = babel.transform(sourceForBabel, options).code;\n transpiled = transpiled.replace(/\\}\\)\\.call\\(undefined\\);$/, \"}).call(this)\");\n return transpiled;\n };\n}", "function setup() {\n\t'use strict';\n\n}", "function hello2() {\n const bye = \"bye\";\n\n /**\n * For disable the es-lint on the line\n * Please put the below comment\n * now instead of the error we will have the warning for below 2\n */\n // eslint-disable-next-line\n console.log(\"this is sample \", bye);\n\n /**\n * disabling a particular rule for the eslint\n */\n // eslint-disable-next-line quotes\n console.log(\"this is sample \", 2323232);\n\n const a = 95;\n\n console.log(`vaylue for the a the `, a);\n}", "onMapModule(desc) {\n\n if (desc.type !== 'VueComponent') {\n return;\n }\n super.onMapModule(desc);\n\n if (desc.template) {\n this.parseTemplate(desc);\n }\n\n if (desc.component.trigger) {\n\n _.forEach(desc.component.trigger, trigger => {\n\n trigger.resource = desc.resource;\n trigger.template = 'function';\n trigger.simpleName = trigger.name;\n const {params, tables} = util.mapParams(trigger.params);\n\n trigger.params = params;\n trigger.tables = tables;\n\n });\n\n }\n\n return Promise.resolve();\n\n }", "function notInlineUseCase() { console.log('Not an inline use case');}", "function sampleB() {\n\n\t'use strict';\n\n\twindow.console.log(\"Sample B\");\n}", "function nonStrictMode() {\n let x = 34;\n\n //..\n 'use strict';\n //..\n }", "function resetIfUsingPreact() {\n if (window.preact !== undefined) {\n jsxLoader.compiler.pragma = 'React.createElement';\n jsxLoader.compiler.pragmaFrag = 'React.Fragment';\n }\n }", "function module() {\n \"use asm\";\n var abs = Math.abs;\n function f() {\n return +abs();\n }\n return { f:f };\n}", "_loosyGoosy(string) {\n // let useStrictRE = /[\"']use strict[\"']\\;?/g\n return string.split('use strict').join('')\n }", "function notBlockUseCase() { console.log('Not an block use case');}", "function sampleA() {\n\n\t'use strict';\n\n\twindow.console.log(\"Sample A\");\n}", "onEnd({ compilation }) {\n console.log('end detecting webpack modules cycles');\n }", "extend (config, ctx) {\n config.devtool = ctx.isClient ? \"eval-source-map\" : \"inline-source-map\";\n\n // if (ctx.isDev && ctx.isClient) {\n // config.module.rules.push({\n // enforce: \"pre\",\n // test: /\\.(js|vue)$/,\n // loader: \"eslint-loader\",\n // exclude: /(node_modules)/,\n // });\n // }\n }", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;// Using console['warn'] to evade Babel and ESLint\nconsole['warn']('The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function o0(e = 'default argument') {\n try { {\n var o3 = () => { try {\n'use strict';\n}catch(e){} }\n\n try {\no18(o3, \"Strict-mode lambda\");\n}catch(e){}\n } } catch(e) {}try { try {\nPromise.call(promise, undefined);\n}catch(e){} } catch(e) {}\n}", "function useDocusaurusContext(){return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_context__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]);}", "function uglify(name) {\n console.log(\"Hello \" + name);\n}", "make_modules() {\n let s = ``\n for (var id in se.mods) {\n if (!se.mods[id].api) continue\n s += `const ${id} = se.mods['${id}'].api[self.id]`\n s += '\\n'\n }\n return s\n }", "function aaa(){\n \"use strict\";\n {\n function fn(){return 10;}\n console.log(fn()); \n {\n \n function fn(){return 2;}\n function fn2(){return 3;} //try to rename in fn\n console.log(fn());\n }\n console.log(fn());\n }\n}", "function compat_module_E(n,t){for(var e in t)n[e]=t[e];return n}", "function isESModule(n){return n.__esModule||hasSymbol&&\"Module\"===n[Symbol.toStringTag]}", "resolveImports() {\n return { safeMath: true, pausable: true, tokenInterface: true };\n }", "function className(name,module){return function(target){target[\"__bjsclassName__\"]=name;target[\"__bjsmoduleName__\"]=module!=null?module:null;};}", "getHeader() {\n return `/**\n * IN2 Logic Tree File\n *\n * This file has been generated by an IN2 compiler.\n */\\n/*eslint-disable-line*/function run(isDryRun){\\n/* global player, core, engine */\nconst files = {};\nconst scope = {};\nconst CURRENT_NODE_VAR = '${CURRENT_NODE_VAR}';\nconst CURRENT_FILE_VAR = '${CURRENT_FILE_VAR}';\nconst LAST_FILE_VAR = '${LAST_FILE_VAR}';`;\n }", "function definition2(appJsExample1) {\n\t\t\t\t\t\t\tlog('provide', '/app/js/example2', 'resolved', 'module, with dependency');\n\n\t\t\t\t\t\t\treturn function appJsExample2() {\n\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}", "function Module(stdlib, imports, buffer) {\n \"use asm\";\n\n var a = imports.x | 0;\n\n function f() {\n return a | 0;\n }\n\n return {\n f: f\n };\n}", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support hyration. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support hyration. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "function removeCommonJSRequireStatement(jscodeshiftAPI, astRootCollection, transformationInfo) {\n\n\tlet importedElement = transformationInfo.importedElement;\n\t// var importSource = importedElement.definitionModuleName.value;\n\n\tlet importSource = importedElement.definitionModuleName;\n\tlet isImportedElementExportedViaModuleExports = importedElement.isImportedElementExportedViaModuleExports;\n\t// let elementProperties = importedElement.dataType === 'function' ? importedElement.functionProperties : importedElement.objectProperties;\n\n\t//update: what if a module is required multiple times (withing multiple function definitions)?\n\t//get the first call\n\tlet impElNode = importedElement.importedElementNodes[0];\n\tlet impElNodeCollection = searchASTNodeByLocation(jscodeshiftAPI, astRootCollection, impElNode);\n\n\tif(impElNodeCollection.length === 0) {\n\n\t\treturn [];\n\t}\n\n\tlet importedElementNode = impElNodeCollection.at(0).get().value;\n\n\t// var importedElementNode = importedElement.importedElementNodes[0];\n\n\tif(importedElementNode.callee.type !== 'Identifier' || \n\t\timportedElementNode.callee.name !== 'require') {\n\n\t\t//not an invocation of require() provided by CommonJS (an import through an external package, e.g. sandbox/proxy)\n\t\t//do not remove statement, simply replace all references to this element\n\t\t//to references of the imported object (switching ES6 default to named exports)\n\t\t//changes semantics: in the former case the export object is the exported definition\n\t\t//in the latter case the export object contains the exported definition as a property\n\t\tif(isImportedElementExportedViaModuleExports === true) {\n\n\t\t\t// let elementReferences = locateImportedElementReferencesInAST(jscodeshiftAPI, astRootCollection, importedElement);\n\n\t\t\t//locate importedElement's references in the AST (need to be modified, along with the ES6 import introduction)\n\t\t\t//filter out element references for each require() invocation\n\t\t\t//importedElement might be imported multiple times (under a different alias)\n\t\t\t/**\n\t\t\t * {impElNode: <AST node>,\n\t\t\t\telementRefIdentifiers: <AST node>}\n\t\t\t*/\n\t\t\tlet elemRefObjs = locateImportedElementReferencesInAST(jscodeshiftAPI, astRootCollection, importedElement);\n\t\t\t\n\t\t\tlet elementReferences;\n\t\t\tlet elemRefObj = elemRefObjs.find(elemRefObj => {\n\n\t\t\t\tlet impElASTNodeLoc = elemRefObj.impElNode.value.loc;\n\t\t\t\t// console.log(elemRefObj)\n\t\t\t\t// console.log(impElASTNodeLoc);\n\t\t\t\t\n\t\t\t\treturn impElASTNodeLoc.start.line === impElNodeLoc.start.line &&\n\t\t\t\t\t\timpElASTNodeLoc.start.column === impElNodeLoc.start.column &&\n\t\t\t\t\t\timpElASTNodeLoc.end.line === impElNodeLoc.end.line &&\n\t\t\t\t\t\timpElASTNodeLoc.end.column === impElNodeLoc.end.column;\n\t\t\t});\n\n\t\t\tif(elemRefObj === undefined) {\n\n\t\t\t\telementReferences = [];\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\telementReferences = elemRefObj.elementReferences;\n\t\t\t}\n\n\t\t\trenameFunctionPropertyReferencesToVariableReferences(jscodeshiftAPI, astRootCollection, transformationInfo.filePath, importedElement, elementReferences, false);\n\n\t\t\t// let usedGlobalIdentifiers = importedElement.usageSet;\n\t\t\t// let elementIdentifier = jscodeshiftAPI.identifier(importedElement.elementName);\n\t\t\t// let aliasIdentifier = jscodeshiftAPI.identifier(importedElement.aliasName);\n\n\t\t\t\n\t\t}\n\n\t\treturn [];\n\t}\n\t\n\t// var importedElementObject;\n\t// var isImportNestedInBlockStatement;\n\n\tlet transformationType = transformationInfo.dependencyType;\n\n\tlet filePath = transformationInfo.filePath;\n\t\n\t//(i) find import statement that needs to be removed\n\t//search by node representing the import statement\n\n\tlet importedElementObjects = importedElement.importedElementNodes.map(importedElementNode => {\n\n\t\t//find specific call to require() through the AST CallExpression node\n\t\t//callee: function called in CallExpression node (contains the range, \n\t\t//namely the position of the node in the AST)\n\n\t\tlet callExpressions = searchASTNodeByLocation(jscodeshiftAPI, astRootCollection, importedElementNode);\n\t\t\n\t\tif(callExpressions.length === 0) {\n\n\t\t\treturn null;\n\t\t}\n\n\t\t//1-1 mapping between node and its location\n\t\tlet callExpression = callExpressions.at(0).get();\n\t\tlet isImportNestedInBlockStatement = importedElement.isNested;\n\t\tlet importedElementObject = {};\n\t\timportedElementObject.isNested = isImportNestedInBlockStatement;\n\n\t\t// console.log(callExpression.parentPath.value);\n\n\t\t//applies only in cases of a nested import \n\t\t//(inside multiple expressions, apart from single member expressions)\n\t\timportedElementObject.isNestedInMemberExpression = isImportNestedInBlockStatement === false ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcallExpression.parentPath.value.type === 'MemberExpression' &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcallExpression.parentPath.value.property.type === 'Identifier' &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcallExpression.parentPath.value.property.name === importedElement.elementName;\n\t\t\n\t\t/*ES6 named import needs two (or three) elements:\n\t\t(1) the name of the imported element's definition module\n\t\t(2) the name of the imported element\n\t\t(3) an alias of the imported element (optional)*/\n\t\t\n\t\t/* (1) find the name of the imported element's definition module\n\t\t(1st argument of require()) */\n\t\tlet callExpressionValue = callExpression.value;\n\t\tlet calleeArguments = callExpression.value.arguments;\n\t\tif(calleeArguments === undefined) {\n\n\t\t\treturn null;\n\t\t}\n\n\t\t// console.log(callExpression);\n\t\tlet importedSourceFileName = calleeArguments[0];\n\t\timportedElementObject['definitionModule'] = importedSourceFileName;\n\t\t\n\t\t/* (2) find the name of the imported element\n\t\t//case 1: after call to require(), a property is accessed (parentNode is a MemberExpression)\n\t\t//case 2: after call to require(), no property is accessed (parentNode is a VariableDeclarator) */\n\t\tlet importedProperty = null;\n\t\tlet importedElementAlias = null;\n\t\tlet importedElementAssignedToProperty;\n\t\tlet grandParentNode;\n\t\tlet parentNode = callExpression.parentPath;\n\t\tlet parentNodeValue = parentNode.value;\n\t\tlet parentNodeValueType = parentNodeValue.type;\n\t\tlet comments = null;\n\t\tlet resultObject;\n\t\tlet propertyOfIteratedObjectAccessed = false;\n\n\t\t// console.log(isImportNestedInBlockStatement);\n\t\t// console.log(parentNode.value);\n\n\t\t// console.log(isImportNestedInBlockStatement);\n\n\t\tif(isImportNestedInBlockStatement === true || \n\t\t\tparentNode.value.type === 'CallExpression' || \n\t\t\tparentNode.value.type === 'Property' ||\n\t\t\t((transformationInfo.dependencyType === 'NamespaceImport' || \n\t\t\ttransformationInfo.dependencyType === 'NamespaceModification') &&\n\t\t\tparentNodeValueType === 'MemberExpression')) {\n\n\t\t\t// console.log(parentNodeValueType);\n\t\t\t//case: parent node of import statement is a call expression or located in nested scope or assigned to an object's property\n\t\t\t//syntax: require(<modulePath>)()\n\t\t\tlet importModule = path.basename(importedElement.definitionModuleName, '.js').replace(/[^a-zA-Z0-9_ ]/g, '');\n\n\t\t\t//differentiate import alias in the case that imported module is an external module\n\t\t\t//prevent bugs due to exported and local modules and variables with the same name\n\t\t\t//imported alias always depends on the definition's name and its definition module's name\n\t\t\tif(importedElement.definitionModuleName.startsWith('.') === false) {\n\n\t\t\t\t// importModule = path.basename(importedElement.definitionModuleName, '.js').replace(/[^a-zA-Z0-9_ ]/g, '');\n\t\t\t\t// importedProperty = (path.basename(importedElement.definitionModuleName, '.js') + '_' + importedElement.elementName).replace(/[^a-zA-Z0-9_ ]/g, '');\n\t\t\t\timportedProperty = `ext_${importedElement.elementName.replace(/[^a-zA-Z0-9_ ]/g, '')}`;\n\t\t\t\t// importedProperty = 'ext_' + importedProperty;\n\t\t\t\timportedElementAlias = importedProperty;\n\t\t\t}\n\t\t\telse if(importedElement.elementName === null && importedElement.aliasName === null) {\n\n\t\t\t\timportedProperty = null;\n\t\t\t\timportedElementAlias = importedProperty;\n\t\t\t}\n\t\t\telse if(parentNodeValueType === 'MemberExpression' && \n\t\t\t\t\timportedElement.numberOfPropertiesExportedFromModule > 1) {\n\n\t\t\t\tif(importedElement.isObjectReferenced === true ||\n\t\t\t\t\timportedElement.isNested === true ||\n\t\t\t\t\timportedElement.isMappedToImportedAndReexportedDefinitions === true) {\n\n\t\t\t\t\timportedProperty = importedElement.definitionModuleName.replace(/[^a-zA-Z0-9_ ]/g, '') + 'js';\n\t\t\t\t\timportedElementAlias = importedProperty;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t// importedProperty = importedElement.aliasName.replace(/[^a-zA-Z0-9_ ]/g, '');\n\t\t\t\t\timportedProperty = parentNodeValue.property.type === 'Identifier' ?\n\t\t\t\t\t\t\t\t\t\tparentNodeValue.property.name :\n\t\t\t\t\t\t\t\t\t\timportedElement.aliasName.replace(/[^a-zA-Z0-9_ ]/g, '');\n\n\t\t\t\t\timportedElementAlias = `${importModule}_${importedProperty}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t//imported element is an object with bound properties that is referenced outside member expressions\n\t\t\t\t//it is named with its alias\n\n\t\t\t\t// importedProperty = (path.basename(importedElement.definitionModuleName, '.js') + 'js').replace(/[^a-zA-Z0-9_ ]/g, '');\n\t\t\t\tlet aliasName = importedElement.aliasName === undefined ? importedElement.elementName : importedElement.aliasName;\n\t\t\t\tlet importedModulePath = importedElement.definitionModuleName;\n\n\t\t\t\tlet localIdentifierName;\n\t\t\t\tif(isImportNestedInBlockStatement === true && importedElement.dataType === 'property' && importedElement.numberOfPropertiesExportedFromModule > 1) {\n\n\t\t\t\t\t//imported element is a property exported from its definition module along\n\t\t\t\t\t//with other properties (a namespace import will be introduced since the import is nested)\n\t\t\t\t\t//avoid using reserved words as names (case: mathjs)\n\t\t\t\t\tlocalIdentifierName = importedElement.definitionModuleName.replace(/[^a-zA-Z0-9_ ]/g, '') + '_obj';\n\t\t\t\t\timportedProperty = localIdentifierName;\n\t\t\t\t\timportedElementAlias = importedProperty;\n\n\t\t\t\t\t//prevent name collisions due to modules with the same name that are located in different directories\n\t\t\t\t\t// importedElementAlias = importedModulePath.replace(/[^a-zA-Z0-9_ ]/g, '') + '_' + importedProperty;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t// localIdentifierName = aliasName;\n\n\t\t\t\t\t//name too big, which causes problems in jscodeshift (?)\n\t\t\t\t\t//prevent name collisions due to modules with the same name which are located in different directories\n\t\t\t\t\tlocalIdentifierName = aliasName.replace(/[^a-zA-Z0-9_ ]/g, '');\n\t\t\t\t\timportedProperty = importedElement.elementName.replace(/[^a-zA-Z0-9_ ]/g, '');\n\t\t\t\t\t// importedProperty = localIdentifierName;\n\n\t\t\t\t\t//prevent name collisions due to modules with the same name that are located in different directories\n\t\t\t\t\timportedElementAlias = importedModulePath.replace(/[^a-zA-Z0-9_ ]/g, '') + '_' + importedProperty;\n\t\t\t\t}\n\n\t\t\t\t// importedProperty = localIdentifierName + 'js';\n\n\t\t\t\t// if(fs.statSync(importedElement.definitionModuleName).isDirectory() === true) {\n\n\t\t\t\t// \timportedElementAlias = importModulePath;\n\t\t\t\t// }\n\t\t\t\t// else {\n\n\t\t\t\t// \timportedElementAlias = path.dirname(importModulePath);\n\t\t\t\t// }\n\n\t\t\t\t// //prevent name collisions due to modules with the same name that are located in different directories\n\t\t\t\t// importedElementAlias = importedModulePath.replace(/[^a-zA-Z0-9_ ]/g, '') + '_' + importedProperty;\n\t\t\t\t// importedProperty = (importedElement.elementName !== null ? importedElement.elementName + 'js' : (path.basename(importedElement.definitionModuleName, '.js') + 'js'));\n\t\t\t\t// importedProperty = importedProperty.replace(/[^a-zA-Z0-9_ ]/g, '');\n\t\t\t}\n\n\t\t\tlet replaceName = importedElementAlias;\n\n\t\t\t// var requireResultcallExpressionCollection = astRootCollection.find(jscodeshiftAPI.CallExpression, callExpressionValue);\n\n\t\t\t//search specific require() invocation, \n\t\t\t//in case that it specifies a module with no exported features\n\t\t\tlet requireResultcallExpressionCollection = searchASTNodeByLocation(jscodeshiftAPI, astRootCollection, callExpressionValue);\n\t\t\tif(requireResultcallExpressionCollection.length === 0) {\n\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif(importedElement.isMappedToExportedDefinitions === false) {\n\n\t\t\t\t//require() assigned to an object's property, but imported module does not export any definition\n\t\t\t\tif(importedElement.definitionModuleName.startsWith('.') === true) {\n\n\t\t\t\t\trequireResultcallExpressionCollection.replaceWith(node => { \n\t\t\t\t\t\t\n\t\t\t\t\t\treturn jscodeshiftAPI.objectExpression([]);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\trequireResultcallExpressionCollection.replaceWith(node => {\n\n\t\t\t\t\t\treturn jscodeshiftAPI.identifier(replaceName);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t//replace references of importedElement with a reference to its alias\n\t\t\t\t//imported definitions are imported through their actual names,\n\t\t\t\t//but they're used with their aliases (in order to prevent name collisions)\n\t\t\t\t// let replaceName = importedElementAlias;\n\n\t\t\t\t//don't replace require() with replaceName ref when:\n\t\t\t\t//(a) it's mapped to an imported and re-exported definition and\n\t\t\t\t//(b) it's not bound to the module object (re-exported from this module) and\n\t\t\t\t//(c) it's not bound to a feat assigned with the module object (re-exported from this module) and\n\t\t\t\t//(d) it's not nested and\n\t\t\t\t//(e) it has no refs\n\t\t\t\tif(importedElement.isMappedToImportedAndReexportedDefinitions === true &&\n\t\t\t\t\timportedElement.boundToExportedDefinition === false &&\n\t\t\t\t\timportedElement.impElBoundToFeatAssignedWithModObj === false &&\n\t\t\t\t\timportedElement.isNested === false &&\n\t\t\t\t\timportedElement.usageSet.length === 0) {\n\n\t\t\t\t\tlet objExp = jscodeshiftAPI.objectExpression([]);\n\n\t\t\t\t\tif(parentNodeValueType === 'MemberExpression') {\n\n\t\t\t\t\t\trequireResultcallExpressionCollection.forEach(node => {\n\n\t\t\t\t\t\t\tjscodeshiftAPI(node.parentPath).replaceWith(objExp);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\trequireResultcallExpressionCollection.replaceWith(node => {\n\n\t\t\t\t\t\t\treturn objExp;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if(importedElement.dataType === 'property' &&\n\t\t\t\t\t(importedElementObject.isNestedInMemberExpression === true ||\n\t\t\t\t\t\tparentNodeValueType === 'MemberExpression')) {\n\n\t\t\t\t\t//importedElement is a property,\n\t\t\t\t\t//while import expression is nested in multiple expressions\n\t\t\t\t\t//and its parent is a member expression accessing importedElement\n\t\t\t\t\t//transform its parent (the member expression) \n\t\t\t\t\trequireResultcallExpressionCollection.forEach(node => {\n\n\t\t\t\t\t\tlet idNode = jscodeshiftAPI.identifier(replaceName);\n\t\t\t\t\t\t// if(importedElement.isMappedToImportedAndReexportedDefinitions === true &&\n\t\t\t\t\t\t// \timportedElement.isImportedElementExportedViaModuleExports === false &&\n\t\t\t\t\t\t// \timportedElement.numberOfPropertiesExportedFromModule > 1) {\n\n\t\t\t\t\t\t// \t\tjscodeshiftAPI(node).replaceWith(idNode);\n\t\t\t\t\t\t// \t\treturn;\n\t\t\t\t\t\t// \t}\n\n\t\t\t\t\t\tif(importedElement.isMappedToImportedAndReexportedDefinitions === true &&\n\t\t\t\t\t\t\timportedElement.isImportedElementExportedViaModuleExports === false) {\n\n\t\t\t\t\t\t\t\tjscodeshiftAPI(node).replaceWith(idNode);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(importedElement.isImportedElementExportedViaModuleExports === true) {\n\n\t\t\t\t\t\t\tjscodeshiftAPI(node).replaceWith(idNode);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tjscodeshiftAPI(node.parentPath).replaceWith(idNode);\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\trequireResultcallExpressionCollection.replaceWith(node => {\n\n\t\t\t\t\t\t// var identifierNode = jscodeshiftAPI.identifier(importModule + '_' + importedProperty);\n\t\t\t\t\t\tlet identifierNode = jscodeshiftAPI.identifier(replaceName);\n\t\t\t\t\t\treturn identifierNode;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\n\t\t\t\t// requireResultcallExpressionCollection.replaceWith(node => {\n\n\t\t\t\t// \t// var identifierNode = jscodeshiftAPI.identifier(importModule + '_' + importedProperty);\n\t\t\t\t// \tlet identifierNode = jscodeshiftAPI.identifier(replaceName);\n\t\t\t\t// \treturn identifierNode;\n\t\t\t\t// });\n\t\t\t}\n\n\t\t\t// importedElementAlias = importedProperty;\n\t\t}\n\t\telse if(parentNode.value.type === 'MemberExpression') {\n\t\t\t\n\t\t\t//parentNode is a MemberExpression\n\t\t\t//(parentNode syntax: require(<modulePath>).<modulePropertyName>)\n\t\t\tresultObject = transformRequireMemberExpression(jscodeshiftAPI, astRootCollection, parentNode, callExpressions, importedElement, filePath);\n\t\t\timportedProperty = resultObject.importedProperty;\n\t\t\timportedElementAlias = resultObject.importedElementAlias;\n\t\t\tcomments = resultObject.comments;\n\t\t\tpropertyOfIteratedObjectAccessed = resultObject.propertyOfIteratedObjectAccessed;\n\t\t}\n\t\telse if(parentNode.value.type === 'VariableDeclarator') {\n\t\t\t\n\t\t\t//parentNode is a VariableDeclarator\n\t\t\t//(syntax: <variableName> = require(<modulePath>))\n\t\t\timportedProperty = transformationInfo.importedElement.elementName;\n\t\t\tresultObject = transformRequireVariableDeclarator(jscodeshiftAPI, filePath, astRootCollection, parentNode, importedElement);\n\t\t\timportedProperty = resultObject.importedProperty;\n\t\t\timportedElementAlias = resultObject.importedElementAlias;\n\t\t\tcomments = resultObject.comments;\n\t\t}\n\t\telse if(parentNode.value.type === 'AssignmentExpression') {\n\t\t\t\n\t\t\t//parentNode is an AssignmentExpression (syntax: <leftOperand> = require(<modulePath>))\n\t\t\t//case: result of requireCall is assigned directly to exports/module.exports (or a variable)\n\t\t\t//syntax: exports.<exportedElementIdentifier> = require(<modulePath>) or\n\t\t\t//\t\t module.exports = require(<modulePath) or\n\t\t\t//\t\t <identifier> = require(<modulePath)\n\t\t\t// importedProperty = transformationInfo.importedElement.elementName;\n\t\t\tresultObject = transformRequireAssignmentExpression(jscodeshiftAPI, filePath, astRootCollection, parentNode, callExpressions, importedElement, isImportNestedInBlockStatement, transformationType);\n\t\t\t// console.log(resultObject);\n\t\t\timportedProperty = resultObject.importedProperty;\n\t\t\timportedElementAlias = resultObject.importedElementAlias;\n\t\t\timportedElementAssignedToProperty = resultObject.importedElementAssignedToProperty;\n\t\t\tcomments = resultObject.comments;\n\t\t}\n\t\telse if(parentNode.value.type === 'ExpressionStatement') {\n\n\t\t\t//parentNode is an ExpressionStatement (syntax: require(<modulePath>);)\n\t\t\t//replace require call with an ES6 module import statement (syntax: import <modulePath>)\n\t\t\tastRootCollection.find(jscodeshiftAPI.ExpressionStatement)\n\t\t\t\t\t\t\t .filter(path => {return path.value === parentNode.value;})\n\t\t\t\t\t\t\t .remove();\n\t\t\timportedProperty = null;\n\t\t\timportedElementAlias = null;\n\t\t\tcomments = null;\n\t\t}\n\t\telse {\n\n\t\t\t//import statement inside other expressions (e.g. NewExpression)\n\t\t\timportedProperty = importedElement.elementName;\n\t\t\timportedElementAlias = importedElement.aliasName;\n\n\t\t\t//replace require() invocation with the importedElement's alias\n\t\t\t//(these imported object have no uses)\n\t\t\tlet requireResultcallExpressionCollection = searchASTNodeByLocation(jscodeshiftAPI, astRootCollection, callExpressionValue);\n\t\t\tif(requireResultcallExpressionCollection.length === 0) {\n\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\trequireResultcallExpressionCollection.replaceWith(node => {\n\n\t\t\t\treturn jscodeshiftAPI.identifier(importedElementAlias);\n\t\t\t});\n\t\t}\n\t\t\n\t\timportedElementObject['importedModuleProperty'] = importedProperty;\n\t\t\n\t\t//(3) find alias of the imported element\n\t\t//(the name of the variable that is assigned the result of the call to require())\n\t\timportedElementObject['importedModulePropertyAlias'] = importedElementAlias;\n\n\t\timportedElementObject['importedElementAssignedToProperty'] = importedElementAssignedToProperty;\n\n\t\timportedElementObject['comments'] = comments;\n\n\t\t//add parentNodeValueType to importedElementObject\n\t\t//(i) parentNodeValueType = 'MemberExpression': export statement syntax: var <variableName> = require(<modulePath>).<elementName> => import {<elementName> [as <variableName>]} from '<modulePath>';\n\t\t//(ii) parentNodeValueType = 'VariableDeclarator': export statement syntax: var <variableName> = require(<modulePath>) => import * as <variableName> from 'modulePath';\n\t\timportedElementObject['parentNodeValueType'] = parentNodeValue.type;\n\n\t\timportedElementObject.propertyOfIteratedObjectAccessed = propertyOfIteratedObjectAccessed;\n\n\t\t// console.log(importedElementObject);\n\n\t\t//update: what if a module is required multiple times?\n\t\treturn importedElementObject;\n\n\t\t// var callExpression;\n\n\t\t// console.log(callExpressions.length);\n\t\t\n\t});\n\t\n\treturn importedElementObjects;\n\n\t// var importedElementObjects = [];\n\t// importedElement.importedElementNodes.forEach(function(importedElementNode) {\n\n\t// \t//find specific call to require() through the AST CallExpression node\n\t// \t//callee: function called in CallExpression node (contains the range, \n\t// \t//namely the position of the node in the AST)\n\t// \tvar callExpressions = astRootCollection.find(jscodeshiftAPI.CallExpression, {callee: importedElementNode.callee});\n\t// \tvar callExpression;\n\n\t// \t// console.log(callExpressions.length);\n\t\t\n\t// \tfor(var callExpressionIndex = 0; callExpressionIndex < callExpressions.length; callExpressionIndex++) {\n\t\t\t\n\t// \t\tcallExpression = callExpressions.at(callExpressionIndex).get();\n\n\t// \t\tisImportNestedInBlockStatement = importedElement.isNested;\n\t// \t\timportedElementObject = {};\n\t// \t\timportedElementObject.isNested = isImportNestedInBlockStatement;\n\t\t\t\n\t// \t\t/*ES6 named import needs two (or three) elements:\n\t// \t\t(1) the name of the imported element's definition module\n\t// \t\t(2) the name of the imported element\n\t// \t\t(3) an alias of the imported element (optional)*/\n\t\t\t\n\t// \t\t/* (1) find the name of the imported element's definition module\n\t// \t\t(1st argument of require()) */\n\t// \t\tvar callExpressionValue = callExpression.value;\n\t// \t\tvar calleeArguments = callExpression.value.arguments;\n\t// \t\tif(calleeArguments === undefined) {\n\n\t// \t\t\tcontinue;\n\t// \t\t}\n\n\t// \t\t// console.log(callExpression);\n\t// \t\tvar importedSourceFileName = calleeArguments[0];\n\t// \t\timportedElementObject['definitionModule'] = importedSourceFileName;\n\t\t\t\n\t// \t\t/* (2) find the name of the imported element\n\t// \t\t//case 1: after call to require(), a property is accessed (parentNode is a MemberExpression)\n\t// \t\t//case 2: after call to require(), no property is accessed (parentNode is a VariableDeclarator) */\n\t// \t\tvar importedProperty = null;\n\t// \t\tvar importedElementAlias = null;\n\t// \t\tvar grandParentNode;\n\t// \t\tvar parentNode = callExpression.parentPath;\n\t// \t\tvar parentNodeValue = parentNode.value;\n\t// \t\tvar parentNodeValueType = parentNodeValue.type;\n\t// \t\tvar comments = null;\n\t// \t\tvar resultObject;\n\t// \t\tlet propertyOfIteratedObjectAccessed = false;\n\n\t// \t\t// console.log(isImportNestedInBlockStatement);\n\t// \t\t// console.log(parentNode.value);\n\n\t// \t\t// console.log(isImportNestedInBlockStatement);\n\n\t// \t\tif(isImportNestedInBlockStatement === true || \n\t// \t\t\tparentNode.value.type === 'CallExpression' || \n\t// \t\t\tparentNode.value.type === 'Property' ||\n\t// \t\t\t((transformationInfo.dependencyType === 'NamespaceImport' || \n\t// \t\t\ttransformationInfo.dependencyType === 'NamespaceModification') &&\n\t// \t\t\tparentNodeValueType === 'MemberExpression')) {\n\n\t// \t\t\t// console.log(parentNodeValueType);\n\t// \t\t\t//case: parent node of import statement is a call expression or located in nested scope or assigned to an object's property\n\t// \t\t\t//syntax: require(<modulePath>)()\n\t// \t\t\tlet importModule = path.basename(importedElement.definitionModuleName, '.js').replace(/[^a-zA-Z0-9_ ]/g, '');\n\n\t// \t\t\t//differentiate import alias in the case that imported module is an external module\n\t// \t\t\t//prevent bugs due to exported and local modules and variables with the same name\n\t// \t\t\t//imported alias always depends on the definition's name and its definition module's name\n\t// \t\t\tif(importedElement.definitionModuleName.startsWith('.') === false) {\n\n\t// \t\t\t\t// importModule = path.basename(importedElement.definitionModuleName, '.js').replace(/[^a-zA-Z0-9_ ]/g, '');\n\t// \t\t\t\t// importedProperty = (path.basename(importedElement.definitionModuleName, '.js') + '_' + importedElement.elementName).replace(/[^a-zA-Z0-9_ ]/g, '');\n\t// \t\t\t\timportedProperty = `ext_${importedElement.elementName.replace(/[^a-zA-Z0-9_ ]/g, '')}`;\n\t// \t\t\t\t// importedProperty = 'ext_' + importedProperty;\n\t// \t\t\t\timportedElementAlias = importedProperty;\n\t// \t\t\t}\n\t// \t\t\telse if(importedElement.elementName === null && importedElement.aliasName === null) {\n\n\t// \t\t\t\timportedProperty = null;\n\t// \t\t\t\timportedElementAlias = importedProperty;\n\t// \t\t\t}\n\t// \t\t\telse {\n\n\t// \t\t\t\t//imported element is an object with bound properties that is referenced outside member expressions\n\t// \t\t\t\t//it is named with its alias\n\n\t// \t\t\t\t// importedProperty = (path.basename(importedElement.definitionModuleName, '.js') + 'js').replace(/[^a-zA-Z0-9_ ]/g, '');\n\t// \t\t\t\tlet aliasName = importedElement.aliasName === undefined ? importedElement.elementName : importedElement.aliasName;\n\t// \t\t\t\tlet importedModulePath = importedElement.definitionModuleName;\n\n\t// \t\t\t\tlet localIdentifierName;\n\t// \t\t\t\tif(isImportNestedInBlockStatement === true && importedElement.dataType === 'property' && importedElement.numberOfPropertiesExportedFromModule > 1) {\n\n\t// \t\t\t\t\t//imported element is a property exported from its definition module along\n\t// \t\t\t\t\t//with other properties (a namespace import will be introduced since the import is nested)\n\t// \t\t\t\t\t//avoid using reserved words as names (case: mathjs)\n\t// \t\t\t\t\tlocalIdentifierName = importedElement.definitionModuleName.replace(/[^a-zA-Z0-9_ ]/g, '') + '_obj';\n\t// \t\t\t\t\timportedProperty = localIdentifierName;\n\t// \t\t\t\t\timportedElementAlias = importedProperty;\n\n\t// \t\t\t\t\t//prevent name collisions due to modules with the same name that are located in different directories\n\t// \t\t\t\t\t// importedElementAlias = importedModulePath.replace(/[^a-zA-Z0-9_ ]/g, '') + '_' + importedProperty;\n\t// \t\t\t\t}\n\t// \t\t\t\telse {\n\n\t// \t\t\t\t\t// localIdentifierName = aliasName;\n\n\t// \t\t\t\t\t//name too big, which causes problems in jscodeshift (?)\n\t// \t\t\t\t\t//prevent name collisions due to modules with the same name which are located in different directories\n\t// \t\t\t\t\tlocalIdentifierName = aliasName.replace(/[^a-zA-Z0-9_ ]/g, '');\n\t// \t\t\t\t\timportedProperty = importedElement.elementName.replace(/[^a-zA-Z0-9_ ]/g, '');\n\t// \t\t\t\t\t// importedProperty = localIdentifierName;\n\n\t// \t\t\t\t\t//prevent name collisions due to modules with the same name that are located in different directories\n\t// \t\t\t\t\timportedElementAlias = importedModulePath.replace(/[^a-zA-Z0-9_ ]/g, '') + '_' + importedProperty;\n\t// \t\t\t\t}\n\n\t// \t\t\t\t// importedProperty = localIdentifierName + 'js';\n\n\t// \t\t\t\t// if(fs.statSync(importedElement.definitionModuleName).isDirectory() === true) {\n\n\t// \t\t\t\t// \timportedElementAlias = importModulePath;\n\t// \t\t\t\t// }\n\t// \t\t\t\t// else {\n\n\t// \t\t\t\t// \timportedElementAlias = path.dirname(importModulePath);\n\t// \t\t\t\t// }\n\n\t// \t\t\t\t// //prevent name collisions due to modules with the same name that are located in different directories\n\t// \t\t\t\t// importedElementAlias = importedModulePath.replace(/[^a-zA-Z0-9_ ]/g, '') + '_' + importedProperty;\n\t// \t\t\t\t// importedProperty = (importedElement.elementName !== null ? importedElement.elementName + 'js' : (path.basename(importedElement.definitionModuleName, '.js') + 'js'));\n\t// \t\t\t\t// importedProperty = importedProperty.replace(/[^a-zA-Z0-9_ ]/g, '');\n\t// \t\t\t}\n\n\t// \t\t\tlet replaceName = importedElementAlias;\n\n\t// \t\t\tvar requireResultcallExpressionCollection = astRootCollection.find(jscodeshiftAPI.CallExpression, callExpressionValue);\n\t// \t\t\tif(requireResultcallExpressionCollection.length === 0) {\n\n\t// \t\t\t\treturn;\n\t// \t\t\t}\n\n\t// \t\t\tif(importedElement.isMappedToExportedDefinitions === false) {\n\n\t// \t\t\t\t//require() assigned to an object's property, but imported module does not export any definition\n\t// \t\t\t\tif(importedElement.definitionModuleName.startsWith('.') === true) {\n\n\t// \t\t\t\t\trequireResultcallExpressionCollection.replaceWith(node => { \n\t\t\t\t\t\t\t\n\t// \t\t\t\t\t\treturn jscodeshiftAPI.objectExpression([]);\n\t// \t\t\t\t\t});\n\t// \t\t\t\t}\n\t// \t\t\t\telse {\n\n\t// \t\t\t\t\trequireResultcallExpressionCollection.replaceWith(node => {\n\n\t// \t\t\t\t\t\treturn jscodeshiftAPI.identifier(replaceName);\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\telse if(requireResultcallExpressionCollection.length > 0) {\n\n\t// \t\t\t\t//replace references of importedElement with a reference to its alias\n\t// \t\t\t\t//imported definitions are imported through their actual names,\n\t// \t\t\t\t//but they're used with their aliases (in order to prevent name collisions)\n\t// \t\t\t\t// let replaceName = importedElementAlias;\n\n\t// \t\t\t\trequireResultcallExpressionCollection.replaceWith(node => {\n\n\t// \t\t\t\t\t// var identifierNode = jscodeshiftAPI.identifier(importModule + '_' + importedProperty);\n\t// \t\t\t\t\tvar identifierNode = jscodeshiftAPI.identifier(replaceName);\n\t// \t\t\t\t\treturn identifierNode;\n\t// \t\t\t\t});\n\t// \t\t\t}\n\n\t// \t\t\t// importedElementAlias = importedProperty;\n\t// \t\t}\n\t// \t\telse if(parentNode.value.type === 'MemberExpression') {\n\t\t\t\t\n\t// \t\t\t//parentNode is a MemberExpression\n\t// \t\t\t//(parentNode syntax: require(<modulePath>).<modulePropertyName>)\n\t// \t\t\tresultObject = transformRequireMemberExpression(jscodeshiftAPI, astRootCollection, parentNode, callExpressions, importedElement, filePath);\n\t// \t\t\timportedProperty = resultObject.importedProperty;\n\t// \t\t\timportedElementAlias = resultObject.importedElementAlias;\n\t// \t\t\tcomments = resultObject.comments;\n\t// \t\t\tpropertyOfIteratedObjectAccessed = resultObject.propertyOfIteratedObjectAccessed;\n\t// \t\t}\n\t// \t\telse if(parentNode.value.type === 'VariableDeclarator') {\n\t\t\t\t\n\t// \t\t\t//parentNode is a VariableDeclarator\n\t// \t\t\t//(syntax: <variableName> = require(<modulePath>))\n\t// \t\t\timportedProperty = transformationInfo.importedElement.elementName;\n\t// \t\t\tresultObject = transformRequireVariableDeclarator(jscodeshiftAPI, filePath, astRootCollection, parentNode, importedElement);\n\t// \t\t\timportedProperty = resultObject.importedProperty;\n\t// \t\t\timportedElementAlias = resultObject.importedElementAlias;\n\t// \t\t\tcomments = resultObject.comments;\n\t// \t\t}\n\t// \t\telse if(parentNode.value.type === 'AssignmentExpression') {\n\t\t\t\t\n\t// \t\t\t//parentNode is an AssignmentExpression (syntax: <leftOperand> = require(<modulePath>))\n\t// \t\t\t//case: result of requireCall is assigned directly to exports/module.exports (or a variable)\n\t// \t\t\t//syntax: exports.<exportedElementIdentifier> = require(<modulePath>) or\n\t// \t\t\t//\t\t module.exports = require(<modulePath) or\n\t// \t\t\t//\t\t <identifier> = require(<modulePath)\n\t// \t\t\t// importedProperty = transformationInfo.importedElement.elementName;\n\t// \t\t\tresultObject = transformRequireAssignmentExpression(jscodeshiftAPI, filePath, astRootCollection, parentNode, callExpressions, importedElement, isImportNestedInBlockStatement, transformationType);\n\t// \t\t\t// console.log(resultObject);\n\t// \t\t\timportedProperty = resultObject.importedProperty;\n\t// \t\t\timportedElementAlias = resultObject.importedElementAlias;\n\t// \t\t\tcomments = resultObject.comments;\n\t// \t\t}\n\t// \t\telse if(parentNode.value.type === 'ExpressionStatement') {\n\n\t// \t\t\t//parentNode is an ExpressionStatement (syntax: require(<modulePath>);)\n\t// \t\t\t//replace require call with an ES6 module import statement (syntax: import <modulePath>)\n\t// \t\t\tastRootCollection.find(jscodeshiftAPI.ExpressionStatement)\n\t// \t\t\t\t\t\t\t .filter(path => {return path.value === parentNode.value;})\n\t// \t\t\t\t\t\t\t .remove();\n\t// \t\t\timportedProperty = null;\n\t// \t\t\timportedElementAlias = null;\n\t// \t\t\tcomments = null;\n\t// \t\t}\n\t\t\t\n\t// \t\timportedElementObject['importedModuleProperty'] = importedProperty;\n\t\t\t\n\t// \t\t//(3) find alias of the imported element\n\t// \t\t//(the name of the variable that is assigned the result of the call to require())\n\t// \t\timportedElementObject['importedModulePropertyAlias'] = importedElementAlias;\n\n\t// \t\timportedElementObject['comments'] = comments;\n\n\t// \t\t//add parentNodeValueType to importedElementObject\n\t// \t\t//(i) parentNodeValueType = 'MemberExpression': export statement syntax: var <variableName> = require(<modulePath>).<elementName> => import {<elementName> [as <variableName>]} from '<modulePath>';\n\t// \t\t//(ii) parentNodeValueType = 'VariableDeclarator': export statement syntax: var <variableName> = require(<modulePath>) => import * as <variableName> from 'modulePath';\n\t// \t\timportedElementObject['parentNodeValueType'] = parentNodeValue.type;\n\n\t// \t\timportedElementObject.propertyOfIteratedObjectAccessed = propertyOfIteratedObjectAccessed;\n\n\t// \t\t// console.log(importedElementObject);\n\n\t// \t\t//update: what if a module is required multiple times?\n\t// \t\timportedElementObjects.push(importedElementObject);\n\t\t\t\n\t// \t\t// return importedElementObject;\n\t// \t}\n\t// });\n\t// return importedElementObjects;\n\n\n\n\t// console.log(astRootCollection.toSource());\n\t\n\t\n\t// return importedElementObject;\n}", "function __WEBPACK_DEFAULT_EXPORT__() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}", "function wrap(fn) {\r\n // tslint:disable-next-line: no-unsafe-any\r\n Object(_helpers__WEBPACK_IMPORTED_MODULE_2__[\"wrap\"])(fn)();\r\n}", "function monkeyPatch() {\n return {\n transform: (code, id) => {\n const file = path.parse(id).base;\n\n // Only one define call per module is allowed by requirejs so\n // we have to remove calls that other libraries make\n if (file === 'FileSaver.js') {\n code = code.replace(/define !== null\\) && \\(define.amd != null/g, '0')\n } else if (file === 'html2canvas.js') {\n code = code.replace(/&&\\s+define.amd/g, '&& define.amd && false')\n }\n\n return code\n }\n }\n}", "function StupidBug() {}", "function doSomething(a, b) {\n \"use strict\";\n return a * b;\n}", "Program(node) {\n const scope = context.getScope(),\n features = context.parserOptions.ecmaFeatures || {};\n\n stack.push({\n init: true,\n node,\n valid: !(\n scope.isStrict ||\n node.sourceType === \"module\" ||\n (features.globalReturn && scope.childScopes[0].isStrict)\n )\n });\n }", "function hoist_2() {\n var message='Hoisting is all the rage!'\n return (message);\n }", "help () {\n console.log(`\n Hello!\n If you want to play around with the imports provided to your WebBS module, or code that uses your module's exports, you need to provide the WebBS editor with a new module dependency provider function.\n The editor is available here as a global variable called \"WebBSEditor\" and you'll want to set the .moduleInstanceProvider field to a function that takes an instance of the editor and returns an object with two fields:\n .imports : An object that contains the imports to be provided to your module.\n .onInit : A function that takes the WebAssembly instance, which is run upon instantiation.\n\n See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance for more information.\n\n The default module dependency provider looks like this:\n\n WebBSEditor.moduleDependencyProvider = ${this.moduleDependencyProvider.toSource()};\n `);\n\n return \"Good Luck!\";\n }", "function dependencyStream(indexes, config) {\n const md = mdeps({\n /**\n * Determine whether a module should be included in documentation\n * @param {string} id path to a module\n * @returns {boolean} true if the module should be included.\n */\n filter: id => !!config.external || moduleFilters.internalOnly(id),\n extensions: []\n .concat(config.requireExtension || [])\n .map(ext => '.' + ext.replace(/^\\./, ''))\n .concat(['.mjs', '.js', '.json', '.es6', '.jsx']),\n transform: [\n babelify.configure({\n sourceMaps: false,\n compact: false,\n cwd: path.resolve(__dirname, '../../'),\n presets: [\n '@babel/preset-react',\n '@babel/preset-env',\n '@babel/preset-flow'\n ],\n plugins: [\n // Stage 0\n '@babel/plugin-proposal-function-bind',\n // Stage 1\n '@babel/plugin-proposal-export-default-from',\n '@babel/plugin-proposal-logical-assignment-operators',\n '@babel/plugin-proposal-optional-chaining',\n ['@babel/plugin-proposal-pipeline-operator', { proposal: 'minimal' }],\n [\n '@babel/plugin-proposal-nullish-coalescing-operator',\n { loose: false }\n ],\n '@babel/plugin-proposal-do-expressions',\n // Stage 2\n ['@babel/plugin-proposal-decorators', { legacy: true }],\n '@babel/plugin-proposal-function-sent',\n '@babel/plugin-proposal-export-namespace-from',\n '@babel/plugin-proposal-numeric-separator',\n '@babel/plugin-proposal-throw-expressions',\n // Stage 3\n '@babel/plugin-syntax-dynamic-import',\n '@babel/plugin-syntax-import-meta',\n ['@babel/plugin-proposal-class-properties', { loose: false }],\n '@babel/plugin-proposal-json-strings'\n ]\n })\n ],\n postFilter: moduleFilters.externals(indexes, config),\n resolve:\n config.resolve === 'node' &&\n ((id, opts, cb) => {\n const r = require('resolve');\n opts.basedir = path.dirname(opts.filename);\n r(id, opts, cb);\n })\n });\n smartGlob(indexes, config.parseExtension).forEach(index => {\n md.write(path.resolve(index));\n });\n md.end();\n\n return new Promise((resolve, reject) => {\n md.once('error', reject);\n md.pipe(\n concat(function(inputs) {\n resolve(\n inputs\n .filter(\n input =>\n // At this point, we may have allowed a JSON file to be caught by\n // module-deps, or anything else allowed by requireExtension.\n // otherwise module-deps would complain about\n // it not being found. But Babel can't parse JSON, so we filter non-JavaScript\n // files away.\n config.parseExtension.indexOf(\n path.extname(input.file).replace(/^\\./, '')\n ) > -1\n )\n .map(input => {\n // remove source file, since it's transformed anyway\n delete input.source;\n return input;\n })\n );\n })\n );\n });\n}", "isValidModuleDest(dest) {\n return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {\n if (!(yield (_fs || _load_fs()).exists(dest))) {\n return false;\n }\n\n if (!(yield (_fs || _load_fs()).exists(path.join(dest, (_constants || _load_constants()).METADATA_FILENAME)))) {\n return false;\n }\n\n return true;\n })();\n }", "function Module(stdlib, imports, buffer) {\n \"use asm\";\n\n function f() {\n return 281474976710655 * 1048575 | 0;\n }\n\n return {\n f: f\n };\n}", "function OBSOLETE(what,hint) {\r\n Ezer.fce.echo(\"WARNING - \\\"\",what,\"\\\" is OBSOLETE\",(hint ? ` - use \\\"${hint}\\\" instead` : ''));\r\n}", "function enhanceDefinedAMD(code) {\n var t = /ll\\/*l/; // uneven backslashes (single here)\n log('RESULTING CODE:\\n', enhanceDefinedAMD(code));\n}", "function anotherFunction() {\n /***/\n console.log(\"This function.\");\n}", "get babelParserPlugins() {\n return [\"typescript\", \"classProperties\", \"decorators-legacy\"];\n }", "function monkeyPatch() {\n return {\n transform: (code, id) => {\n var file = id.split('/').pop()\n\n // Only one define call per module is allowed by requirejs so\n // we have to remove calls that other libraries make\n if (file === 'FileSaver.js') {\n code = code.replace(/define !== null\\) && \\(define.amd != null/g, '0')\n } else if (file === 'html2canvas.js') {\n code = code.replace(/&&\\s+define.amd/g, '&& define.amd && false')\n }\n\n return code\n }\n }\n}", "function Module(){}", "function Module(){}", "function assureBlock(stmt) {\n if(stmt.child(0).ctorName === \"Block\") {\n return \"{\\n\" + stmt.child(0).child(1).es5Translator + \"}\";\n } else {\n return \"{\\n\" + stmt.es5Translator + \"}\";\n }\n}", "function require() { return {}; }", "function isUseStrictPrologueDirective(node) {\n var nodeText = ts.getTextOfNodeFromSourceText(file.text, node.expression);\n // Note: the node text must be exactly \"use strict\" or 'use strict'. It is not ok for the\n // string to contain unicode escapes (as per ES5).\n return nodeText === '\"use strict\"' || nodeText === \"'use strict'\";\n }", "function Bundler () {\n}", "extend (config, { isDev, isClient,isServer }) {\n if (isDev && isClient) {\n config.module.rules.push({\n enforce: 'pre',\n test: /\\.(js|vue)$/,\n loader: 'eslint-loader',\n exclude: /(node_modules)/\n })\n config.devtool = 'eval-source-map'\n }\n // if (isServer) {\n // config.externals = [\n // require('webpack-node-externals')({\n // whitelist: [/\\.(?!(?:js|json)$).{1,5}$/i, /^ai-act-ui/, /^ai-i/]\n // })\n // ]\n // }\n }", "_rollupInlineModuleScripts(ast) {\n return __awaiter(this, void 0, void 0, function* () {\n this.document = yield this._reanalyze(parse5_1.serialize(ast));\n utils_1.rewriteObject(ast, this.document.parsedDocument.ast);\n dom5.removeFakeRootElements(ast);\n const es6Rewriter = new es6_rewriter_1.Es6Rewriter(this.bundler, this.manifest, this.assignedBundle);\n const inlineModuleScripts = [...this.document.getFeatures({\n kind: 'js-document',\n imported: false,\n externalPackages: true,\n excludeBackreferences: true,\n })].filter(({ isInline, parsedDocument: { parsedAsSourceType } }) => isInline && parsedAsSourceType === 'module');\n for (const inlineModuleScript of inlineModuleScripts) {\n const { code } = yield es6Rewriter.rollup(this.document.parsedDocument.baseUrl, inlineModuleScript.parsedDocument.contents, inlineModuleScript);\n if (inlineModuleScript.astNode &&\n inlineModuleScript.astNode.language === 'html') {\n // Second argument 'true' tells encodeString to escape the <script>\n // content.\n dom5.setTextContent(inlineModuleScript.astNode.node, encode_string_1.default(`\\n${code}\\n`, true));\n }\n }\n });\n }", "function Config() {\n \"use strict\";\n}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function ll(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "function reactDocgenLoader(source) {\n const componentInfo = reactDocs.parse(source, findAllComponentDefinitions);\n return `module.exports = ${JSON.stringify(componentInfo)};`;\n}", "function wrap(fn) {\n return Object(_helpers__WEBPACK_IMPORTED_MODULE_3__[\"wrap\"])(fn)(); // tslint:disable-line:no-unsafe-any\n}", "function jsTaskIIFE(){\n return src([files.jsPathIIFE])\n .pipe(concat('figma-plugin-ds.js'))\n .pipe(prettier({ \n \"parser\":\"babel\",\n \"printWidth\":100,\n \"tabWidth\":4,\n \"useTabs\":true,\n \"semi\":true,\n \"singleQuote\":true,\n \"trailingComma\":\"none\",\n \"bracketSpacing\":true,\n \"jsxBracketSameLine\":true,\n \"arrowParens\":\"always\"\n }))\n .pipe(dest('dist/iife')\n );\n}", "function bn(t,e){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+t),e&&console.warn(e.stack))}", "exit(programPath, state) {\n // Babel 6 only let's you read plugin options inside visitors,\n // so we can't warn about an invalid config until the first file is hit.\n // TODO: In Babel 7, use config passed in when plugin is first created\n const {\n config,\n prod = false,\n onWarning = noop,\n onError = noop\n } = state.opts;\n\n if (!validationRan) {\n validationRan = true;\n if (typeof prod !== 'boolean') {\n onError(\n `Expected \"prod\" to be a boolean, but received \"${typeof prod}\"`\n );\n }\n if (typeof config !== 'object') {\n onError(\n `Expected \"config\" to be an object, but received \"${typeof config}\"`\n );\n }\n\n const { passed, error } = validateConfig(config);\n if (!passed) {\n // Warn about invalid config, but let the compilation\n // keep going\n onWarning(error);\n }\n }\n\n // We need to find any identifiers in scope that could be used to call\n // React's `createElement` function.\n const reactModuleImports = identifiersInScopeFromModule(\n programPath,\n /^react$/\n );\n const {\n reactIdentifier,\n createElementIdentifier\n } = reactModuleImports.reduce((acc, importData) => {\n if (importData.bindingName === 'default') {\n acc.reactIdentifier = importData.local;\n }\n if (importData.bindingName === 'createElement') {\n acc.createElementIdentifier = importData.local;\n }\n return acc;\n }, {});\n\n // No element creation in this file, so we bail\n if (!(reactIdentifier || createElementIdentifier)) {\n return;\n }\n\n // Start the transformation traversal\n programPath.traverse({\n CallExpression(path) {\n const isCECall = isCreateElementCall(\n path,\n reactIdentifier,\n createElementIdentifier\n );\n if (!isCECall) return;\n\n const [element] = path.get('arguments');\n const dataMIDPropNode = getProp(path, 'data-mid');\n if (!dataMIDPropNode) return;\n\n const { value: dataMID, type } = dataMIDPropNode;\n if (type !== 'StringLiteral') {\n onWarning(\n 'Expected \"data-mid\" to be a literal string, ' +\n `but instead found a value of type \"${type}\"`\n );\n }\n\n if (!t.isStringLiteral(element)) {\n onWarning(\n '\"data-mid\" found on a Composite Component.' +\n 'Only DOM elements(div/span/etc) can be a Layout Container'\n );\n }\n\n const operations = config[dataMID];\n // No operations were registered for this Container\n if (!(operations && operations.length)) {\n return;\n }\n\n new ContainerOperationsProcessor({\n types: t,\n operations,\n containerPath: path,\n containerMID: dataMID,\n program: programPath,\n reactIdentifier,\n createElementIdentifier,\n onWarning,\n onError\n }).execute();\n }\n });\n }", "analyzePhase({ts, node, moduleDoc}){\n switch (node.kind) {\n case ts.SyntaxKind.ClassDeclaration:\n /**\n * Add tagName to classDoc, extracted from `@Component({tag: 'foo-bar'})` decorator\n * Add custom-element-definition to exports\n */ \n const className = node?.name?.getText();\n\n const componentDecorator = node?.decorators?.find(decorator('Component'))?.expression;\n\n const tagName = componentDecorator?.arguments?.[0]?.properties?.find(prop => {\n return prop?.name?.getText() === 'tag'\n })?.initializer?.text;\n\n const currClass = moduleDoc?.declarations?.find(declaration => declaration.name === className);\n if(tagName) {\n currClass.tagName = tagName;\n moduleDoc.exports.push({\n kind: \"custom-element-definition\",\n name: tagName,\n declaration: {\n name: className,\n module: moduleDoc.path\n }\n });\n }\n\n /** \n * Collect fields with `@Event()` decorator so we can process them in `moduleLinkPhase`\n */ \n const eventFields = node?.members\n ?.filter(member => member?.decorators?.find(decorator('Event')))\n ?.map(member => {\n const eventDecorator = member?.decorators?.find(decorator('Event'));\n const eventName = eventDecorator?.expression?.arguments?.[0]?.properties?.find(prop => {\n return prop?.name?.getText() === 'eventName'\n })?.initializer?.text;\n\n return { field: member?.name?.getText(), as: eventName || member?.name?.getText() }\n });\n events = [...(eventFields || [])];\n\n /**\n * Handle `@Prop` decorator, and store attributes to add to manifest later\n * - if type is primitive -> create attr\n * - if not `{ attribute: ''}` in decorator, just kebabcase the fieldname, otherwise use the value provided\n * - if type is not primitve -> no attr\n * - add fieldName to attr\n */\n node?.members\n ?.filter(member => member?.decorators?.find(decorator('Prop')))\n ?.forEach(property => {\n const fieldName = property?.name?.text;\n const isPrimitiveType = ATTR_PRIMITIVES.includes(property?.type?.getText());\n const attrNameFromDecorator = property?.decorators?.[0]?.expression?.arguments?.[0]?.properties?.find(prop => prop?.name?.getText() === 'attribute')?.initializer?.text;\n const attrName = attrNameFromDecorator || toKebabCase(property?.name?.text);\n \n if(isPrimitiveType) {\n if(!currClass.attributes) currClass.attributes = [];\n currClass.attributes.push({\n name: attrName,\n fieldName,\n type: {\n text: property?.type?.getText()\n }\n });\n }\n });\n\n break;\n }\n }", "async function minify(){\n const { terser } = await import('rollup-plugin-terser');\n return terser({\n output: {\n //comments: \"all\",\n comments: function(node, comment) {\n var text = comment.value;\n var type = comment.type;\n if (type == 'comment2') {\n // multiline comment\n return /@preserve|@license|@cc_on/i.test(text);\n }\n },\n }\n });\n}", "function _getRamBundleInfo() {\n _getRamBundleInfo = _asyncToGenerator(function*(\n entryPoint,\n pre,\n graph,\n options\n ) {\n let modules = _toConsumableArray(pre).concat(\n _toConsumableArray(graph.dependencies.values())\n );\n\n modules = modules.concat(getAppendScripts(entryPoint, modules, options));\n modules.forEach(module => options.createModuleId(module.path));\n const ramModules = modules\n .filter(isJsModule)\n .filter(options.processModuleFilter)\n .map(module => ({\n id: options.createModuleId(module.path),\n code: wrapModule(module, options),\n map: fullSourceMapObject([module], {\n excludeSource: options.excludeSource,\n processModuleFilter: options.processModuleFilter\n }),\n name: path.basename(module.path),\n sourcePath: module.path,\n source: module.getSource().toString(),\n type: nullthrows(\n module.output.find(_ref => {\n let type = _ref.type;\n return type.startsWith(\"js\");\n })\n ).type\n }));\n\n const _ref2 = yield _getRamOptions(\n entryPoint,\n {\n dev: options.dev,\n platform: options.platform\n },\n filePath => getTransitiveDependencies(filePath, graph),\n options.getTransformOptions\n ),\n preloadedModules = _ref2.preloadedModules,\n ramGroups = _ref2.ramGroups;\n\n const startupModules = [];\n const lazyModules = [];\n ramModules.forEach(module => {\n if (preloadedModules.hasOwnProperty(module.sourcePath)) {\n startupModules.push(module);\n return;\n }\n\n if (module.type.startsWith(\"js/script\")) {\n startupModules.push(module);\n return;\n }\n\n if (module.type.startsWith(\"js/module\")) {\n lazyModules.push(module);\n }\n });\n const groups = createRamBundleGroups(\n ramGroups,\n lazyModules,\n (module, dependenciesByPath) => {\n const deps = getTransitiveDependencies(module.sourcePath, graph);\n const output = new Set();\n\n for (const dependency of deps) {\n const module = dependenciesByPath.get(dependency);\n\n if (module) {\n output.add(module.id);\n }\n }\n\n return output;\n }\n );\n return {\n getDependencies: filePath => getTransitiveDependencies(filePath, graph),\n groups,\n lazyModules,\n startupModules\n };\n });\n return _getRamBundleInfo.apply(this, arguments);\n}", "function printHeader() {\r\n \"use strict\";\r\n console.log(\"----------\");\r\n}", "function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"source.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}", "_mapDeprecatedFunctionality(){\n\t\t//all previously deprecated functionality removed in the 5.0 release\n\t}" ]
[ "0.64158064", "0.5856894", "0.5804921", "0.5788511", "0.5710229", "0.5710229", "0.570638", "0.56965965", "0.5665966", "0.56631815", "0.5658681", "0.565474", "0.56163067", "0.55871135", "0.5546054", "0.5545191", "0.552622", "0.5504311", "0.54164606", "0.5409648", "0.5379085", "0.53041494", "0.5300939", "0.5300939", "0.52949846", "0.5293712", "0.5279668", "0.5278317", "0.5264893", "0.5260966", "0.52596503", "0.5243353", "0.5238822", "0.5222382", "0.52223533", "0.5211991", "0.51917773", "0.5191595", "0.51852715", "0.5175227", "0.5166796", "0.516509", "0.51576203", "0.515477", "0.51512563", "0.5144552", "0.51407063", "0.5130587", "0.5127205", "0.51178277", "0.5103224", "0.50983065", "0.50884867", "0.50849664", "0.50720584", "0.50715834", "0.50715834", "0.5068823", "0.5068247", "0.50655335", "0.5060662", "0.5055821", "0.505546", "0.50469524", "0.5046693", "0.50455064", "0.5043751", "0.502655", "0.5022608", "0.50121325", "0.50029707", "0.5002041", "0.49992096", "0.4995532", "0.49907982", "0.49907982", "0.49904266", "0.49785545", "0.4967554", "0.49657983", "0.49648327", "0.4961013", "0.495545", "0.49532676", "0.49532676", "0.49532676", "0.49532676", "0.49532676", "0.49532676", "0.4950335", "0.49494487", "0.49456167", "0.49421936", "0.4935666", "0.4929248", "0.4926551", "0.4925062", "0.4916179", "0.4914661", "0.49092507", "0.49092174" ]
0.0
-1
Creating a function to build and return a HTML string.
function buildHTMLString(element) { let htmlString = `<div class="restaurant-card" id="card-id-${element.id}"><a href="${element.url}" target= _blank> ${element.name}</a><p>${element.address}</p> <p>Rating: ${element.averageUserRating}</p><p>Average Cost For Two: $ ${element.averageCostPerTwo}</p><a href="${element.menuURL}" target= _blank><button class="menu-button">View Menu</button></a><button id="del-btn-${element.id}">Delete</button><button id="edit-btn-${element.id}">Edit</button></div>`; return htmlString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildHTML(tag, html, attrs) {\n\n var element = document.createElement(tag);\n // if custom html passed in, append it\n if (html) element.innerHTML = html;\n\n // set each individual attribute passed in\n for (attr in attrs) {\n if (attrs[attr] === false) continue;\n element.setAttribute(attr, attrs[attr]);\n }\n\n return element;\n }", "tagMaker() {\n const isHtmlNode = () => {\n return true;\n };\n const isAttribMap = () => {\n return true;\n };\n var notEmpty = (x) => {\n if ((typeof x === 'undefined') ||\n (x === null) ||\n x.length === 0) {\n return false;\n }\n return true;\n };\n var maker = (name, defaultAttribs = {}) => {\n var tagFun= (attribs, children) => {\n let node = '<';\n\n // case 1. one argument, first may be attribs or content, but attribs if object.\n if (typeof children === 'undefined') {\n if (typeof attribs === 'object' &&\n ! (attribs instanceof Array) &&\n isAttribMap(attribs)) {\n if (Object.keys(attribs).length === 0) {\n node += name;\n } else {\n const tagAttribs = this.attribsToString(this.mergeAttribs(attribs, defaultAttribs));\n node += [name, tagAttribs].filter(notEmpty).join(' ');\n }\n node += '>';\n // case 2. arity 1, is undefined\n } else if (typeof attribs === 'undefined') {\n const tagAttribs = this.attribsToString(defaultAttribs);\n node += [name, tagAttribs].filter(notEmpty).join(' ');\n node += '>';\n // case 3: arity 1, is content\n } else if (isHtmlNode(attribs)) {\n const tagAttribs = this.attribsToString(defaultAttribs);\n node += [name, tagAttribs].filter(notEmpty).join(' ');\n node += '>' + this.renderChildren(attribs);\n }\n // case 4. arity 2 - atribs + content\n } else if (isAttribMap(attribs) && isHtmlNode(children)) {\n if (Object.keys(attribs).length === 0) {\n node += name;\n } else {\n const tagAttribs = this.attribsToString(this.mergeAttribs(attribs, defaultAttribs));\n node += [name, tagAttribs].filter(notEmpty).join(' ');\n }\n node += '>' + this.renderChildren(children);\n }\n node += '</' + name + '>';\n return node;\n };\n return tagFun;\n };\n return maker;\n }", "render(){return html``}", "function createFunction(html) {\n\n // Regex to match template tags\n // TODO: Finish double bracket option\n var tagRegex, useDouble = go.config().useDoubleBrackets;\n if (!useDouble) tagRegex = /\\{(\\/?)([\\*\\?\\$\\^\\*\\.\\+\\-\\!@%&~#:>=]\\w*)(?:\\(((?:[^\\}]|\\}(?!\\}))*?)?\\))?(?:\\s+(.*?)?)?(\\(((?:[^\\}]|\\}(?!\\}))*?)\\))?\\s*\\}/g;\n\n // Replace tags with code\n var code = html.replace(tagRegex, convertTagToCode);\n\n // Replace curly brackets in content\n code = code\n .replace(/\\\\#lcb#/g, \"{\") // Replace left curly bracket break\n .replace(/\\\\#rcb#/g, \"}\"); // Replace right currly bracket break\n\n // Create final function string\n // Introduce the data as local variables using with(){}\n var funcStr = \"var __=[];with(this){__.push('\" + code + \"');}return __;\";\n\n // Debug - Add line breaks\n funcStr = funcStr.replace(/;/g, \";\\r\\n\").replace(/\\{/g, \"{\\r\\n\").replace(/\\}/g, \"}\\r\\n\");\n\n // Convert to function\n return new Function(\"$\", \"$h\", \"$u\", \"e\", \"values\", funcStr);\n }", "function makehtml(fi) {//makes an html file which will contain the lyrics for the song designated by the file named 'fi' a string of html code\n var ht=\"<!DOCTYPE html>\\n<html>\\n<head lang=\\\"en\\\">\\n<meta charset=\\\"UTF-8\\\">\\n<title>\"+ fi + \"</title>\\n</head>\\\"\\n<body>\\n<p id=\\\"demo\\\"></p>\";\n ht+=formatlyrics(fi);\n ht+= \"</body>\\n</html>\";\n return ht;\n\n}", "function genFinalHtml() {\r\n ` </div> \r\n\r\n </body>\r\n </html`;\r\n}", "function buildHTML(template /* Optional parameters to replace */) {\n\t\t// First argument is template string and next are replace values\n\t\tvar howManyToReplace = arguments.length - 1;\n\t\tvar str = template;\n\t\tfor (var i = 1; i <= howManyToReplace; i++) {\n\t\t\tstr = str.replace(\"{!\" + i + \"}\", arguments[i]);\n\t\t}\n\t\treturn str;\n\t}", "function html() {\n\t// Your code here\n}", "createMarkup(html) {\n return {\n __html: html\n };\n }", "html()\n{\n console.log(\"Rendering\");\n const html = ` <h2>${this.name}</h2>\n <div class=\"image\"><img src=\"${this.imgSrc}\" alt=\"${this.imgAlt}\"></div>\n <div>\n <div>\n <h3>Distance</h3>\n <p>${this.distance}</p>\n </div>\n <div>\n <h3>Difficulty</h3>\n <p>${this.difficulty}</p>\n </div>\n </div>`;\n\n return html;\n}", "function makeTemplate() {\n return html`\n\n <div class=\"display-div\"> </div>\n\n `;\n}", "render() {\n return html ``;\n }", "function buildHTML() {\n //initialize html\n html = \"\";\n\n for(var i=0; i<elements.length; i++) {\n switch(elements[i].type) {\n case 'title':\n buildTitle(elements[i].options);\n break;\n case 'header':\n buildHeader(elements[i].options);\n break;\n case 'img-one':\n buildImageOne(elements[i].options);\n break;\n case 'img-two':\n buildImageTwo(elements[i].options);\n break;\n case 'img-three':\n buildImageThree(elements[i].options);\n break;\n case 'article-right':\n buildArticleRight(elements[i].options);\n break;\n case 'article-left':\n buildArticleLeft(elements[i].options);\n break;\n case 'text' :\n buildText(elements[i].options);\n break;\n \n }\n }\n buildEnd();\n\n document.getElementById('HTML').innerText = `${html}`;\n}", "function toHTML(myString) {\n myString = \"\\\"\" + myString + \"\\\"\"\n return myString;\n}", "get html() {\n let html = '<div style=\"background: #fff; border: solid 1px #000; border-radius: 5px; font-weight: bold; margin-bottom: 1em; overflow: hidden;\">';\n html += '<div style=\"background: #000; color: #fff; text-align: center;\">' + this._header + '</div>';\n html += '<div style=\"padding: 5px;\">' + this._content + '</div>';\n html += '</div>';\n return html;\n }", "function SafeHtml() {}", "function SafeHtml() {}", "function SafeHtml() {}", "function SafeHtml() {}", "function SafeHtml() {}", "function createMarkup(data) {\n return { __html: data };\n}", "function createHtml(o){\n var b = '',\n attr,\n val,\n key,\n cn;\n\n if(typeof o == \"string\"){\n b = o;\n } else if (Ambow.isArray(o)) {\n for (var i=0; i < o.length; i++) {\n if(o[i]) {\n b += createHtml(o[i]);\n }\n };\n } else {\n b += '<' + (o.tag = o.tag || 'div');\n for (attr in o) {\n val = o[attr];\n if(!confRe.test(attr)){\n if (typeof val == \"object\") {\n b += ' ' + attr + '=\"';\n for (key in val) {\n b += key + ':' + val[key] + ';';\n };\n b += '\"';\n }else{\n b += ' ' + ({cls : 'class', htmlFor : 'for'}[attr] || attr) + '=\"' + val + '\"';\n }\n }\n };\n // Now either just close the tag or try to add children and close the tag.\n if (emptyTags.test(o.tag)) {\n b += '/>';\n } else {\n b += '>';\n if ((cn = o.children || o.cn)) {\n b += createHtml(cn);\n } else if(o.html){\n b += o.html;\n }\n b += '</' + o.tag + '>';\n }\n }\n return b;\n }", "function pagehtml(){\treturn pageholder();}", "function nameFunc(name){\n\tconst html = `<p>hello ${name}</p>`\n\treturn html\n}", "function gen_pet_tips_html(equipid, big_img_root, equip_face_img, pet_skill_url, pet_desc, pet_name){\nvar pet_attrs = get_pet_attrs_info(pet_desc);\nvar template = get_tips_template($(\"pet_tips_template\").innerHTML); \n\nvar result = template.format(equipid, big_img_root,equip_face_img, pet_name, pet_attrs.pet_grade, pet_attrs.attack_aptitude, \n\npet_attrs.defence_aptitude, pet_attrs.physical_aptitude, pet_attrs.magic_aptitude, pet_attrs.speed_aptitude, pet_attrs.avoid_aptitude, pet_attrs.lifetime, pet_attrs.growth, equipid, equipid, pet_attrs.blood,pet_attrs.max_blood, \n\npet_attrs.soma, pet_attrs.magic, pet_attrs.max_magic, pet_attrs.magic_powner, pet_attrs.attack, pet_attrs.strength, pet_attrs.defence, pet_attrs.endurance, pet_attrs.speed, pet_attrs.smartness, pet_attrs.wakan, pet_attrs.potential, equipid, equipid, \n\npet_attrs.five_aptitude, equipid, equipid,equipid, pet_attrs.all_skill, pet_attrs.sp_skill, pet_skill_url, equipid);\n\nreturn result;\n}", "function construct_html(href, title, describe,tags) {\n url1 = '<article class=\"post tag-sync_sulab post__wrapper\" data-cols=\"4\">' + '<div class=\"post__wrapper_helper post__wrapper_helper--notloaded el__transition post__wrapper_helper--hover\">' + '<div class=\"post__preview el__transition\">' + '<header class=\"post__header\">' + '<h2 class=\"post__title\">' + '<a href='\n\n url2 = ' class=\"post__link post__title_link\"><span>'\n\n url3 = '</span></a></h2></header><p class=\"post__excerpt\"><a href='\n url4 = ' class=\"post__link post__readmore\">'\n\n url5 = '</a></p></div><footer class=\"post__meta\"><ul class=\"post__tags\">'\n url6 = '</ul></footer></div></article>'\n html = url1 + href + url2 + title + url3 + href + url4 + describe + url5\n for(var i=0; i < tags.length; i++) {\n if (tags[i] != 'sync_sulab') { // skip internal sync_sulab tag\n html += construct_tag(tags[i]);\n }\n };\n html += url6;\n return html\n}", "function buildHTML(tree, options) {\n // buildExpression is destructive, so we need to make a clone\n // of the incoming tree so that it isn't accidentally changed\n tree = JSON.parse((0, _stringify2.default)(tree));\n\n // Build the expression contained in the tree\n var expression = buildExpression(tree, options, true);\n var body = makeSpan([\"base\"], expression, options);\n\n // Add struts, which ensure that the top of the HTML element falls at the\n // height of the expression, and the bottom of the HTML element falls at the\n // depth of the expression.\n var topStrut = makeSpan([\"strut\"]);\n var bottomStrut = makeSpan([\"strut\", \"bottom\"]);\n\n topStrut.style.height = body.height + \"em\";\n bottomStrut.style.height = body.height + body.depth + \"em\";\n // We'd like to use `vertical-align: top` but in IE 9 this lowers the\n // baseline of the box to the bottom of this strut (instead staying in the\n // normal place) so we use an absolute value for vertical-align instead\n bottomStrut.style.verticalAlign = -body.depth + \"em\";\n\n // Wrap the struts and body together\n var htmlNode = makeSpan([\"katex-html\"], [topStrut, bottomStrut, body]);\n\n htmlNode.setAttribute(\"aria-hidden\", \"true\");\n\n return htmlNode;\n}", "function generateTagHTML (tag){//generates HTML for a given tag\n return `<li class='tag'><div class='tag-box'>${tag}</div></li>`;\n}", "function htmlWriteResults(cases) {\r\n var myHTML = '';\r\n myHTML +=\r\n `<article><div class=\"col-md-4\">\r\n <div class=\"well text-center\">`;\r\n if (filterMovies(cases.imdbID)) {\r\n myHTML +=\r\n `<div class=\"alert alert-success\" id=\"${cases.imdbID}inCollection\"><p><i class=\"fa fa-cloud-download\"></i> In Collection</p></div>`;\r\n } else {\r\n myHTML +=\r\n `<div class=\"alert alert-danger\" id=\"${cases.imdbID}notInCollection\"><p><i class=\"fa fa-exclamation-triangle\"></i> Not in Collection</p></div>`;\r\n }\r\n myHTML +=\r\n `<figure><img src=\"${posterError(cases.Poster)}\" alt=\"${cases.Title}\"></figure>\r\n <h5 class=\"whiteheader\">${cases.Title} (${cases.Year.substring(0, 4)})</h5>\r\n <div class=\"btn-group\">\r\n <a onclick=\"movieSelected('${cases.imdbID}')\" class=\"btn btn-primary btn-rounded\" href=\"#\"><i class=\"fa fa-info-circle\"></i> ${upperFirst(cases.Type)} Details</a>\r\n </div>\r\n </div>\r\n </div></article>\r\n `;\r\n return myHTML;\r\n}", "function createHtml(o){\n var b = '',\n attr,\n val,\n key,\n keyVal,\n cn;\n\n if(typeof o == \"string\"){\n b = o;\n } else if (Ext.isArray(o)) {\n for (var i=0; i < o.length; i++) {\n if(o[i]) {\n b += createHtml(o[i]);\n }\n };\n } else {\n b += '<' + (o.tag = o.tag || 'div');\n for (attr in o) {\n val = o[attr];\n if(!confRe.test(attr)){\n if (typeof val == \"object\") {\n b += ' ' + attr + '=\"';\n for (key in val) {\n b += key + ':' + val[key] + ';';\n };\n b += '\"';\n }else{\n b += ' ' + ({cls : 'class', htmlFor : 'for'}[attr] || attr) + '=\"' + val + '\"';\n }\n }\n };\n // Now either just close the tag or try to add children and close the tag.\n if (emptyTags.test(o.tag)) {\n b += '/>';\n } else {\n b += '>';\n if ((cn = o.children || o.cn)) {\n b += createHtml(cn);\n } else if(o.html){\n b += o.html;\n }\n b += '</' + o.tag + '>';\n }\n }\n return b;\n }", "function typeHtmlBuilder(fn){\n\n\tif (fn()[2] == 'inc') {\n\t\tvar x = new budgetInfo(getInfo());\n\t\tincList.push(x);\n\t\tlisto = [];\n\t\tfor (let i = 0; i < incList.length; i++) {\n\t\t\tlisto.push(i);\t\n\t\t}\n\t\tincList[listo.length - 1].htmlBuilder();\n\t\n\t\t$(\".budget__income--value\").text(totalIncomeCalculator());\n\t\t\n\t}\n\n\telse {\n\t\t var x = new budgetInfo(getInfo());\n\t\t expList.push(x);\n\t\t listo = [];\n\t\tfor (let i = 0; i < expList.length; i++) {\n\t\t\tlisto.push(i);\t\n\t\t}\n\t\texpList[listo.length - 1].htmlBuilder();\n\t\t$(\".budget__expenses--value\").text(totalExpensesCalculator());\n\t\t\n\t}\n}", "function buildHTML(tree, options) {\n // buildExpression is destructive, so we need to make a clone\n // of the incoming tree so that it isn't accidentally changed\n tree = JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(tree));\n\n // Build the expression contained in the tree\n var expression = buildExpression(tree, options, true);\n var body = makeSpan([\"base\"], expression, options);\n\n // Add struts, which ensure that the top of the HTML element falls at the\n // height of the expression, and the bottom of the HTML element falls at the\n // depth of the expression.\n var topStrut = makeSpan([\"strut\"]);\n var bottomStrut = makeSpan([\"strut\", \"bottom\"]);\n\n topStrut.style.height = body.height + \"em\";\n bottomStrut.style.height = body.height + body.depth + \"em\";\n // We'd like to use `vertical-align: top` but in IE 9 this lowers the\n // baseline of the box to the bottom of this strut (instead staying in the\n // normal place) so we use an absolute value for vertical-align instead\n bottomStrut.style.verticalAlign = -body.depth + \"em\";\n\n // Wrap the struts and body together\n var htmlNode = makeSpan([\"katex-html\"], [topStrut, bottomStrut, body]);\n\n htmlNode.setAttribute(\"aria-hidden\", \"true\");\n\n return htmlNode;\n}", "function compose(toHTML, fn) {\n return function () {\n const args = lodash_1.default.toArray(arguments);\n args[0] = toHTML(args[0]);\n return fn.apply(null, args);\n };\n}", "function getHtml( value ) {\n value = value || \"\";\n\n // No action required if the value is an element\n if ( value instanceof Element ) {\n return value;\n }\n\n if ( value instanceof Function ) {\n return getHtml( value() );\n }\n\n if (value instanceof Array) {\n // Return empty element if array is empty\n if ( !value.length ) {\n return getHtml();\n }\n\n // Appending each element to wrapper\n const el = document.createElement( \"div\" );\n value.map( arrEl => el.appendChild( getHtml( arrEl ) ) );\n\n return el;\n }\n\n // Create a text-node if content is string\n if ( value.constructor === String || value.constructor === Number ) {\n return document.createTextNode( value );\n }\n\n // Render modular elements\n if ( value instanceof Object ) {\n if ( value.__config__ && value.__config__.type !== \"modular-element\" ) {\n throw err( 2 );\n }\n\n return value.__config__.render();\n }\n\n throw err( 3 );\n }", "function SafeHtml() { }", "function SafeHtml() { }", "function SafeHtml() { }", "function buildTmplFunction(nodes) {\n var ret, content, node,\n endsInPlus = TRUE,\n chainingDepth = 0,\n nested = [],\n i = 0,\n l = nodes.length,\n code = 'var tag=$.views.renderTag,html=$.views.encode.html,\\nresult=\"\"+';\n\n function nestedCall(node, outParams) {\n if (\"\" + node === node) {\n return '\"' + node + '\"';\n }\n if (node.length < 3) {\n // Named parameter\n key = (outParams[0] && \",\") + node[0] + \":\";\n outParams[0] += key + nestedCall(node[1]);\n outParams[1] += key + node[1];\n return FALSE;\n }\n var codeFrag, tokens, j, k, ctx, val, hash, key, out,\n tag = node[0],\n params = node[1],\n encoding = node[3];\n if (tag === \"=\") {\n if (chainingDepth > 0 || params.length !== 1) {\n // Using {{= }} at depth>0 is an error.\n return \"\"; // Could throw...\n }\n params = params[0];\n if (tokens = /^((?:\\$view|\\$data|\\$(itemNumber)|\\$(ctx))(?:$|\\.))?[\\w\\.]*$/.exec(params)) {\n // Can optimize for perf and not go through call to renderTag()\n codeFrag = tokens[1]\n ? tokens[2] || tokens[3]\n ? ('$view.' + params.slice(1)) // $itemNumber, $ctx -> $view.itemNumber, $view.ctx\n : params // $view, $data - unchanged\n : '$data.' + params; // other paths -> $data.path\n if (encoding !== \"none\") {\n codeFrag = 'html(' + codeFrag + ')';\n }\n } else {\n // Cannot optimize here. Must call renderTag() for processing, encoding etc.\n codeFrag = 'tag(\"=\",\"' + params + '\",$view,\"' + encoding + '\")'; // Not able\n }\n } else {\n codeFrag = 'tag(\"' + tag + '\",';\n chainingDepth++;\n out = [\"\", \"\"]; // out param\n for (j = 0, k = params.length; j < k; j++) {\n val = nestedCall(params[j], out);\n codeFrag += val ? (val + ',') : \"\";\n }\n hash = out[0];\n chainingDepth--;\n content = node[2];\n if (content) {\n nested.push(buildTmplFunction(content));\n }\n codeFrag += '$view,\"'\n + ( encoding\n ? encoding\n : chainingDepth\n ? \"string\"\t\t// Default encoding for chained tags is \"string\"\n : \"\" ) + '\"'\n + (hash ? \",{ json:'{\" + out[1] + \"}',\" + hash + \"}\" : \"\")\n + (content ? \",\" + nested.length : \"\"); // For block tags, pass in the key to the nested content template\n codeFrag += ')';\n }\n return codeFrag;\n }\n\n for (; i < l; i++) {\n endsInPlus = TRUE;\n node = nodes[i];\n if (node[0] === \"*\") {\n code = code.slice(0, -1) + \";\" + node[1] + \"result+=\";\n } else {\n code += nestedCall(node) + \"+\";\n endsInPlus = TRUE;\n }\n }\n ret = new Function(\"$data, $view\", code.slice(0, endsInPlus ? -1 : -8) + \";\\nreturn result;\");\n ret.nested = nested;\n return ret;\n }", "renderHTML() {\n \n }", "getHtmlTemplateString(employeesObjectArray) {\n let employeeDetails = \"\";\n let iconHtml = \"\";\n const returnedHtmlObjects = [];\n //iterate over each employee\n for (const employee of employeesObjectArray) {\n // https://stackoverflow.com/questions/10314338/get-name-of-object-or-class\n const currentObjectTypeName = employee.constructor.name;\n //different employee types get different HTML\n if (currentObjectTypeName == \"Manager\") {\n employeeDetails = this.getHtmlManagerDetails(employee.getId(), employee.getEmail(), employee.getOfficeNumber());\n iconHtml = \"<i class='fas fa-tasks'></i>\";\n } else if (currentObjectTypeName == \"Engineer\") {\n employeeDetails = this.getHtmlEngineerDetails(employee.getId(), employee.getEmail(), employee.getGitHub());\n iconHtml = \"<i class='fas fa-laptop-code'></i>\";\n } else if (currentObjectTypeName == \"Intern\") {\n employeeDetails = this.getHtmlInternDetails(employee.getId(), employee.getEmail(), employee.getSchool());\n iconHtml = \"<i class='fas fa-glasses'></i>\";\n }\n //add each iteration to an array\n returnedHtmlObjects.push(this.getHtmlEmployeeString(employee.getName(), employee.getDescription(), iconHtml, currentObjectTypeName, employee.getImageUrl(), employeeDetails));\n }\n //pass the array to be wrapped and return constructed and formatted HTML\n const innerHtml = this.wrapInParentHtml(returnedHtmlObjects);\n return `\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Our Software Team</title>\n <link rel=\"stylesheet\" href=\"https://unpkg.com/[email protected]/css/bulma.min.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"./hero.css\">\n <script src=\"https://kit.fontawesome.com/e6ff202c8b.js\" crossorigin=\"anonymous\"></script>\n </head>\n <body>\n <section class=\"hero is-info is-small\">\n <div class=\"hero-body\">\n <div class=\"container has-text-centered\">\n <p class=\"title\">\n Our Software Team\n </p>\n </div>\n </div>\n </section>\n <section class=\"container\">\n ${innerHtml}\n </section>\n </body>\n </html>`.replace(/\\s+/g, ' ');\n }", "createHTMLtask() {\n const htmlstring = '<div class=\"task\" draggable=\"true\" id=\"' + this.id + '\" ondragstart=\"drag(event)\" ondrop=\"drop(event)\" ondragover=\"allowDrop(event)\">' +\n '<big><strong>' + this.name + \" \" + '</strong></big>' +\n this.date.replace('T', ' ').substring(0, 19) +\n '<button id=\"' + this.id + '\" onClick=\"viewTask(this.id)\"' + ' class=\"view\" type=\"button\">&#128065;</button>' +\n this.priorityButton() + '<br><br>' +\n \"<p>\" + this.minimizeDescription() +\n this.changePhaseButton() +\n '<p>Assignee: ' + this.assignee + '..........Priority: ' + this.priority + '</p>' +\n '</div><br><br><br><br><br>';\n\n return htmlstring;\n }", "getHTML() {\n const endIndex = this.strings.length - 1;\n let html = '';\n for (let i = 0; i < endIndex; i++) {\n const s = this.strings[i];\n // This exec() call does two things:\n // 1) Appends a suffix to the bound attribute name to opt out of special\n // attribute value parsing that IE11 and Edge do, like for style and\n // many SVG attributes. The Template class also appends the same suffix\n // when looking up attributes to create Parts.\n // 2) Adds an unquoted-attribute-safe marker for the first expression in\n // an attribute. Subsequent attribute expressions will use node markers,\n // and this is safe since attributes with multiple expressions are\n // guaranteed to be quoted.\n const match = lastAttributeNameRegex.exec(s);\n if (match) {\n // We're starting a new bound attribute.\n // Add the safe attribute suffix, and use unquoted-attribute-safe\n // marker.\n html += s.substr(0, match.index) + match[1] + match[2] +\n boundAttributeSuffix + match[3] + marker;\n }\n else {\n // We're either in a bound node, or trailing bound attribute.\n // Either way, nodeMarker is safe to use.\n html += s + nodeMarker;\n }\n }\n return html + this.strings[endIndex];\n }", "generateHTML() {\n return `<nav>${this.generateMenu(this.data)}</nav>`;\n }", "function generateHtml() {\n const folder = fs.readdirSync(`${__dirname}/projects`);\n let myHtml = \" \";\n folder.forEach((arg) => {\n myHtml += `<p><a href=\"/${arg}/\">${arg}</a></p>`;\n });\n return myHtml;\n}", "function createHTML(hashTable){\n return '<!DOCTYPE html>\\n' +\n '<html lang=\"en\">\\n' +\n '\\t<head>\\n' +\n '\\t\\t<meta charset=\"UTF-8\">\\n' +\n '\\t\\t<title>The Elements - ' + hashTable.elementName + '</title>\\n'+\n '\\t\\t<link rel=\"stylesheet\" href=\"css/styles.css\">\\n'+\n '\\t</head>\\n'+\n '\\t<body>\\n' +\n '\\t\\t<h1>' + hashTable.elementName + '</h1>\\n' +\n '\\t\\t<h2>' + hashTable.elementSymbol + '</h2>\\n' +\n '\\t\\t<h3>Atomic number ' + hashTable.elementAtomicNumber + '</h3>\\n' +\n '\\t\\t<p>' + hashTable.elementDescription + '</p>\\n' +\n '\\t\\t<p><a href=\"/\">back</a></p>\\n' +\n '\\t</body>\\n'+\n '</html>';\n}", "_generateMarkup() {\n // console.log(this._data); // data is in the form of an array. We want to return one of the below html elements for each of the elements in that array\n\n return this._data.map(this._generateMarkupPreview).join('');\n }", "function div(text) { return '<div>'+text+'</div>'; }", "function toHTML2(myString) {\n myString = \"\\'\" + myString + \"\\'\"\n return myString;\n}", "function html(h, ...values){ return h.join('');}", "function SafeHtml(){}", "function makeHTMLd(deaths, year){\n htmlStr=\"\";\n htmlStr+=\"<div class= 'Numbers'>\";\n htmlStr+= \"<h4>\" + \"Death Toll: \" + deaths +\"</h4>\" ;\n htmlStr+= \"</div>\";\n $('#Numbers').html(htmlStr);\n}", "function compileHtmlFunction(html) {\n return function() {\n var element = $compile(html)($scope);\n $scope.$digest();\n return element;\n };\n }", "showHTML() { \n return `\n <div class='showRecipes'>\n <div>\n <h3>${this.recipeTitle}</h3> \n </div> \n <div>\n ${'Time: ' + this.recipeTime}\n </div>\n <div>\n ${this.recipeIngredients}\n </div>\n <div>\n ${this.recipeAllergies}</li>\n </div>\n </div>`\n }", "function buildHTML (cssPath = '', dynamicHtml = '') {\n\tvar year = new Date().getFullYear();\n\tvar html = `<!doctype html>\n\t<html lang=\"en\">\n\t <head>\n\t <!-- Required meta tags -->\n\t <meta charset=\"utf-8\">\n\t <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">\n\n\t <!-- Bootstrap CSS -->\n\t <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css\" integrity=\"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T\" crossorigin=\"anonymous\">\n\t <!-- Font Awesome CSS -->\n\t <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.1.0/css/all.css\" integrity=\"sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt\" crossorigin=\"anonymous\">\n\t <link href=\"https://fonts.googleapis.com/css?family=Gravitas+One\" rel=\"stylesheet\">\n\t <link href=\"/css/${cssPath}\" rel=\"stylesheet\">\n\t <link rel='shortcut icon' type='image/x-icon' href='https://my-portfolio-dev-images.s3-us-west-2.amazonaws.com/favicon.ico' />\n\n\t <title>Hello, world!</title>\n\t </head>\n\t <body class=\"vh-100\">\n\t\t<nav class=\"navbar navbar-expand-lg navbar-light\">\n\t\t <a class=\"navbar-brand\" href=\"/\"><span style=\"font-size: 30px; color: black;\">&#60; <i class=\"fas fa-home\"></i> &#47;&#62;</span></a>\n\t\t <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarNavAltMarkup\" aria-controls=\"navbarNavAltMarkup\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n\t\t <span class=\"navbar-toggler-icon\"></span>\n\t\t </button>\n\t\t <div class=\"collapse navbar-collapse\" id=\"navbarNavAltMarkup\">\n\t\t <div class=\"navbar-nav\">\n\t\t <a class=\"nav-item nav-link active\" href=\"/\">Home<span class=\"sr-only\">(current)</span></a>\n\t\t <a class=\"nav-item nav-link\" href=\"/about\">About</a>\n\t\t <a class=\"nav-item nav-link\" href=\"/projects\">Projects</a>\n\t\t <a class=\"nav-item nav-link\" href=\"/contact\">Contact</a>\n\t\t </div>\n\t\t </div>\n\t\t</nav>\n\t\t<div id=\"mainContent\" class=\"container-fluid\">\n\t\t <div class=\"row justify-content-center\">\n\t\t <div class=\"col-6\">\n\t\t ${dynamicHtml}\n\t\t </div>\n\t\t </div>\n\t\t <div id=\"footer\" class=\"row fixed-bottom\">\n\t\t <div class=\"col-5\">\n\t\t <p>Jacob Anavisca ©${year}</p>\n\t\t </div>\n\t\t <div class=\"col-2 text-center\">\n\t\t \t<a class=\"fab fa-facebook-square pull-right fa-2x\" href=\"https://www.facebook.com/jacob.anavisca\"></a>\n \t\t\t<a class=\"fab fa-instagram pull-right fa-2x\" href=\"https://www.instagram.com/skanbananas/\"></a>\n \t\t\t\t<a class=\"fab fa-linkedin pull-right fa-2x\" href=\"https://www.linkedin.com/in/jacob-anavisca-8b424ab8/\"></a>\n \t\t</div>\n\t\t </div>\n\t\t</div>\n\t\t<script>\n\t\t// var mainContentHeight = window.screen.height - document.getElementById(\"mainContent\").offsetTop; //71\n\t\t// document.getElementById(\"mainContent\").style.height = mainContentHeight + \"px\";\n\t\t// console.log(mainContentHeight + \"px\");\n\t\t</script>\n\t\t<!-- Optional JavaScript -->\n\t <!-- jQuery first, then Popper.js, then Bootstrap JS -->\n\t <script src=\"https://code.jquery.com/jquery-3.3.1.slim.min.js\" integrity=\"sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo\" crossorigin=\"anonymous\"></script>\n\t <script src=\"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js\" integrity=\"sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1\" crossorigin=\"anonymous\"></script>\n\t <script src=\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js\" integrity=\"sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM\" crossorigin=\"anonymous\"></script>\n\t </body>\n\t</html>`;\n\n\treturn html\n}", "html(strings, ...args) {\n\t\tlet buf = strings[0];\n\t\tlet i = 0;\n\t\twhile (i < args.length) {\n\t\t\tbuf += this.escapeHTML(args[i]);\n\t\t\tbuf += strings[++i];\n\t\t}\n\t\treturn buf;\n\t}", "generateHTML(type, classes, parent = app, text = \"\", id = \"\") {\n const element = document.createElement(type);\n element.classList = (classes);\n element.innerText = (text);\n element.id = (id);\n parent.appendChild(element);\n return element;\n }", "function toString() {\n return static_1.html(this, this.options);\n}", "function mk( elementName, attrObj, parent, appendChild) {\n\treturn mkHTML( elementName, attrObj, parent, appendChild);\n}", "function show_specials() {\n\n var specials_HTML = \"<table id='specials-table'>\";\n specials_HTML += \"<tr>\" + \"<th>Item</th>\" + \"<th>Price</th>\" + \"<th>Picture</th>\" + \"</tr>\";\n specials_HTML += create_specials();\n specials_HTML += \"</table>\";\n\n return specials_HTML;\n}", "function buildWebPage(result){\n document.getElementById('article').innerHTML = result.description;\n document.getElementById('article-title').innerHTML = result.title;\n}", "wrapHTML(title, body) {\n\t\treturn `<!DOCTYPE html>\\\n\t\t<html>\\\n\t\t\t<head>\\\n\t\t\t\t<meta charset=\"UTF-8\">\\\n\t\t\t\t<link rel=\"stylesheet\" href=\"/style.css\">\\\n\t\t\t\t<link href=\"https://fonts.googleapis.com/css?family=Ovo\" rel=\"stylesheet\">\\\n\t\t\t\t<title>${title} - ${config.username}</title>\\\n\t\t\t</head>\\\n\t\t\t<body>\\\n\t\t\t\t<div id=\"container\">\\\n\t\t\t\t\t<div id=\"header\">\\\n\t\t\t\t\t\t<h1>${title} - ${config.username}</h1>\\\n\t\t\t\t\t</div>\\\n\t\t\t\t\t<div id=\"text-area\">\\\n\t\t\t\t\t\t${body}\\\n\t\t\t\t\t</div>\\\n\t\t\t\t</div>\\\n\t\t\t</body>\\\n\t\t</html>`;\n\t}", "function writeHTML(array) { \n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n \n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <title>Team Profile Generator</title>\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css\" integrity=\"sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==\" crossorigin=\"anonymous\" />\n <link rel=\"stylesheet\" href=\"./dist/style.css\">\n </head>\n\n <body>\n <header>\n <h1>\n Team Profile \n </h1>\n </header>\n\n <main>\n <div class=\"main\">\n ${writeEmployees(array)}\n </div>\n </main>\n </body>\n `\n}", "function el(e) {\n return function(body) {\n return \"<\"+e+\">\"+body+\"</\"+e+\">\"\n }\n }", "function GenerateTagHTML(tags) {\r\n \r\n var html = '<div class=\"tags\">';\r\n \r\n // Generate the html for each of the tags and return it\r\n $.each(tags, function(key, tag) { html += '<span>' + tag + '</span>' });\r\n return html + '</div>';\r\n \r\n }", "function generateHTML(team) {\n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <title>Team Profile</title>\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css\">\n </head>\n <body>\n <div class=\"container-fluid blue-grey lighten-4 z-depth-2\">\n <h1 class=\"center-align blue-grey-text\" style=\"padding: 50px; margin-top: 0px;\">Team Profile</h1>\n </div>\n <div id=\"employeeCards\" class=\"row\">\n ${team.map(generateCard).join('')}\n </div>\n </body>\n</html>`\n}", "html() {\n var htm;\n htm = \"\";\n if (UI.hasLays) {\n htm += `<div class=\"layout-logo \" id=\"${this.htmlId('Logo')}\"></div>`;\n }\n if (UI.hasLays || (this.navbs != null)) {\n htm += `<div class=\"layout-corp\" id=\"${this.htmlId('Corp')}\"></div>`;\n }\n if (UI.hasLays) {\n htm += `<div class=\"layout-find\" id=\"${this.htmlId('Find')}\"></div>`;\n }\n if (UI.hasTocs) {\n htm += `<div class=\"layout-tocs tocs\" id=\"${this.htmlId('Tocs')}\"></div>`;\n }\n htm += `<div class=\"layout-view\" id=\"${this.htmlId('View')}\"></div>`;\n if (UI.hasLays) {\n htm += `<div class=\"layout-side\" id=\"${this.htmlId('Side')}\"></div>`;\n }\n if (UI.hasLays) {\n htm += `<div class=\"layout-pref \" id=\"${this.htmlId('Pref')}\"></div>`;\n }\n if (UI.hasLays) {\n htm += `<div class=\"layout-foot\" id=\"${this.htmlId('Foot')}\"></div>`;\n }\n if (UI.hasLays) {\n htm += `<div class=\"layout-trak\" id=\"${this.htmlId('Trak')}\"></div>`;\n }\n return htm;\n }", "function verse1() {\n let output = ''\n output = '<p>In the heart of Holy See</p>' +\n '<p>In the home of Christianity</p>' +\n '<p>The Seat of power is in danger</p>'\n\n return output\n}", "function htmlEncode(value){\n return $('<div/>').text(value).html();\n}", "function htmlEncode(value){\n return $('<div/>').text(value).html();\n}", "function generateHtml(toBeCreated) {\n //console.log('generateHtml function ran'); \n if (currentPage === 'startPage') {\n return startPage();\n } else if (currentPage === 'questionPage') {\n return questionPage();\n } else if (currentPage === 'resultsPage') {\n return resultsPage();\n } else if (currentPage === 'feedbackPage') { \n return feedbackPage();\n }\n}", "function createHTML(resultArray) {\n let htmlString = `<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Cars</title>\n </head>\n <body>\n <h1>Search result</h1>\n <table>\n <thead>\n <th>Model</th>\n <th>Licence</th>\n </thead>\n <tbody>`;\n\n for (let car of resultArray) {\n htmlString += `<tr>\n <td>${car.model}</td><td>${car.licence}</td></tr>`;\n }\n\n htmlString += `</tbody> \n </table>\n </body>\n </html>`;\n}", "function html(query_times, head, ...args) {\n return `<!DOCTYPE html><html lang='en'>\n ${ query_times }\n ${ head }\n <body>\n <div class='container' >\n ${ args.join('') }\n ${ footer() }\n </div>\n </body>\n <script async src='/jquery.min.js'></script>\n </html>`\n}", "function returnHtml(params) {\n\n /* Build multiple choice option controls */\n /* Requires: */\n /* mId: Number. Multiple choice option Id */\n /* init: OPTIONAL. Boolean. True when init multiple choice options */\n const buildMultiControlHtml = (mId, init) => {\n // If mId is NaN, return error.\n if (isNaN(mId)) {\n return 'Error: Missing/invalid mId';\n }\n\n // .multi-control-remove element\n let removeControlHtml = `\n <a href=\"#!\" class=\"multi-control-remove light-blue-text ` +\n `text-darken-4\">-</a>`;\n\n // .multi-control-add element\n let addControlHtml = `\n <a href=\"#!\" class=\"multi-control-add light-blue-text ` +\n `text-darken-4\">+</a>`;\n\n // Build the final html string\n let controlHtml = '';\n // if mId is 2, and init is not true...\n if (mId === 2 && !init) {\n controlHtml = addControlHtml; // add the addControlHtml\n } else if (mId > 2) { // Otherwise if mId > 2\n // add removeControlHtml + addControlHtml\n controlHtml = removeControlHtml + addControlHtml.trim();\n }\n\n return controlHtml; // return the finalised html string\n };\n\n /* Build multiple choice option elements */\n /* Requires: */\n /* rId: Number. Round Id */\n /* qId: Number. Question Id */\n /* mId: Number. Multiple choice option Id */\n /* init: OPTIONAL. Boolean. True when init multiple choice options */\n const buildMultiHtml = (rId, qId, mId, init) => {\n let err = '';\n if (isNaN(rId)) {\n err = 'Error: Missing/invalid rId'; // rId is NaN so set err\n }\n if (isNaN(qId)) {\n if (err.length > 0) {\n err += `\\n`;\n }\n err += 'Error: Missing/invalid qId'; // qId is NaN so update err\n }\n if (isNaN(mId)) {\n if (err.length > 0) {\n err += `\\n`;\n }\n err += 'Error: Missing/invalid mId'; // mId is NaN so update err\n }\n\n // If err length is > 0, return err\n if (err.length > 0) {\n return err;\n }\n\n // Call buildMultiControlHtml() to generate controls\n let controlHtml = buildMultiControlHtml(mId, init);\n\n // Define the multiple choice option html string\n let answerHtml = `\n <div class=\"multi-container col s12\">\n <ul id=\"answerHelperCollapsible_${rId}_${qId}_${mId}\" ` +\n `class=\"collapsible helper-collapsible col s12\">\n <li>\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n An answer must be between 1-255 characters ` +\n `in length.\n </blockquote>\n </div>\n </li>\n <li class=\"paired\">\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n Please provide an answer, and/or a valid link ` +\n `to an image hosted online.<br>\n An answer must be between 1-255 characters in ` +\n `length.\n </blockquote>\n </div>\n </li>\n </ul>\n <div class=\"input-field multi-input col s10\">\n <span class=\"prefix center-align\" data-question=\"${qId}\"` +\n `data-multi=\"${mId}\">\n ${controlHtml}` +\n `</span>\n <input id=\"answer_${rId}_${qId}_${mId}\" ` +\n `name=\"answer_${rId}_${qId}_${mId}\" ` +\n `type=\"text\" minlength=\"1\" maxlength=\"255\" ` +\n `class=\"option\" value=\"\" required>\n <label for=\"answer_${rId}_${qId}_${mId}\" ` +\n `data-error=\"Invalid Answer\" ` +\n `data-default=\"Answer ${rId}-${qId}-${mId}\">` +\n `Answer ${rId}-${qId}-${mId}</label>\n </div>\n <div class=\"input-field col s2 checkbox-container ` +\n `inline-input center-align\">\n <label class=\"center-align full-width\">\n <input id=\"correct_${rId}_${qId}_${mId}\" ` +\n `name=\"correct_${rId}_${qId}_${mId}\" ` +\n `class=\"correct\"` +\n `type=\"checkbox\"/>\n <span></span>\n </label>\n </div>\n <!-- Optional Image URL -->\n <ul id=\"oImgHelperCollapsible_${rId}_${qId}_${mId}\" ` +\n `class=\"collapsible helper-collapsible col s12\">\n <li>\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n Please provide a valid link to an image hosted ` +\n `online\n </blockquote>\n </div>\n </li>\n </ul>\n <div class=\"input-field multi-input col s12\">\n <span class=\"prefix light-blue-text text-darken-4 ` +\n `center-align\"></span>\n <input id=\"a_img_${rId}_${qId}_${mId}\" ` +\n `name=\"a_img_${rId}_${qId}_${mId}\" ` +\n `type=\"url\" class=\"img-url\" value=\"\">\n <label for=\"a_img_${rId}_${qId}_${mId}\" ` +\n `data-error=\"Invalid URL\" ` +\n `data-default=\"Optional Image URL\">` +\n `Optional Image URL</label>\n </div>\n <div class=\"image-preview col s12 center-align\"></div>\n </div>`;\n\n return answerHtml; // return the multiple choice option html string\n };\n\n /* Build answer elements */\n /* Requires: */\n /* rId: Number. Round Id */\n /* qId: Number. Question Id */\n const buildAHtml = (rId, qId) => {\n let err = '';\n if (isNaN(rId)) {\n err = 'Error: Missing/invalid rId'; // rId is NaN so set err\n }\n if (isNaN(qId)) {\n if (err.length > 0) {\n err += `\\n`;\n }\n err += 'Error: Missing/invalid qId'; // qId is NaN so update err\n }\n\n // If err length is > 0, return err\n if (err.length > 0) {\n return err;\n }\n\n // Define the answer html string\n let aHtml = `\n <ul id=\"answerHelperCollapsible_${rId}_${qId}\" ` +\n `class=\"collapsible helper-collapsible col s12\">\n <li>\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n An answer must be between 1-255 ` +\n `characters in length.\n </blockquote>\n </div>\n </li>\n <li class=\"paired\">\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n Please provide an answer, and/or a ` +\n `valid link to an image hosted ` +\n `online.<br>\n An answer must be between 1-255 ` +\n `characters in length.\n </blockquote>\n </div>\n </li>\n </ul>\n <div class=\"input-field col s12\">\n <span class=\"prefix\" data-question=\"${qId}\" ` +\n `data-multi=\"0\"></span>\n <input id=\"answer_${rId}_${qId}\" ` +\n `name=\"answer_${rId}_${qId}\" ` +\n `type=\"text\" minlength=\"1\" maxlength=\"255\" ` +\n `class=\"answer\" value=\"\" required>\n <label for=\"answer_${rId}_${qId}\" ` +\n `data-error=\"Invalid Answer\" ` +\n `data-default=\"Answer ${qId}\">` +\n `Answer ${qId}</label>\n </div>\n <!-- Optional Image URL -->\n <ul id=\"aImgHelperCollapsible_${rId}_${qId}\" ` +\n `class=\"collapsible helper-collapsible col s12\">\n <li>\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n Please provide a valid link to an ` +\n `image hosted online\n </blockquote>\n </div>\n </li>\n </ul>\n <div class=\"input-field col s12\">\n <span class=\"prefix light-blue-text ` +\n `text-darken-4 ` +\n `center-align\"></span>\n <input id=\"a_img_${rId}_${qId}\" ` +\n `name=\"a_img_${rId}_${qId}\" type=\"url\" ` +\n `class=\"img-url\" value=\"\">\n <label for=\"a_img_${rId}_${qId}\" ` +\n `data-error=\"Invalid URL\" ` +\n `data-default=\"Optional Image URL\"> ` +\n `Optional Image URL</label>\n </div>\n <div class=\"image-preview col s12 center-align\"></div>\n `;\n\n return aHtml; // return the answer html string\n };\n\n /* Return answer html, or initialise multiple choice options */\n /* Returned html depends on the status of the .quizMulti checkbox */\n /* Requires: */\n /* rId: Number. Round Id */\n /* qId: Number. Question Id */\n /* checked: Boolean. Checked state of .quizMulti checkbox */\n const toggleMultiHtml = (rId, qId, checked) => {\n let err = '';\n if (isNaN(rId)) {\n err = 'Error: Missing/invalid rId'; // rId is NaN so set err\n }\n if (isNaN(qId)) {\n if (err.length > 0) {\n err += `\\n`;\n }\n err += 'Error: Missing/invalid qId'; // qId is NaN so update err\n }\n if (typeof checked !== 'boolean' ||\n (checked !== true && checked !== false)) {\n if (err.length > 0) {\n err += `\\n`;\n }\n // checked is invalid, so update err\n err += 'Error: Missing/invalid checked state';\n }\n\n // If err length is > 0, return err\n if (err.length > 0) {\n return err;\n }\n\n // Define mId as 0\n let mId = 0;\n\n // If checked is true...\n let htmlTitle = '';\n let htmlContent = '';\n if (checked === true) {\n // set mId = 1\n mId = 1;\n\n // Set htmlTitle for multiple choice options\n htmlTitle = `<span class=\"col s10\">What are the Choices?</span>` +\n `<span class=\"col s2 center-align\">Correct?</span>`;\n\n /* Initialise multiple choice options */\n /* Returns html for 3 multiple choice options */\n /* Controls are added to the third option */\n const initMultiHtml = () => {\n // Call buildMultiHtml() and append to htmlContent\n htmlContent += buildMultiHtml(rId, qId, mId, true); // init True\n // If mId < 3...\n if (mId < 3) {\n mId += 1; // increment mId by 1\n return initMultiHtml(); // PTC\n }\n };\n\n initMultiHtml(); // Initialise multiple choice options\n\n /* return an object with the html title, content and the number */\n /* of multiple choice options (either 0 or 3) */\n return {htmlTitle, htmlContent, 'multiCount': mId};\n }\n\n // Otherwise set htmlTitle for single answer\n htmlTitle = `<span class=\"col s12\">What is the Answer?</span>`;\n\n // Call buildAHtml() to return the answer html string\n htmlContent = buildAHtml(rId, qId);\n\n /* return an object with the html title, content and the number */\n /* of multiple choice options (either 0 or 3) */\n return {htmlTitle, htmlContent, 'multiCount': mId};\n };\n\n /* Return question controls html */\n /* Requires: */\n /* qId: Number. Question Id */\n const buildQControlHtml = (qId) => {\n // If qId is NaN, return error.\n if (isNaN(qId)) {\n return 'Error: Missing/invalid mId';\n }\n\n // .qcontrols container element\n let qControlHtml = `\n <div class=\"qcontrols col s2 right-align\">\n <a href=\"#!\" ` +\n `class=\"qcontrols-remove light-blue-text ` +\n `text-darken-4\">` +\n `-</a>\n <a href=\"#!\" ` +\n `class=\"qcontrols-add light-blue-text ` +\n `text-darken-4\">+</a>\n </div>`;\n\n // If qId is 1, update the .qcontrols container element string\n if (qId === 1) {\n qControlHtml = `\n <div class=\"qcontrols col s2 right-align\">\n <a href=\"#!\" ` +\n `class=\"qcontrols-add light-blue-text ` +\n `text-darken-4\">+</a>\n </div>`;\n }\n\n return qControlHtml; // return the finalised html string\n };\n\n /* Return question html */\n /* Requires: */\n /* rId: Number. Round Id */\n /* qId: Number. Question Id */\n const buildQHtml = (rId, qId) => {\n let err = '';\n if (isNaN(rId)) {\n err = 'Error: Missing/invalid rId'; // rId is NaN so set err\n }\n if (isNaN(qId)) {\n if (err.length > 0) {\n err += `\\n`;\n }\n err += 'Error: Missing/invalid qId'; // qId is NaN so update err\n }\n\n // If err length is > 0, return err\n if (err.length > 0) {\n return err;\n }\n\n // Call buildQControlHtml() to generate controls\n let qControlHtml = buildQControlHtml(qId);\n\n // Call builtAHtml() to generate the answer elements\n let aHtml = buildAHtml(rId, qId);\n\n // Define the question html string\n let qHtml = `\n <li>\n <div class=\"collapsible-header question-title\" ` +\n `data-question=\"${qId}\">\n Question ${qId}\n <svg class=\"caret\" height=\"32\" viewBox=\"0 0 24 24\" ` +\n `width=\"32\" ` +\n `xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n </svg>` +\n qControlHtml + `\n </div>\n <div class=\"collapsible-body\">\n <div class=\"row\">\n <!-- Question ${qId} -->\n <ul id=\"questionHelperCollapsible_${rId}_${qId}\" ` +\n `class=\"collapsible helper-collapsible col s12\">\n <li>\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n A question must be between 2-255 ` +\n `characters in length.\n </blockquote>\n </div>\n </li>\n <li class=\"paired\">\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n Please provide a question, and/or a ` +\n `valid link to an image hosted online.<br>\n A question must be between 2-255 ` +\n `characters in length.\n </blockquote>\n </div>\n </li>\n </ul>\n <div class=\"input-field col s12\">\n <span class=\"prefix light-blue-text text-darken-4 ` +\n `center-align\"></span>\n <input id=\"question_${rId}_${qId}\" ` +\n `name=\"question_${rId}_${qId}\" ` +\n `type=\"text\" minlength=\"2\" maxlength=\"255\" ` +\n `class=\"question\" value=\"\" required>\n <label for=\"question_${rId}_${qId}\" ` +\n `data-error=\"Invalid Question\" ` +\n `data-default=\"Question ${qId}\">` +\n `Question ${qId}</label>\n </div>\n <!-- Optional Image URL -->\n <ul id=\"qImgHelperCollapsible_${rId}_${qId}\" ` +\n `class=\"collapsible helper-collapsible col s12\">\n <li>\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n Please provide a valid link to an ` +\n `image hosted online\n </blockquote>\n </div>\n </li>\n </ul>\n <div class=\"input-field col s12\">\n <span class=\"prefix light-blue-text text-darken-4 ` +\n `center-align\"></span>\n <input id=\"q_img_${rId}_${qId}\" ` +\n `name=\"q_img_${rId}_${qId}\" ` +\n `type=\"url\" class=\"img-url\" value=\"\">\n <label for=\"q_img_${rId}_${qId}\" ` +\n `data-error=\"Invalid URL\" ` +\n `data-default=\"Optional Image URL\">` +\n `Optional Image URL</label>\n </div>\n <div class=\"image-preview col s12 center-align\">\n </div>\n <!-- Multiple Choice? -->\n <span class=\"title col s12\">` +\n `Is this a multiple choice Question?</span>\n <div class=\"input-field col s12 checkbox-container\">\n <i class=\"prefix light-blue-text text-darken-4\"></i>\n <label id=\"quizMulti_${rId}_${qId}\">\n <input id=\"quizMultiInput_${rId}_${qId}\" ` +\n `class=\"quizMulti\" ` +\n `name=\"quizMulti_${rId}_${qId}\" ` +\n `type=\"checkbox\"/>\n <span>Multiple Choice?</span>\n </label>\n </div>\n <!-- Answer -->\n <div class=\"title col s12\">\n <span class=\"col s12\">What is the Answer?</span>\n </div>\n <input id=\"multiCount_${rId}_${qId}\" ` +\n `name=\"multiCount_${rId}_${qId}\" type=\"text\" ` +\n `class=\"hidden\" value=\"1\">\n <div class=\"answers-container col s12\">` +\n aHtml +\n `</div>\n </div>\n </div>\n </li>`;\n\n return qHtml; // Return the question html string\n };\n\n /* Return round controls html */\n /* Requires: */\n /* rId: Number. Round Id */\n const buildRControlHtml = (rId) => {\n // If rId is NaN, return error.\n if (isNaN(rId)) {\n return 'Error: Missing/invalid rId';\n }\n\n // .rcontrols container element\n let rControlHtml = `\n <div class=\"rcontrols col s2 right-align\">\n <a href=\"#!\" ` +\n `class=\"rcontrols-remove light-blue-text ` +\n `text-darken-4\">` +\n `-</a>\n <a href=\"#!\" ` +\n `class=\"rcontrols-add light-blue-text ` +\n `text-darken-4\">` +\n `+</a>\n </div>`;\n\n // if rId is 1, update the .rcontrols container element string\n if (rId === 1) {\n rControlHtml = `\n <div class=\"rcontrols col s2 right-align\">\n <a href=\"#!\" ` +\n `class=\"rcontrols-add light-blue-text ` +\n `text-darken-4\">` +\n `+</a>\n </div>`;\n }\n\n return rControlHtml; // return the finalise html string\n };\n\n /* Build round html */\n /* Requires: */\n /* rId: Number. Round Id */\n const buildRHtml = (rId) => {\n // If qId is NaN, return error.\n if (isNaN(rId)) {\n return 'Error: Missing/invalid rId';\n }\n\n // Call buildRControlHtml() to generate controls\n let rControlHtml = buildRControlHtml(rId);\n\n // Define the round html string\n let rHtml = `\n <li>\n <div class=\"collapsible-header round-title\" data-round=\"${rId}\">\n Round ${rId}\n <svg class=\"caret\" height=\"32\" viewBox=\"0 0 24 24\" ` +\n `width=\"32\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n </svg>`;\n rHtml += rControlHtml +\n `\n </div>\n <div class=\"collapsible-body\">\n <div class=\"row round-row\">\n <span class=\"title col xl12 hide-on-large-and-down\">\n Choose a Category and Provide a Title for this Round\n </span>\n <ul id=\"roundTitleHelperCollapsibleXl_${rId}\" ` +\n `class=\"collapsible helper-collapsible col ` +\n `hide-on-large-and-down\">\n <li>\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n Round titles must be 5-100 ` +\n `characters in length.\n </blockquote>\n </div>\n </li>\n </ul>\n <!-- Round Category -->\n <span class=\"title col s12 hide-on-extra-large-only\">\n Choose a Category for this Round\n </span>\n <div class=\"input-field col s12 xl5 select-container\">\n <i id=\"roundCategoryIcon_${rId}\" ` +\n `class=\"prefix light-blue-text text-darken-4 ` +\n `fas\"></i>\n <select id=\"roundCategory_${rId}\" ` +\n `class=\"round-category\" ` +\n `name=\"roundCategory_${rId}\">`;\n // Iterate over categoryList global to generate round category select\n categoryList.forEach((category) => {\n rHtml += `\n <optgroup label='<span class=\"subopt\">\n <i class=\"fas ${category.category_icon} ` +\n `fa-fw light-blue-text ` +\n `text-darken-4\">` +\n `</i> ` +\n `<span class=\"light-blue-text ` +\n `text-darken-4\">\n ${category.category}\n </span></span>'>\n <option>${category.category}</option>\n </optgroup>`;\n });\n rHtml += `\n </select>\n <label>Round Category</label>\n </div>\n <!-- Round Name -->\n <span class=\"title col s12 hide-on-extra-large-only\">\n Provide a Title for this Round\n </span>\n <div class=\"col s12 xl7\">\n <ul id=\"roundTitleHelperCollapsible_${rId}\" ` +\n `class=\"collapsible helper-collapsible ` +\n `hide-on-extra-large-only\">\n <li>\n <div class=\"collapsible-header\"></div>\n <div class=\"collapsible-body\">\n <blockquote class=\"black-text\">\n Quiz titles must be 5-100 ` +\n `characters in length.\n </blockquote>\n </div>\n </li>\n </ul>\n <div class=\"input-field\">\n <input id=\"roundTitle_${rId}\" ` +\n `name=\"round_title_${rId}\" type=\"text\" ` +\n `minlength=\"5\" maxlength=\"100\" ` +\n `class=\"round-title\" ` +\n `value=\"Round ${rId}\" required>\n <label for=\"roundTitle_${rId}\" ` +\n `data-error=\"Invalid Round Title\" ` +\n `data-default=\"Round Title\">Round Title` +\n `</label>\n </div>\n </div>\n <span class=\"title col s12\">\n Create Questions for this Round\n </span>\n <input id=\"questionCount_${rId}\" ` +\n `name=\"questionCount_${rId}\" type=\"text\" ` +\n `class=\"hidden\" value=\"1\">\n </div>\n <div class=\"row\">\n <div class=\"col s12\">\n <ul class=\"collapsible expandable\">\n <li class=\"active\">`;\n\n // Call buildQHtml() to generate question and answer elements\n let qHtml = buildQHtml(rId, 1);\n\n // Format the returned question html for inclusion in the round html\n qHtml = qHtml.slice(qHtml.indexOf(\" <div\"));\n let formatQHtml = qHtml.split(\"\\n\");\n qHtml = `\n `;\n formatQHtml.forEach((line, i) => {\n if (i === 0) {\n qHtml += ` ` + line;\n return;\n }\n\n qHtml += `\\n ` + line;\n\n });\n\n // Append the question html to the round html string\n rHtml += qHtml;\n\n // Finalise the round html string\n rHtml += `\n </ul>\n </div>\n </div>\n </div>\n </li>\n `;\n\n return rHtml; // return the round html string\n };\n\n /* Build MaterializeCSS preloader */\n const preloader = () => {\n // Define preloader html string\n let preloaderHtml = `\n <div class=\"preloader-container\">\n <div class=\"preloader-wrapper big active\">\n <div class=\"spinner-layer\">\n <div class=\"circle-clipper left\">\n <div class=\"circle\"></div>\n </div>\n <div class=\"gap-patch\">\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 </div>`;\n\n return preloaderHtml; // return preloader html string\n };\n\n /* Build img element */\n /* Requires: */\n /* imgUrl: String. Url to an image. */\n const imgPreviewHtml = (imgUrl) => {\n // Define img html string\n let imgPreviewHtml = `<img class=\"hidden\" src=\"${imgUrl}\" ` +\n `alt=\"Image Preview\"></img>`;\n\n return imgPreviewHtml; // return img html string\n };\n\n /* Validate params object and return requested html */\n const validateParams = () => {\n // If the request property is missing, return error\n if (!Object.prototype.hasOwnProperty.call(params, 'request')) {\n return 'Missing request parameter';\n }\n\n // Execute the relevant function to return the html string/object\n let html;\n switch (params.request) {\n case 'toggleMulti':\n html = toggleMultiHtml(params.rId, params.qId, params.checked);\n break;\n case 'multiControl':\n html = buildMultiControlHtml(params.mId); // returns an object\n break;\n case 'addMulti':\n html = buildMultiHtml(params.rId, params.qId, params.mId);\n break;\n case 'qControl':\n html = buildQControlHtml(params.qId);\n break;\n case 'addQ':\n html = buildQHtml(params.rId, params.qId);\n break;\n case 'rControl':\n html = buildRControlHtml(params.rId);\n break;\n case 'addR':\n html = buildRHtml(params.rId);\n break;\n case 'preloader':\n html = preloader();\n break;\n case 'imgPreview':\n html = imgPreviewHtml(params.imgUrl);\n break;\n default:\n break;\n }\n\n return html; // return the html string/object\n };\n\n // Call validateParams() to get the requested html string/object\n let result = validateParams();\n\n return result; // return the requested html string/object\n}", "function printHtml(el) { \n return function(html) { \n el.innerHTML = html;\n }\n }", "function buildTodo(todo) {\n var todoHtml = '<div class=\"todo\" id=\"'+ todo.title +'\" ><p>' + todo.description\n + '</p>'\n + '<button class=\"delete-todo\">Delete</button></div>';\n\n return todoHtml;\n}", "function createTemplate (data) {\n var htmlTemplate = `\n <!DOCTYPE html>\n <html>\n <head>\n <title>Authors</title>\n </head>\n <body>\n ${data}\n </body>\n </html>\n `;\n return htmlTemplate;\n}", "toHtml()\n\t{\n //to finish \n var answer = '<div class=\"student-project-panel\"><div class=\"personal-row\"> <h3>' \n\t\t+ this.name + '</h3><span class=\"'+ map_dot[this.status]+'\"></span></div></div>'\n\t\treturn answer;\n\t}", "createHTML(html) {\n return htmlPolicy.createHTML(html);\n }", "function createHTMLString(item) {\n return `\n <li class=\"content\">\n <img src=\"${item.image}\" alt=\"${item.type}\" class=\"item__thumbnail>\n <p class=\"item_description>${item.gender}, ${item.size} size</p>\n `;\n}", "html(str){\n if(str !== undefined){\n\n if(typeof str === \"function\"){\n return this.forEach(function(elem, index){\n elem.innerHTML = str.call(elem, index, elem.innerHTML);\n });\n }\n\n for(let elem of this){\n elem.innerHTML = str;\n }\n return this;\n }\n return this[0].innerHTML;\n }", "html(argHTML) {\n if (argHTML === undefined) return this.elementArray[0].innerHTML;\n this.each(ele => {\n ele.innerHTML = argHTML;\n });\n }", "returnHTML(){\n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.0-beta3/css/bootstrap.min.css\"/>\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css\">\n \n <title>Team Profile</title>\n </head>\n <body>\n <div class=\"container-fluid\">\n <div class=\"row mb-4\">\n <div class=\"col py-3 bg-primary bg-gradient text-white text-center\">\n <h1 class=\"display-1\">My Developer Team</h1>\n </div>\n </div>\n <div class=\"row justify-content-center\">\n <div id=\"member-container\" class=\"col-8 d-flex flex-wrap justify-content-center\">\n ${this.generateTeamHTML()}\n </div>\n </div>\n </div>\n </body>\n </html>`;\n }", "function htmlEncode(value)\n{\n return $('<div/>').text(value).html();\n}", "function generateHTML(node) {\n\n if (node.name === 'h4') {\n\n html = h4(lib, node)\n\n } else if (node.name === 'h5') {\n\n html = h5(lib, node)\n\n } else if (node.name === 'img') {\n\n html = img(lib, node)\n\n } else {\n\n html = '<' + node.name + ' not-yet-supported/>'\n }\n\n debug('generate <%s> --> %s', node.name, html)\n\n return html\n}", "function wrap(xhtml, tag) {\n var e = document.createElement('div');\n e.innerHTML = xhtml;\n return e;\n}", "function users_list_format (fakeout, edit, name, company, address, phone, email, latlong, notes) {\n return \"\"+\n \"<div class='glider'>\"+\n \" <table class='users-list-expando'>\"+\n \" <tr>\"+\n \" <td>Full Name</td>\"+\n \" <td>Company & Position</td>\"+\n \" <td>Address</td>\"+\n \" <td>Phone Number(s)</td>\"+\n \" <td>Email Address</td>\"+\n \" <td>Lat/Long</td>\"+\n \" <td>Notes</td>\"+\n \" <td></td>\"+\n \" </tr>\"+\n \" <tr name='\"+fakeout+\"' class='no-table'>\"+ // \"no-table\" class allows single-row expandos to not highlight on hover\n \" <td>\"+name+\"</td>\"+\n \" <td class='address-margin'>\"+company+\"</td>\"+\n \" <td class='address-margin'>\"+address+\"</td>\"+\n \" <td class='address-margin'>\"+phone+\"</td>\"+\n \" <td>\"+email+\"</td>\"+\n \" <td>\"+latlong+\"</td>\"+\n \" <td>\"+notes+\"</td>\"+\n \" <td>\"+edit+\"</td>\"+\n \" </tr>\"+\n \" </table>\"+\n \"</div>\";\n }", "function _escapeHtml(html) {\n return $('<div />').text(html).html();\n}", "function buildHtml() {\n $(\"<article>\", {class: \"article\"}).append(\n $(\"<section>\", {class:\"impressions\"}).append(\"News Source\"),\n $(\"<section>\", {class:\"featuredImage\"}).append(\n $(\"<img src =\" + image + \" alt = ''>\")\n ),\n $(\"<section>\", {class:\"articleContent\"}).append(\n $(\"<a href =\" + link + \">\").append(\n $(\"<h3>\").text(title), \n $(\"<h6>\").text(source)\n )\n ),\n $(\"<section>\", {class:\"impressions\"}).append(source),\n $(\"<div>\", {class:\"clearfix\"})\n ).appendTo(\"#article-list\")\n $(\".loader\").addClass(\"hidden\");\n}", "function createMarkUp() {\n\t\t\treturn { __html: a.content }\n\t\t}", "function createLink(url,text){\r\n\treturn \"<a href=\\\"\"+url+\"\\\"\"+Target+\">\"+text+\"</a>\";\r\n}", "function html () {\n let result = null\n\n // Break into three sequence calls. That should allow accurate reconstruction of the original HTML, and requiring an exact tag name match.\n // 1. open through closeHtmlTag\n // 2. expression\n // 3. openHtmlEnd through close\n // This will allow recording the positions to reconstruct if HTML is to be treated as text.\n\n const startOpenTagPos = pos\n\n const openHtmlStartTag = makeStringParser('<')\n const optionalForwardSlash = makeRegexParser(/^\\/?/)\n const closeHtmlTag = makeRegexParser(/^\\s*>/)\n\n const parsedOpenTagResult = sequence([\n openHtmlStartTag,\n asciiAlphabetLiteral,\n htmlAttributes,\n optionalForwardSlash,\n closeHtmlTag\n ])\n\n if (parsedOpenTagResult === null) {\n return null\n }\n\n const endOpenTagPos = pos\n const startTagName = parsedOpenTagResult[1]\n\n const parsedHtmlContents = nOrMore(0, expression)()\n\n const startCloseTagPos = pos\n const openHtmlEndTag = makeStringParser('</')\n\n const parsedCloseTagResult = sequence([\n openHtmlEndTag,\n asciiAlphabetLiteral,\n closeHtmlTag\n ])\n\n if (parsedCloseTagResult === null) {\n // Closing tag failed. Return the start tag and contents.\n return ['CONCAT', message.slice(startOpenTagPos, endOpenTagPos)]\n .concat(parsedHtmlContents)\n }\n\n const endCloseTagPos = pos\n const endTagName = parsedCloseTagResult[1]\n const wrappedAttributes = parsedOpenTagResult[2]\n const attributes = wrappedAttributes.slice(1)\n if (isAllowedHtml(startTagName, endTagName, attributes)) {\n result = ['HTMLELEMENT', startTagName, wrappedAttributes]\n .concat(parsedHtmlContents)\n } else {\n // HTML is not allowed, so contents will remain how\n // it was, while HTML markup at this level will be\n // treated as text\n // E.g. assuming script tags are not allowed:\n //\n // <script>[[Foo|bar]]</script>\n //\n // results in '&lt;script&gt;' and '&lt;/script&gt;'\n // (not treated as an HTML tag), surrounding a fully\n // parsed HTML link.\n //\n // Concatenate everything from the tag, flattening the contents.\n const escapeHTML = (unsafeContent) => unsafeContent\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&#039;')\n result = ['CONCAT', escapeHTML(message.slice(startOpenTagPos, endOpenTagPos))]\n .concat(parsedHtmlContents, escapeHTML(message.slice(startCloseTagPos, endCloseTagPos)))\n }\n\n return result\n }", "function html_tag(tag)\n{\n\t function wrap_text( msg )\n\t {\n\t\t console.log( '<' + tag + '>' + msg + '</' + tag + '>' ) \n\t }\n\n\t return wrap_text\n}", "displayHTML() {\n return `<p>Name: ${this.name}</p>\n <p>Email: ${this.email}</p>\n <p>Phone: ${this.phone}</p>\n <p>Relation: ${this.relation}</p>`;\n }", "buildTemplateHtmlString() {\n const fieldId = this.columnDef && this.columnDef.id;\n const minValue = this.filterProperties.hasOwnProperty('minValue') ? this.filterProperties.minValue : DEFAULT_MIN_VALUE$1;\n const maxValue = this.filterProperties.hasOwnProperty('maxValue') ? this.filterProperties.maxValue : DEFAULT_MAX_VALUE$1;\n const defaultValue = this.filterParams.hasOwnProperty('sliderStartValue') ? this.filterParams.sliderStartValue : minValue;\n const step = this.filterProperties.hasOwnProperty('valueStep') ? this.filterProperties.valueStep : DEFAULT_STEP$1;\n if (this.filterParams.hideSliderNumber) {\n return `\n <div class=\"search-filter slider-container filter-${fieldId}\">\n <input type=\"range\" name=\"${this._elementRangeInputId}\"\n defaultValue=\"${defaultValue}\" value=\"${defaultValue}\"\n min=\"${minValue}\" max=\"${maxValue}\" step=\"${step}\"\n class=\"form-control slider-filter-input range ${this._elementRangeInputId}\" />\n </div>`;\n }\n return `\n <div class=\"input-group slider-container search-filter filter-${fieldId}\">\n <input type=\"range\" name=\"${this._elementRangeInputId}\"\n defaultValue=\"${defaultValue}\" value=\"${defaultValue}\"\n min=\"${minValue}\" max=\"${maxValue}\" step=\"${step}\"\n class=\"form-control slider-filter-input range ${this._elementRangeInputId}\" />\n <div class=\"input-group-addon input-group-append slider-value\">\n <span class=\"input-group-text ${this._elementRangeOutputId}\">${defaultValue}</span>\n </div>\n </div>`;\n }", "function makeTodoHTML(todoText) {\n \n return \"<li class=\\\"todo-item\\\"><span class=\\\"delete-todo\\\"><i class=\\\"fa fa-times\\\" aria-hidden=\\\"true\\\"></i></span> \" + todoText + \"</li>\";\n\n}", "function make_template_function(templateName) { // 346\n\tif (!templateName) { // 347\n\t\tthrow new Error(\"templateName is not specified\"); // 348\n\t} // 349\n // 350\n\tvar tmpl = Template[templateName]; // 351\n\tif (!tmpl) { // 352\n\t\tthrow new Error(\"Template '\" + templateName + \"' is not defined\"); // 353\n\t} // 354\n // 355\n\treturn function(context) { // 356\n\t\tvar div = $(\"<div/>\"); // 357\n\t\tif ($.isFunction(Blaze.renderWithData)) { // 358\n\t\t\tBlaze.renderWithData(tmpl, context, div[0]); // 359\n\t\t} else { // for meteor < v0.9 // 360\n\t\t\tvar range = UI.renderWithData(tmpl, context); // 361\n\t\t\tUI.insert(range, div[0]); // 362\n\t\t} // 363\n\t\t// return html wrapped into div to avoid visual issues // 364\n\t\treturn div[0].outerHTML; // 365\n\t}; // 366\n} // 367", "function new_td(value) {\n var td = '<td>' + value + '</td>';\n\n return td;\n}", "function temp_articolo(){\n let articolo = `\n <article>\n <h2>Titolo articolo</h2>\n <p>Testo del parragrago</p>\n </article>\n `;\n return articolo;\n}", "htmlForInfo() {\nvar html;\n//----------\nreturn html = `<!--========================================================-->\n<hr style=\"height:1px;\" />\n${this.htmlForProgress()}\n<br>\n${this.htmlForStatus()}`;\n}", "function OLcontentSimple(text){\r\nvar txt=\r\n'<table'+(o3_wrap?'':' width=\"'+o3_width+'\"')+o3_height+' border=\"0\" cellpadding=\"'+o3_border\r\n+'\" cellspacing=\"0\"'+(o3_bgclass?' class=\"'+o3_bgclass+'\"':o3_bgcolor+o3_bgbackground)\r\n+'><tr><td><table width=\"100%\"'+o3_height+' border=\"0\" cellpadding=\"'+o3_textpadding\r\n+'\" cellspacing=\"0\"'+(o3_fgclass?' class=\"'+o3_fgclass+'\"':o3_fgcolor+o3_fgbackground)\r\n+'><tr><td valign=\"top\"'+(o3_fgclass?' class=\"'+o3_fgclass+'\"':'')+'>'\r\n+OLlgfUtil(0,o3_textfontclass,'div',o3_textcolor,o3_textfont,o3_textsize)+text\r\n+OLlgfUtil(1,'','div')+'</td></tr></table>'+((o3_base>0&&!o3_wrap)?\r\n('<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"'+o3_base\r\n+'\"></td></tr></table>'):'')+'</td></tr></table>';\r\nOLsetBackground('');\r\nreturn txt;\r\n}" ]
[ "0.65401155", "0.64846575", "0.63951284", "0.6355726", "0.634439", "0.62954026", "0.6284767", "0.6277153", "0.62669307", "0.6248323", "0.62193817", "0.62069726", "0.61787236", "0.6177544", "0.61741894", "0.6142228", "0.6142228", "0.6142228", "0.6142228", "0.6142228", "0.6110512", "0.61069095", "0.6093672", "0.6092475", "0.6084356", "0.6073334", "0.60602057", "0.6057094", "0.6038632", "0.60335696", "0.60176414", "0.6016135", "0.6016052", "0.59831136", "0.5978511", "0.5978511", "0.5978511", "0.5970917", "0.59686077", "0.59672904", "0.5965084", "0.595674", "0.5938351", "0.59355193", "0.5929921", "0.5928131", "0.59188306", "0.5912119", "0.588968", "0.58886224", "0.5877623", "0.5868334", "0.58502835", "0.58485746", "0.58431596", "0.5830726", "0.5826645", "0.58163124", "0.57732534", "0.5768014", "0.5758255", "0.5742952", "0.57409394", "0.5740019", "0.5734863", "0.57161295", "0.57100856", "0.5703069", "0.5703069", "0.5688302", "0.56861424", "0.56819034", "0.5674048", "0.56702197", "0.5670089", "0.56677765", "0.5666247", "0.5666033", "0.56643635", "0.5650042", "0.5649723", "0.564853", "0.56428367", "0.56385946", "0.5629618", "0.56265694", "0.5626506", "0.5621187", "0.5613135", "0.5611618", "0.56036055", "0.56010324", "0.56002843", "0.55939037", "0.5590098", "0.55847836", "0.5579988", "0.55777556", "0.55755746", "0.5563353" ]
0.58855015
50
Creating a function for searching the restaurants by title
function restaurantSearch(searchTerm) { fetch(jsVar.fetchLink).then((restaurants) => restaurants.json()).then((parsedRestaurants) => { parsedRestaurants.forEach((element) => { if (element.name.toLowerCase().includes(searchTerm.toLowerCase())) { document.querySelector(`#restaurant-container`).innerHTML += buildHTMLString(element); } }); searchFunctions.noResultsFound(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchBook(title) {\n const bookData = getListOfBook();\n const searchResult = [];\n for (let data of bookData) {\n if (data.title.includes(title)) {\n searchResult.unshift(data);\n }\n }\n renderBookList(true, searchResult);\n}", "function search() {\n var search = {\n bounds: map.getBounds(),\n types: [\"restaurant\"]\n }\n\n places.nearbySearch(search, function(results, status) {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n clearResults()\n clearMarkers()\n // Create a marker for each hotel found, and\n // assign a letter of the alphabetic to each marker icon.\n for (var i = 0; i < results.length; i++) {\n var markerLetter = String.fromCharCode(\"A\".charCodeAt(0) + i % 26)\n var markerIcon = MARKER_PATH + markerLetter + \".png\"\n\n // Use marker animation to drop the icons incrementally on the map.\n markers[i] = new google.maps.Marker({\n position: results[i].geometry.location,\n icon: markerIcon,\n zIndex: -1\n })\n\n // If the user clicks a restaurant marker, show the details of that restaurant\n // in an info window.\n markers[i].placeResult = results[i]\n google.maps.event.addListener(markers[i], \"click\", showInfoWindow)\n setTimeout(dropMarker(i), i * 100)\n addResult(results[i], i)\n }\n }\n })\n}", "async function searchTitle({ title }) {\n\t\tlet results = await getTitlesFromAPI(title);\n\t\tsetSearchResults(results);\n\t}", "function searchTerm(){\n \n }", "findItem(query) {\n if (query === '') {\n return this.dataSearch.slice(0, 5);\n }\n const regex = new RegExp(`${query.trim()}`, 'i');\n return this.dataSearch.filter(film => film.name.search(regex) >= 0);\n }", "async function searchByTitle(title){\n let titleURI = encodeURIComponent(title.innerHTML);\n let response = await fetch(dbURI + `t=${titleURI}`);\n let data = await response.json();\n return data;\n}", "function getSongByTitle(title) {\n for(let i = 0; i < songDatabase.length; i++) {\n if (title === songDatabase[i].title) {\n return songDatabase[i];\n }\n\n // fuzzy search\n /*\n if (songDatabase[i].title.includes(title)) {\n return songDatabase[i];\n }\n */\n }\n return;\n}", "function searchMovies(title) {\n\n var url = 'http://www.omdbapi.com/?i=tt3896198&apikey=18c5a437&s=' + title;\n\n $http.get(url)\n .then(function (response) {\n model.movies = response.data.Search\n\n })\n $location.url('/movie')\n }", "searchMovies(){\r\n document.documentElement.scrollTop = 0\r\n this.page = 1\r\n this.films = []\r\n this.searchedTitle = this.searchTitle\r\n if(this.genreSelected === \"All\"){\r\n this.searchFilm()\r\n this.searchTv()\r\n } else if(this.genreSelected === \"Films\") {\r\n this.searchFilm()\r\n } else {\r\n this.searchTv()\r\n }\r\n }", "function filterMovies(titlename) {\r\n const filteredMovies = movies.filter(word => word.Title.includes(titlename));\r\n addMoviesToDom(filteredMovies);\r\n}", "searchTitleFuzzy(input){\r\n // Fuzzy Search the quiz title\r\n let results = fuzzy.filter(input, this.quizList, {extract: (el) => {\r\n return el.title;\r\n }})\r\n this.searchFuzzy(results);\r\n }", "function searchPlaces() {\n\n\tvar input = document.getElementById(\"searchBar\").value;\n\tif(input.length <= 0) { return }\n\t\t//returns clears it \n\n\tvar request = {\n\t\tlocation: map.getCenter(),\n\t\tradius: 8000,//getZoomRadius(),\n\t\t// keyword: \"\",\n\t\ttype: ['Restaurants'],\n\t\tfields: ['formatted_address', 'name', 'rating']\n\t}\n\n\tif(input.length > 0) {\n\t\trequest.keyword = input;\n\t}\n\t\n\tinfowindow = new google.maps.InfoWindow();\n\t\n\tvar service = new google.maps.places.PlacesService(map);\n\n\tservice.textSearch(request, searchPlacesCallback);\n}", "function searchFilmsByTitle(title) {\n let format = title.split(' ').join('+'); // replace spaces with plus\n $.ajax({\n url: `https://www.omdbapi.com/?apikey=ac155d96&s=${format}`,\n dataType: \"json\"\n }).done(function(resp) {\n if (resp.Search != null) {\n let respSize = resp.Search.length;\n for (let i = 0; i < respSize; i++) {\n if(resp.Search[i].Poster != 'N/A' && resp.Search[i].Type == 'movie') {\n let myHTML = \n `<div class=\"col-sm-6\">\n <a class=\"movie-select\" href=\"#\" id=\"${resp.Search[i].imdbID}\">\n <img class=\"movie-image\" src=\"${resp.Search[i].Poster}\">\n </a>\n </div>`;\n $(\"#movies\").append(myHTML);\n }\n }\n } else {\n let myHTML =\n `<div class=\"col-sm-12\">\n <div class=\"alert alert-primary col\" role=\"alert\">\n ${resp.Error}\n </div></div>`;\n $(\"#movies\").append(myHTML);\n }\n });\n }", "function getRestaurantsByType (type) {\n var request = {\n location: selectedCoords,\n radius: $radius.val(),\n query: type + \" restaurant\"\n };\n $('.bg_overlay_alt').addClass('is_show');\n $('body').addClass('no_scroll');\n placeService.textSearch(request, function (results, status, pagination) {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n callbackTextSearch(results, pagination, type);\n }\n });\n}", "function searchTitle(title) {\n const sql = `SELECT * FROM post WHERE title LIKE '%${title}%' ORDER BY timeposted DESC;`;\n return db.execute(sql);\n}", "async findByTitle({query}) {\n if (query == undefined)\n return [];\n else\n return movie.find({\"title\": query});\n }", "function search() {\n\t\n}", "function isRecipeFound(recipe) {\n //Get the user input\n var userInput = filterInput.value;\n // Make the input lower case\n var lowercaseUserInput = userInput.toLowerCase();\n //make the movie title lower case so we can compare titles\n var lowercaseTitle = recipe.title.toLowerCase();\n //check is the user input is in the lowercase recipe title\n if (lowercaseTitle.indexOf(lowercaseUserInput) >= 0) {\n //see if the lowercase title contains the user input from the user input field.\n return true; //if it matches we will return the recipe in the results\n } else {\n return false; //if it does not match then we won't return the recipe in the results\n }\n}", "searchByTitle(title, page) {\n return new Promise((fulfill, reject) => {\n https.get(restHost + \"/search/movie\" + pathTail + \"&query=\" + title + \"&include_adult=false&page=\" + page, function (response) {\n response.setEncoding('utf8');\n var body = '';\n response.on('data', function (d) {\n body += d;\n });\n response.on('error', (e) => {\n reject(e);\n });\n response.on('end', function () {\n var parsed = JSON.parse(body);\n fulfill(parsed);\n });\n });\n });\n }", "function searchForMovie(title) {\n var promise = deferred();\n\n login().then( () => {\n request('https://tls.passthepopcorn.me/torrents.php?searchstr=' + encodeURI(title) + '&json=noredirect', function (error, res, body) {\n promise.resolve(process(JSON.parse(body)));\n });\n });\n\n return promise.promise;\n}", "restFilter(item) {\n return item.restaurantName === this.state.restaurantTitle; \n }", "function filter_movie_data_by_title(title) {\n\tfiltered_data = [];\n\t$(sf_movie_data).each( function(i,data){\n\t\tif (data[8] == title) {\n\t\t\tfiltered_data.push(data);\n\t\t}\n\t} );\n\treturn filtered_data;\n}", "function filterBySearchTerm(){\n let inputName = document.querySelector('#input-pokemon-name').value;\n let pokemonNames = arrayOfPokemon.filter(pokemon => pokemon.name.startsWith(inputName));\n\n let inputType = document.querySelector('#input-pokemon-type').value;\n let pokemonTypes = arrayOfPokemon.filter(pokemon => pokemon.primary_type.startsWith(inputType));\n\n if (inputName !== \"\"){\n document.querySelector('#pokemon-list').innerText = '';\n displayList(pokemonNames);\n } else if (inputType !== \"\"){\n document.querySelector('#pokemon-list').innerText = '';\n displayList(pokemonTypes);\n } else if (inputName == \"\" && inputType == \"\"){\n let pokemonList = document.querySelector('#pokemon-list');\n pokemonList.innerHTML = \"\";\n displayList(arrayOfPokemon);\n };\n}", "async findByTitle({query}) {\n if(query == undefined)\n return []\n else\n return Movie.find({\"title\": query});\n }", "function getFilmsByTitle (searchTerm) {\n return knex('films').where('title', 'ILIKE', '%' + searchTerm + '%')\n}", "async function search(title) {\n // get job names via search term\n let jobs = await JoblyApi.getJobs(title);\n setJobs(jobs);\n }", "function searchRecom() {\n\t// store keyword in localSession\n\twindow.localStorage.setItem('kw', keyWord);\n\t// Fuse options\t\t\t\t\n\tvar options = {\n\t\tshouldSort: true,\n\t\ttokenize: true,\n\t\tthreshold: 0.2,\n\t\tlocation: 0,\n\t\tdistance: 100,\n\t\tincludeScore: true,\n\t\tmaxPatternLength: 32,\n\t\tminMatchCharLength: 2,\n\t\tkeys: [\"title.recommendation_en\",\n\t\t\t \"title.title_recommendation_en\",\n\t\t\t \"topic.topic_en\"]\n\t};\n\t//Fuse search\n\tvar fuse = new Fuse(recommends, options); //https://fusejs.io/\n\tconst results = fuse.search(keyWord);\n\treturn results;\n}", "function search() {\r\n\t\tlet query = $(\"#searchText\").val();\r\n\t\tquery = query.toLowerCase().trim();\r\n\r\n\t\tlet matches = [];\r\n\t\t\tfor(let course of COURSES) {\r\n\t\t\t\tlet coursetitle = course.course_title;\r\n\t\t\t\tcoursetitle = course.course_title.toLowerCase(); \r\n\r\n\t\t\t\tif(coursetitle.includes(query)) {\r\n\t\t\t\t\tmatches.push(course)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tdisplayCourses(matches);\r\n}", "function searchPhotos() {\n let $val = $('#searchbar').val().toLowerCase();\n $photoGal.each(function(i, item) {\n if ($(item).attr('data-title').toLowerCase().indexOf($val) >-1) {\n $(item).parent().show(); \n } else { \n $(item).parent().hide();\n }\n});\n}", "function SearchByName(){\n if(inputSearch.value !== \"\"){\n setTimeout(responsiveVoice.speak(inputSearch.value),0);\n resultHotel= [];\n result = hotels.filter((hotel) =>{\n if( hotel.name.toLocaleLowerCase().indexOf(inputSearch.value.toLocaleLowerCase()) > -1){\n return hotel;\n }\n })\n inputSearch.value=\"\";\n resultHotel = result;\n display(result);\n }else{\n alerts(\"Add your Search\",3000);\n }\n range();\n filterByPrice()\n}", "searchByName(string){\n \n const searchName = string.toLowerCase()\n const artists = this.artistas.filter( function(artista) { return artista.name.toLowerCase().includes(searchName)} );\n const albums = this.albums.filter( function(album) { return album.name.toLowerCase().includes(searchName)} );\n const tracks = this.tracks.filter( function(track) { return track.name.includes(searchName)} );\n const playlists = this.playsLists.filter( function(playlist) { return playlist.name.includes(searchName) } );\n \n \n return {artists: artists, albums: albums, tracks: tracks, playlists: playlists};\n \n }", "function SearchResults (props) {\n return axios.get('api/events', {\n params: {\n title: props.value//TODO: grab event's whose titles have the word passed in as any of the words in the title\n }\n })\n .then(function (response) {\n console.log(response);\n })\n .catch(function (error) {\n console.log(error);\n })\n}", "function linearSearch() {\n var result = []; //temporary array to store results\n for (var i = 0; i < restaurantInfo.length - 1; i++) {\n if (restaurantInfo[i] == ratingSearch) { //checks to see if number is same as the one being looked for, add to result array.\n result.push(restaurantFile.results[i].name);\n }\n }\n if (result.length > 0) { //if there's something in the array, display the names of the places with the rating\n return console.log(result);\n } else { //if there's nothing in the array, display that no restaurants exist with that rating\n return console.log('No restaurants exist with that rating.');\n }\n}", "function searchIt() {\r\n if (MovieListLoaded && SeriesListLoaded) {\r\n var searchFor = window.location.href.split('?q=');\r\n var searchQuery = searchFor[1];\r\n\r\n if (searchQuery !== null && searchFor.length > 1) {\r\n document.getElementById('searchText').value = decodeURI(\r\n searchQuery);\r\n getMovies(searchQuery);\r\n }\r\n }\r\n}", "function searchFunction() {\n let input = document.getElementById('myinput');\n let filter = input.value.toUpperCase();\n let ul = document.getElementById('catalog');\n \n html = '';\n for (let recipe of allRecipes) {\n let ingredientMatches = false;\n let allargiesMatches = false;\n\n for (let ingredient of recipe.recipeIngredients) {\n if(ingredient.toLowerCase().includes(input.value.toLowerCase())) {\n ingredientMatches = true;\n }\n }\n for (let allargies of recipe.recipeAllargies) {\n if(allargies.toLowerCase().includes(input.value.toLowerCase())) {\n allargiesMatches = true;\n } \n }\n if (recipe.recipeTitle.toLowerCase().includes(input.value.toLowerCase()) || ingredientMatches || allargiesMatches ){\n html += recipe.generateHTMLStructure()\n \n } \n document.getElementById('catalog').innerHTML = html\n let addToCartButtons = document.getElementsByClassName('btn-shop')\n for (var i = 0; i < addToCartButtons.length; i++) {\n var button = addToCartButtons[i]\n button.addEventListener('click', addToCartClicked)\n }\n\n }\n}", "function searchPlaces() {\n\tservice.nearbySearch({\n\t\tkeyword: 'lunch',\n\t\tlocation: new google.maps.LatLng(location.coords.latitude, location.coords.longitude),\n\t\tmaxPriceLevel: 2,\n\t\topenNow: true,\n\t\tradius: 4000,\n\t\ttype: 'restaurant|food'\n\t}, pickPlaces);\n}", "function search_genre(search){\n\tvar sResult = [];\n\tfor(let films in search_results){\n\t\tvar film = search_results[films];\n\t\tif(film.genre){\n\t\tif(film.genre.toLowerCase().includes(search.toLowerCase())){\n\t\t\tgenre.innerHTML+= \"<li><a href= \\\"show_movie.html?id=\" + films + \"\\\">\" + film.otitle + \"</a> </li> <br>\";\n\t\t}\n\t\t\t\n\t\t}\n\t}\n\tconsole.log(sResult);\n\t\n}", "compareSearchWords(term, toDoEntries) {\n// data => array of strings, each string one entry?\n let onlyMatchingEntries = toDoEntries.filter(function (todoEntry) { // TODO BOTTOM if todo-item has 'more than one text field', search then\n if (todoEntry.includes(term)) {\n return true;\n };\n });\n // Filter to make an array of only item titles\n return onlyMatchingEntries; // These are the item TITLES, not contents**\n }", "function SearchByTitlePre(database,word,func) {\r\n database.query('SELECT books_basic.ID,Title,Subtitle,Image FROM books_basic WHERE Title = \"'+word+'\";', func);\r\n}", "function searchByName(name) {\n var testName = name.toLowerCase();\n if (testName===\"bar\"||\"bars\"||\"restaurant\"||\"restaurants\"||\"food\"||\"beer\") {\n var request = {\n location: pos,\n radius: '500',\n type: ['bar', 'restaurant']\n };\n service = new google.maps.places.PlacesService(map);\n service.nearbySearch(request, callback);\n } else {\n var request = {\n query: name,\n fields: ['photos', 'formatted_address', 'name', 'rating', 'opening_hours', 'geometry'],\n locationBias: {radius: 50, center: pos}\n };\n service = new google.maps.places.PlacesService(map);\n service.findPlaceFromQuery(request, callback);\n };\n}", "function searchRecipes() {\n showAllRecipes();\n let searchedRecipes = domUpdates.recipeData.filter(recipe => {\n return recipe.name.toLowerCase().includes(searchInput.value.toLowerCase());\n });\n filterNonSearched(createRecipeObject(searchedRecipes));\n}", "async function getRecipeByTitle(title){\n if(!title){\n throw 'No title provided.'\n }\n const recipeCollection = await recipes()\n return await recipeCollection\n .find({'title' : title}) //not sure if this is the right way to search. I think so based of lab 6 codebase\n .toArray()\n}", "getByTitle(title) {\r\n return new List(this, `getByTitle('${title}')`);\r\n }", "function searchByText(searchText) {\n removeMarkers(allPlacesMarkers);\n removeRestaurants(allRestaurants);\n\n bounds = map.getBounds();\n\n if (searchText === \"\") {\n displayErrorMessage(\"Please enter a search term.\");\n } else {\n placesService.textSearch(\n {\n query: searchText,\n location: defaultCoords,\n type: [\"food\"],\n radius: 50\n },\n function(results, status) {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n map.setCenter(results[0].geometry.location);\n\n /* Go ahead and create markers */\n createMarkersForMultiplePlaces(results);\n } else {\n alert(\"Sorry, there are no results\");\n\n /* Reset markers and clear existing results */\n removeMarkers(allPlacesMarkers);\n removeRestaurants(allRestaurants);\n }\n }\n );\n }\n}", "function gotSearch(data) {\n\n //Random title from search results\n let len = data[1].length;\n let index = floor(random(len));\n let title = data[1][index];\n\n //If no results found, start from beginning (still random)\n if (title === undefined) {\n restart();\n } else {\n //Print title and access content API\n //createDiv(title);\n titles.unshift(title);\n\n //console.log(titles[1]);\n drawTitle(titles[0]);\n\n title = title.replace(/\\s+/g, '_');\n let url = contentUrl + title;\n loadJSON(url, gotContent, 'jsonp');\n\n }\n}", "function foodTypeHandler(e) {\n\tsearchInput = e.target.value\n\tconst foodType = restaurants.filter((r) => {\n\t\treturn r.Tags.join('|')\n\t\t\t.toLowerCase()\n\t\t\t.split('|')\n\t\t\t.includes(searchInput.toLowerCase())\n\t})\n\tconsole.log(foodType)\n\tfilteredRestaurants(foodType)\n}", "function search(text) {\n text = text.toLowerCase();\n var container = $(\"#catalog\");\n // clear everything\n $(container).html('');\n\n // paint only items that fullfil the filter\n for (var i = 0; i < DB.length; i++) {\n var item = DB[i];\n\n // decide if the items fullfils the filter\n // if so, display it\n if (\n item.title.toLowerCase().indexOf(text) >= 0 // if title contains the text\n || // or\n item.code.toLowerCase().indexOf(text) >= 0 // if the code contains the text\n ) {\n displayItem(item);\n }\n\n }\n}", "function search (keyword) {\n searchArray = [];\n for (i=0;i<foodArray.length;i++) {\n if (foodArray[i].name.match(keyword)) {\n searchArray.push(foodArray[i]);\n }\n }\n}", "function searchFilm() {\n if (searchQuery.length === 0) {\n searchQuery = \"Mr. Nobody\"\n }\n request(`http://www.omdbapi.com/?t=${searchQuery}&plot=short&apikey=5d94fa00`, function (error, response, body) {\n if (!error && response.statusCode === 200) {\n console.log(`Movie: ${JSON.parse(body).Title}`);\n console.log(`Starring: ${JSON.parse(body).Actors}`);\n console.log(`Year: ${JSON.parse(body).Year}`);\n console.log(`Origin: ${JSON.parse(body).Country}`);\n console.log(`Language: ${JSON.parse(body).Language}`);\n console.log(`IMDB Rating: ${JSON.parse(body).imdbRating}`);\n console.log(`Tomato-meter: ${JSON.parse(body).Ratings[1].Value}`);\n console.log(`Synopsis: ${JSON.parse(body).Plot}`); \n }\n });\n}", "function search(){\n let query;\n if(searchLocation===\"location\"){\n searchLocation(\"\")\n }\n query=`https://ontrack-team3.herokuapp.com/students/search?location=${searchLocation}&className=${searchClass}&term=${searchName}` \n prop.urlFunc(query);\n }", "function searchBooksByTitle(title, inputList = fakeBooks){\n\treturn inputList.filter((fBook) => fBook.bookTitle == title)\n}", "function search(){\n //\tinput = document.getElementById(\"myInput\");\n var names = [];\n var x = 0;\n _.each(_DATA, function(i) {\n names[x] = i.title;\n x++;\n })\n return names\n }", "function search_actor(search){\n\tvar sResult = [];\n\tfor(let films in search_results){\n\t\tvar film = search_results[films];\n\t\tif(film.folk){\n\t\tif(film.folk.toLowerCase().includes(search.toLowerCase())){\n\t\t\tactor.innerHTML+= \"<li><a href= \\\"show_movie.html?id=\" + films + \"\\\">\" + film.otitle + \"</a> </li> <br>\";\n\t\t}\n\t\t\t\n\t\t}\n\t}\n\tconsole.log(sResult);\n\t\n}", "function searchRecommendations(searchVal) {\n if (searchVal !== \"\") {\n let resultArray = [];\n if (props.title === \"Song\")\n {\n const testParams = {\n limit: 5\n }\n props.spotify.search(searchVal, [\"track\"], testParams)\n .then((response) => {\n console.log(response)\n response.tracks.items.map((item, index) => {\n resultArray.push(item.name + \" By: \" + item.artists[0].name + \";\" + item.id + \";\" + (item.album.images.length > 0 ? item.album.images[0].url : \"\"))\n })\n props.setRecs(resultArray)\n })\n }\n else if (props.title === \"Artist\")\n {\n const testParams = {\n limit: 5\n }\n props.spotify.search(searchVal, [\"artist\"], testParams)\n .then((response) => {\n console.log(response)\n response.artists.items.map((item, index) => {\n resultArray.push(item.name + ';' + item.id + ';' + (item.images.length > 0 ? item.images[0].url : \"\"))\n })\n props.setRecs(resultArray)\n })\n }\n else if (props.title === \"Genre\")\n {\n props.spotify.getAvailableGenreSeeds()\n .then((response) => {\n let genres = response.genres.filter((genre) => genre.includes(searchVal))\n if (genres.length > 5) {\n props.setRecs(genres.slice(0, 5))\n }\n else props.setRecs(genres)\n })\n }\n }\n }", "function isSearched(searchTerm){\n return function(item){\n return !searchTerm || item.title.toLowerCase().includes(searchTerm.toLowerCase());\n }\n}", "function isSearched(searchTerm){\n return function(item){\n return !searchTerm || item.title.toLowerCase().includes(searchTerm.toLowerCase());\n }\n}", "function runSearch(search, term) {\n // By default, if no search type is provided, search for a movie\n if (!search) {\n search = \"movie-this\";\n }\n\n // this runs the omdb.js if user selects \"movie-this\"\n if (search === \"movie-this\") {\n // By default, if no search term is provided, search for \"Mr. Nobody\"\n if (!term) {\n term = \"Mr. Nobody\";\n };\n //uses constructor from omdb.js to call the findMovie function and pass through the user's term\n movie.findMovie(term);\n // this runs the bands.js if user selects \"concert-this\"\n } else if (search === \"concert-this\") {\n //uses constructor from bands.js to call the findShow function and pass through the user's term\n band.findShow(term);\n // this runs the spotify.js if user selects \"spotify-this-song\"\n } else if (search === \"spotify-this-song\") {\n //By default, if no search term is provided, search for \"The Sign\"\n if (!term) {\n term = \"The Sign\";\n };\n //uses constructor from spotify.js to call the findSong function and pass through the user's term\n spotify.findSong(term);\n // if user types in an unknown search command\n } else {\n console.log(\"I don't know that.\")\n }\n}", "function searchfilm(films){\n items.innerHTML = \"\";\n var d = false;\n var searchval;\n var searchedFilms = [];\n \n for (var i=0;i<films.length;i++){ // variable is used to stop repeating code\n\tvar content = defLa[0] + i + defLa[1] + i + defLa[2] + films[i].image + defLa[3] + \" Title: \" +films[i].title + \" <br>Genre: \" + films[i].genre + defLa[4] + films[i].rating + defLa[5];\n//These If statements are used to see which search is being used either title search, genre search or ratings search\nif (firstSearch === document.activeElement){\n\t\tsearchval = firstSearch.value;\n\t\n\n\t\tif(films[i].title.toLowerCase().match(searchval.toLowerCase())){//.match() fuction is used with the .search() function because .search() only shows the results with the searched letters at the start\n\t\t\titems.innerHTML += content;\n\t\t\n\t\t\td = true; //If d is true, thish means that there is some content to show\n\t\t}\n\t}else if (SecondSearch === document.activeElement){\n\t\tsearchval = SecondSearch.value;\n\t\tif(films[i].genre.toLowerCase().match(searchval.toLowerCase())){\n\t\t\titems.innerHTML += content;\n\t\t\td = true;\n\t\t\tsearchedFilms[i]=\"film\"+i;\n\t\t}\n\t\tif (slider.noUiSlider.get()[0]==10&&slider.noUiSlider.get()[1]==100) {}else{\n\t\t\tfilterAndSearch(films, searchedFilms, slider, 1, content);\n\t\t} // a jquery slider library called nouislider is used to filter out the films ratings\n\t}\n }\n \n if(d==false){\n items.innerHTML = \"No Results Found\"; // if d is false then this error message will be shown as there is no content matching the search inputted\n }\n}", "function searchQuery(search)\n{\n matching = '';\n if(search)\n {\n matching += \"WHERE (title LIKE '%\" + search + \"%')\" + \n \"OR (description LIKE '%\" + search + \"%')\";\n }\n return matching;\n}", "function get_search(search_text) {\n\n search_text = search_text.toUpperCase();\n \n var getSearch = $.ajax({\n url: \"https://ontariotechu.ca/programs/index.json\",\n type: \"GET\",\n dataType: \"json\"\n });\n\n getSearch.done(function (data) {\n var content = \"\";\n var program_list = data.programs.program;\n var result = program_list.filter(program => program.title.toUpperCase().includes(search_text));\n $.each(result, function (i, item) {\n content += `<li class=\"program-title\">${item.title}</li>`;\n });\n $(\".found>td>ul\").html(content);\n });\n\n getSearch.fail(function (jqXHR, textStatus) {\n alert(\"Something went Wrong! (getSearch)\" +\n textStatus);\n });\n}", "static findByName(id, title, cb) {\n getProductsFromFile((products) => {\n console.log('Get Product by name', title, \"--\", id);\n // Sequencial Search\n // const product = products.find(p => p.title === title);\n\n // Implement Binary Search\n const product = binarySearch(products, title);\n\n cb(product);\n });\n }", "getAllMovies(){\n return this.state.movies.filter(\n el=>el.rate>=this.state.value&&\n el.title.toLowerCase().includes(this.state.titlefilter.toLowerCase())\n )\n }", "function isSearched(s) {\n return function(item) {\n const searchTerm = s;\n let wasFound = true;\n\n s.split(\" \").forEach(searchTerm => {\n let termFound = false;\n if (item.info.location.toLowerCase().includes(searchTerm.toLowerCase()) || item.info.title.toLowerCase().includes(searchTerm.toLowerCase()) || item.info.description.toLowerCase().includes(searchTerm.toLowerCase()) || item.info.skill_summary.toLowerCase().includes(searchTerm.toLowerCase()) || item.info.level.toLowerCase().includes(searchTerm.toLowerCase())) {\n termFound = true;\n }\n wasFound = wasFound && termFound;\n });\n\n return !searchTerm || wasFound;\n };\n}", "function search(searchTerm) {\n var search = new RegExp(searchTerm, 'i');\n \n return TITLES.filter(function(title) {\n return search.test(title);\n });\n}", "function search_method(){\n var name = \"Jose Carlos Cruz Santiago\";\n var search = name.search(\"Cruz\");\n document.getElementById(\"search_method\").innerHTML=search;\n}", "function searchFood(ll){\n // foursquare.clientId & foursquare.clientSecret live in keys.js which is listed about this file so you are able to access the objects\n var queryURL = \"https://api.foursquare.com/v2/venues/search?client_id=\"+foursquare.clientId+\"&client_secret=\"+foursquare.clientSecret +\"&ll=\"+ ll + \"&query=restuarant&limit=5&v=20180206\"\n \n //.get is short hand for .ajax see links below\n //https://stackoverflow.com/questions/3870086/difference-between-ajax-and-get-and-load\n //http://api.jquery.com/jquery.ajax/\n $.get(queryURL, function(results){\n var data = results.response.venues;\n for(var i = 0; i < data.length;i++){\n // console.log(\"food\", data[i])\n var wrap = $('<div>').addClass('food-card');\n\n var addr = data[i].location.formattedAddress.join(\",\")\n var map = \"<iframe width='300' height='300' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='https://maps.google.com/maps?&amp;q=\"+encodeURIComponent( addr ) + \n \"&amp;output=embed'></iframe>\"; \n $(wrap).html(map);\n\n var latlong = data[i].lat + \",\" + data[i].lng\n wrap.data('fsqFid', data[i].id).data('fsqFlatlng', latlong)\n var name = $('<h5>').text(data[i].name);\n var cat = $('<p>').text(data[i].categories[0].name);\n var address = $('<p>').text(data[i].location.formattedAddress.join(\",\"));\n $(wrap).append(name, cat, address);\n $('#restaurant-display').append(wrap)\n }\n })\n }", "function searchEngine(e){\n\n let input = document.getElementById('search-input');\n let html = '';\n let matchingResults = [];\n let heading = document.querySelector('.search-heading');\n\n// Find Matching Results\n if(input.value === ''){\n\n searchResults.forEach(function(obj){\n heading.textContent = 'Most Visited';\n\n if(obj.frequent === true){\n matchingResults.push(obj);\n }\n })\n } else {\n\n heading.textContent = 'Search Results';\n searchResults.forEach(function(obj){\n if(obj.title.toUpperCase().includes(input.value.toUpperCase())){\n matchingResults.push(obj);\n }\n })\n }\n\n\n\n if(matchingResults.length > 0){\n\n matchingResults.forEach(function(el){\n html += `<li><a class=\"grey-text\" href=\"${el.link}\">${boldString(el.title, input.value)}</a></li>`\n })\n document.querySelector('.popup-list').innerHTML = html;\n } else{\n html = `<li>There are no suggestions for your query.</li>`\n document.querySelector('.popup-list').innerHTML = html;\n }\n\n}", "function search_movies() {\n\tlet input = document.getElementById('searchbar').value\n\tinput=input.toLowerCase();\n\tlet x = document.getElementsByClassName('movies');\n\t\n\tfor (i = 0; i < x.length; i++) {\n\t\tif (!x[i].innerHTML.toLowerCase().includes(input)) {\n\t\t\tx[i].style.display=\"none\";\n\t\t}\n\t\telse {\n\t\t\tx[i].style.display=\"list-item\";\t\t\t\t\n\t\t}\n\t}\n}", "async function search(title) {\n let jobs = await JoblyApi.getJobs(title);\n setJobs(jobs);\n }", "async findByName(body)\n {\n // return all the restaurants that match a name\n return await models.ea_restaurants.findAll({where: {name: body.name}})\n }", "function findSearch(searchTerm) {\r\n\r\nfor (var i = 0; i < jobList.length; i++) {\r\n if (jobList[i].JobTitle.toLowerCase().includes(searchTerm.toLowerCase()) || jobList[i].Category.toLowerCase().includes(searchTerm.toLowerCase() ) || jobList[i].Location.toLowerCase().includes(searchTerm.toLowerCase() ) ) {\r\n document.getElementById(i).style.display = \"block\"\r\n }\r\n else{\r\n document.getElementById(i).style.display = \"none\"\r\n }\r\n } \r\n}", "function search(){\n\n\n // remove all markers from the map. Useful when a new search is made \n\n for(i=0;i<all_markers.length;i++){\n\n all_markers[i].marker_obj.setMap(null);\n\n }\n\n // hide the placeholder text and remove previous results from the list\n var placetext = document.getElementById(\"placeholder-text\");\n if(placetext) placetext.innerHTML = \"\";\n \n placesList = document.getElementById('places');\n placesList.innerHTML = \"\";\n\n // prepare request object for place api search\n\n var request = {\n location: pyrmont,\n radius: 5000,\n types: [\"restaurant\"]\n };\n\n var keyword = document.getElementById(\"keyword\").value;\n var minprice = document.getElementById(\"minprice\").value;\n var maxprice = document.getElementById(\"maxprice\").value;\n var opennow = document.getElementById(\"opennow\").checked;\n\n if(keyword != \"\") \n request.name = keyword;\n \n request.minprice = minprice;\n request.maxprice = maxprice;\n\n if(opennow) request.opennow = true;\n\n console.log(request);\n\n \n // initialize the service \n var service = new google.maps.places.PlacesService(map);\n service.nearbySearch(request, callback);\n}", "function googlePlacesSearch(foods){\n console.log('gps what food? ', foods);\n\n //request variable used to run the Google Places Search\n var request = {\n location: center,\n radius: '5000',\n keyword: foods\n };\n\n console.log(\"**********LOOOKKKKK \" + foods)\n\n // running the Google Places API Search \n service = new google.maps.places.PlacesService(map);\n service.nearbySearch(request, function(resp) {\n\n console.log(resp);\n \n //console log response\n console.log(\"this is a test print\" + foods)\n console.log(\"Restaurant Name:\" + \" \" + resp[2].name);\n console.log(\"Address:\" + \" \" + resp[2].vicinity);\n console.log(\"Rating:\" + \" \" + resp[2].rating);\n console.log(\"Restaurant Photo URL:\" + \" \" + resp[0].photos[0].getUrl({ maxWidth: 100 }));\n\n //[\"0\"].photos[\"0\"].getUrl\n \n\n \t// Push to HTML\n\t\t$(\"#restaurant-1\").html(resp[0].name);\n\t\t$(\"#restaurantAddress-1\").html(\"Address: \" + resp[0].vicinity);\n $(\"#restaurantRating-1\").html(\"Rating: \" + resp[0].rating);\n \n\t\t// generate image\n\t\tvar photoUrl = resp[0].photos[0].getUrl({ maxWidth: 280 });\n\t\tvar restaurantPhoto = $(\"<img>\");\n\t\trestaurantPhoto.attr(\"src\", photoUrl);\n\t\trestaurantPhoto.attr(\"alt\", resp[0].name);\n $(\"#restaurantPhoto-1\").html(restaurantPhoto);\n\n \n \t// Second Results Push to Second Container\n\t\t$(\"#restaurant-2\").html(resp[1].name);\n\t\t$(\"#restaurantAddress-2\").html(\"Address: \" + resp[1].vicinity);\n\t\t$(\"#restaurantRating-2\").html(\"Rating: \" + resp[1].rating);\n\t\t// generate image\n\t\tvar photoUrl = resp[1].photos[0].getUrl({ maxWidth: 280 });\n\t\tvar restaurantPhoto = $(\"<img>\");\n\t\trestaurantPhoto.attr(\"src\", photoUrl);\n\t\trestaurantPhoto.attr(\"alt\", resp[1].name);\n $(\"#restaurantPhoto-2\").html(restaurantPhoto);\n \n \t// Print the third results to the third results container\n\t\t$(\"#restaurant-3\").html(resp[2].name);\n\t\t$(\"#restaurantAddress-3\").html(\"Address: \" + resp[2].vicinity);\n\t\t$(\"#restaurantRating-3\").html(\"Rating: \" + resp[2].rating);\n\t\t// generate image\n\t\tvar photoUrl = resp[2].photos[0].getUrl({ maxWidth: 280 });\n\t\tvar restaurantPhoto = $(\"<img>\");\n\t\trestaurantPhoto.attr(\"src\", photoUrl);\n\t\trestaurantPhoto.attr(\"alt\", resp[2].name);\n $(\"#restaurantPhoto-3\").html(restaurantPhoto);\n \n \t// Print the 4th results to the third results container\n\t\t$(\"#restaurant-4\").html(resp[3].name);\n\t\t$(\"#restaurantAddress-4\").html(\"Address: \" + resp[3].vicinity);\n\t\t$(\"#restaurantRating-4\").html(\"Rating: \" + resp[3].rating);\n\t\t// generate image\n\t\tvar photoUrl = resp[3].photos[0].getUrl({ maxWidth: 280 });\n\t\tvar restaurantPhoto = $(\"<img>\");\n\t\trestaurantPhoto.attr(\"src\", photoUrl);\n\t\trestaurantPhoto.attr(\"alt\", resp[3].name);\n $(\"#restaurantPhoto-4\").html(restaurantPhoto);\n \n \t// Print the 5th results to the third results container\n\t\t$(\"#restaurant-5\").html(resp[4].name);\n\t\t$(\"#restaurantAddress-5\").html(\"Address: \" + resp[4].vicinity);\n\t\t$(\"#restaurantRating-5\").html(\"Rating: \" + resp[4].rating);\n\t\t// generate image\n\t\tvar photoUrl = resp[4].photos[0].getUrl({ maxWidth: 280 });\n\t\tvar restaurantPhoto = $(\"<img>\");\n\t\trestaurantPhoto.attr(\"src\", photoUrl);\n\t\trestaurantPhoto.attr(\"alt\", resp[4].name);\n $(\"#restaurantPhoto-5\").html(restaurantPhoto);\n \n // Print the 6th results to the third results container\n\t\t$(\"#restaurant-6\").html(resp[5].name);\n\t\t$(\"#restaurantAddress-6\").html(\"Address: \" + resp[5].vicinity);\n\t\t$(\"#restaurantRating-6\").html(\"Rating: \" + resp[5].rating);\n\t\t// generate image\n\t\tvar photoUrl = resp[5].photos[0].getUrl({ maxWidth: 280 });\n\t\tvar restaurantPhoto = $(\"<img>\");\n\t\trestaurantPhoto.attr(\"src\", photoUrl);\n\t\trestaurantPhoto.attr(\"alt\", resp[5].name);\n\t\t$(\"#restaurantPhoto-6\").html(restaurantPhoto);\n\n });\n\n }", "function search() {\n var search = {\n bounds: map.getBounds(),\n types: ['lodging']\n };\n\n places.nearbySearch(search, function(results, status) {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n clearMarkers();\n // Create a marker for each hotel found, and\n // assign a letter of the alphabetic to each marker icon.\n for (var i = 0; i < results.length; i++) {\n var markerLetter = String.fromCharCode('A'.charCodeAt(0) + i);\n var markerIcon = MARKER_PATH + markerLetter + '.png';\n // Use marker animation to drop the icons incrementally on the map.\n markers[i] = new google.maps.Marker({\n position: results[i].geometry.location,\n animation: google.maps.Animation.DROP,\n icon: markerIcon\n });\n // If the user clicks a hotel marker, show the details of that hotel\n // in an info window.\n markers[i].placeResult = results[i];\n google.maps.event.addListener(markers[i], 'click', showInfoWindow);\n setTimeout(dropMarker(i), i * 100);\n //addResult(results[i], i);\n }\n }\n });\n}", "function search(trm) {\n\n \tterm = trm;\n //re-extend the search results holder, to show the results to the user\n $('#search_results_holder').height(300);\n //use the httpget function to grab the custom google search\n //JSON DATA\n //var json_dta = httpGet('https://www.googleapis.com/customsearch/v1?key=AIzaSyDM8_gZ-5DQVcBUt1y7qq_wAjUDbr4YSTA&cx=009521426283403904660:drg6vvs6o2a&q=' + trm);\n add_results('https://www.googleapis.com/customsearch/v1?key=AIzaSyDM8_gZ-5DQVcBUt1y7qq_wAjUDbr4YSTA&cx=009521426283403904660:drg6vvs6o2a&q=' + trm);\n }", "function search(keyword) {\n var color;\n var search = {\n bounds: map.getBounds(),\n keyword: keyword,\n };\n\n places.nearbySearch(search, function(results, status) {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n console.log(results);\n // clearResults();\n // clearMarkers();\n // Create a marker for each hotel found, and\n // assign a letter of the alphabetic to each marker icon.\n if (keyword == \"food\") {\n color = \"/ff0000/\";\n } else if (keyword == \"bike share\") {\n color = \"/0099FF/\";\n } else if (keyword == \"coworking space\") {\n color = \"/99ff33/\";\n }\n\n for (var i = 0; i < results.length; i++) {\n var markerLetter = String.fromCharCode(\"A\".charCodeAt(0) + i % 26);\n var markerIcon = MARKER_PATH + markerLetter + color;\n // Use marker animation to drop the icons incrementally on the map.\n markers[i] = new google.maps.Marker({\n position: results[i].geometry.location,\n animation: google.maps.Animation.DROP,\n icon: markerIcon,\n });\n // If the user clicks a hotel marker, show the details of that hotel\n // in an info window.\n markers[i].placeResult = results[i];\n google.maps.event.addListener(markers[i], \"click\", showInfoWindow);\n setTimeout(dropMarker(i), i * 100);\n // addResult(results[i], i);\n }\n }\n });\n}", "function _search()\n {\n var allCategoryNames = [];\n // Incorporate all terms into\n var oepterms = $scope.selectedOepTerms ? $scope.selectedOepTerms : [];\n var situations = $scope.selectedSituations ? $scope.selectedSituations : [];\n var allCategories = oepterms.concat(situations);\n allCategories.forEach(function(categoryObj) {\n allCategoryNames.push(categoryObj.name);\n checkEmergencyTerms(categoryObj.name);\n });\n search.search({ category: allCategoryNames.join(',') });\n }", "function searchMovie(value) {\n\n const path = '/search/movie';\n\n const url = generateUrl(path) + '&query=' + value;\n\n const render = renderMovies.bind({title: 'Results'});\n\n sectionMovies(url, render, handleError);\n\n}", "function search() {\r\n\t\tlet food = document.getElementById(\"searchFood\").value;\r\n\t\tlet foodName = \"\";\r\n\t\tlet foodSplit = food.split(/[ \\t\\n]+/);\r\n\r\n\t\tfor(let i = 0; i < foodSplit.length; i++) {\r\n\t\t\tfoodName += foodSplit[i];\r\n\t\t\tif(i + 1 < foodSplit.length) {\r\n\t\t\t\tfoodName += \"+\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet url = \"https://www.themealdb.com/api/json/v1/1/search.php?s=\"+foodName;\r\n\t\tfetch(url)\r\n\t\t\t.then(checkStatus)\r\n\t\t\t.then(function(responseText) {\r\n\t\t\t\tlet json = JSON.parse(responseText);\r\n\r\n\t\t\t\tif(json.meals == null) {\r\n\t\t\t\t\terrorName = document.getElementById(\"searchFood\").value;\r\n\t\t\t\t\tclear();\r\n\t\t\t\t\terror();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tshowResult(json);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.catch(function(error) {\r\n\t\t\t\tconsole.log(error);\r\n\t\t\t});\r\n\t}", "function searchData() {\r\n var searchKeyword = document.getElementById(\"navSearch\").value.toUpperCase();\r\n console.log(searchKeyword);\r\n var searchResult = productData.filter((searchItem) => searchItem.product.toUpperCase().includes(searchKeyword));\r\n console.log(searchResult);\r\n cards(searchResult);\r\n}", "function search(text) {\n console.log('search: ' + text);\n return WebsitesIndex\n .search(text, { limit: 0 })\n .fetch()\n .sort(function (a, b) {\n return a.title.localeCompare(b.title);\n });\n}", "function search() {\n // get the value of the search input field\n var searchString = $('#search').val().toLowerCase();\n\n markerLayer1.setFilter(showType);\n\n // here we're simply comparing the 'name' property of each marker\n // to the search string, seeing whether the former contains the latter.\n function showType(feature) {\n return feature.properties.name\n .toLowerCase()\n .indexOf(searchString) !== -1;\n }\n}", "function doSearchByTerm(location) {\n app.showPreloader();\n\n ps.searchByTerm(searchTerm, searchByTermSuccess, searchByTermError);\n\n function searchByTermSuccess(data) {\n processResponse(data);\n }\n\n function searchByTermError(data) {\n showErrorState({message: 'Other error'});\n }\n }", "function wildlifeCentres() {\n\n //check whether the value field is not empty\n // if it is not, proceed with the search\n if(document.getElementById(\"userQuery\").value != \"\") {\n\n // delete any existing markers\n deleteMarkers();\n query = 'Wildlife centres';\n userQuery = document.getElementById(\"userQuery\").value;\n\n //depending on what the user has typed, the title on the page will be changed\n document.querySelector(\".new-heading\").textContent = userQuery;\n\n // create a request object\n let request = {\n placeId: place.place_id,\n // location: globalPos,\n // radius: '100000',\n //again, it doesn't matter where you are, just search for the wildlife centres(query)\n // in the region user has chosen (userQuery)\n query: [ query + ' ' + userQuery ]\n };\n\n // create the service object\n const service = new google.maps.places.PlacesService(map);\n\n // perform a search based on the request object and callback\n service.textSearch(request, callback);\n\n // this is an inner callback function as referenced immediately above\n function callback(results, status) {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n for (let i = 0; i < results.length; i++){\n addMarker(results[i]);\n }\n }\n }\n\n // display all the pins on the map\n displayAllMarkers(map);\n\n //if the user puts an empty value\n } else {alert (\"Search field is empty! Put some value there.\")}\n }", "static search(searchTerm){\n return new Promise(async (resolve, reject)=>{\n if(typeof(searchTerm) == \"string\"){\n let posts = await Post.reuseablePostQuery([\n {$match: {$text: {$search: searchTerm}}},\n {$sort: {score: {$meta: \"textScore\"}}}\n ]);\n resolve(posts);\n }else{\n reject();\n }\n })\n }", "function search_country(search){\n\tvar sResult = [];\n\tfor(let films in search_results){\n\t\tvar film = search_results[films];\n\t\tif(film.country){\n\t\tif(film.country.toLowerCase().includes(search.toLowerCase())){\n\t\t\tcountry.innerHTML+= \"<li><a href= \\\"show_movie.html?id=\" + films + \"\\\">\" + film.otitle + \"</a> </li> <br>\";\n\t\t}\n\t\t\t\n\t\t}\n\t}\n\tconsole.log(sResult);\n\t\n}", "function searchClick() {\n console.log(\"sono qui\");\n var query = $('#titolo_digit').val();\n console.log(query);\n movieResult(query);\n tvResult(query);\n\n}", "function search(searchContent) {\r\n smoothTopScroll();\r\n if (searchContent.length==0) {\r\n callCategories();\r\n return;\r\n }\r\n document.getElementById(\"pagetitle\").innerHTML = \"Search\";\r\n var results = {};\r\n Object.keys(itemvarsetidenum).forEach(function(num) {\r\n Object.keys(itemvarsetidenum[num]).forEach(function(key) {\r\n if (key.toLowerCase().includes(searchContent.toLowerCase())) {\r\n results[key]=itemvarsetidenum[num][key];\r\n }\r\n });\r\n });\r\n\r\n hideAllBoxes();\r\n activeSet = 1;\r\n generateBox(\"Back\", null, 0, 1, \"<div class='subtext'>Click to return to categories</div>\");\r\n Object.keys(results).forEach(function(key) {\r\n if (Object.keys(results).indexOf(key) + 2 > 20) {return};\r\n generateBox(key, results, 0, Object.keys(results).indexOf(key) + 2,\r\n \"<div class='subtext shortcut'>\" + results[key] + \"</div>\")\r\n });\r\n}", "function search(location) {\r\n switch (carType) {\r\n case \"gus\":\r\n searchGus(location);\r\n break;\r\n case \"eletric\":\r\n searchEletric(location);\r\n }\r\n}", "static search(query, callback) {\n const path = `/?type=movie&s=${query}`;\n\n return makeOmdbRequest(path, (err, response) => {\n if(response) {\n // If there was no error, only return the movies array\n response = response.Search;\n }\n\n callback(err, response);\n });\n }", "function ingredientSearch (food) {\n\n\t\t// J\n\t\t// Q\n\t\t// U\n\t\t// E\n\t\t// R\n\t\t// Y\n\t\t$.ajax ({\n\t\t\tmethod: \"GET\",\n\t\t\turl: ingredientSearchURL+\"?metaInformation=false&number=10&query=\"+food,\n\t\t headers: {\n\t\t 'X-Mashape-Key': XMashapeKey,\n\t\t 'Content-Type': \"application/x-www-form-urlencoded\",\n\t\t \"Accept\": \"application/json\"\n\t\t }\n\t\t}).done(function (data) {\n\t\t\t// check each returned ingredient for complete instance of passed in food\n\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\tvar word_list = getWords(data[i].name);\n\t\t\t\t// ensures food is an ingredient and not already in the food list\n\t\t\t\tif (word_list.indexOf(food) !== -1 && food_list.indexOf(food) === -1) {\n\t\t\t\t\tfood_list.push(food);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "function filteredShoes() {\n let searchTerm = \"shoe\";\n console.log(searchTerm);\n console.log(products);\n let searchedProducts = products.filter((product) => \n product.product_type.toLowerCase().includes(searchTerm.toLowerCase())\n \n );\n console.log(searchedProducts);\n make_products(searchedProducts);\n\n}", "function search(){\n var searchInputValue = searchInput.value;\n var uppercaseValue = searchInputValue.toUpperCase();\n if (uppercaseValue == 'QUEENSTOWN' ||\n uppercaseValue == 'WANAKA' ||\n uppercaseValue == 'CADRONA' ||\n uppercaseValue == 'REMARKABLES' ||\n uppercaseValue == 'THE REMARKABLES' ||\n uppercaseValue == 'THE REMARKS' ||\n uppercaseValue == 'CORONET PEAK' ){\n loadThumbnails(locations.queenstown);\n initMap(168.697751, 45.026377);\n } else if (uppercaseValue == 'CHRISTCHURCH'||\n uppercaseValue == 'CANTERBURY'||\n uppercaseValue == 'MT HUTT' ||\n uppercaseValue == 'MOUNT HUTT' ||\n uppercaseValue == 'TEMPLE BASIN' ||\n uppercaseValue == 'ARTHUR\\'S PASS' ||\n uppercaseValue == 'CHEESEMAN' ||\n uppercaseValue == 'PORTERS' ||\n uppercaseValue == 'MT OLYMPUS' ||\n uppercaseValue == 'MOUNT OLYMPUS' ||\n uppercaseValue == 'BROKEN RIVER'){\n loadThumbnails(locations.christchurch);\n initMap(172.493273, 43.538478);\n } else if (uppercaseValue == 'WHAKAPAPA' ||\n uppercaseValue == 'RUAPEHU' ||\n uppercaseValue == 'MOUNT RUAPEHU' ||\n uppercaseValue == 'MT RUAPEHU' ||\n uppercaseValue == 'TONGARIRO' ||\n uppercaseValue == 'OHAKUNE' ||\n uppercaseValue == 'NATIONAL PARK' ||\n uppercaseValue == 'TUROA'){\n loadThumbnails(locations.whakapapa);\n initMap(175.549994, 39.231289);\n } else {\n thumbnailsBox.innerHTML = '<span class=\"no-results\">No location matched your search, please check your spelling and try again. Hint: Try searching by field name or nearest town, Eg. Queenstown.</span>';\n }\n }", "function searchMovies(query, language, genre) {\n\t// ajax calling themoviedb.org api for searching movies (max 20 displayed)\n\t$.ajax({\n\t\turl: \"https://api.themoviedb.org/3/search/movie\",\n\t\tmethod: \"GET\",\n\t\tdata: {\n\t\t\tapi_key: '6258744f8a6314eddb8961371f91076e',\n\t\t\tlanguage: language,\n\t\t\tquery: query\n\t\t},\n\t\tsuccess: function (data, state) {\n\t\t\tvar movies = data.results;\n\t\t\tconsole.log(movies);\n\t\t\tprintMovies(movies, genre);\n\t\t},\n\t\terror: function (request, state, error) {\n\t\t\tconsole.log(error);\n\t\t}\n\t});\n}", "function searchAndDivide(str){\r\n result = {\r\n match: [],\r\n unmatch: []\r\n }\r\n for(let i = 0; i < movies.length; i++){\r\n if (movies[i].Title.includes(str))\r\n result.match.push(movies[i])\r\n else\r\n result.unmatch.push(movies[i])\r\n }\r\n return result\r\n}", "function search(){\n // creating a dropdown list for Episodes\n let option = document.createElement(\"option\");\n option.value = 0;\n option.text = \"Episodes\";\n episodesSelect.appendChild(option); \n allEpisodes.map((episodes) => {\n let option = document.createElement(\"option\");\n option.value = episodes.name;\n option.text = episodes.name;\n episodesSelect.appendChild(option);\n });\n\n // Live Search\n searchBar.addEventListener(\"keyup\", function (el) {\n let searchTerm = el.target.value.toLowerCase();\n let filteredEpisodes = allEpisodes.filter((episode) => {\n return (\n episode.name.toLowerCase().includes(searchTerm) ||\n episode.summary.toLowerCase().includes(searchTerm)\n );\n });\n\n displayEpisodes(filteredEpisodes);\n });\n }", "function search() {\n var input, filter, searchItem = [];\n input = document.getElementById(\"search-item\");\n filter = input.value.toLowerCase();\n console.log(\"filter \" + filter);\n products.forEach((item, index) => {\n console.log(\"filter \" + filter + \"\" + item.name.indexOf(filter));\n if (item.name.indexOf(filter) != -1) {\n searchItem.push(item);\n const storeItem = document.getElementById(\"store-items\");\n storeItem.innerHTML = \"\"\n loadHtml(searchItem);\n }\n })\n}", "function searchFor(searchterm) {\n // Check if a space is found and if it is, replace it with a +\n console.log('Your search term is: ' + searchterm)\n let newSearchURL = baseURL + \"term=\" + searchterm.split(' ').join('+').toLowerCase()\n console.log('Your new search term is: ' + newSearchURL)\n // Query iTunes API and display results in React\n}", "function movieSearch(event) {\n var movieSearch = $(\"#movie-input\")\n .val()\n .trim();\n\n event.preventDefault();\n\n if (!movieSearch) return;\n var queryURL =\n \"https://utelly-tv-shows-and-movies-availability-v1.p.mashape.com/lookup?\";\n var queryString = queryURL + \"country=\" + \"us\" + \"&term=\" + movieSearch;\n getMovies(queryString);\n }", "executeSearch(term) {\n var results;\n try {\n results = this.search.fuse.search(term); // the actual query being run using fuse.js\n } catch (err) {\n if (err instanceof TypeError) {\n console.log(\"hugo-fuse-search: search failed because Fuse.js was not instantiated properly.\")\n } else {\n console.log(\"hugo-fuse-search: search failed: \" + err)\n }\n return;\n }\n let searchitems = '';\n\n if (results.length === 0) { // no results based on what was typed into the input box\n this.resultsAvailable = false;\n searchitems = '';\n } else { // we got results, show 5\n for (let item in results.slice(0,5)) {\n let result = results[item];\n if ('item' in result) {\n let item = result.item;\n searchitems += this.itemHtml(item);\n }\n }\n this.resultsAvailable = true;\n }\n\n this.element_results.innerHTML = searchitems;\n if (results.length > 0) {\n this.top_result = this.element_results.firstChild;\n this.bottom_result = this.element_results.lastChild;\n }\n }" ]
[ "0.7001196", "0.68762887", "0.67931485", "0.66652256", "0.6527432", "0.65255845", "0.6509465", "0.64972496", "0.6487822", "0.64734995", "0.6472562", "0.6467518", "0.64127386", "0.6406536", "0.6340363", "0.6300312", "0.6295129", "0.62785655", "0.62728345", "0.6264796", "0.6260108", "0.6259733", "0.6250365", "0.624085", "0.62271625", "0.6226753", "0.6221584", "0.6203014", "0.62026495", "0.6197263", "0.6186844", "0.61556935", "0.6145453", "0.61341846", "0.61087406", "0.6095099", "0.60826296", "0.6072459", "0.6070431", "0.60594803", "0.6059411", "0.6054563", "0.60464483", "0.60459435", "0.604213", "0.6038107", "0.60325575", "0.60226285", "0.6017349", "0.6014771", "0.60143805", "0.6003304", "0.59949154", "0.59870845", "0.597468", "0.597468", "0.59730977", "0.59671575", "0.5956428", "0.5954956", "0.5950629", "0.59500206", "0.5945154", "0.5945023", "0.5942338", "0.5939626", "0.59389913", "0.5938706", "0.59383595", "0.5929894", "0.59292245", "0.59265685", "0.59240425", "0.5919874", "0.5915652", "0.5903521", "0.58988035", "0.58949244", "0.5892726", "0.58913684", "0.58911043", "0.5875765", "0.58751583", "0.58727103", "0.58545387", "0.5836197", "0.58348686", "0.5833645", "0.58283126", "0.5828257", "0.5827534", "0.58275265", "0.5826078", "0.5824335", "0.5822054", "0.5821903", "0.58187413", "0.58023304", "0.58009064", "0.57993907" ]
0.694777
1
return true if new layout is different from current page layout
function layoutChanged(page) { if (!$layout.length) return false; if (!lastPage || lastPage.fixlayout || lang(lastPage) !== lang(page)) return true; var currentlayout = $layout.attr('data-render-layout') || 'main-layout'; var newlayout = generator.layoutTemplate(page); return (newlayout !== currentlayout); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleConfKeepLayout(){\n\ttoggleConfBool('layout', keepLayout);\n\tredirect(link[posActual]);\n}", "get layoutModified() {\n return this._layoutModified;\n }", "performLayoutUpdate () {\n this.component.layout ();\n this.stale = this.rows.length !== this.component.getRows ().length;\n\n if (this.stale) {\n next (this, 'performLayoutUpdate');\n }\n\n return this.stale;\n }", "function inHistory(file, layout, options) {\n return !options.disableHistory && file.layoutStack.indexOf(layout) !== -1;\n}", "function confKeepLayout(defval, defpag){\n\treturn confBool('layout', defval, defpag);\n}", "function compareView(a, b) {\n return a.layoutInfo.section - b.layoutInfo.section || a.layoutInfo.index - b.layoutInfo.index;\n}", "_getLayoutType() {\n const that = this,\n orientation = that.orientation,\n inverted = that.inverted;\n\n that._normalLayout = orientation === 'horizontal' && !inverted || orientation === 'vertical' && inverted;\n }", "layoutHorizontalAlign () {\n return false;\n //return this.content.layout &&\n // this.content.layout.alignment == createjs_ui.LayoutAlignment.HORIZONTAL_ALIGNMENT\n }", "function detectDisabledLayouts(){var isDisabled=!!document.querySelector('[md-layouts-disabled]');config.enabled=!isDisabled;}", "function sidebarEqual() {\n\t\tif ( body.hasClass('sidebar-equal') ) {\n\n\t\t\t// reset heights\n\t\t\tsidebar.css( 'min-height', '' );\n\t\t\tmainWrap.css( 'min-height', '' );\n\n\t\t\tvar sidebarHeight \t = sidebar.outerHeight(),\n\t\t\t\tmainWrapHeight \t = mainWrap.outerHeight(),\n\t\t\t\tCopyAndSocHeight = CopyAndSoc.outerHeight();\n\n\t\t\tif ( body.hasClass('copy-fixed') || CopyAndSoc.css('display') === 'none' ) {\n\t\t\t\tCopyAndSocHeight = 0;\n\t\t\t}\n\n\t\t\tif ( sidebarHeight > ( mainWrapHeight + CopyAndSocHeight ) ) {\n\t\t\t\tmainWrap.css( 'min-height', sidebarHeight - CopyAndSocHeight );\n\t\t\t} else {\n\t\t\t\tsidebar.css( 'min-height', mainWrapHeight + CopyAndSocHeight );\n\t\t\t}\n\n\t\t}\n\t}", "shouldUpdate() {\n //should update if not render before\n if (!this._lastRender) {\n return true;\n }\n // make sure this have no side effect to this component\n const html = this.getTemplate().call(this, (this.getData()));\n return (html != this._lastRender.html) || !this._isSameMountPoint(this.getMountPoint(), this._lastRender.mountPoint);\n }", "function detectDisabledLayouts() {\n var isDisabled = !!document.querySelector('[md-layouts-disabled]');\n config.enabled = !isDisabled;\n }", "function detectDisabledLayouts() {\n var isDisabled = !!document.querySelector('[md-layouts-disabled]');\n config.enabled = !isDisabled;\n }", "function generateLayoutype(layoutStatus){\nif(layoutStatus === 12){\n return true;\n}else{\n return false;\n}\n}", "_redrawLayoutSidenav() {\n const layoutSidenav = this.getLayoutSidenav()\n\n if (layoutSidenav && layoutSidenav.querySelector('.sidenav')) {\n const inner = layoutSidenav.querySelector('.sidenav-inner')\n const scrollTop = inner.scrollTop\n const pageScrollTop = document.documentElement.scrollTop\n\n layoutSidenav.style.display = 'none'\n layoutSidenav.offsetHeight\n layoutSidenav.style.display = ''\n inner.scrollTop = scrollTop\n document.documentElement.scrollTop = pageScrollTop\n\n return true\n }\n\n return false\n }", "saveLayout() {\n // If the application is in single document mode, use the cached layout if\n // available. Otherwise, default to querying the dock panel for layout.\n const layout = {\n mainArea: {\n currentWidget: this._tracker.currentWidget,\n dock: this.mode === 'single-document'\n ? this._cachedLayout || this._dockPanel.saveLayout()\n : this._dockPanel.saveLayout()\n },\n downArea: {\n currentWidget: this._downPanel.currentWidget,\n widgets: toArray(this._downPanel.stackedPanel.widgets),\n size: this._vsplitPanel.relativeSizes()[1]\n },\n leftArea: this._leftHandler.dehydrate(),\n rightArea: this._rightHandler.dehydrate(),\n relativeSizes: this._hsplitPanel.relativeSizes()\n };\n return layout;\n }", "function islayoutready() {\n\t\treturn window.innerWidth > 0;\n\t}", "function fnSaveLayoutState_DDK2() {\n\t\tbSaveLayoutState = true;\n\n\t\tvar iLayoutWidth = $('#layout_container').width();\n\n\t\t//modify use of state for nested layout\n\t\tvar outerCenter = PSC_Layout_Object.center.children.layout1;\n\t\tvar iLayoutWestSize, bLayoutWestIsClosed, iLayoutWestPercent;\n\t\tvar iLayoutEastSize, bLayoutEastIsClosed, iLayoutEastPercent;\n\t\tvar iLayoutSouthSize, bLayoutSouthIsClosed, iLayoutSouthPercent, iLayoutSouthMaxSize;\n\t\tvar iLayoutNorthSize, bLayoutNorthIsClosed, iLayoutNorthPercent;\n\n\t\tif (outerCenter.west !== false) {\n\t\t\tiLayoutWestSize = outerCenter.state.west.size;\n\t\t\tbLayoutWestIsClosed = outerCenter.state.west.isClosed;\n\t\t\tiLayoutWestPercent = (iLayoutWestSize * 100 / iLayoutWidth).toFixed();\n\t\t\tdaaURLUpdate('s_lpw', iLayoutWestSize + ',' + iLayoutWestPercent + ',' + bLayoutWestIsClosed);\n\t\t\tif (outerCenter.west.children.layout1.north !== false) {\n\t\t\t\tvar wTop = outerCenter.west.children.layout1.state.north;\n\t\t\t\tvar wTopPercent = (wTop.size * 100 / wTop.maxSize).toFixed();\n\t\t\t\tdaaURLUpdate('s_lpwt', wTop.size + ',' + wTopPercent + ',' + wTop.isClosed);\n\t\t\t}\n\t\t\tif (outerCenter.west.children.layout1.south !== false) {\n\t\t\t\tvar wBottom = outerCenter.west.children.layout1.state.south;\n\t\t\t\tvar wBottomPercent = (wBottom.size * 100 / wBottom.maxSize).toFixed();\n\t\t\t\tdaaURLUpdate('s_lpwb', wBottom.size + ',' + wBottomPercent + ',' + wBottom.isClosed);\n\t\t\t}\n\t\t}\n\n\t\tif (outerCenter.east !== false) {\n\t\t\tiLayoutEastSize = outerCenter.state.east.size;\n\t\t\tbLayoutEastIsClosed = outerCenter.state.east.isClosed;\n\t\t\tiLayoutEastPercent = (iLayoutEastSize * 100 / iLayoutWidth).toFixed();\n\t\t\tdaaURLUpdate('s_lpe', iLayoutEastSize + ',' + iLayoutEastPercent + ',' + bLayoutEastIsClosed);\n\t\t\tif (outerCenter.east.children.layout1.north !== false) {\n\t\t\t\tvar eTop = outerCenter.east.children.layout1.state.north;\n\t\t\t\tvar eTopPercent = (eTop.size * 100 / eTop.maxSize).toFixed();\n\t\t\t\tdaaURLUpdate('s_lpet', eTop.size + ',' + eTopPercent + ',' + eTop.isClosed);\n\t\t\t}\n\t\t\tif (outerCenter.east.children.layout1.south !== false) {\n\t\t\t\tvar eBottom = outerCenter.east.children.layout1.state.south;\n\t\t\t\tvar eBottomPercent = (eBottom.size * 100 / eBottom.maxSize).toFixed();\n\t\t\t\tdaaURLUpdate('s_lpeb', eBottom.size + ',' + eBottomPercent + ',' + eBottom.isClosed);\n\t\t\t}\n\t\t}\n\n\t\tif (outerCenter.south !== false) {\n\t\t\tiLayoutSouthSize = outerCenter.state.south.size;\n\t\t\tiLayoutSouthMaxSize = outerCenter.state.south.maxSize;\n\t\t\tbLayoutSouthIsClosed = outerCenter.state.south.isClosed;\n\t\t\tiLayoutSouthPercent = (iLayoutSouthSize * 100 / iLayoutSouthMaxSize).toFixed();\n\t\t\tdaaURLUpdate('s_lps', iLayoutSouthSize + ',' + iLayoutSouthPercent + ',' + bLayoutSouthIsClosed);\n\t\t\tif (outerCenter.east.children.layout1.north !== false) {\n\t\t\t\tvar sTop = outerCenter.east.children.layout1.state.north;\n\t\t\t\tvar sTopPercent = (sTop.size * 100 / sTop.maxSize).toFixed();\n\t\t\t\tdaaURLUpdate('s_lpst', sTop.size + ',' + sTopPercent + ',' + sTop.isClosed);\n\t\t\t}\n\t\t\tif (outerCenter.east.children.layout1.south !== false) {\n\t\t\t\tvar sBottom = outerCenter.east.children.layout1.state.south;\n\t\t\t\tvar sBottomPercent = (sBottom.size * 100 / sBottom.maxSize).toFixed();\n\t\t\t\tdaaURLUpdate('s_lpsb', sBottom.size + ',' + sBottomPercent + ',' + sBottom.isClosed);\n\t\t\t}\n\t\t}\n\n\t\tif (outerCenter.north !== false) {\n\t\t\tiLayoutNorthSize = outerCenter.state.north.size;\n\t\t\tbLayoutNorthIsClosed = outerCenter.state.north.isClosed;\n\t\t\t//iLayoutNorthPercent = (iLayoutNorthSize * 100 / iLayoutWidth).toFixed();\n\t\t\tdaaURLUpdate('s_lpn', iLayoutNorthSize + ',' + iLayoutNorthPercent + ',' + bLayoutNorthIsClosed);\n\t\t}\n\t}", "function setLayout(currentLocalStorageLayout) {\n var navLinkStyle = $('.nav-link-style'),\n currentLayout = getCurrentLayout(),\n mainMenu = $('.main-menu'),\n navbar = $('.header-navbar'),\n // Witch to local storage layout if we have else current layout\n switchToLayout = currentLocalStorageLayout ? currentLocalStorageLayout : currentLayout;\n $html.removeClass('semi-dark-layout dark-layout bordered-layout');\n\n if (switchToLayout === 'dark-layout') {\n $html.addClass('dark-layout');\n mainMenu.removeClass('menu-light').addClass('menu-dark');\n navbar.removeClass('navbar-light').addClass('navbar-dark');\n navLinkStyle.find('.ficon').replaceWith(feather.icons['sun'].toSvg({\n \"class\": 'ficon'\n }));\n } else if (switchToLayout === 'bordered-layout') {\n $html.addClass('bordered-layout');\n mainMenu.removeClass('menu-dark').addClass('menu-light');\n navbar.removeClass('navbar-dark').addClass('navbar-light');\n navLinkStyle.find('.ficon').replaceWith(feather.icons['moon'].toSvg({\n \"class\": 'ficon'\n }));\n } else if (switchToLayout === 'semi-dark-layout') {\n $html.addClass('semi-dark-layout');\n mainMenu.removeClass('menu-dark').addClass('menu-light');\n navbar.removeClass('navbar-dark').addClass('navbar-light');\n navLinkStyle.find('.ficon').replaceWith(feather.icons['moon'].toSvg({\n \"class\": 'ficon'\n }));\n } else {\n $html.addClass('light-layout');\n mainMenu.removeClass('menu-dark').addClass('menu-light');\n navbar.removeClass('navbar-dark').addClass('navbar-light');\n navLinkStyle.find('.ficon').replaceWith(feather.icons['moon'].toSvg({\n \"class\": 'ficon'\n }));\n } // Set radio in customizer if we have\n\n\n if ($('input:radio[data-layout=' + switchToLayout + ']').length > 0) {\n setTimeout(function () {\n $('input:radio[data-layout=' + switchToLayout + ']').prop('checked', true);\n });\n }\n }", "shouldComponentUpdate(nextProps, nextState){\n const props = this.props;\n const state = this.state;\n if ((props.document !== nextProps.document)\n || (props.segmentId !== nextProps.segmentId)\n || (props.layers !== nextProps.layers)\n || (state.mode !== nextState.mode)) {\n return true;\n }\n\n // Compare visible segments\n var currentVisible = this.computeVisibleSegments(props.segments, props.currentTime);\n var nextVisible = this.computeVisibleSegments(nextProps.segments, nextProps.currentTime);\n if (currentVisible.length !== nextVisible.length) return true;\n for(var i=0; i<currentVisible.length; i++){\n if (currentVisible[i] !== nextVisible[i]) return true;\n }\n return false;\n }", "function thenSwapStylePosition() {\n var windowsize = $(window).width();\n var testthen = $('#pagestyle').hasClass('test-then');\n var navstyle = $('.navbar').css('display');\n\n if (testthen == true && windowsize < 800) {\n $('.footer-now').css('display', 'none');\n $('.swap-click-800').css('display', 'block');\n }\n else {\n $('.footer-now').css('display', 'block');\n $('.swap-click-800').css('display', 'none');\n\n }\n }", "[OVERRIDE_PAGE_LAYOUT_CONFIG](state, payload) {\n state.commit(OVERRIDE_PAGE_LAYOUT_CONFIG, payload);\n }", "updateLayout (layout) {\n this.setState({ layout })\n localStorage.setItem(this._key(this.state.editMode), layout.stringify())\n }", "function getPageChanges() {\n if (getQueryStringValue(document.location.href, 'mode') == 'view') {\n return false;\n }\n\n if (typeof (HasChanges) != \"undefined\" && HasChanges || typeof (HasRCChanges) != \"undefined\" && HasRCChanges)\n return true;\n else if (typeof (vrGridIds) != \"undefined\") {\n for (var vrGridId in vrGridIds) {\n var _actgridid = vrGridIds[vrGridId].split(\";\")[1];\n\n if (checkGridHasChanges(_actgridid)) {\n return true;\n }\n }\n\n for (var vrGridId in vrGridIds) {\n var _actgridid = vrGridIds[vrGridId].split(\";\")[1];\n var _grid_obj = el(_actgridid);\n\n if (typeof (_grid_obj) != \"undefined\" && _grid_obj != null) {\n _grid_obj.Submit();\n }\n\n if (checkGridHasChanges(_actgridid)) {\n return true;\n }\n }\n\n }\n return false;\n}", "recordCoordinateChange(newLayout, allLayouts){\n if(allLayouts.lg !== undefined){\n if(allLayouts.lg.length > 0)\n this.setLayout(allLayouts.lg)\n }else if( allLayouts.md !== undefined){\n if(allLayouts.md > 0)\n this.setLayout(allLayouts.md)\n }else if(newLayout !== undefined){\n this.setLayout(newLayout)\n } \n }", "switchLayout () {\n let prevMode = this.state.editMode\n let nextMode = !this.state.editMode\n localStorage.setItem('SongCheat.App.Mode', nextMode ? 'edit' : 'view')\n\n // current layout (potentially modified) becomes our new reference for prevMode\n let layouts = { [prevMode]: this.state.layout, [nextMode]: this.state.layouts[nextMode] }\n this.setState({ editMode: nextMode, layouts: layouts, layout: layouts[nextMode] }, () => this.force())\n }", "function updateLayout(layout) {\n return {\n type: UPDATE_LAYOUT,\n payload: layout };\n\n}", "onEditMode() {\n const {selectedPage, selectedView, selectedPageDirty} = this.props;\n return ((selectedPage && selectedPage.tabId === 0) || selectedPageDirty\n || selectedView === panels.SAVE_AS_TEMPLATE_PANEL\n || selectedView === panels.ADD_MULTIPLE_PAGES_PANEL \n || selectedView === panels.CUSTOM_PAGE_DETAIL_PANEL);\n }", "function chooseLayout(layout)\n{\n // yay for half-baked data storage schemes\n layout = layout || document.cookieHash['layout'] || 'default';\n\n // in case we're being called externally, make the UI match\n $('#layoutSelector').val(layout);\n $(\"#nextWindowConfirmation\").hide();\n console.log(\"Setting layout to \" + layout);\n\n // change focus so we don't inadvertently change layout again by changing slides\n $(\"#preview\").focus();\n $(\"#layoutSelector\").blur();\n\n // what we are switching *from*\n switch(mode.layout) {\n case 'thumbs':\n $('#preview').removeClass('thumbs');\n $('#preview .thumb').hide();\n break;\n\n case 'beside':\n $('#preview').removeClass('beside');\n $('#preview #nextSlide .container').removeAttr(\"style\");\n $('#preview #nextSlide').hide();\n break;\n\n case 'floating':\n try {\n if (nextWindow) {\n // unregister the event so we don't accidentally double-fire\n nextWindow.window.onunload = null;\n nextWindow.close();\n }\n }\n catch (e) {\n console.log(e);\n console.log('Next window failed to close properly.');\n }\n break;\n\n default:\n\n }\n\n // what we are switching *to*\n switch(layout) {\n case 'thumbs':\n $('#preview').addClass('thumbs');\n $('#preview .thumb').show();\n break;\n\n case 'beside':\n $('#preview').addClass('beside');\n $('#preview #nextSlide').show();\n\n var w = $('#nextSlide .container').width();\n $('#nextSlide .container').height(w*.75)\n break;\n\n case 'floating':\n $(\"#nextWindowConfirmation\").show();\n break;\n\n default:\n\n }\n\n document.cookie = \"layout=\"+layout\n mode.layout = layout;\n zoom(true);\n}", "_changeCurrentView() {\n\t if (this._view !== this._visibleView) {\n\t this._view = this._visibleView;\n\t this._stopTimer();\n\t return true;\n\t }\n\t return false;\n\t }", "function isotopeUpdateLayout() {\n\tif (globalDebug) {console.log(\"Isotope Update Layout\");}\n\n\tif ( !empty($isotope_container) && $isotope_container.length ) {\n\t\t$isotope_container.isotope( 'layout' );\n\t}\n}", "function confirmChanges() {\r\n if (window.testgrid1 && window.origtestgrid1) {\r\n return (isChanged || isPageDataChanged());\r\n } else {\r\n return isChanged;\r\n }\r\n}", "function reloadLayout() {\n\tmyDiagram.startTransaction(\"change Layout\");\n\tvar lay = myDiagram.layout;\n\n\tlay.treeStyle = go.TreeLayout.StyleLayered;\n\tlay.layerStyle = go.TreeLayout.LayerIndividual;\n\tlay.angle = graphConfig.angle; // 0, 90, 180, 270\n\tlay.alignment = go.TreeLayout.AlignmentCenterChildren;\n\tlay.nodeSpacing = 20;\n\tlay.layerSpacing = 50;\n\n\tmyDiagram.commitTransaction(\"change Layout\");\n}", "toggleLayout() {\n var $next = this.$container.find('.layout.active').next();\n if ( $next.length == 0 ) {\n $next = this.$container.find('.layout:first');\n }\n\n this.$container\n .find('.layout')\n .removeClass('active');\n \n $next.addClass('active');\n }", "function changeButtonInset(layout) {\r\n\t$('.layout-btn').removeClass('active');\r\n\t$('#layout-btn-' + layout).addClass('active');\r\n}", "function HRcycleLayoutSize(currentSize) {\r\n switch (currentSize) {\r\n case 'md':\r\n default:\r\n var layoutSize = \"lg\";\r\n break;\r\n\r\n case 'lg':\r\n var layoutSize = \"md\";\r\n break;\r\n }\r\n\r\n return layoutSize;\r\n}", "getLocalLayout (subtract) {\r\n var layoutContext, local;\r\n\r\n local = {};\r\n layoutContext = this.getLayoutContext();\r\n\r\n if (layoutContext) {\r\n local.visible = layoutContext.visible;\r\n local.fontSize = layoutContext.fontSize;\r\n core.DIMENSIONS.forEach(function (dim) {\r\n if (layoutContext[dim]) {\r\n local[dim] = layoutContext[dim];\r\n }\r\n });\r\n }\r\n\r\n if (subtract) {\r\n core.DIMENSIONS.forEach(function (dim) {\r\n if (subtract[dim] && local[dim]) {\r\n local[dim] -= subtract[dim];\r\n }\r\n });\r\n }\r\n\r\n var breakpointLayout = core.getBreakpointLayout(this, { self: local });\r\n\r\n if (breakpointLayout.style) {\r\n Object.assign(local, breakpointLayout.style);\r\n }\r\n\r\n if (local.visible === false) {\r\n return {\r\n display: 'none',\r\n };\r\n }\r\n\r\n return local;\r\n }", "updateLayout() {\n if ( !this.isLocked ) {\n this.lock();\n\n this.layout();\n\n this.unlock();\n }\n }", "updateLayoutAutomatically() {\n if ( this._enabled ) {\n this.updateLayout();\n }\n }", "function bookLayoutImageSwap() {\n\t\t\tvar wd = $(window);\n\t\t\n\t\t\tvar vp = {\n\t\t\t\ttop : wd.scrollTop(),\n\t\t\t\tleft : wd.scrollLeft()\n\t\t\t};\n\t\t\t\n\t\t\t$('.js-book-layout-content').each(function() {\n\t\t\t\tvar offset = $(this).offset();\n\t\t\t\tvar section = $(this).attr('ID');\n\t\t\t\t\n\t\t\t\tif ((wd.height() + vp.top) >= offset.top+(wd.height()/2)) {\n\t\t\t\t\t$(this).prev('.js-book-layout-sidebar').addClass('is-active');\n\t\t\t\t\t$('.js-to-book-section').removeClass('is-active');\n\t\t\t\t\t$(this).closest('.js-book-layout').find('.js-to-book-section[data-section=\"'+ section +'\"]').addClass('is-active');\n\t\t\t\t} else {\n\t\t\t\t\t$(this).prev('.js-book-layout-sidebar').removeClass('is-active');\n\t\t\t\t\t$(this).closest('.js-book-layout').find('.js-to-book-section[data-section=\"'+ section +'\"]').removeClass('is-active');\n\t\t\t\t}\n\t\t\t});\n\t\t}", "__checkIsMain() {\n if (this.__isMain) {\n document\n .getElementById('layout')\n .classList\n .add('layout__main');\n }\n }", "changed()\n {\n if (window.location.hash !== this.lastHash)\n {\n this.lastHash = window.location.hash;\n return true;\n }\n else\n {\n return false;\n }\n }", "samePagination (oldPag, newPag) {\n // eslint-disable-next-line no-unused-vars\n for (let prop in newPag) {\n if (newPag[prop] !== oldPag[prop]) {\n return false\n }\n }\n return true\n }", "function AppLayoutChangedHandler(e) {\n\t\tconsole.log('AppLayoutChangedHandler');\n\t\tif (showingHelp) {\n\t\t\tlocalUpdate();\n\t\t}\n\t}", "_isSameView(date1, date2) {\n if (this.calendar.currentView == 'month') {\n return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2) &&\n this._dateAdapter.getMonth(date1) == this._dateAdapter.getMonth(date2);\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2);\n }\n // Otherwise we are in 'multi-year' view.\n return isSameMultiYearView(this._dateAdapter, date1, date2, this.calendar.minDate, this.calendar.maxDate);\n }", "_isSameView(date1, date2) {\n if (this.calendar.currentView == 'month') {\n return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2) &&\n this._dateAdapter.getMonth(date1) == this._dateAdapter.getMonth(date2);\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2);\n }\n // Otherwise we are in 'multi-year' view.\n return isSameMultiYearView(this._dateAdapter, date1, date2, this.calendar.minDate, this.calendar.maxDate);\n }", "get layout() { return this._layout; }", "[OVERRIDE_LAYOUT_CONFIG](state) {\n state.commit(OVERRIDE_LAYOUT_CONFIG);\n }", "get _isResized() {\n // Compare ratios. Very different includes IHM space.\n var heightRatio = _Global.document.documentElement.clientHeight / _Global.innerHeight,\n widthRatio = _Global.document.documentElement.clientWidth / _Global.innerWidth;\n\n // If they're nearly identical, then the view hasn't been resized for the IHM\n // Only check one bound because we know the IHM will make it shorter, not skinnier.\n return (widthRatio / heightRatio < 0.99);\n\n }", "shouldComponentUpdate(nextProps, nextStates) {\n const { markersData, sidePanelOpen, zoomFullMap, zoomToSite, siteDetail } = this.props;\n const { mapZoomLevel, mapBoundingBoxCorner } = this.state;\n const siteDetailId = siteDetail && siteDetail.id;\n const nextSiteDetailId = nextProps.siteDetail && nextProps.siteDetail.id;\n\n if (\n nextProps.markersData !== markersData ||\n nextStates.mapZoomLevel !== mapZoomLevel ||\n nextStates.mapBoundingBoxCorner !== mapBoundingBoxCorner ||\n nextProps.sidePanelOpen !== sidePanelOpen ||\n nextSiteDetailId !== siteDetailId ||\n nextProps.zoomFullMap !== zoomFullMap ||\n nextProps.zoomToSite !== zoomToSite\n ) {\n return true;\n }\n\n return false;\n }", "isEventInView(eventLayout) {\n // Milestones need to be visible at start & end\n if (eventLayout.startMs === eventLayout.endMs) {\n return eventLayout.startMs <= this.viewportEnd && eventLayout.endMs > this.viewportStart;\n }\n\n // But normal events do not\n return eventLayout.startMs < this.viewportEnd && eventLayout.endMs > this.viewportStart;\n }", "__layoutChanged(value, oldValue) {\n if (value === \"\") return\n this.getCSS(value)\n this.getHTML(value)\n }", "function isDestinyTheStartingSection(){\n var anchors = window.location.hash.replace('#', '').split('/');\n var destinationSection = getSectionByAnchor(decodeURIComponent(anchors[0]));\n \n return !destinationSection.length || destinationSection.length && destinationSection.index() === startingSection.index();\n }", "function isDestinyTheStartingSection(){\n var anchors = window.location.hash.replace('#', '').split('/');\n var destinationSection = getSectionByAnchor(decodeURIComponent(anchors[0]));\n \n return !destinationSection.length || destinationSection.length && destinationSection.index() === startingSection.index();\n }", "function isDestinyTheStartingSection(){\r\n var anchors = window.location.hash.replace('#', '').split('/');\r\n var destinationSection = getSectionByAnchor(decodeURIComponent(anchors[0]));\r\n \r\n return !destinationSection.length || destinationSection.length && destinationSection.index() === startingSection.index();\r\n }", "function isDestinyTheStartingSection(){\r\n var anchors = window.location.hash.replace('#', '').split('/');\r\n var destinationSection = getSectionByAnchor(decodeURIComponent(anchors[0]));\r\n \r\n return !destinationSection.length || destinationSection.length && destinationSection.index() === startingSection.index();\r\n }", "shouldComponentUpdate(nextProps) {\n if (this.props.direction !== nextProps.direction) {\n this.setState({\n firstPaneSize: nextProps.direction === 'horizontal'\n ? this.container.current.offsetWidth / 2\n : this.container.current.offsetHeight / 2\n });\n }\n \n return true;\n }", "function confirmChanges() {\r\n return (isChanged ||\r\n isPageDataChanged());\r\n}", "function onChangeFixedLayout() {\n setAttributes({\n hasFixedLayout: !hasFixedLayout\n });\n }", "function marginPushersAgain() {\n if(JSON.stringify(fullLayout._size) === oldmargins) return;\n\n return Lib.syncOrAsync([\n marginPushers,\n subroutines.layoutStyles\n ], gd);\n }", "function marginPushersAgain() {\n if(JSON.stringify(fullLayout._size) === oldmargins) return;\n\n return Lib.syncOrAsync([\n marginPushers,\n subroutines.layoutStyles\n ], gd);\n }", "shouldComponentUpdate(oldProps) {\n return this.props.appUrl !== oldProps.appUrl;\n }", "function updatePageLayout(content, header, navbar) {\n\t$(content).css('height', \n\t\twindow.screen.height - $(header).height() - $(navbar).height() - 32);\n}", "get viewportChanged() {\n return (this.flags & 4 /* Viewport */) > 0;\n }", "shouldComponentUpdate(nextProps) {\n const device = nextProps.device !== this.props.device;\n const viewport = nextProps.viewport.width !== this.props.viewport.width;\n if (device || viewport) {\n return true;\n }\n return false;\n }", "function onPageChange(layout) {\n onPageUpdate(layout);\n updatePageNavigation();\n updateSettings();\n }", "function updateDocumentState() {\n\n // Get the Iframe content not in xml \n let JqueryIframe = $(`<div>${tinymce.activeEditor.getContent()}</div>`)\n let JquerySavedContent = $(`#raje_root`)\n\n // True if they're different, False is they're equal\n ipcRenderer.send('updateDocumentState', JqueryIframe.html() != JquerySavedContent.html())\n }", "updatePanelSize ()\n {\n this.viewerState.viewport.invalidate();\n\n // FIXME(wabain): This should really only be called after initial load\n if (this.viewerState.renderer)\n {\n this.updateOffsets();\n this.viewerState.renderer.goto(this.settings.currentPageIndex, this.viewerState.verticalOffset, this.viewerState.horizontalOffset);\n }\n\n return true;\n }", "function isAnyoneDirty()\r\n{\r\n // Default to current frame's value if one exists\r\n var areWeDirty = isDirty();\r\n\r\n // First check if master/detail form layout exists, call detail frame's isDirty() method, as this is what will be set\r\n if (top.frameWorkspace.frameWorkspaceWrapper != null && top.frameWorkspace.frameWorkspaceWrapper.frameWorkspaceDetail != null && top.frameWorkspace.frameWorkspaceWrapper.frameWorkspaceDetail.detailFrame != null)\r\n {\r\n areWeDirty = areWeDirty || top.frameWorkspace.frameWorkspaceWrapper.frameWorkspaceDetail.detailFrame.isDirty();\r\n }\r\n\r\n // Second check top-level workspace frame. This is used by views such as Census --> Demographics\r\n // which do not leverage the master/detail form layout.\r\n if (top.frameWorkspace.frameWorkspaceWrapper != null && top.frameWorkspace.frameWorkspaceWrapper.frameWorkspaceDetail != null)\r\n {\r\n areWeDirty = areWeDirty || top.frameWorkspace.frameWorkspaceWrapper.frameWorkspaceDetail.isDirty();\r\n }\r\n\r\n return areWeDirty;\r\n}", "function checkLayout (layout) {\n\n if (!is.plainObject(layout))\n throw new Error('each layout must be a plain object')\n\n layout = copy(layout)\n\n if (!is.string(layout.name))\n throw new Error('each layout must have a name')\n\n if (layout.name.length === 0)\n throw new Error('layout names must not be empty')\n\n const tests = wrap(layout.test).filter(is.func)\n if (tests.length === 0)\n throw new Error('each layout must have at least one test function')\n\n layout.test = tests.length === 1\n ? tests[0]\n : tests::allPass\n\n if (!is.number(layout.count))\n layout.count = 1\n\n layout.required = !!layout.required\n\n layout.validate = wrap(layout.validate)\n .filter(is.func)\n ::unshift(\n layout::wrapIfMany,\n layout::setDefault\n )\n ::push(\n layout::mustPassTest,\n layout::checkIfRequired\n )\n\n if (is.defined(layout.default) && !layout.test(layout.default))\n throw new Error('default layout values must pass test')\n\n return layout\n}", "shouldComponentUpdate(nextProps, nextState) {\n const dateSelected = nextProps.leadData.get('dateSelected');\n if (!dateSelected) return false;\n let update = dateSelected.render || this.state.calendarHeight !== nextState.calendarHeight;\n if (\n nextProps.components.get('isCalendarVisible') !==\n this.props.components.get('isCalendarVisible') ||\n nextProps.browser.width !== this.props.browser.width\n ) {\n update = true;\n }\n return !!update;\n }", "static has_plotly_title(layout){\n if(!layout) { return false } //no plotly title to keep\n else if (!layout.title) { return false } //no plotly title to keep\n else if ((typeof(layout.title) === \"string\") ||\n layout.title.text) { //got a plotly title\n return true //make space for the plotly title as we're keeping it.\n }\n else { return false }\n }", "isFullView() {\n let currentPath = this.props.children.props.route.path;\n return (currentPath == Constants.selectedAdminTab.count) || (currentPath == Constants.selectedAdminTab.sites ||(currentPath == Constants.selectedAdminTab.manageEmail) ||(currentPath == Constants.selectedAdminTab.checkIn));\n }", "function toggleSavedLayout(){\n\t$.get('/get_layout', function(data,status){\n// \t\talert(\"Data: \"+JSON.stringify(data) +'\\nStatus: '+status);\n\t\t$(\"#myLayoutList\").html('<a id=\"'+data[0].name + '\">'+data[0].name+'</a>');\n\t\tfor(var i=1; i<data.length; i++){\n\t\t\t$(\"#myLayoutList\").append('<a id=\"'+data[i].name + '\">'+data[i].name+'</a>');\n\t\t}\n\t\t$(\"#myLayoutList a\").click(function(){\n\t\t\t\tfor(var item in data){\n\t\t\t\t\tif(this.id == data[item].name){\n loadLayout(data[item])\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\t\t\t});\t\t\n\n\t});\n\n \n\t\n\tdocument.getElementById(\"Layout_List\").classList.toggle(\"show\");\n}", "shouldComponentUpdate(nextProps, nextState){\n\t\treturn nextProps.show !== this.props.show || nextProps.children !== this.props.children;\n\t}", "function menuLayout() {\n if (homepage.width() > homepage.height()) {\n mobMenuItem.addClass(\"mobile-menu-horizontal\");\n mobMenuItem.removeClass(\"mobile-menu-vertical\");\n } else {\n mobMenuItem.addClass(\"mobile-menu-vertical\");\n mobMenuItem.removeClass(\"mobile-menu-horizontal\");\n }\n }", "function currentBlockIsChanged () {\n //Changes tools display on toolbar\n //Depens on the type of the current block\n toggleControlModule();\n \n //Update which blocks should be displayed on canvas\n //All blocks be of desination positon of bookmark should be hidden\n //Only one of them can be shown on page, which is the child of selected block\n updateBlocks();\n}", "function isDestinyTheStartingSection(){\n var anchor = getAnchorsURL();\n var destinationSection = getSectionByAnchor(anchor.section);\n return !anchor.section || !destinationSection || typeof destinationSection !=='undefined' && index(destinationSection) === index(startingSection);\n }", "function isDestinyTheStartingSection(){\n var anchor = getAnchorsURL();\n var destinationSection = getSectionByAnchor(anchor.section);\n return !anchor.section || !destinationSection || typeof destinationSection !=='undefined' && index(destinationSection) === index(startingSection);\n }", "function isDestinyTheStartingSection(){\n var anchor = getAnchorsURL();\n var destinationSection = getSectionByAnchor(anchor.section);\n return !anchor.section || !destinationSection || typeof destinationSection !=='undefined' && index(destinationSection) === index(startingSection);\n }", "_shouldRecreateView(changes) {\n const ctxChange = changes['ngTemplateOutletContext'];\n return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n }", "_shouldRecreateView(changes) {\n const ctxChange = changes['ngTemplateOutletContext'];\n return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n }", "_shouldRecreateView(changes) {\n const ctxChange = changes['ngTemplateOutletContext'];\n return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n }", "_shouldRecreateView(changes) {\n const ctxChange = changes['ngTemplateOutletContext'];\n return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n }", "_shouldRecreateView(changes) {\n const ctxChange = changes['ngTemplateOutletContext'];\n return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n }", "function is_normal_pageview()\n{\n return (window == top) || ('lunar_main' == window.name);\n}", "restoreLayout(mode, layout) {\n var _a, _b;\n const { mainArea, downArea, leftArea, rightArea, relativeSizes } = layout;\n // Rehydrate the main area.\n if (mainArea) {\n const { currentWidget, dock } = mainArea;\n if (dock) {\n this._dockPanel.restoreLayout(dock);\n }\n if (mode) {\n this.mode = mode;\n }\n if (currentWidget) {\n this.activateById(currentWidget.id);\n }\n }\n else {\n // This is needed when loading in an empty workspace in single doc mode\n if (mode) {\n this.mode = mode;\n }\n }\n // Rehydrate the down area\n if (downArea) {\n const { currentWidget, widgets, size } = downArea;\n const widgetIds = (_a = widgets === null || widgets === void 0 ? void 0 : widgets.map(widget => widget.id)) !== null && _a !== void 0 ? _a : [];\n // Remove absent widgets\n this._downPanel.tabBar.titles\n .filter(title => !widgetIds.includes(title.owner.id))\n .map(title => title.owner.close());\n // Add new widgets\n const titleIds = this._downPanel.tabBar.titles.map(title => title.owner.id);\n widgets === null || widgets === void 0 ? void 0 : widgets.filter(widget => !titleIds.includes(widget.id)).map(widget => this._downPanel.addWidget(widget));\n // Reorder tabs\n while (!ArrayExt.shallowEqual(widgetIds, this._downPanel.tabBar.titles.map(title => title.owner.id))) {\n this._downPanel.tabBar.titles.forEach((title, index) => {\n const position = widgetIds.findIndex(id => title.owner.id == id);\n if (position >= 0 && position != index) {\n this._downPanel.tabBar.insertTab(position, title);\n }\n });\n }\n if (currentWidget) {\n const index = this._downPanel.stackedPanel.widgets.findIndex(widget => widget.id === currentWidget.id);\n if (index) {\n this._downPanel.currentIndex = index;\n (_b = this._downPanel.currentWidget) === null || _b === void 0 ? void 0 : _b.activate();\n }\n }\n if (size && size > 0.0) {\n this._vsplitPanel.setRelativeSizes([1.0 - size, size]);\n }\n else {\n // Close all tabs and hide the panel\n this._downPanel.stackedPanel.widgets.forEach(widget => widget.close());\n this._downPanel.hide();\n }\n }\n // Rehydrate the left area.\n if (leftArea) {\n this._leftHandler.rehydrate(leftArea);\n }\n else {\n if (mode === 'single-document') {\n this.collapseLeft();\n }\n }\n // Rehydrate the right area.\n if (rightArea) {\n this._rightHandler.rehydrate(rightArea);\n }\n else {\n if (mode === 'single-document') {\n this.collapseRight();\n }\n }\n // Restore the relative sizes.\n if (relativeSizes) {\n this._hsplitPanel.setRelativeSizes(relativeSizes);\n }\n if (!this._isRestored) {\n // Make sure all messages in the queue are finished before notifying\n // any extensions that are waiting for the promise that guarantees the\n // application state has been restored.\n MessageLoop.flush();\n this._restored.resolve(layout);\n }\n }", "function layoutIfMediaMatch(mediaName){if(mediaName==null){// TODO(shyndman): It would be nice to only layout if we have\n\t// instances of attributes using this media type\n\tctrl.invalidateLayout();}else if($mdMedia(mediaName)){ctrl.invalidateLayout();}}", "shiftLayoutedItems() {\n if (isNullOrUndefined(this.viewer.blockToShift) || isNullOrUndefined(this.viewer.blockToShift.containerWidget)) {\n this.viewer.blockToShift = undefined;\n return;\n }\n let block = this.viewer.blockToShift;\n let sectionIndex = block.bodyWidget.index;\n this.reLayoutOrShiftWidgets(block, this.viewer);\n let updateNextBlockList = true;\n // If flow layout, then all sections are in single page. Hence need to update till last block of last section.\n // Todo: For page layout and section break continuous, need to handle the same.\n let splittedWidget = block.getSplitWidgets();\n let nextBlock = splittedWidget[splittedWidget.length - 1].nextRenderedWidget;\n while (nextBlock instanceof BlockWidget && nextBlock.bodyWidget.index === sectionIndex) {\n let currentWidget = undefined;\n let blocks = block.getSplitWidgets();\n currentWidget = blocks[blocks.length - 1];\n block = nextBlock;\n updateNextBlockList = false;\n let nextWidget = undefined;\n blocks = block.getSplitWidgets();\n if (block instanceof ParagraphWidget) {\n nextWidget = blocks[0];\n }\n else {\n if (block instanceof TableWidget) {\n nextWidget = blocks[0];\n }\n }\n if (currentWidget.containerWidget === nextWidget.containerWidget\n && (HelperMethods.round(nextWidget.y, 2) === HelperMethods.round(this.viewer.clientActiveArea.y, 2)) &&\n isNullOrUndefined(nextWidget.nextWidget)) {\n break;\n }\n updateNextBlockList = true;\n this.reLayoutOrShiftWidgets(block, this.viewer);\n splittedWidget = block.getSplitWidgets();\n nextBlock = splittedWidget[splittedWidget.length - 1].nextRenderedWidget;\n }\n if (this.viewer.owner.editorModule) {\n this.viewer.owner.editorModule.updateListItemsTillEnd(block, updateNextBlockList);\n }\n this.viewer.blockToShift = undefined;\n let viewer = this.viewer;\n // if (viewer instanceof PageLayoutViewer) {\n viewer.removeEmptyPages();\n this.updateFieldElements();\n viewer.updateScrollBars();\n // }\n }", "function isDestinyTheStartingSection(){\r\n var anchor = getAnchorsURL();\r\n var destinationSection = getSectionByAnchor(anchor.section);\r\n return !anchor.section || !destinationSection || typeof destinationSection !=='undefined' && index(destinationSection) === index(startingSection);\r\n }", "_isStacked() {\n if (!this.$watched[0] || !this.$watched[1]) {\n return true;\n }\n return this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top;\n }", "get layout() {\n\t\treturn this.nativeElement ? this.nativeElement.layout : undefined;\n\t}", "inView() {\n let page = $(\"#NutritionPage\")[0];\n let offset = $(\"#LandingPage\")[0].getBoundingClientRect().height;\n const top = page.getBoundingClientRect().top;\n return (top + offset) >= 0 && (top - offset) <= window.innerHeight;\n }", "shouldComponentUpdate(nextProps, nextState){\n\t\tif(this.reRender){\n\t\t\t//a new element has been added to the display \n\t\t\tthis.reRender = false;\n\t\t\tthis.typeOne = false;\n\t\t\treturn true;\n\t\t}\n\t\telse if (this.typeOne){\n\t\t\t//a preexisting element has a letter (or up to \"scale\" letters) appended \n\t\t\tthis.typeOne = false;\n\t\t\tif(this.latestElement){\n\t\t\t\tthis.latestElement.reWrite(this.latestElementNewText);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\t//no elements need changing\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "function isJustScrollingToNewPage(prevOptions, options) {\n if (!prevOptions) {\n // It's a new search, or we just popped back from a different view.\n return false;\n }\n\n // Compare every field except for 'page' and 'release_time'.\n // There might be better ways to achieve this.\n let tmpPrevOptions = { ...prevOptions };\n tmpPrevOptions.page = -1;\n tmpPrevOptions.release_time = '';\n\n let tmpOptions = { ...options };\n tmpOptions.page = -1;\n tmpOptions.release_time = '';\n\n return JSON.stringify(tmpOptions) === JSON.stringify(tmpPrevOptions);\n }", "function layoutIntacto(){\n\t// make the links to the previous pages / sgte work like the back / next buttons\n\tif(confBool('overwrite_links', true)){\n\t\ttry{\n\t\t\tvar next = contenido(document.documentElement.innerHTML, getNext, 0);\n\t\t\tvar linksNext = xpath('//*[@href=\"'+next+'\"]', document, true);\n\t\t\tfor(var i=0;i<linksNext.length;i++){\n\t\t\t\tlinksNext[i].href = '#next';\n\t\t\t\tsetEvt(linksNext[i], 'click', btnnext);\n\t\t\t}\n\t\t}catch(e){}\n\t\ttry{\n\t\t\tvar back = contenido(document.documentElement.innerHTML, getBack, 0);\n\t\t\tvar linksBack = xpath('//*[@href=\"'+back+'\"]', document, true);\n\t\t\tfor(var i=0;i<linksBack.length;i++){\n\t\t\t\tlinksBack[i].href = '#back';\n\t\t\t\tsetEvt(linksBack[i], 'click', btnback);\n\t\t\t}\n\t\t}catch(e){}\n\t}\n\n\t// replace the image with the default layout\n\tvar img;\n\tif(layoutElement) img = xpath(layoutElement);\n\telse{\n\t\timg = contenido(document.documentElement.innerHTML, getImagen, 0);\n\t\tvar src = typeof(img)=='string' ? match(img, /src=\"(.+?)\"/i, 1, img) : xpath('@src', img);\n\t\ttry{ img = xpath('//img[@src=\"'+src+'\"]'); }\n\t\tcatch(e){ img = xpath('//img[@src=\"'+decodeURI(src)+'\"]'); }\n\t}\n\n\tvar padre = img.parentNode;\n\tvar div = document.createElement('div');\n\tdiv.innerHTML = layoutDefault;\n\tpadre.insertBefore(div, img);\n\tpadre.removeChild(img);\n\n\t// if I am inside a link, I delete it\n\twhile(padre){\n\t\tif(padre.href){\n\t\t\twhile(padre.childNodes.length) padre.parentNode.insertBefore(padre.childNodes[0], padre);\n\t\t\tpadre.parentNode.removeChild(padre);\n\t\t\tbreak;\n\t\t}\n\t\telse if(padre == document.body) break;\n\t\tpadre = padre.parentNode;\n\t}\n\n\tget('wcr_btnlayout').innerHTML = 'Use Minimalistic Layout';\n}", "function isDestinyTheStartingSection(){\r\n var destinationSection = getSectionByAnchor(getAnchorsURL().section);\r\n return !destinationSection || destinationSection.length && destinationSection.index() === startingSection.index();\r\n }", "function changeLayout() {\r\n // Remove the buddy icon\r\n if (!showBuddyIcon) {\r\n $('table.launchHead').remove();\r\n\t\tGM_addStyle('#Main {margin-top: 15px ! important; }');\r\n }\r\n\r\n // Dynamic width of homepage contents\r\n if (dynamicWidth) {\r\n GM_addStyle(\r\n '.act-data { width: 95% ! important; }\\n' +\r\n '.tt-col1 { width: 50% ! important; min-height: 200px ! important; }\\n' +\r\n '.tt-col2 { width: 47% ! important; min-height: 200px ! important; }\\n' +\r\n '#Main { margin-left: 10px ! important; margin-right: 10px !important; }\\n' +\r\n '#Main, .Header, .NavBar, div.Footer { width: 98% ! important; }\\n');\r\n }\r\n\r\n // Gray background with rounded corners\r\n if (grayBackground) {\r\n GM_addStyle(\r\n '.saj-block, .tt-module, .tt-block { ' +\r\n\t\t\t'padding: 5px 3px ! important; background-color: #f6f6f6 ! important;' +\r\n\t\t\t(roundedBorder ? '-moz-border-radius: 3px ! important;' : '') +\r\n\t\t\t'border: 1px solid #cccccc ! important; }\\n' +\r\n\t\t\t'#y-groups > .bd > div:first-child { margin-top: 0 ! important; }\\n' +\r\n '.saj-block, #y-groups { margin-bottom: 20px ! important; }\\n');\r\n\t}\r\n\r\n // Extend links from group images so that the will link in the group pool\r\n if (linkToGroupPool) {\r\n\t\threfs = $('#y-groups .bd h3.special a').attr('href');\r\n\t\tif (typeof hrefs != 'undefined') {\r\n\t\t\tpoolUrl = hrefs.replace(/.*\\/groups\\//, '');\r\n\t\t\t$('div#y-groups span.photo_container a:not([href*=in/pool])').attr('href', function() {\r\n\t\t\t\treturn this.href + 'in/pool-' + poolUrl;\r\n\t\t\t});\r\n\t\t}\r\n }\r\n\r\n // Set position of modules\r\n function getNodeKey(n) {\r\n return n.tagName + ' ' + $(n).attr('id');\r\n }\r\n \r\n if (customPositions) {\r\n var nodes = [];\r\n $('.tt-col1,.tt-col2').children().each(function (i, v) {\r\n nodes[getNodeKey(v)] = v;\r\n });\r\n \r\n function setColumn(c, nodes) {\r\n parent = $(c);\r\n var m = eval(GM_getValue('state' + c));\r\n for (i in m) {\r\n\t\t\t\tnode = nodes[m[i]];\t\t\t\t\r\n\t\t\t\tif (typeof node != 'undefined') {\r\n\t\t\t\t\tparent.append($(nodes[m[i]]));\r\n\t\t\t\t}\r\n }\r\n }\r\n \r\n setColumn('.tt-col1', nodes);\r\n setColumn('.tt-col2', nodes);\r\n }\r\n \r\n // Drag & drop modules\r\n if (dragDrop) {\r\n GM_addStyle('.placeholder { border: 2px dashed #cccccc; }\\n');\r\n function saveColumnState(c) {\r\n var m = [];\r\n $(c).children().each(function (i, v) {\r\n m[i] = getNodeKey(v);\r\n });\r\n // window.setTimeout(GM_setValue, 0, 'state' + c, m.toSource());\r\n window.setTimeout(function() { GM_setValue('state' + c, m.toSource()) }, 0);\r\n }\r\n\r\n\t\tvar sortables = $('.tt-col1, .tt-col2, #ad-block');\r\n\t\tsortables.sortable({\r\n\t\t\titems: '.tt-module, .tt-block, #ad-block, .saj-block',\r\n\t\t\tconnectWith: $('.tt-col1, .tt-col2'),\r\n\t\t\tcursor: 'move',\r\n\t\t\tforcePlaceholderSize: 'true',\r\n\t\t\tplaceholder: 'placeholder',\r\n start: function(e,ui) {\r\n ui.helper.css('width', ui.item.width());\r\n },\r\n stop: function(e, ui) {\r\n saveColumnState('.tt-col1');\r\n saveColumnState('.tt-col2');\r\n }\r\n });\r\n }\r\n \r\n // Flickr blog\r\n if (!showBlog) {\r\n $('#tt-blog').remove();\r\n }\r\n\r\n // Tips\r\n if (!showTips) {\r\n $('#tt-tips').remove();\r\n }\r\n\r\n // Images in recent activity\r\n if (!showImages) {\r\n $('#y-photostream .act-content img').remove();\r\n }\r\n\r\n // Upload link\r\n if (showUploadInMenuBar) {\r\n $('#tt-upload').remove();\r\n $('ul.site_nav_menu_buttons').eq(0).append($('<li class=\"no_menu_li\"><span><a href=\"/photos/upload/\">Upload</a></span></li>'));\r\n }\r\n}", "function HRapplyLayoutSize(layoutSize) {\r\n var layoutMain = $(\".layoutSize\");\r\n\r\n if (!layoutMain.is('.locked')) {\r\n if (layoutSize == \"lg\") {\r\n layoutMain.addClass(\"container-fluid\");\r\n layoutMain.removeClass(\"container\");\r\n }\r\n else {\r\n layoutMain.addClass(\"container\");\r\n layoutMain.removeClass(\"container-fluid\");\r\n }\r\n }\r\n}", "get BaseModalLayout() {\n elementorCommon.helpers.deprecatedMethod('elementor.modules.components.templateLibrary.views.BaseModalLayout', '2.4.0', 'elementorModules.common.views.modal.Layout');\n return elementorModules.common.views.modal.Layout;\n }" ]
[ "0.63119304", "0.62250066", "0.6035228", "0.6025724", "0.58956254", "0.5884063", "0.56655836", "0.56432134", "0.5613372", "0.5547768", "0.55335164", "0.55305576", "0.55305576", "0.54757786", "0.5461575", "0.54430956", "0.53780544", "0.53751343", "0.531757", "0.53046453", "0.5266518", "0.5253862", "0.5244509", "0.5238237", "0.52352357", "0.5171988", "0.5166645", "0.5163301", "0.513838", "0.5112403", "0.5107712", "0.5087081", "0.50856704", "0.5084304", "0.50816715", "0.5080099", "0.5074779", "0.50683665", "0.5063472", "0.50609356", "0.50543255", "0.5046053", "0.5023156", "0.5021678", "0.5020167", "0.5020167", "0.500727", "0.49963656", "0.4990721", "0.49834228", "0.49831688", "0.4974043", "0.4966597", "0.4966597", "0.49639598", "0.49639598", "0.4955946", "0.4940646", "0.4935817", "0.49356818", "0.49356818", "0.49207017", "0.4900696", "0.48947158", "0.48912686", "0.48729217", "0.4853945", "0.48521566", "0.48508117", "0.48507494", "0.48472184", "0.48451304", "0.48444924", "0.4839163", "0.48323765", "0.48295674", "0.4829171", "0.4828921", "0.4828921", "0.4828921", "0.48246175", "0.48246175", "0.48246175", "0.48246175", "0.48246175", "0.48109275", "0.48054665", "0.48035476", "0.48029634", "0.4792044", "0.47751406", "0.47744423", "0.47740683", "0.4773289", "0.47714484", "0.47695425", "0.4763925", "0.47612032", "0.4761052", "0.47590828" ]
0.82934874
0
this won't work if the href of a fragment is edited
function updateHtml(href) { var fragment = generator.fragment$[href]; if (!fragment) return log('jqueryview cannot find fragment: ' + href); var $html = $('[data-render-html="' + href + '"]'); if (!$html.length) return log('jqueryview cannot update html for fragment: ' + href); generator.emit('before-update-view', $html); $html.replaceWith(generator.renderHtml(fragment)); generator.emit('after-update-view', $html); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onHashChange() {\n // set location fragmention as uri-decoded text (from href, as hash may be decoded)\n location.fragmention = decodeURIComponent((location.href.match(/#(#|%23)(.+)/) || [0,0,''])[2].replace(/\\+/g, ' '));\n\n\n // conditionally remove stashed element fragmention attribute\n if (element) {\n element.removeAttribute('fragmention');\n\n // DEPRECATED: trigger style in IE8\n if (element.runtimeStyle) {\n element.runtimeStyle.windows = element.runtimeStyle.windows;\n }\n }\n\n // if fragmention exists\n if (location.fragmention) {\n // get element containing text (or return document)\n element = getElementByText(document, location.fragmention);\n\n // if element found\n if (element !== document) {\n // scroll to element\n element.scrollIntoView();\n\n // set fragmention attribute\n element.setAttribute('fragmention', '');\n element.setAttribute('tabindex', '-1');\n element.focus();\n\n // DEPRECATED: trigger style in IE8\n if (element.runtimeStyle) {\n element.runtimeStyle.windows = element.runtimeStyle.windows;\n }\n }\n // otherwise clear stashed element\n else {\n element = null;\n }\n }\n }", "autolink() {\n const linkRegex = new RegExp(`(https?://\\\\S+\\\\.\\\\S+)\\\\s`, 'ig');\n const editor = this.getEditor();\n const content = editor.getDocument().toString();\n let match;\n while ((match = linkRegex.exec(content))) {\n const url = match[1];\n if (isURL(url)) {\n const position = match.index;\n const range = [position, position + url.length];\n const hrefAtRange = editor.getDocument().getCommonAttributesAtRange(range).href;\n if (hrefAtRange !== url) {\n this.updateInRange(editor, range, 0, () => {\n if (editor.canActivateAttribute('href')) {\n editor.activateAttribute('href', url);\n }\n });\n }\n }\n }\n }", "function href(editor, v) {\n\t\tvar a = getFirstAnchor(editor);\n\t\tif (!v)\n\t\t\treturn a ? a.href : '';\n\t\telse if (a)\n\t\t\ta.href = v;\n\t}", "function updateHashInUrl(href) {\n var hashInUrl = href;\n if (href.indexOf('/feature/') !== -1) {\n hashInUrl = href.substring(18);\n }\n\n lastClickElementHref = hashInUrl;\n window.location.hash = '#' + hashInUrl;\n}", "function do_fragment_change() {\n var fragment = window.location.hash;\n set_url(fragment);\n\n if (fragment.match(/^#t=/)) {\n do_time_change(fragment);\n }\n else if (fragment.match(/^#!/)) {\n do_transcript_change(fragment);\n }\n}", "function set_url(fragment) {\n var baseurl = window.location.protocol+\"//\"+window.location.host+window.location.pathname\n var url = baseurl + fragment;\n $('span#cur_url').html(\"<a href='\"+url+\"'>\"+url+\"</a>\"); \n}", "function onClick (e) {\n var el = e.target\n while (el) {\n if (el.tagName == 'A' && el.origin == window.location.origin && el.hash && el.hash == window.location.hash)\n return e.preventDefault(), e.stopPropagation(), phoenix.refreshPage()\n el = el.parentNode\n }\n}", "function addPathFragmentContentToHref(formLink){\t\r\n\tvar formHref = formLink.href;\t\t\t\t\r\n\tif(formHref.indexOf(\"/content/\") == -1){\r\n\t\tvar index = formHref.indexOf(\"/\");\r\n\t\tindex = formHref.indexOf(\"/\", index + 1);\r\n\t\tindex = formHref.indexOf(\"/\", index + 1);\t\t\t\t\r\n\t\tvar protocolAndDomain = formHref.substring(0, index);\r\n\t\tvar path = formHref.substring(index);\t\t\t\t\r\n\t\tformHref = protocolAndDomain + \"/content\" + path;\t\t\t\t\r\n\t\tformLink.href = formHref;\t\t\t\t\t\t\r\n\t}\t\t\t\r\n}", "function onChangeContentURL(content) {\n setAttributes({ link_url: content });\n }", "function getAnchor(e) {\n let el = e.target;\n while (el && !el.href) {\n el = el.parentNode;\n }\n if (el) {\n e.preventDefault();\n history.pushState(null, null, el.href); // Modify current url to become url of link.\n changePage();\n }\n }", "function interceptClickEvent(e) {\n var href;\n var target = e.target || e.srcElement;\n if (target.tagName === 'A') {\n href = target.getAttribute('href');\n var isLocal = href != null && href.startsWith('/');\n\n //put your logic here...\n if (isLocal) {\n location.hash = href;\n\n var anchorSearch = RegExp(/[\\/\\w]+(\\?\\w+=\\w*(&\\w+=\\w*))?#(\\w+)/g).exec(href);\n if (anchorSearch != null && anchorSearch[3] != null) {\n setTimeout(function () {\n var anchorElem = document.getElementById(anchorSearch[3]);\n anchorElem && anchorElem.scrollIntoView();\n }, 1);\n }\n\n //tell the browser not to respond to the link click\n e.preventDefault();\n }\n }\n }", "update() {\n\tlet usp = new search.URLSearchParams(location.hash)\n\tfor (let node of this.anchors) {\n\t let params = new search.URLSearchParams(node.hash)\n\t usp.set('m', params.get('m'))\n\t node.href = '#?' + usp.toString()\n\t}\n }", "checkUrl(/* e */) {\n if (this.location.pathname === this.fragment) {\n return false\n }\n\n this.loadUrl()\n }", "function updateLinkHref() {\n\tvar codeHeader = \"(function() {\";\n\tvar codeFooter = \"})(); void 0;\";\n\tvar codeBody = editor.getSession().getValue();\n\n\t// minify\n\tvar full_code = codeHeader + codeBody + codeFooter;\n\tfull_code = full_code.replace(/\\n/g, '').replace(/ /g, '');\n\n\tlink.href = 'javascript: ' + full_code;\n\n\tvar baseUrl = '';\n\tstatic_link.href = baseUrl + '#' + utf8_to_b64(codeBody);\n\n}", "get anchor() {}", "onClickAdvanced() {\n location.hash = '/content/json/' + this.model.id;\n }", "function modifyAnchorTags(caller) {\n var tagParts, currentStateLink, isSamePage, pathHashCount;\n if (caller === \"modalPopupCtrl.pageContent\" || ctrl.currentLink === undefined) {\n currentStateLink = [];\n }\n else {\n currentStateLink = ctrl.currentLink.split('/');\n }\n $(ctrl.anchorTags).each(function (index) {\n if (ctrl.anchorTags[index].hasAttribute('href')) {\n var isExternalLink = ctrl.anchorTags[index].getAttribute('href').indexOf('http');\n if (isExternalLink === -1) {\n if (ctrl.anchorTags[index].getAttribute('href').indexOf('Page?$filter=contains(Title') !== -1) {\n $(ctrl.anchorTags[index]).attr('class', 'removed-link');\n var splittedArray = ctrl.anchorTags[index].getAttribute('href').split(\"'\");\n var pageTitle = null;\n if (splittedArray[1]) {\n pageTitle = splittedArray[1];\n }\n var docId = null;\n if (splittedArray[3]) {\n docId = splittedArray[3];\n }\n DocumentService.getAllPages(\"$filter=contains(tolower(Title),tolower('\" + pageTitle + \"')) and DocumentCode eq '\" + docId + \"'\")\n .then(function (result) {\n if (result.value.length > 0) {\n var popupData = '';\n var currentReleasePage = $.grep(result.value, function (e) { return e.ReleaseId === $rootScope.release; });\n if (currentReleasePage.length === 0) {\n if (result.value.length > 1) {\n popupData = createPopupData(result.value, index, caller);\n angular.element(ctrl.anchorTags[index]).attr('id', 'linktag' + index);\n angular.element(ctrl.anchorTags[index]).attr('data-toggle', 'dropdown');\n angular.element(ctrl.anchorTags[index]).attr('aria-haspopup', 'true');\n angular.element(ctrl.anchorTags[index]).attr('aria-expanded', 'false');\n $(ctrl.anchorTags[index]).wrap('<div style=\\\"display:inline-block;\\\" class=\\\"dropdown\\\"></div>');\n var linkText = angular.element(ctrl.anchorTags[index]).html();\n angular.element(ctrl.anchorTags[index]).html(linkText + \" <span class=\\\"caret\\\"></span> \");\n angular.element(popupData).insertAfter(ctrl.anchorTags[index]);\n } else {\n currentReleasePage = result.value[0];\n }\n } else {\n currentReleasePage = currentReleasePage[0];\n }\n if (caller === \"modalPopupCtrl.pageContent\") {\n if (popupData === '') {\n $(ctrl.anchorTags[index]).on(\"click\", function () {\n $rootScope.reloadPopUpOnLnkClk(currentReleasePage.Id);\n }\n );\n var buttonNewTab = window.document.createElement('a');\n angular.element(buttonNewTab).attr('href', '' + ctrl.docCenterUrl + '#/docHome/document/' + currentReleasePage.DocumentId +\n '/page/' + currentReleasePage.Id + '');\n angular.element(buttonNewTab).attr('target', '_blank');\n var spanNewTab = window.document.createElement('span');\n angular.element(buttonNewTab).append(' ');\n angular.element(buttonNewTab).append(spanNewTab);\n angular.element(buttonNewTab).insertAfter(ctrl.anchorTags[index]);\n }\n }\n else {\n $(ctrl.anchorTags[index]).on(\"click\", function () {\n if (popupData === '') {\n ctrl.changeState(currentReleasePage.DocumentId, currentReleasePage.Id, null);\n }\n });\n }\n $(ctrl.anchorTags[index]).removeAttr(\"class\");\n $(ctrl.anchorTags[index]).attr('style', 'cursor: pointer;');\n }\n });\n $(ctrl.anchorTags[index]).removeAttr('href');\n return;\n }\n tagParts = ctrl.anchorTags[index].getAttribute('href').split('/');\n isSamePage = ctrl.anchorTags[index].getAttribute('issamepage');\n pathHashCount = ctrl.anchorTags[index].getAttribute('isPathHavingHash');\n if (tagParts.length > 0) {\n ctrl.items = tagParts[tagParts.length - 1].split('#');\n // Check if the link is in the same page.\n if (currentStateLink[currentStateLink.length - 1] === ctrl.items[0] || isSamePage === \"true\") {\n if (ctrl.items.length > 1) {\n (function (anchorId) {\n $(ctrl.anchorTags[index]).on(\"click\", function () {\n ctrl.goToHeading(anchorId);\n });\n }(ctrl.items[1]));\n }\n $(ctrl.anchorTags[index]).removeAttr('issamepage');\n\n } else {\n var documentId, pageId, achId;\n documentId = tagParts[2];\n pageId = ctrl.items[0];\n achId = ctrl.items[1];\n if (pathHashCount && parseInt(pathHashCount, 10) > 0) {\n if (ctrl.items.length > parseInt(pathHashCount, 10) + 1) {\n achId = ctrl.items[ctrl.items.length - 1];\n var pageIdArray = ctrl.items.slice(0, ctrl.items.length - 1);\n pageId = pageIdArray.join('#');\n } else {\n pageId = ctrl.items.join('#');\n achId = null;\n }\n $(ctrl.anchorTags[index]).removeAttr('isPathHavingHash');\n }\n $(ctrl.anchorTags[index]).on(\"click\", function () {\n ctrl.changeState(documentId, pageId, achId);\n });\n }\n $(ctrl.anchorTags[index]).attr('style', 'cursor: pointer;');\n $(ctrl.anchorTags[index]).removeAttr(\"class\");\n $(ctrl.anchorTags[index]).removeAttr('href');\n }\n } else {\n $(ctrl.anchorTags[index]).attr('target', '_blank');\n }\n }\n });\n }", "function changeUrlFragment(targetGroup) {\n document.location.hash = \"#\" + targetGroup + \"_tab\";\n }", "function updateURLFragment(path) {\n window.location.hash = path;\n }", "handleFactDeepLink() {\n if (location.hash.startsWith(\"#f-\")) {\n this.selectItem(location.hash.slice(3));\n }\n }", "function getUrl(e) {\n e.preventDefault();\n url = e.target.href;\n console.log(url);\n // Call the function loadContent to load the \n // updated content:\n loadContent(url);\n \n}", "function link(e){\n\tvar newURL = e.target.href;\n\tchrome.tabs.update({url:newURL});\n}", "function onLinkClicked(element) {\n const section = document.querySelector('#'+element.dataset.section);\n checkSectionsInView();\n scrollTO(section);\n}", "function updateLink() {\n const url = urlInput.value;\n const name = nameInput.value;\n editBookmark({url, name, key}, () => {\n renderBookmarks(pagination.currentPage);\n cancelEdit();\n });\n }", "function change_links(a){\r\n\tx = a.href.indexOf('gid=');\r\n\ta.innerHTML = eval('gid'+a.href.substr(a.href.indexOf('gid=')+4));\r\n}", "function handleOnFieldHref(href) {\r\n var realscript = processHrefPlaceholders(href, null);\r\n if (realscript.indexOf(\"javascript:\") >= 0) {\r\n var realscript = realscript.substring(realscript.indexOf(\"javascript:\") + 11);\r\n eval(realscript);\r\n }\r\n else {\r\n setWindowLocation(realscript);\r\n }\r\n}", "function onclick_highlight() {\n\tif (document.getElementsByTagName) {\n\t\tvar alinks = document.getElementById('rules').getElementsByTagName('a');\n\t\tfor (var i = 0; i < alinks.length; i++) {\n\t\t\tif (alinks[i].getAttribute('href') !== null && alinks[i].getAttribute('href').indexOf('#') >= 0) {\n\t\t\t\tvar fragment = alinks[i].getAttribute('href').substring(alinks[i].getAttribute('href').indexOf('#') + 1);\n\t\t\t\tvar e_onclick_function = \"frag_highlight('\" + fragment + \"')\";\n\t\t\t\tvar new_function = new Function('e', e_onclick_function);\n\t\t\t\talinks[i].onclick = new_function;\n\t\t\t}\n\t\t}\n\t}\n}", "function onAnchorClick(event) {\n chrome.tabs.create({\n selected: true,\n url: event.srcElement.href\n });\n return false;\n}", "function setUrlAdr(link) {\n //url_adr = link.onclick;\n if (link.onclick !== null) { url_adr = link.onclick.toString().split(\"'\")[1]; }\n else {url_adr = link.href.toString().split(\"#\")[1];}\n}", "function onAnchorClick(event) {\n chrome.tabs.create({\n selected: true,\n url: event.srcElement.href\n });\n return false;\n}", "link(options = {}) {\n if (!options || (options && !options.href) || !this.isValid()) {\n return;\n }\n\n if (window.getSelection && !window.getSelection().toString()) {\n console.warn(\"no text selected..\");\n return null;\n }\n const unwrapAtags = (linkElements) => {\n linkElements.forEach(link => {\n Array.from(link.querySelectorAll(\"a\")).forEach(aTag => aTag.unwrap());\n const closestATag = link.parentElement ? link.parentElement.__closest(\"a\") : null;\n if (closestATag) {\n var a = Object(_utilis_splitHTML__WEBPACK_IMPORTED_MODULE_2__[\"splitHTML\"])(link, closestATag, {\n tag: \"a\"\n });\n if (a) {\n a.center.unwrap();\n }\n // closestATag.unwrap();\n }\n });\n }\n const setTargetToTag = (linkElements, renderedLink, _target) => {\n linkElements.forEach(aTag => {\n aTag.href = renderedLink;\n if (_target) {\n aTag.setAttribute(\"target\", _target);\n }\n });\n }\n const setProtocol = (_protocol, newURL) => {\n _protocol = _protocol.replace(/:/g, \"\");\n _protocol = _protocol.replace(/\\/\\//g, \"\");\n _protocol += \":\";\n if (_protocol.includes(\"http\")) {\n _protocol += \"//\";\n } else {\n }\n newURL.push(_protocol);\n return _protocol;\n }\n\n\n const { href = \"\", protocol = \"\", target = \"\" } = options;\n\n const linkElements = Object(_services_range_service__WEBPACK_IMPORTED_MODULE_0__[\"wrapRangeWithElement\"])(\"a\");\n let newURL = [];\n const Atag = Object(_services_link_service__WEBPACK_IMPORTED_MODULE_9__[\"createTempLinkElement\"])(href);\n let _href = Object(_services_link_service__WEBPACK_IMPORTED_MODULE_9__[\"resetURL\"])(href.trim());\n\n let _protocol = protocol.trim() || Atag.protocol;\n let _target = null;\n const testTarget = _services_link_service__WEBPACK_IMPORTED_MODULE_9__[\"TARGETS\"][target.trim().toLowerCase()];\n if (testTarget) {\n _target = testTarget;\n }\n if (_protocol.trim()) {\n _protocol = setProtocol(_protocol, newURL);\n }\n if (_href) {\n newURL.push(_href);\n }\n const renderedLink = newURL.join(\"\");\n unwrapAtags(linkElements);\n setTargetToTag(linkElements, renderedLink, _target);\n const { firstFlag, lastFlag } = Object(_services_range_service__WEBPACK_IMPORTED_MODULE_0__[\"setSelectionFlags\"])(linkElements[0], linkElements[linkElements.length - 1]); //Set Flag at last\n Object(_services_range_service__WEBPACK_IMPORTED_MODULE_0__[\"setSelectionBetweenTwoNodes\"])(firstFlag, lastFlag);\n linkElements.forEach(aTag=>{\n Object(_services_textEditor_service__WEBPACK_IMPORTED_MODULE_4__[\"normalizeElement\"])(aTag.parentElement);// merge siblings and parents with child as possible.. \n })\n }", "function sanearEnlaces(){\n\t\tvar a = find(\"//a[@href='#']\", XPList);\n\t\tfor (var i = 0; i < a.snapshotLength; i++) a.snapshotItem(i).href = 'javascript:void(0)';\n\t}", "function m(e){return e.href.replace(/#.*/,\"\")}", "function openlink(upperCase){\n clickAnchor(upperCase,getItem(\"link\"));\n}", "function sanearEnlaces(){\r\n\t\tvar a = find(\"//a[@href='#']\", XPList);\r\n\t\tfor (var i = 0; i < a.snapshotLength; i++) a.snapshotItem(i).href = 'javascript:void(0)';\r\n\t}", "function editEndpointAnchorsHref($node) {\n // Get data\n var pluginData = getElasticSearchData($node);\n // Loop trough links\n $(pluginData.settings.endpointAnchorTarget).each(function () {\n // Store element\n $anchor = $(this);\n // If not active\n var anchorEndpoint = getQueryString(pluginData.settings.endpointQueryParam, $anchor.attr(\"href\"));\n if (anchorEndpoint !== endpoint) {\n // Check for cookie\n var cookieValue = getElasticSearchCookie(pluginData.settings.cookiePrefix + anchorEndpoint);\n // If cookie value is defined\n if (cookieValue !== null && cookieValue !== \"\") {\n // Update href\n $anchor.attr(\"href\", $anchor.attr(\"href\") + cookieValue);\n }\n }\n });\n }", "function checkLink() {\n var href = this.href;\n if (pattern.test(href)) {\n // Show context menu on right click\n $(this).bind('contextmenu', function(e) {\n targetHref = href;\n $('#gview-cmenu').removeClass('gview-hidden').css(\n {'left':e.pageX, 'top':e.pageY})[0].focus();\n return false;\n });\n // Rewrite link\n this.href = VIEWER_URL + encodeURIComponent(href);\n provideMenu = true;\n }\n}", "function refreshHash() {\n navbox.find('a[href=\"'+window.location.hash+'\"]').tab('show');\n }", "click(e){\r\n if ( this.url ){\r\n bbn.fn.link(this.url);\r\n }\r\n else{\r\n this.$emit('click', e);\r\n }\r\n }", "navigateHyperlink() {\n let fieldBegin = this.getHyperlinkField();\n if (fieldBegin) {\n this.fireRequestNavigate(fieldBegin);\n }\n }", "['click .method-container a'](e, $el) {\n\t\tToc.goToHash($el.attr('href'));\n\t}", "function checkHash() {\n var hash = window.location.hash;\n if (hash) {\n hash = hash.replace(/^#/, '');\n var title, tagString, type, args;\n args = hash.split('/');\n if (args.length == 4) {\n args[2] = args.slice(2).join('/');\n args.pop();\n }\n $.each(args, function(index, arg) {\n args[index] = decodeURIComponent(arg);\n });\n title = args[0] || emptyEdit();\n tagString = args[1] || '';\n type = args[2] || '';\n startEdit(title, tagString, type);\n } else {\n emptyEdit();\n }\n}", "function makeUrlChangeShowNote() {\n window.addEventListener(\"hashchange\", showNoteForCurrentPage);\n }", "function makeOrChangeLink()\n{\n var dom = dw.getDocumentDOM(); \n\n if (typeof dom[\"setLinkHref\"] != 'undefined') //CONTRIBUTE ALERT\n dom.setLinkHref();\n}", "function onClick(link){\n \n}", "function relocateHash(data) {\n location.href = \"#\"+data\n }", "function hashchange(){\n\t\tgoTo(location.hash, false);\n\t}", "function click(e) {\n //prevent all default clicks.\n //e.preventDefault();\n\n if (this.href.indexOf(\"_jcr_content\") === -1 && this.href.indexOf(\"jcr:content\") === -1) {\n var asynchronousPath = $(Cru.components.searchresults.className).data(\"asynchronous-path\");\n var a = $('<a>', { href:asynchronousPath } )[0];\n var path = a.href.split(\"/jcr:content\")[0];\n var selectors = this.href.split(path).pop();\n\n Cru.components.searchresults.refresh(asynchronousPath + selectors);\n } else {\n Cru.components.searchresults.refresh(this.href);\n }\n }", "function onPreviewLinkClicked(event) {\n\n var url = event.target.getAttribute('href');\n if (url) {\n openPreview(url);\n event.preventDefault();\n }\n\n }", "loadUrl(fragment) {\n fragment = this.fragment = this.location.pathname\n this.onLoadUrl && this.onLoadUrl(fragment, this.location.search)\n }", "function updateUrlFragment() {\n window.history.replaceState(null, '', '#' + (currentSlideNumber + 1))\n}", "function updateUrlFragment() {\n window.history.replaceState(null, '', '#' + (currentSlideNumber + 1))\n}", "function hashChange(first) {\n\tif (isFullscreenSidebar() && flags.mobileSidebar) {\n\t\ttoggleSidebar()\n\t}\n\tvar fragment = getPath()\n\t// append # to the end of fragment links,\n\t// and it will be removed, so every time you clikc the link it will scroll\n\tif (fragment[2] == \"\") {\n\t\tsilentSetFragment(location.hash.slice(0,-1))\n\t}\n\tif (currentPath == fragment[0]) {\n\t\tscrollTo(fragment[1])\n\t} else {\n\t\tcurrentPath = fragment[0]\n\t\tnavigateTo(fragment[0], first, function() {\n\t\t\tscrollTo(fragment[1])\n\t\t}, fragment[1])\n\t}\n}", "function updateLink(node, opts) {\n \tlet href = opts.href || node.getAttribute(\"href\");\n\n \t// Destination must start with '/' or '#/'\n \tif (href && href.charAt(0) == \"/\") {\n \t\t// Add # to the href attribute\n \t\thref = \"#\" + href;\n \t} else if (!href || href.length < 2 || href.slice(0, 2) != \"#/\") {\n \t\tthrow Error(\"Invalid value for \\\"href\\\" attribute: \" + href);\n \t}\n\n \tnode.setAttribute(\"href\", href);\n\n \tnode.addEventListener(\"click\", event => {\n \t\t// Prevent default anchor onclick behaviour\n \t\tevent.preventDefault();\n\n \t\tif (!opts.disabled) {\n \t\t\tscrollstateHistoryHandler(event.currentTarget.getAttribute(\"href\"));\n \t\t}\n \t});\n }", "function fixAbsRefRendering()\n{\t\n\tvar table = document.getElementById('prerendered');\n\tvar anchors = table.getElementsByTagName('a');\n\tfor (var i = 1; i < anchors.length; i++)\n\t{\n\t\tif(anchors[i].href !=\"\") \n\t\t{\t\t\n\t\t\tapplyAbsRefStyleCorrection(anchors[i]);\n\t\t\t\n\t\t}\n\t}\n}", "handleAddLink(target, url) {\n const { editorState, isDirty } = this.state;\n const { delegate } = this.props;\n this.setState(() => ({\n editorState: createLinkAtSelection(editorState, target, url),\n }), () => {\n if (!isDirty) {\n delegate.handleDirtyEditor();\n }\n });\n }", "set anchor(value) {}", "function updateLink(node, opts) {\n \tlet href = opts.href || node.getAttribute('href');\n\n \t// Destination must start with '/' or '#/'\n \tif (href && href.charAt(0) == '/') {\n \t\t// Add # to the href attribute\n \t\thref = '#' + href;\n \t} else if (!href || href.length < 2 || href.slice(0, 2) != '#/') {\n \t\tthrow Error('Invalid value for \"href\" attribute: ' + href);\n \t}\n\n \tnode.setAttribute('href', href);\n\n \tnode.addEventListener('click', event => {\n \t\t// Prevent default anchor onclick behaviour\n \t\tevent.preventDefault();\n\n \t\tif (!opts.disabled) {\n \t\t\tscrollstateHistoryHandler(event.currentTarget.getAttribute('href'));\n \t\t}\n \t});\n }", "function replaceParams() {\n var href = $(this).attr(\"href\") || $(this).serialize()\n href = PlaceGuide.cleanParamString(href)\n var state = href.match(/[\\?\\&]/) ? $.deparam.querystring(href) : {}\n $.bbq.pushState(state, PlaceGuide.REPLACE_EXISTING)\n return false\n }", "function handleClickedLink( url, view ) {\n\t// return true if the link was handled or to prevent other plugins or Colloquy from handling it\n\treturn false;\n}", "function togglePostURL() {\n $(\".cmb2-id--w-link-info, .cmb2-id--w-post-link\").toggle($(\"#post-format-link\").is(\":checked\"));\n tabsChanged();\n }", "redirect(e) {\n var curLink = e.currentTarget.innerText;\n var campus = this.props.campus.city;\n switch (curLink) {\n case \"Campuses\": hashHistory.replace(\"/\"); break;\n case \"Apartments\": hashHistory.replace(\"/apartments/\" + campus); break;\n case \"Waitlist\": hashHistory.replace(\"/waitlist\"); break;\n case \"Work Orders\": hashHistory.replace(\"/workorders\"); break;\n case \"Tour/FAQ\": hashHistory.replace(\"/portaladmin\"); break;\n case \"Portal\": hashHistory.replace(\"/portal\"); break;\n case \"Tour\": hashHistory.replace(\"/tour\"); break;\n case \"FAQ\": hashHistory.replace(\"/faq\"); break;\n default: break;\n }\n }", "function setHref(lnk,q){\n\turl = DBEDIT_MODULE_URL +\"&dba=118\";\n\tDBEDIT_TABLE_NAME = (dbObject.tableName)?dbObject.tableName:DBEDIT_TABLE_NAME;\n\tif(!DBEDIT_TABLE_NAME && !DBEDIT_DB_ID) return false;\n\turl+= (DBEDIT_DB_ID)?'&db='+DBEDIT_DB_ID:'';\n\turl+= (DBEDIT_TABLE_NAME) ? '&tbl='+DBEDIT_TABLE_NAME : '';\n\turl+= q;\n\tlnk.set({'href':url});\n}", "function linkhandler(a){\n\ta.href=\"?\" + a.href.split(\"?\")[1];\n\tvar val = '&arduino_address=' + $(\"#arduino_address\").val();\t\n\t\n\ta.href=a.href + val;\n\ta.href = a.href.replace(val+val,val);\n}", "function fnVoltarLink() {\r\n\tvar oLink = document.links[0];\r\n\toLink.innerHTML = \"Pegar Feeds\";\r\n\toLink.className = \"\";\r\n\toLink.onclick = fnGo;\r\n}", "function linkshare() {\r\n fx('pageUrl').fadeIn(250);\r\n fx('bg2').fadeIn(500);\r\n if (!channel.id || !location.hash.split('#!/')[1])changeText(doc.q('#pageUrl input'),'https://youcount.github.io/');\r\n}", "function reloadAndGotoAnchor() {\n window.location.href='/#statistics';\n window.location.reload();\n}", "function removeLink(editor) {\n editor.focus();\n editor.addUndoSnapshot(function (start, end) {\n editor.queryElements('a[href]', 1 /* OnSelection */, roosterjs_editor_dom_1.unwrap);\n editor.select(start, end);\n }, \"Format\" /* Format */);\n}", "function highlight(e) {\n\t\t\n\t\te.preventDefault();\n\t\tnote = document.getElementById(e.toElement.href.slice(-1)); // TODO: Fix the slice arguments (this will break for multiple-digit numbers)\n\t\t\n\t\twindow.location = e.toElement.href;\n\n\t\t// TODO: Add and remove classes properly\n\t\tif (previous !== undefined) {\n\t\t\tprevious.className = \"\";\n\t\t}\n\n\t\tprevious = note;\n\t\t\n\t\tnote.className = \"highlight\"; // Add highlight to corresponding reference TODO: Trim space\n\n\t\tconsole.log(e.toElement.href);\n\t\tconsole.log(note);\n\n\t}", "function anchor_fix() {\n var links = document.getElementsByTagName('A');\n var m;\n var _rg = new RegExp(\"(^|\" + self.location.host + xcart_web_dir + \"/)#([\\\\w\\\\d_]+)$\")\n for (var i = 0; i < links.length; i++) {\n if (links[i].href && (m = links[i].href.match(_rg))) {\n links[i].href = 'javascript:void(self.location.hash = \"' + m[2] + '\");';\n }\n }\n}", "function onAnchorClick(e) { // 756\n var event = e || window.event; // 757\n var target = event.target || event.srcElement; // 758\n var defaultPrevented = \"defaultPrevented\" in event ? event['defaultPrevented'] : event.returnValue === false; // 759\n if (target && target.nodeName === \"A\" && !defaultPrevented) { // 760\n var current = parseURL(); // 761\n var expect = parseURL(target.getAttribute(\"href\", 2)); // 762\n var isEqualBaseURL = current._href.split('#').shift() === expect._href.split('#').shift(); // 763\n if (isEqualBaseURL) { // 764\n if (current._hash !== expect._hash) { // 765\n historyObject.location.hash = expect._hash; // 766\n } // 767\n scrollToAnchorId(expect._hash); // 768\n if (event.preventDefault) { // 769\n event.preventDefault(); // 770\n } else { // 771\n event.returnValue = false; // 772\n } // 773\n } // 774\n } // 775\n } // 776", "function findAnchorLink(){\n\tif (location.href.indexOf('#') != -1) {\n\t\tvar namedAnchor = window.location.hash;\n\t\tvar faqToFind = namedAnchor + ' .faq_question';\n\t\t$(faqToFind).trigger('click');\n\t}\n}", "function changeLinkToHtml() {\n var allLinks = document.querySelectorAll('#'+parameters.cdmContainer+' a');\n allLinks.forEach(function (item) {\n item.setAttribute(\"href\", (item.getAttribute(\"href\"))+\".html\");\n });\n\n }", "function e() {\n window.location = linkLocation;\n}", "function onClick() {return thisObj.load(this.href);}", "function onClick() {return thisObj.load(this.href);}", "function UpdateAnchorsHandler() { }", "function activateLink(e){\n // remove/add .active\n let activeLink = document.getElementsByClassName('active')[0] ? \n document.getElementsByClassName('active')[0] : \n null;\n\n if(activeLink){\n activeLink.removeAttribute('class');\n }\n e.target.setAttribute('class', 'active');\n\n // get the paragraph\n let content = new Content();\n content.getParagraphByIndex(e.target.id);\n\n // change the url in the address bar\n window.history.pushState(\"\", \"\", e.target.id);\n}", "function addUser(e){\n var url=e.getAttribute(\"href\");\n url=url+\"?user=\"+getPageUser();\n console.log(\"New URL\",url);\n e.href=url;\n}", "function tt_OpDeHref(el) {\n if (!tt_op)\n return;\n if (tt_elDeHref)\n tt_OpReHref();\n while (el) {\n if (el.hasAttribute && el.hasAttribute(\"href\")) {\n el.t_href = el.getAttribute(\"href\");\n el.t_stats = window.status;\n el.removeAttribute(\"href\");\n el.style.cursor = \"hand\";\n tt_AddEvtFnc(el, \"mousedown\", tt_OpReHref);\n window.status = el.t_href;\n tt_elDeHref = el;\n break;\n }\n el = tt_GetDad(el);\n }\n}", "change_fragment(new_fragment) {\n if (this.get_fragment_id() != null) {\n let fragment = this.get_fragment();\n fragment.remove_node(this);\n if (fragment.get_contents_size() == 0){\n this.fc.delete_fragment(fragment);\n }\n\n }\n this.set_fragment(new_fragment)\n new_fragment.add_node(this);\n if (this.node_id != 1) {\n this.get_parent_node().update_child(this);\n }\n this.update_children();\n this.notify_fragment_dirty();\n }", "function anchor(url){\n\twindow.location.href= url;\n}", "navigate(fragment, { trigger, replace } = { trigger: true }) {\n if (!STATIC.started) {\n return false\n }\n\n if (this.fragment !== fragment) {\n this.fragment = fragment\n\n this.history[replace ? 'replaceState' : 'pushState']({}, document.title, fragment)\n\n if (trigger) {\n this.loadUrl(fragment.startsWith('/') ? fragment : `/${fragment}`)\n }\n }\n }", "function hackernews_when_loaded (buffer) {\n hackernews_fix_link_rel(buffer);\n}", "function autograb() { // autograbs item (if the item is listed)\r\n\tif (item.snapshotLength > 0) {\r\n\t\titem = item.snapshotItem(0);\r\n\t\tselectedlink = item.previousSibling.previousSibling;\r\n\t\twindow.location = selectedlink;\r\n\t}\r\n}", "function gotoHref(event, url) {\n if (_.isEmpty(url))\n url = $(event.currentTarget).attr('href');\n url = Utils.combineUrl(CourseMeta.actNode.url, url);\n CourseMeta.gotoData(url);\n return false;\n}", "function replaceFragment(trustedUrl, fragment) {\n var urlString = (0, resource_url_impl_1.unwrapResourceUrl)(trustedUrl).toString();\n return (0, resource_url_impl_1.createResourceUrl)(BEFORE_FRAGMENT_REGEXP.exec(urlString)[0] + '#' + fragment);\n}", "function create_fragment$2(ctx) {\n \tlet a;\n \tlet current;\n \tlet dispose;\n \tconst default_slot_template = /*$$slots*/ ctx[16].default;\n \tconst default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[15], null);\n\n \tlet a_levels = [\n \t\t{ href: /*href*/ ctx[0] },\n \t\t{ \"aria-current\": /*ariaCurrent*/ ctx[2] },\n \t\t/*props*/ ctx[1]\n \t];\n\n \tlet a_data = {};\n\n \tfor (let i = 0; i < a_levels.length; i += 1) {\n \t\ta_data = assign(a_data, a_levels[i]);\n \t}\n\n \treturn {\n \t\tc() {\n \t\t\ta = element(\"a\");\n \t\t\tif (default_slot) default_slot.c();\n \t\t\tthis.h();\n \t\t},\n \t\tl(nodes) {\n \t\t\ta = claim_element(nodes, \"A\", { href: true, \"aria-current\": true });\n \t\t\tvar a_nodes = children(a);\n \t\t\tif (default_slot) default_slot.l(a_nodes);\n \t\t\ta_nodes.forEach(detach);\n \t\t\tthis.h();\n \t\t},\n \t\th() {\n \t\t\tset_attributes(a, a_data);\n \t\t},\n \t\tm(target, anchor) {\n \t\t\tinsert(target, a, anchor);\n\n \t\t\tif (default_slot) {\n \t\t\t\tdefault_slot.m(a, null);\n \t\t\t}\n\n \t\t\tcurrent = true;\n \t\t\tdispose = listen(a, \"click\", /*onClick*/ ctx[5]);\n \t\t},\n \t\tp(ctx, [dirty]) {\n \t\t\tif (default_slot && default_slot.p && dirty & /*$$scope*/ 32768) {\n \t\t\t\tdefault_slot.p(get_slot_context(default_slot_template, ctx, /*$$scope*/ ctx[15], null), get_slot_changes(default_slot_template, /*$$scope*/ ctx[15], dirty, null));\n \t\t\t}\n\n \t\t\tset_attributes(a, get_spread_update(a_levels, [\n \t\t\t\tdirty & /*href*/ 1 && { href: /*href*/ ctx[0] },\n \t\t\t\tdirty & /*ariaCurrent*/ 4 && { \"aria-current\": /*ariaCurrent*/ ctx[2] },\n \t\t\t\tdirty & /*props*/ 2 && /*props*/ ctx[1]\n \t\t\t]));\n \t\t},\n \t\ti(local) {\n \t\t\tif (current) return;\n \t\t\ttransition_in(default_slot, local);\n \t\t\tcurrent = true;\n \t\t},\n \t\to(local) {\n \t\t\ttransition_out(default_slot, local);\n \t\t\tcurrent = false;\n \t\t},\n \t\td(detaching) {\n \t\t\tif (detaching) detach(a);\n \t\t\tif (default_slot) default_slot.d(detaching);\n \t\t\tdispose();\n \t\t}\n \t};\n }", "get href(){return $href;}", "get href(){return $href;}", "function openLinkDialog() {\n const node = tinymce.activeEditor.selection.getNode();\n const href = node.getAttribute('href');\n\n if (href) {\n editor.execCommand(TinyMCEActionRegistrar.getEditorCommandFromUrl(href));\n }\n }", "function checkAnchor(){\r\n\t//Check if it has changes\r\n\tif(currentAnchor != document.location.hash){\r\n\t\tcurrentAnchor = document.location.hash;\r\n\t\t//if there is not anchor, the loads the default section\r\n\t\tif(!currentAnchor)\r\n\t\t\tquery = \"section=myProfile\";\r\n\t\telse\r\n\t\t{\r\n\t\t\t//Creates the string callback. This converts the url URL/#main&id=2 in URL/?section=main&id=2\r\n\t\t\tvar splits = currentAnchor.substring(1).split('&');\r\n\t\t\t//Get the section\r\n\t\t\tvar section = splits[0];\r\n\t\t\tdelete splits[0];\r\n\t\t\t//Create the params string\r\n\t\t\tvar params = splits.join('&');\r\n\t\t\tvar query = \"section=\" + section + params;\r\n\t\t}\r\n\t\t//Send the petition\r\n\t\t$.get(\"callbacks.php\",query, function(data){\r\n\t\t\t$(\"#main\").html(data);\r\n\t\t});\r\n\t}\r\n}", "function updateDropDownAnchor(section)\n {\n // Label\n $('span.label', drop_down_anchor).html(section.label);\n\n // Href\n drop_down_anchor.attr('href', '#' + section.id);\n }", "function changeUrls() {\n let selectAtoChange = document.querySelector(\"main a\")\n selectAtoChange.removeAttribute(\"href\")\n selectAtoChange.setAttribute(\"href\",\"https://www.google.com\")\n selectAtoChange.innerText = \"Now this link goes to Google, Strivers!\"\n }", "function onPopAndStart(){\n var l = location.href;\n //http://localhost/.../hash\n var pageName = l.substring(l.lastIndexOf(\"/\")+1);\n // if no pageName set pageName to false\n pageName = pageName || false;\n switchToSection(pageName);\n }", "function handleClick(e) {\n if (e.target.nodeName === \"A\") {\n e.preventDefault();\n console.log(\"markdown link click\")\n if (e.target.href) {\n const url = new URL(e.target.href);\n //if it is an internal link, push to history so page doesnt refresh\n if (url.hostname.indexOf(\".hotter.com\") > -1 || url.hostname === \"localhost\" || url.hostname.indexOf(\"hotter-amplience-poc.herokuapp.com\") > -1) {\n history.push(e.target.pathname);\n } else {\n //otherwise open new tab\n window.open(url.href, \"_blank\")\n }\n }\n }\n}", "function fixLink(elm) {\n let link = elm.href.replace('xxxxxxxxxxxxxxxxxxxx', localStorage.myPlexAccessToken);\n let shadowDOM = elm.parentNode.attachShadow({ mode: 'closed' });\n elm.remove();\n elm.href = link;\n\n let styleSheets = document.querySelectorAll('link[rel=\"stylesheet\"]');\n for (let ss of styleSheets) {\n shadowDOM.appendChild(ss.cloneNode());\n }\n\n shadowDOM.appendChild(elm);\n}", "function LinkAdaptatorToModifyBook(id) \r\n{\r\n\tvar a = document.getElementById(id); \r\n\tif (confirm('Do you want to modify the following book : '+ a.id )) {\r\n\t\ta = \"ModifyBook?idModify=\"+a.id;\r\n\t\twindow.location.replace(a);\r\n\t}\r\n\r\n}", "function navigateLink(ev){\n /*\n this is an event handler for navigation for the varius pages.\n it will load the page using ajax. create push state in history and\n change the url to match new page. It will call function to display\n loading gif while waiting for a response from the server\n */\n var link_elem;\n ev.preventDefault();\n toggleLoadingGif(true);\n if(ev.target.nodeName == \"A\"){\n link_elem = ev.target;\n } else {\n link_elem = ev.target.parentElement;\n }\n state_obj.page = link_elem.getAttribute(\"data-link\");\n var params = {};\n params.method = \"GET\";\n params.url = \"/section/\"+state_obj.page;\n params.data = null;\n params.setHeader = false;\n ajaxRequest(params, navigationResponse);\n }", "function m_tt_OpDeHref(el)\n{\n\tif(!m_tt_op)\n\t\treturn;\n\tif(m_tt_elDeHref)\n\t\tm_tt_OpReHref();\n\twhile(el)\n\t{\n\t\tif(el.hasAttribute(\"href\"))\n\t\t{\n\t\t\tel.t_href = el.getAttribute(\"href\");\n\t\t\tel.t_stats = window.status;\n\t\t\tel.removeAttribute(\"href\");\n\t\t\tel.style.cursor = \"hand\";\n\t\t\tm_tt_AddEvtFnc(el, \"mousedown\", m_tt_OpReHref);\n\t\t\twindow.status = el.t_href;\n\t\t\tm_tt_elDeHref = el;\n\t\t\tbreak;\n\t\t}\n\t\tel = el.parentElement;\n\t}\n}" ]
[ "0.65636873", "0.6541271", "0.648164", "0.6408295", "0.63244", "0.62536347", "0.6221268", "0.6210001", "0.6202181", "0.61882466", "0.6112521", "0.6107851", "0.60569245", "0.60199714", "0.5981198", "0.5963247", "0.59495384", "0.5942643", "0.59400046", "0.5935999", "0.5907381", "0.587058", "0.5858342", "0.58356595", "0.5797266", "0.57956874", "0.5788785", "0.5780975", "0.5780975", "0.5780975", "0.5751431", "0.5747656", "0.5733871", "0.57334816", "0.5725114", "0.57034403", "0.5696972", "0.5684007", "0.56832504", "0.56723475", "0.5662372", "0.56602335", "0.5660081", "0.56524724", "0.56440985", "0.564093", "0.5628089", "0.56204015", "0.5613445", "0.5605628", "0.55901337", "0.55901337", "0.5588253", "0.5588067", "0.55679995", "0.55661124", "0.5561871", "0.5558091", "0.55576813", "0.55537105", "0.5553463", "0.5540626", "0.5533985", "0.5519936", "0.5516611", "0.54934996", "0.5492289", "0.5491797", "0.5485238", "0.5481058", "0.5478859", "0.5468231", "0.54647917", "0.5464155", "0.5462535", "0.5462535", "0.5451604", "0.54479194", "0.5447441", "0.5435984", "0.54320604", "0.5421538", "0.54182446", "0.5416992", "0.5413473", "0.5411746", "0.54108495", "0.54076546", "0.5406227", "0.5406227", "0.5405944", "0.5402152", "0.53917444", "0.5384956", "0.53786963", "0.53783727", "0.53778714", "0.5375913", "0.53748506", "0.5356439" ]
0.63842475
4
Initialize the submenu HTML element.
initMenu() { let menuGroups = this._items.map(menuGroup => { let items = menuGroup.map(menuItem => { let item = HTMLBuilder.li("", "menu-item"); item.html(menuItem.label); if (menuItem.action) { item.data("action", menuItem.action) .click(e => { if (!item.hasClass("disabled")) { this.controller.doAction(menuItem.action); this.closeAll(); } }); let shortcut = this.controller.shortcutCommands[menuItem.action]; if (shortcut) { HTMLBuilder.span("", "hint") .html(convertShortcut(shortcut)) .appendTo(item); } } if (menuItem.submenu) { let submenu = new this.constructor(this, item, menuItem.submenu); item.addClass("has-submenu").mouseenter(e => { if (!item.hasClass("disabled")) { this.openSubmenu(submenu); } }); this._submenus.push(submenu); } item.mouseenter(e => { if (this._activeSubmenu && item !== this._activeSubmenu.parentItem) { this.closeSubmenus(); } }); this.makeItem(item, menuItem); return item; }); return HTMLBuilder.make("ul.menu-group").append(items); }); this._menu = HTMLBuilder.div(`submenu ${this.constructor.menuClass}`, menuGroups); // make sure submenus appear after the main menu this.attach(); this._submenus.forEach(submenu => { submenu.attach(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_init() {\n var subs = this.$element.find('li.is-dropdown-submenu-parent');\n this.$element.children('.is-dropdown-submenu-parent').children('.is-dropdown-submenu').addClass('first-sub');\n\n this.$menuItems = this.$element.find('[role=\"menuitem\"]');\n this.$tabs = this.$element.children('[role=\"menuitem\"]');\n this.$tabs.find('ul.is-dropdown-submenu').addClass(this.options.verticalClass);\n\n if (this.$element.hasClass(this.options.rightClass) || this.options.alignment === 'right' || Foundation.rtl() || this.$element.parents('.top-bar-right').is('*')) {\n this.options.alignment = 'right';\n subs.addClass('opens-left');\n } else {\n subs.addClass('opens-right');\n }\n this.changed = false;\n this._events();\n }", "function createInitializedSubmenus(self) {\n var submenus = self.element.find('oj-menu:not(.oj-menu-submenu)');\n\n for (var i = 0; i < submenus.length; i++) {\n // element might not be upgraded so just toggle its visibility and wait to be upgraded\n $(submenus[i]).attr('aria-hidden', 'true').hide();\n var busyContext = Context.getContext(submenus[i]).getBusyContext();\n busyContext.whenReady().then(function (submenu) {\n submenu.refresh();\n }.bind(self, submenus[i]));\n }\n }", "_init() {\n this.$element.find('[data-submenu]').not('.is-active').slideUp(0);//.find('a').css('padding-left', '1rem');\n this.$element.attr({\n 'role': 'menu',\n 'aria-multiselectable': this.options.multiOpen\n });\n\n this.$menuLinks = this.$element.find('.is-accordion-submenu-parent');\n this.$menuLinks.each(function(){\n var linkId = this.id || Foundation.GetYoDigits(6, 'acc-menu-link'),\n $elem = $(this),\n $sub = $elem.children('[data-submenu]'),\n subId = $sub[0].id || Foundation.GetYoDigits(6, 'acc-menu'),\n isActive = $sub.hasClass('is-active');\n $elem.attr({\n 'aria-controls': subId,\n 'aria-expanded': isActive,\n 'role': 'menuitem',\n 'id': linkId\n });\n $sub.attr({\n 'aria-labelledby': linkId,\n 'aria-hidden': !isActive,\n 'role': 'menu',\n 'id': subId\n });\n });\n var initPanes = this.$element.find('.is-active');\n if(initPanes.length){\n var _this = this;\n initPanes.each(function(){\n _this.down($(this));\n });\n }\n this._events();\n }", "function initMenu() {\n\n //removeSelectedClassForMenu();\n\n //$('.sub-menu > .sub-menu__item').eq(selectedIndex).addClass('sub-menu__item--active', 'active');\n \n }", "function init(target, data) {\n $.each(data, function (i, item) {\n var li = $('<li></li>');\n var a = $('<a></a>');\n var icon = $('<i></i>');\n icon.addClass(\"menu-icon \").addClass(item.icon);\n var text = $('<span></span>');\n text.addClass('menu-text').text(\" \" + item.name);\n a.append(icon);\n a.append(text);\n if (item.subMenus && item.subMenus.length > 0) {\n var subMenuId = \"submenu_\" + i;\n a.attr('href', '#' + subMenuId);\n a.addClass('dropdown-toggle');\n var arrow = $('<b></b>');\n arrow.addClass('arrow').addClass('fa fa-angle-down');\n a.append(arrow);\n li.append(a);\n var menus = $('<ul></ul>');\n menus.id = subMenuId;\n menus.addClass('submenu');\n init(menus, item.subMenus);\n li.append(menus);\n }\n else {\n var id = 'menu_' + item.id;\n var href = 'javascript:addTabs({id:\\'' + item.id + '\\',title: \\'' + item.name + '\\',close: true,url: \\'' + ctx + item.url + '\\',target:\\'' + id + '\\'});';\n a.attr('href', href);\n a.attr('id', id);\n li.append(a);\n }\n target.append(li);\n });\n }", "function init() {\n let menu = $E('menu', {\n id: kUI.prefMenu.id,\n label: kUI.prefMenu.label,\n accesskey: kUI.prefMenu.accesskey\n });\n\n if (kSiteList.length) {\n let popup = $E('menupopup');\n\n $event(popup, 'command', onCommand);\n\n kSiteList.forEach(({name, disabled}, i) => {\n let menuitem = popup.appendChild($E('menuitem', {\n label: name + (disabled ? ' [disabled]' : ''),\n type: 'checkbox',\n checked: !disabled,\n closemenu: 'none'\n }));\n\n menuitem[kDataKey.itemIndex] = i;\n });\n\n menu.appendChild(popup);\n }\n else {\n $E(menu, {\n tooltiptext: kUI.prefMenu.noSiteRegistered,\n disabled: true\n });\n }\n\n $ID('menu_ToolsPopup').appendChild(menu);\n }", "_init() {\n this.$submenuAnchors = this.$element.find('li.is-drilldown-submenu-parent').children('a');\n this.$submenus = this.$submenuAnchors.parent('li').children('[data-submenu]');\n this.$menuItems = this.$element.find('li').not('.js-drilldown-back').attr('role', 'menuitem').find('a');\n this.$element.attr('data-mutate', (this.$element.attr('data-drilldown') || Foundation.GetYoDigits(6, 'drilldown')));\n\n this._prepareMenu();\n this._registerEvents();\n\n this._keyboardEvents();\n }", "function menuSetup() {\n\t\t\tmenu.classList.remove(\"no-js\");\n\n\t\t\tmenu.querySelectorAll(\"ul\").forEach((submenu) => {\n\t\t\t\tconst menuItem = submenu.parentElement;\n\n\t\t\t\tif (\"undefined\" !== typeof submenu) {\n\t\t\t\t\tlet button = convertLinkToButton(menuItem);\n\n\t\t\t\t\tsetUpAria(submenu, button);\n\n\t\t\t\t\t// bind event listener to button\n\t\t\t\t\tbutton.addEventListener(\"click\", toggleOnMenuClick);\n\t\t\t\t\tmenu.addEventListener(\"keyup\", closeOnEscKey);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "initialize() {\n super.initialize();\n\n this.dom.menu.setAttribute(\"role\", \"menubar\");\n\n this.createChildElements(Menubar);\n this.handleFocus();\n this.handleClick();\n if (this.isHoverable) this.handleHover();\n this.handleKeydown();\n this.handleKeyup();\n\n this.elements.menuItems[0].dom.link.tabIndex = 0;\n }", "_initMenu() {\n this.menu.parentMenu = this.triggersSubmenu() ? this._parentMenu : undefined;\n this.menu.direction = this.dir;\n this._setMenuElevation();\n this._setIsMenuOpen(true);\n this.menu.focusFirstItem(this._openedBy || 'program');\n }", "function pageSubmenuInit() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('.page-submenu[data-sticky=\"true\"]').length > 0 && $('#nectar_fullscreen_rows').length == 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Remove outside of column setups \r\n\t\t\t\t\t\tif ($('.page-submenu').parents('.span_12').find('> .wpb_column').length > 1) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvar pageMenu = $('.page-submenu').clone(),\r\n\t\t\t\t\t\t\tpageMenuParentRow = $('.page-submenu').parents('.wpb_row');\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$('.page-submenu').remove();\r\n\t\t\t\t\t\t\tpageMenuParentRow.before(pageMenu);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar sticky = new Waypoint.Sticky({\r\n\t\t\t\t\t\t\telement: $('.page-submenu[data-sticky=\"true\"]')[0]\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Adjust to be higher.\r\n\t\t\t\t\tif ($('#nectar_fullscreen_rows').length == 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('.page-submenu')\r\n\t\t\t\t\t\t\t.parents('.wpb_row')\r\n\t\t\t\t\t\t\t.css('z-index', 10000);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Bind events.\r\n\t\t\t\t\t$('.page-submenu .mobile-menu-link').on('click', function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).parents('.page-submenu')\r\n\t\t\t\t\t\t\t.find('ul')\r\n\t\t\t\t\t\t\t.stop(true)\r\n\t\t\t\t\t\t\t.slideToggle(350);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.page-submenu ul li a').on('click', function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('body.mobile').length > 0) {\r\n\t\t\t\t\t\t\t$(this).parents('.page-submenu')\r\n\t\t\t\t\t\t\t\t.find('ul')\r\n\t\t\t\t\t\t\t\t.stop(true)\r\n\t\t\t\t\t\t\t\t.slideToggle(350);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function initialize() {\n activateMenus();\n}", "function initMenu(){\n\toutlet(4, \"vpl_menu\", \"clear\");\n\toutlet(4, \"vpl_menu\", \"append\", \"properties\");\n\toutlet(4, \"vpl_menu\", \"append\", \"help\");\n\toutlet(4, \"vpl_menu\", \"append\", \"rename\");\n\toutlet(4, \"vpl_menu\", \"append\", \"expand\");\n\toutlet(4, \"vpl_menu\", \"append\", \"fold\");\n\toutlet(4, \"vpl_menu\", \"append\", \"---\");\n\toutlet(4, \"vpl_menu\", \"append\", \"duplicate\");\n\toutlet(4, \"vpl_menu\", \"append\", \"delete\");\n\n\toutlet(4, \"vpl_menu\", \"enableitem\", 0, myNodeEnableProperties);\n\toutlet(4, \"vpl_menu\", \"enableitem\", 1, myNodeEnableHelp);\n outlet(4, \"vpl_menu\", \"enableitem\", 3, myNodeEnableBody);\t\t\n outlet(4, \"vpl_menu\", \"enableitem\", 4, myNodeEnableBody);\t\t\n}", "function addSubMenus(parentItem, isSubTree) { var submenuHtml = \"\"; if (parentItem.items != undefined && parentItem.items.length > 0) { if (parentItem.type == \"link-list-image\") { submenuHtml += \"<ul class=\\\"mm-product-list\\\">\"; jQueryBuddha.each(parentItem.items, function (pos, subitem) { var href = (subitem.id != undefined && schemaLinksJSON[subitem.link] && schemaLinksJSON[subitem.link][subitem.id]) ? schemaLinksJSON[subitem.link][subitem.id] : schemaLinksJSON[subitem.link]; var useOnClick = \"\"; if (window.self == window.top || (window.self !== window.top && window.name == \"mega-menu-iframe\")) { useOnClick = \"onclick=\\\"return mmGoToPage(this)\\\"\"; } if (subitem.link == \"product\" || subitem.link == \"collection\" || subitem.link == \"article\") { var image = \"\"; if (subitem.link == \"product\" && productImages[subitem.id] != undefined && productImages[subitem.id].indexOf(\"no-image\") == -1) { image = \"<div class=\\\"mm-list-image\\\"><a data-href=\\\"\" + href + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \"\\\"><img src=\\\"\" + productImages[subitem.id] + \"\\\"></a></div>\"; } else if (subitem.link == \"collection\" && collectionImages[subitem.id] != undefined && collectionImages[subitem.id].indexOf(\"no-image\") == -1) { image = \"<div class=\\\"mm-list-image\\\"><a data-href=\\\"\" + href + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \"\\\"><img src=\\\"\" + collectionImages[subitem.id] + \"\\\"></a></div>\"; \"<div class=\\\"mm-list-image\\\"><img src=\\\"\" + collectionImages[subitem.id] + \"\\\"></div>\"; } else if (subitem.image != undefined) { if (subitem.link == \"article\" && subitem.image.indexOf(\"/articles/\") !== -1 && subitem.image.indexOf(\"_240x\") == -1) { subitem.image = subitem.image.replace(\".jpg\", \"_240x.jpg\").replace(\".png\", \"_240x.png\"); } image = \"<div class=\\\"mm-list-image\\\"><a data-href=\\\"\" + href + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \"\\\"><img src=\\\"\" + subitem.image + \"\\\"></a></div>\"; } else { image = \"<div class=\\\"mm-list-image\\\"></div>\"; } var listInfo = \"\"; if (jQueryBuddha.trim(subitem.name) != \"\") { listInfo = \"<div class=\\\"mm-list-info\\\"><a data-href=\\\"\" + href + \"\\\" class=\\\"mm-product-name\\\" href=\\\"\" + href + \"\\\">\" + subitem.name.replace(/&quot;/g, '\"') + \"</a><br>\"; } if (subitem.link == \"product\" && subitem.id != undefined && prices[subitem.id] != undefined) { listInfo += \"<div class=\\\"mega-menu-prices\\\">\" + prices[subitem.id] + \"</div>\"; } submenuHtml += \"<li>\" + image + listInfo + \"</div>\"; } submenuHtml += \"</li>\"; }); submenuHtml += \"</ul>\"; } else { var subMenuType = (parentItem.type != undefined) ? \" \" + parentItem.type : \"\"; submenuHtml += \"<ul class=\\\"mm-submenu\" + subMenuType + \"\\\">\"; jQueryBuddha.each(parentItem.items, function (pos, subitem) { if (subitem.link == \"no-link\") { var dataHref = \"no-link\"; var href = \"#\"; } else if (subitem.link == \"http\") { var dataHref = subitem.http; var href = subitem.http; } else { var dataHref = (subitem.id != undefined && schemaLinksJSON[subitem.link] && schemaLinksJSON[subitem.link][subitem.id]) ? schemaLinksJSON[subitem.link][subitem.id] : schemaLinksJSON[subitem.link]; var href = (subitem.id != undefined && schemaLinksJSON[subitem.link] && schemaLinksJSON[subitem.link][subitem.id]) ? schemaLinksJSON[subitem.link][subitem.id] : schemaLinksJSON[subitem.link]; } var useOnClick = \"\"; if (window.self == window.top || (window.self !== window.top && window.name == \"mega-menu-iframe\")) { useOnClick = \"onclick=\\\"return mmGoToPage(this)\\\"\"; } if (parentItem.type == \"simple\") { if (subitem.link == \"best-sellers\") { submenuHtml += \"<li><div class=\\\"mega-menu-item-container\\\"><div class=\\\"mm-list-name\\\"><span>\" + subitem.name.replace(/&quot;/g, '\"') + \"</span></div>\" + bestSellersHTML + \"</div>\"; } else if (subitem.link == \"newest-products\") { submenuHtml += \"<li><div class=\\\"mega-menu-item-container\\\"><div class=\\\"mm-list-name\\\"><span>\" + subitem.name.replace(/&quot;/g, '\"') + \"</span></div>\" + newestProductsHTML + \"</div>\"; } else if (subitem.link == \"link-list\") { subitem.type = \"link-list\"; var linkList = addSubMenus(subitem); submenuHtml += \"<li><div class=\\\"mega-menu-item-container\\\"><div class=\\\"mm-list-name\\\"><span>\" + subitem.name.replace(/&quot;/g, '\"') + \"</span></div>\" + linkList + \"</div>\"; } else if (subitem.link == \"link-list-image\") { subitem.type = \"link-list-image\"; var linkListImage = addSubMenus(subitem); submenuHtml += \"<li><div class=\\\"mega-menu-item-container\\\"><div class=\\\"mm-list-name\\\"><span class=\\\"name\\\">\" + subitem.name.replace(/&quot;/g, '\"') + \"</span></div>\" + linkListImage + \"</div>\"; } else { var image = \"\"; if (subitem.link == \"product\" && productImages[subitem.id] != undefined && productImages[subitem.id].indexOf(\"no-image\") == -1) { image = \"<div class=\\\"mm-image-container\\\"><div class=\\\"mm-image\\\"><a data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\"><img src=\\\"\" + productImages[subitem.id] + \"\\\"></a></div></div>\"; } else if (subitem.link == \"collection\" && collectionImages[subitem.id] != undefined && collectionImages[subitem.id].indexOf(\"no-image\") == -1) { image = \"<div class=\\\"mm-image-container\\\"><div class=\\\"mm-image\\\"><a data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\"><img src=\\\"\" + collectionImages[subitem.id] + \"\\\"></a></div></div>\"; } else if (subitem.image != undefined) { if (subitem.link == \"article\" && subitem.image.indexOf(\"/articles/\") !== -1 && subitem.image.indexOf(\"_240x\") == -1) { subitem.image = subitem.image.replace(\".jpg\", \"_240x.jpg\").replace(\".png\", \"_240x.png\"); } image = \"<div class=\\\"mm-image-container\\\"><div class=\\\"mm-image\\\"><a data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\"><img src=\\\"\" + subitem.image + \"\\\"></a></div></div>\"; } var pricesHTML = \"\"; if (subitem.link == \"product\" && subitem.id != undefined && prices[subitem.id] != undefined) { pricesHTML = \"<div class=\\\"mega-menu-prices\\\">\" + prices[subitem.id] + \"</div>\"; } var nameHtml = \"\"; if (jQueryBuddha.trim(subitem.name) != \"\") { nameHtml += \"<a class=\\\"mm-featured-title\\\" data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\">\" + subitem.name.replace(/&quot;/g, '\"') + \"</a>\"; } submenuHtml += \"<li><div class=\\\"mega-menu-item-container\\\">\" + image + nameHtml + pricesHTML + \"</div>\"; } } else if (parentItem.type == \"tree\" || isSubTree) { submenuHtml += \"<li data-href=\\\"\" + dataHref + \"\\\" \" + useOnClick + \"><a data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\">\" + subitem.name.replace(/&quot;/g, '\"') + \"</a>\"; } else { submenuHtml += \"<li><a data-href=\\\"\" + dataHref + \"\\\" href=\\\"\" + href + \"\\\" \" + useOnClick + \" aria-label=\\\"\" + jQueryBuddha(\"<div/>\").html(subitem.name.replace(/&quot;/g, '\"')).text() + \"\\\">\" + subitem.name.replace(/&quot;/g, '\"') + \"</a>\"; } /* set the simple menu type for each tab child */ if (parentItem.type == \"tabbed\") { subitem.type = \"simple\"; } if (subitem.link != \"link-list\" && subitem.link != \"link-list-image\") { if (parentItem.type == \"tree\" || isSubTree) { submenuHtml += addSubMenus(subitem, true); } else { submenuHtml += addSubMenus(subitem, false); } } submenuHtml += \"</li>\"; }); submenuHtml += \"</ul>\"; } } return submenuHtml; }", "function initFromTemplate(item, template) {\n initFromCommon(item, template);\n if (template.submenu !== void 0) {\n item.submenu = menu_1.Menu.fromTemplate(template.submenu);\n }\n}", "function setup_sidebar_menu() {\n\tvar $ = jQuery,\n\t\t$items_with_submenu = public_vars.$sidebarMenu.find('li:has(ul)'),\n\t\tsubmenu_options = {\n\t\t\tsubmenu_open_delay: 0.25,\n\t\t\tsubmenu_open_easing: Sine.easeInOut,\n\t\t\tsubmenu_opened_class: 'opened'\n\t\t},\n\t\troot_level_class = 'root-level',\n\t\tis_multiopen = public_vars.$mainMenu.hasClass('multiple-expanded');\n\n\tpublic_vars.$mainMenu.find('> li').addClass(root_level_class);\n\n\t$items_with_submenu.each(function (i, el) {\n\t\tvar $this = $(el),\n\t\t\t$link = $this.find('> a'),\n\t\t\t$submenu = $this.find('> ul');\n\n\t\t$this.addClass('has-sub');\n\n\t\t$link.click(function (ev) {\n\t\t\tev.preventDefault();\n\n\t\t\tif (!is_multiopen && $this.hasClass(root_level_class)) {\n\t\t\t\tvar close_submenus = public_vars.$mainMenu.find('.' + root_level_class).not($this).find('> ul');\n\n\t\t\t\tclose_submenus.each(function (i, el) {\n\t\t\t\t\tvar $sub = $(el);\n\t\t\t\t\tmenu_do_collapse($sub, $sub.parent(), submenu_options);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!$this.hasClass(submenu_options.submenu_opened_class)) {\n\t\t\t\tvar current_height;\n\n\t\t\t\tif (!$submenu.is(':visible')) {\n\t\t\t\t\tmenu_do_expand($submenu, $this, submenu_options);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmenu_do_collapse($submenu, $this, submenu_options);\n\t\t\t}\n\t\t});\n\n\t});\n\n\t// Open the submenus with \"opened\" class\n\tpublic_vars.$mainMenu.find('.' + submenu_options.submenu_opened_class + ' > ul').addClass('visible');\n\n\t// Well, somebody may forgot to add \"active\" for all inhertiance, but we are going to help you (just in case) - we do this job for you for free :P!\n\tif (public_vars.$mainMenu.hasClass('auto-inherit-active-class')) {\n\t\tmenu_set_active_class_to_parents(public_vars.$mainMenu.find('.active'));\n\t}\n\n\t// Search Input\n\tvar $search_input = public_vars.$mainMenu.find('#search input[type=\"text\"]'),\n\t\t$search_el = public_vars.$mainMenu.find('#search');\n\n\tpublic_vars.$mainMenu.find('#search form').submit(function (ev) {\n\t\tvar is_collapsed = public_vars.$pageContainer.hasClass('sidebar-collapsed');\n\n\t\tif (is_collapsed) {\n\t\t\tif ($search_el.hasClass('focused') == false) {\n\t\t\t\tev.preventDefault();\n\t\t\t\t$search_el.addClass('focused');\n\n\t\t\t\t$search_input.focus();\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t});\n\n\t$search_input.on('blur', function (ev) {\n\t\tvar is_collapsed = public_vars.$pageContainer.hasClass('sidebar-collapsed');\n\n\t\tif (is_collapsed) {\n\t\t\t$search_el.removeClass('focused');\n\t\t}\n\t});\n}", "function initMenu()\r\n{\r\n // a test to avoid some browser like IE4, Opera 6, and IE Mac\r\n if ( browser.isDOM1 \r\n && !( browser.isMac && browser.isIE ) \r\n && !( browser.isOpera && browser.versionMajor < 7 )\r\n && !( browser.isIE && browser.versionMajor < 5 ) )\r\n {\r\n // get some element\r\n var menu = document.getElementById('menu'); // the root element\r\n var lis = menu.getElementsByTagName('li'); // all the li\r\n \r\n // change the class name of the menu, \r\n // it's usefull for compatibility with old browser\r\n menu.className='menu';\r\n \r\n // i am searching for ul element in li element\r\n for ( var i=0; i<lis.length; i++ )\r\n {\r\n // is there a ul element ?\r\n if ( lis.item(i).getElementsByTagName('ul').length > 0 )\r\n { \r\n // improve IE key navigation\r\n if ( browser.isIE )\r\n {\r\n addAnEvent(lis.item(i),'keyup',show);\r\n }\r\n // link events to list item\r\n addAnEvent(lis.item(i),'mouseover',show);\r\n addAnEvent(lis.item(i),'mouseout',timeoutHide);\r\n addAnEvent(lis.item(i),'blur',timeoutHide);\r\n addAnEvent(lis.item(i),'focus',show);\r\n \r\n // add an id to list item\r\n lis.item(i).setAttribute( 'id', \"li\"+i );\r\n }\r\n }\r\n }\r\n}", "function xTreeMenu(sUlId, sMainUlClass, sSubUlClass, sLblLiClass, sItmLiClass, sPlusImg, sMinusImg, sImgClass, sImgWidth) // Object Prototype\r\n{\r\n // Public Property\r\n this.id = sUlId;\r\n // Private Event Listener\r\n function onclick()\r\n {\r\n if (this.xtmChildUL) { // 'this' points to the A element clicked\r\n var s, uls = this.xtmChildUL.style;\r\n if (uls.display != 'block') { // close sub-menu\r\n s = sMinusImg;\r\n uls.display = 'block';\r\n xWalkUL(this.xtmParentUL, this.xtmChildUL,\r\n function(p,li,c,d) {\r\n if (c && c != d && c.style.display != 'none') {\r\n if (sPlusImg) {\r\n var a = xFirstChild(li,'a');\r\n xFirstChild(a,'img').src = sPlusImg;\r\n }\r\n c.style.display = 'none';\r\n }\r\n return true;\r\n }\r\n );\r\n }\r\n else { // open sub-menu\r\n s = sPlusImg;\r\n uls.display = 'none';\r\n }\r\n if (sPlusImg) {\r\n xFirstChild(this,'img').src = s;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n // Constructor Code\r\n var ul = xGetElementById(sUlId);\r\n ul.className = sMainUlClass;\r\n xWalkUL(ul, null,\r\n function(p,li,c) {\r\n var liCls = sItmLiClass;\r\n var a = xFirstChild(li,'a');\r\n if (a) {\r\n var m = 'Click to toggle sub-menu';\r\n if (c) { // this LI is a label which presedes the submenu c\r\n if (sPlusImg) {\r\n // insert the image as the firstChild of the A element\r\n var i = document.createElement('img');\r\n i.title = m;\r\n a.insertBefore(i, a.firstChild);\r\n i.src = sPlusImg;\r\n i.className = sImgClass;\r\n }\r\n liCls = sLblLiClass;\r\n c.className = sSubUlClass;\r\n c.style.display = 'none';\r\n a.title = m;\r\n a.xtmParentUL = p;\r\n a.xtmChildUL = c;\r\n a.onclick = onclick;\r\n }\r\n else if (sPlusImg) { // this LI is not a label but is an item\r\n // if we are inserting images in label As then give A items left padding equal to the image width\r\n a.style.paddingLeft = sImgWidth;\r\n }\r\n }\r\n li.className = liCls;\r\n return true;\r\n }\r\n );\r\n} // end prototype", "init() {\n\t\t\tfetch(this.url)\n\t\t\t\t.then(response => response.json())\n\t\t\t\t.then(data => {\n\t\t\t\t\tlet itemObject = data.items;\n\n\t\t\t\t\t/* Populate nodes */\n\t\t\t\t\treturn itemObject.map(itemObject => {\n\t\t\t\t\t\tlet li = this.createNode('li'),\n\t\t\t\t\t\t\ta = this.createNode('a'),\n\t\t\t\t\t\t\tspan = this.createNode('span'),\n\t\t\t\t\t\t\tinnerHTML = this.createTextNode(itemObject.label);\n\n\t\t\t\t\t\tthis.appendNode(this.id, li).setAttribute('class', 'nav__list-item');\n\n\t\t\t\t\t\tif (itemObject.items.length === 0) {\n\t\t\t\t\t\t\ta.setAttribute('href', itemObject.url);\n\t\t\t\t\t\t\tthis.appendNode(li, a).setAttribute('class', 'nav__list-link');\n\t\t\t\t\t\t\tthis.appendNode(a, innerHTML);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.appendNode(li, span).setAttribute('class', 'nav__list-label nav__chevron-arrow');\n\t\t\t\t\t\t\tthis.appendNode(span, innerHTML);\n\n\t\t\t\t\t\t\tlet subItemObject = itemObject.items;\n\t\t\t\t\t\t\tlet ol = this.createNode('ol');\n\t\t\t\t\t\t\tol.setAttribute('class', 'nav__sub-menu');\n\t\t\t\t\t\t\tthis.appendNode(li, ol);\n\n\t\t\t\t\t\t\tlet buildSubOL = (secondary, ol) => {\n\t\t\t\t\t\t\t\t/* Populate secondary navigation */\n\t\t\t\t\t\t\t\treturn secondary.map(secondary => {\n\t\t\t\t\t\t\t\t\tlet li = this.createNode('li'),\n\t\t\t\t\t\t\t\t\t\ta = this.createNode('a'),\n\t\t\t\t\t\t\t\t\t\tspan = this.createNode('span'),\n\t\t\t\t\t\t\t\t\t\tinnerHTML = this.createTextNode(secondary.label);\n\n\t\t\t\t\t\t\t\t\tthis.appendNode(ol, li).setAttribute('class', 'nav__sublist-item');\n\t\t\t\t\t\t\t\t\ta.setAttribute('href', secondary.url);\n\t\t\t\t\t\t\t\t\tthis.appendNode(li, a).setAttribute('class', 'nav__sublist-link');\n\t\t\t\t\t\t\t\t\tthis.appendNode(a, innerHTML);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tbuildSubOL(subItemObject, ol);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch(function(error) {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}); \n\t\t}", "function init() {\n var menu = new Item();\n menu.submenu = $('#bottomBar ul.menu');\n\n var accountMenuItem = menu.addItem('account', undefined, 'account');\n var settingsMenuItem = menu.addItem('settings', undefined, 'settings');\n var downloadsMenuItem = menu.addItem('downloads',undefined, 'downloads');\n var aboutUsMenuItem = menu.addItem('about_us', undefined, 'aboutus');\n\n /*\n * Accounts\n */\n accountMenuItem.addItem('invitation', account.showInviteDialog);\n if (account.isLoggedIn()) {\n accountMenuItem.addItem('change_login_data', account.editProfile);\n accountMenuItem.addItem('delete_account', account.deleteAccount);\n accountMenuItem.addSeparator();\n var logOutParent = (settings.os === \"web\") ? menu : accountMenuItem;\n logOutParent.addItem('logout', function() {\n sync.fireSync(true);\n }, 'logout');\n } else {\n accountMenuItem.addItem('sign_in', account.showRegisterDialog);\n }\n\n // Language Menu\n var languageMenuItem = settingsMenuItem.addItem('language', undefined, 'language');\n var languages = language.availableLang, languageItem;\n $.each(languages, function(code) {\n languageItem = languageMenuItem.addItem(languages[code].translation);\n languageItem.el.attr(\"class\", code);\n });\n languageMenuItem.el.delegate('li', 'click', function(e) {\n language.setLanguage(e.currentTarget.className);\n });\n\n\n settingsMenuItem.addSeparator();\n settingsMenuItem.addItem('add_item_method', dialogs.openSelectAddItemMethodDialog);\n settingsMenuItem.addItem('switchdateformat', dialogs.openSwitchDateFormatDialog);\n settingsMenuItem.addItem('sidebar_position', dialogs.openSidebarPositionDialog);\n settingsMenuItem.addItem('delete_prompt_menu', dialogs.openDeletePromptDialog);\n\n var isNaturalDateRecognitionEnabled = settings.getInt('enable_natural_date_recognition', 0);\n var enableNaturalDateRecognitionMenuString = 'enable_natural_date_recognition';\n var enableNaturalDateRecognitionMenuItem;\n if (isNaturalDateRecognitionEnabled === 1) {\n enableNaturalDateRecognitionMenuString = 'disable_natural_date_recognition';\n }\n enableNaturalDateRecognitionMenuItem = settingsMenuItem.addItem(enableNaturalDateRecognitionMenuString, function () {\n var isNaturalDateRecognitionEnabled = settings.getInt('enable_natural_date_recognition', 0);\n if (isNaturalDateRecognitionEnabled === 1) {\n settings.setInt('enable_natural_date_recognition', 0);\n enableNaturalDateRecognitionMenuItem.setLabel('enable_natural_date_recognition');\n } else {\n settings.setInt('enable_natural_date_recognition', 1);\n enableNaturalDateRecognitionMenuItem.setLabel('disable_natural_date_recognition');\n }\n });\n settingsMenuItem.addSeparator();\n\n // Reset Window Positions\n settingsMenuItem.addItem('reset_window_size', undefined);\n settingsMenuItem.addItem('reset_note_window', undefined);\n\n // Create Tutorials\n //settingsMenuItem.addItem('create_tutorials', database.recreateTuts);\n\n /*\n * About Wunderlist\n */\n\n aboutUsMenuItem.addItem('knowledge_base', 'http://support.6wunderkinder.com/kb');\n //aboutUsMenuItem.addItem('privacy_policy', 'http://www.6wunderkinder.com');\n aboutUsMenuItem.addItem('wunderkinder_tw', 'http://www.twitter.com/6Wunderkinder');\n aboutUsMenuItem.addItem('wunderkinder_fb', 'http://www.facebook.com/6Wunderkinder');\n aboutUsMenuItem.addSeparator();\n aboutUsMenuItem.addItem('changelog', 'http://www.6wunderkinder.com/wunderlist/changelog');\n aboutUsMenuItem.addItem('backgrounds', dialogs.openBackgroundsDialog);\n aboutUsMenuItem.addItem('about_wunderlist', dialogs.openCreditsDialog);\n aboutUsMenuItem.addItem('about_wunderkinder', 'http://www.6wunderkinder.com/');\n\n\n /*\n * Downloads\n */\n downloadsMenuItem.addItem('iphone', 'http://itunes.apple.com/us/app/wunderlist-to-do-listen/id406644151');\n downloadsMenuItem.addItem('ipad', 'http://itunes.apple.com/us/app/wunderlist-hd/id420670429');\n downloadsMenuItem.addItem('android', 'http://market.android.com/details?id=com.wunderkinder.wunderlistandroid');\n if (settings.os !== 'darwin') {\n downloadsMenuItem.addItem('macosx', 'http://www.6wunderkinder.com/wunderlist/');\n }\n if (settings.os !== 'windows') {\n downloadsMenuItem.addItem('windows', 'http://www.6wunderkinder.com/wunderlist/');\n }\n if (settings.os !== 'linux') {\n downloadsMenuItem.addItem('linux', 'http://www.6wunderkinder.com/wunderlist/');\n }\n }", "fillSubMenu(options, subMenuId, stringStructureRemoved) {\n var subMenu = document.getElementById(subMenuId);\n for (var i = 0; i < options.length; i++) {\n var li = document.createElement(\"li\");\n var a = document.createElement(\"a\");\n li.appendChild(a);\n a.href = options[i];\n a.draggable = true;\n a.title = Utilitary.messageRessource.hoverLibraryElement;\n a.addEventListener(\"click\", (e) => { e.preventDefault(); });\n var dblckickHandler = this.dispatchEventLibrary.bind(this, a.href);\n a.ondblclick = dblckickHandler;\n a.ontouchstart = (e) => { this.dbleTouchMenu(e); };\n a.text = this.cleanNameElement(options[i], stringStructureRemoved);\n subMenu.appendChild(li);\n }\n }", "function CreateSubmenu() {\n //console.log(\"=== CreateSubmenu == \");\n let el_submenu = document.getElementById(\"id_submenu\");\n // hardcode access of system admin, to get access before action 'crud' is added to permits\n const permit_system_admin = (permit_dict.requsr_role_system && permit_dict.usergroup_list.includes(\"admin\"));\n const permit_role_admin = (permit_dict.requsr_role_admin && permit_dict.usergroup_list.includes(\"admin\"));\n\n if (permit_dict.permit_crud_sameschool || permit_dict.requsr_role_admin || permit_dict.permit_crud_otherschool) {\n AddSubmenuButton(el_submenu, loc.Add_user, function() {MUA_Open(\"addnew\")}, [\"tab_show\", \"tab_btn_user\", \"tab_btn_usergroup\", \"tab_btn_allowed\"]);\n };\n if (permit_dict.permit_crud_sameschool) {\n AddSubmenuButton(el_submenu, loc.Add_users_from_prev_year, function() {ModConfirmOpen_AddFromPreviousExamyears()}, [\"tab_show\", \"tab_btn_user\", \"tab_btn_usergroup\", \"tab_btn_allowed\"]);\n AddSubmenuButton(el_submenu, loc.Delete_user, function() {ModConfirmOpen(\"user\",\"delete\")}, [\"tab_show\", \"tab_btn_user\", \"tab_btn_usergroup\", \"tab_btn_allowed\"]);\n AddSubmenuButton(el_submenu, loc.Upload_usernames, function() {MIMP_Open(loc, \"import_username\")}, [\"tab_show\", \"tab_btn_user\", \"tab_btn_usergroup\", \"tab_btn_allowed\"], \"id_submenu_import\");\n\n };\n AddSubmenuButton(el_submenu, loc.Download_user_data, function() {ModConfirmOpen_DownloadUserdata(\"download_userdata_xlsx\")}, [\"tab_show\", \"tab_btn_user\", \"tab_btn_usergroup\", \"tab_btn_allowed\"]);\n\n // hardcode access of system admin`\n if (permit_system_admin){\n AddSubmenuButton(el_submenu, loc.Add_permission, function() {MUPM_Open(\"addnew\")}, [\"tab_show\", \"tab_btn_userpermit\"]);\n AddSubmenuButton(el_submenu, loc.Delete_permission, function() {ModConfirmOpen(\"userpermit\",\"delete\")}, [\"tab_show\", \"tab_btn_userpermit\"]);\n AddSubmenuButton(el_submenu, loc.Download_permissions, null, [\"tab_show\", \"tab_btn_userpermit\"], \"id_submenu_download_perm\", urls.url_download_permits, false); // true = download\n AddSubmenuButton(el_submenu, loc.Upload_permissions, function() {MIMP_Open(loc, \"import_permit\")}, [\"tab_show\", \"tab_btn_userpermit\"], \"id_submenu_import\");\n };\n el_submenu.classList.remove(cls_hide);\n }", "function init() {\n console.log(\"init\");\n //let menuConf = {$menu: document.getElementById('top-nav'), direction: 'horizontal' }\n return new Menu({ $menu: document.getElementById('top-nav'), direction: 'horizontal' });\n}", "function Menu() {\n this.name = 'menu';\n this.init(template, style);\n}", "init( _menus ) {\r\n const self = this;\r\n\r\n if ( ! Array.isArray( _menus ) || ! _menus.length ) {\r\n self.menuError( '[menuHandler] [general] Initialization requires an array of menus to be passed as an argument. see documentation' );\r\n }\r\n\r\n _menus.forEach( function ( _menu ) {\r\n const menuTemplate = {\r\n name: null,\r\n open: null,\r\n close: null,\r\n enterFocus: null,\r\n exitFocus: null,\r\n activeOpen: null,\r\n activeClose: null,\r\n activeEnterFocus: null,\r\n activeExitFocus: null,\r\n container: null,\r\n innerContainer: null,\r\n loop: false,\r\n type: 'menu', // menu, dropdown, popup // TODO: add to README\r\n isOpen: false, // run time\r\n isPinned: false, // run time\r\n isMobile: false, // run time\r\n openDelay: 0,\r\n closeDelay: 0,\r\n debounce: 20,\r\n openOnMouseEnter: false,\r\n transitionDelay: 0, // run time\r\n transitionDuration: 0, // run time\r\n orientation: 'horizontal', // TODO: add to README\r\n direction: null, // TODO: add to README\r\n menuFunc: self.menuFunc,\r\n pin: false,\r\n preventBodyScroll: true,\r\n mobile: {\r\n breakpoint: '667px',\r\n open: null,\r\n close: null,\r\n pin: false,\r\n enterFocus: null,\r\n exitFocus: null,\r\n orientation: 'vertical',\r\n preventBodyScroll: true,\r\n },\r\n on: {\r\n beforeInit: null,\r\n afterInit: null,\r\n beforeOpen: null,\r\n afterOpen: null,\r\n beforeClose: null,\r\n afterClose: null,\r\n beforePinOpen: null,\r\n afterPinOpen: null,\r\n beforePinClose: null,\r\n afterPinClose: null,\r\n },\r\n submenuOptions: {\r\n isEnabled: true,\r\n menuFunc: self.submenuFunc,\r\n openOnMouseEnter: false,\r\n closeOnBlur: true,\r\n closeDelay: 0,\r\n orientation: 'vertical',\r\n closeSubmenusOnOpen: true,\r\n mobile: {\r\n closeOnBlur: true,\r\n closeDelay: 0,\r\n closeSubmenusOnOpen: true,\r\n orientation: 'vertical',\r\n },\r\n on: {\r\n beforeOpen: null,\r\n afterOpen: null,\r\n beforeClose: null,\r\n afterClose: null,\r\n }\r\n },\r\n actions: {},\r\n submenus: {},\r\n };\r\n\r\n if ( ! _menu.name ) {\r\n menuTemplate.name = Math.random().toString( 36 ).substr( 2 ); // create a random menu name from a random number converted to base 36.\r\n } else {\r\n menuTemplate.name = _menu.name;\r\n }\r\n\r\n if ( ! _menu.elements ) {\r\n self.menuError( `[menuHandler] [menu:${menuTemplate.name}] Error: menu elements object is missing` );\r\n }\r\n self.initMenuElements( menuTemplate, _menu.elements );\r\n\r\n if ( _menu.mobile && _menu.mobile.elements ) {\r\n self.initMenuMobileElements( menuTemplate, _menu.mobile.elements );\r\n }\r\n\r\n self.initMenuOptions( menuTemplate, _menu );\r\n\r\n menuTemplate.direction = getComputedStyle( menuTemplate.container ).direction;\r\n\r\n // ! important: in order to find the event and remove it by removeEventListener, \r\n // we need to pass a reference to the function and bind it to the menuHandler object\r\n menuTemplate.toggleMenu = self.toggleMenu.bind( self, menuTemplate );\r\n\r\n if ( self.checkRequiredElement( menuTemplate ) ) {\r\n self.menus.push( menuTemplate );\r\n }\r\n } );\r\n\r\n if ( ! self.menus.length ) {\r\n self.menuError( `[menuHandler] [general] Error: no menus initialized` );\r\n }\r\n\r\n self.initMenus();\r\n }", "function addSubmenu(parentElement, layer, submenu) {\r\n\r\n let container = document.createElement(\"div\");\r\n container.classList.add(\"submenu-container\");\r\n switch(layer) {\r\n case 2: container.classList.add(\"second-layer\");\r\n break;\r\n case 3: container.classList.add(\"third-layer\");\r\n break;\r\n }\r\n parentElement.appendChild(container);\r\n\r\n let item;\r\n let a;\r\n for(let i = 0; i < submenu.length; i++) {\r\n item = document.createElement(\"div\");\r\n item.classList.add(\"submenu-item\");\r\n\r\n a = document.createElement(\"a\");\r\n a.innerText = submenu[i].text;\r\n a.href = submenu[i].href;\r\n\r\n item.appendChild(a);\r\n container.appendChild(item);\r\n\r\n if(submenu[i].submenu != null) {\r\n addSubmenu(item, layer + 1, submenu[i].submenu);\r\n }\r\n\r\n }\r\n\r\n}", "function menuItem () {\n\tthis.id = 0;\n\tthis.startStop = 0;\n\tthis.endStop = 0;\n\tthis.center = {x:0,y:0};\n\tthis.icon = \"\";\n\tthis.text = \"\";\n\tthis.parent = null;\n\tthis.children = [];\n}", "function buildMenu(menu, element) {\n let ul = document.createElement(\"UL\");\n\n for (let i = 0; i < menu.length; i++) {\n\n let li = document.createElement(\"LI\");\n let node_text = document.createTextNode(menu[i].title);\n li.appendChild(node_text);\n\n ul.appendChild(li);\n\n if (!menu[i].disabled) {\n if (menu[i].submenu) {\n buildMenu(menu[i].submenu, li);\n itemBehavior(li, 'submenu');\n }\n if (menu[i].click_handler) itemBehavior(li, 'handler');\n\n }\n\n if (menu[i].disabled) itemBehavior(li, 'disabled');\n\n }\n\n if (element) {\n element.appendChild(ul);\n element.setAttribute(\"class\", \"submenu\");\n }\n\n build_menu = ul;\n }", "#renderMenu() {\n return html`\n <div class=\"collapse navbar-collapse navbar-ex1-collapse admin-side-navbar\" id=\"${this.#divMenu}\">\n <!-- To check the visibility of each menu and submenu item-->\n <ul class=\"nav navbar-nav left\">\n ${\n UtilsNew.getVisibleItems(this._config.menu, this.opencgaSession)\n .map(item => item.submenu && UtilsNew.hasVisibleItems(item.submenu, this.opencgaSession) ? html `\n <li class=\"dropdown open\">\n <!-- CAUTION: href attribute removed. To discuss: toggle open always-->\n <a class=\"dropdown-toggle\" data-toggle=\"dropdown open\"\n role=\"button\" aria-haspopup=\"true\" aria-expanded=\"true\">\n ${item.name} <!-- <span class=\"caret\"></span> -->\n </a>\n <ul class=\"dropdown-menu\" @click=\"${this._onItemNavClick}\">\n ${\n UtilsNew.getVisibleItems(item.submenu, this.opencgaSession)\n .map(subItem => {\n const type = [\"category\", \"separator\"].find(type => type in subItem);\n switch (type) {\n case \"category\":\n return html `\n <li>\n <a class=\"nav-item-category\"\n style=\"cursor:auto!important;\">\n <strong>${subItem.name}</strong>\n </a>\n <!--<p class=\"navbar-text\">$submenuItem.name}</p>-->\n </li>\n `;\n case \"separator\":\n return html `\n <li role=\"separator\" class=\"divider\"></li>\n `;\n default:\n return html `\n <li class=\"nav-item\" data-id=\"${subItem.id}\">\n <!-- TODO: fix for formatting icon | name -->\n <a class=\"nav-link\">${subItem.name}</a>\n </li>\n `;\n }\n })\n }\n </ul>\n </li>\n ` : html `\n <li>TODO: NO SUBMENU</li>\n `)}\n </ul>\n </div>\n `;\n }", "function prepMenu()\n {\n\n navRoot = document.getElementById(\"popupmenu\");\n var items = navRoot.getElementsByTagName('li');\n for (i=0; i<items.length; i++)\n {\n node = items[i];\n if (node.nodeName==\"LI\")\n {\n node.onmouseover = function()\n {\n this.className+=\" over\"; //Show the submenu\n }\n node.onmouseout=function()\n {\n if (this.className.indexOf('pmenu') > 0)\n {\n this.className=\"pmenu\";\n }\n else {\n this.className = \"\";\n }\n }\n }\n }\n }", "function initMenu() {\n // Set up TreeMenu\n App4Sea.TreeMenu.SetUp();\n\n // Set up TreeInfo\n App4Sea.TreeInfo.SetUp();\n\n // Hook events to menu\n $(\"#MenuContainer input[type='checkbox']\").click(() => {\n updateBaseMap();\n });\n $('#MenuContainer select').change(() => {\n updateBaseMap();\n });\n }", "function buildTaskMenu() {\n // figure out which sequence is selected\n var item = $(\"#dropdown option:selected\").attr(\"value\");\n\n // now build the submenu\n var submenu = \"\";\n if (item != -1) {\n // extract each task from the json data\n for (var i = 0; i < jsonData[0].sequences[item].tasks.length; i++) {\n seqData=jsonData[0].sequences[item].tasks[i];\n submenu += \"<div><a class='task' href='#' seq='\"+item+\"' task='\"+i+\"' type='\"+seqData.options.type+\"'>\"+seqData.name+\"</a></div>\\n\";\n }\n }\n $(\"#submenu\").html(submenu);\n\n // define a callback to handle when a task is selected\n $(\".task\").click(loadTask);\n }", "function _init() {\n var self = this\n ;\n //i18n.translate(self['parent'][0]);\n try {\n self['items'] = [];\n // developers\n self['items'].push({\n _id: 'mnu_tool_dev',\n description: i18n.get('home.tools_dev'),\n image: ''\n });\n } catch (err) {\n console.error('(tool.js) _init(): ' + err);\n }\n }", "function install_menu() {\n var config = {\n name: 'dashboard_level',\n submenu: 'Settings',\n title: 'Dashboard Level',\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "function CreateSubmenu() {\n console.log( \"===== CreateSubmenu ========= \");\n\n //PR2023-06-08 debug: to prevent creating submenu multiple times: skip if btn columns exists\n if (!document.getElementById(\"id_submenu_columns\")){\n\n // PR2023-07-17 show tab 'Personal data' only when role = corrector, and usergroup contains auth4\n console.log( \" permit_dict.requsr_role_corr \", permit_dict.requsr_role_corr);\n console.log( \" permit_dict.usergroup_list \", permit_dict.usergroup_list);\n const show_btn_userdata = permit_dict.requsr_role_corr &&\n permit_dict.usergroup_list && permit_dict.usergroup_list.includes(\"auth4\");\n add_or_remove_class(document.getElementById(\"id_btn_userdata\"), cls_hide, !show_btn_userdata)\n console.log( \" show_btn_userdata \", show_btn_userdata);\n\n // PR2023-03-26 show tab 'Correctors' only when requsr_same_school, to add allowed clusters\n const show_btn_correctors = permit_dict.requsr_same_school;\n add_or_remove_class(document.getElementById(\"id_btn_correctors\"), cls_hide, !show_btn_correctors)\n\n // PR2023-03-26 show tab 'Compensation' only when role = corrector and ug=auth1 or auth2\n // tab 'Compensation' is only confusing for schools or correctors\n const show_btn_usercomp_agg = (permit_dict.requsr_role_corr && permit_dict.permit_pay_comp);\n add_or_remove_class(document.getElementById(\"id_btn_usercomp_agg\"), cls_hide, !show_btn_usercomp_agg);\n if (permit_dict.permit_approve_comp){\n AddSubmenuButton(el_submenu, loc.Approve_compensations, function() {MAC_Open(\"approve\")}, []);\n AddSubmenuButton(el_submenu, loc.Preliminary_compensation_form, function() {ModConfirmOpen(\"prelim_excomp\")}, []);\n AddSubmenuButton(el_submenu, loc.Submit_compensation_form, function() {MAC_Open(\"submit\")}, []);\n };\n if (permit_dict.permit_view_invoice){\n AddSubmenuButton(el_submenu, loc.Download_invoice, function() {ModConfirmOpen(\"download_invoice\")}, []);\n };\n\n if (show_btn_usercomp_agg){\n AddSubmenuButton(el_submenu, loc.Download_payment_form, function() {ModConfirmOpen(\"payment_form\")}, []);\n };\n\n AddSubmenuButton(el_submenu, loc.Hide_columns, function() {t_MCOL_Open(\"page_corrector\")}, [])\n\n el_submenu.classList.remove(cls_hide);\n };\n }", "function setUpSubMenuClick () {\n\t\t mainNavItems.click(function(event){\n\t var subMenu = jQuery(this).children('.sub-menu');\n\t if(subMenu.length > 0 &&!subMenu.hasClass('open')) {\n\t //event.preventDefault();\n\t subMenu.addClass('open');\n\t jQuery(this).addClass('open');\n\t jQuery(this).siblings().removeClass('open');\n\t \tjQuery(this).siblings().children('.sub-menu').removeClass('open');\n\t } else if (subMenu.length > 0 && subMenu.hasClass('open')){\n\t \t//event.preventDefault();\n\t subMenu.removeClass('open');\n\t jQuery(this).removeClass('open');\n\t }\n\t });\n\n\t\t jQuery('.utility-nav').children('.menu-item-has-children').children('a').click(function(e){\n\t\t \tif(!jQuery(this).parent().hasClass('open')) {\n\t\t \t\te.preventDefault();\n\t\t \t\tjQuery(this).parent().addClass('open');\n\t\t\t\tjQuery(this).parent().siblings().removeClass('open');\n\t\t\t\tvar subMenu = jQuery(this).parent().children('.sub-menu');\n\t\t\t\tif(!subMenu.hasClass('open')) {\n\t\t\t \tjQuery(this).addClass('open');\n\t\t\t \tsubMenu.addClass('open');\n\t\t\t \tjQuery(this).siblings().children('.sub-menu').removeClass('open');\n\t\t\t }\n\t\t \t}\n\t\t\t/*jQuery(this).addClass('open');\n\t\t\tjQuery(this).siblings().removeClass('open');\n\t\t\tvar subMenu = jQuery(this).children('.sub-menu');\n\t\t if(!subMenu.hasClass('open')) {\n\t\t \tjQuery(this).addClass('open');\n\t\t \tsubMenu.addClass('open');\n\t\t \tjQuery(this).siblings().children('.sub-menu').removeClass('open');\n\t\t } else {\n\t\t \treturn;\n\t\t }*/\n\t\t});\n\t}", "function cdd_menu0(){//////////////////////////Start Menu Data/////////////////////////////////\n/**********************************************************************************************\n\n\tMenu 0 - General Settings and Menu Structure\n\n\t**See the menu_styles.css file for additional customization options**\n\n***********************************************************************************************/\n\n/*---------------------------------------------\nIcon Images\n---------------------------------------------*/\n\n//Define two types of unlimited icon images below, associate any image\n//with any item using both the 'icon_rel' and 'icon_abs' parameter in the\n//sub menu structure section (set to the index number of the icon image)\n\n\n //Relative positioned icon images (flow with main menu or sub item text)\n\n\tthis.rel_icon_image0 = \"menu/sample_images/bullet.gif\"\n\tthis.rel_icon_rollover0 = \"menu/sample_images/bullet_hl.gif\"\n\tthis.rel_icon_image_wh0 = \"13,8\"\n\t\n\n\n //Absolute positioned icon images (coordinate positioned - relative to \n //right top corner of the menu item displaying the icon.)\n\n\tthis.abs_icon_image0 = \"menu/sample_images/arrow.gif\"\n\tthis.abs_icon_rollover0 = \"menu/sample_images/arrow.gif\"\n\tthis.abs_icon_image_wh0 = \"13,10\"\n\tthis.abs_icon_image_xy0 = \"-15,4\"\n\n\n\n\n/*---------------------------------------------\nDivider Settings\n---------------------------------------------*/\n\n\n\tthis.use_divider_caps = false\t\t//cap the top and bottom of each menu group\n\tthis.divider_width = 3\t\t\t//space between entries on horizontal menus\n\tthis.divider_height = 0\t\t\t//border width between vertical submenu entries\n\n\n //available specific settings\n\n\tthis.use_divider_capsX = true\n\n\n\n/*---------------------------------------------\nMenu Orientation and Sizing\n---------------------------------------------*/\n\n\n\tthis.is_horizontal = false\t\t//false = vertical menus, true = horizontal menus\n\tthis.is_horizontal_main = true\n\n\t\n\tthis.menu_width = 200\t\t\t//applies to vertical menus\n\tthis.menu_width_items = 90\t\t//width of buttons in horizontal menu\n\t\n\t\n\n //available specific settings\n\t\n\n\tthis.is_horizontalX = true\n\t\n\tthis.menu_widthX = 200\n\n\tthis.menu_width_itemsX = 100\n\tthis.menu_width_itemX_X = 100\n\n\t\n\n\n/*---------------------------------------------\nOptional Style Sheet Class Name Association\n---------------------------------------------*/\n\n//Use the following section to optionally associate menu groups \n//and menu items with existing CSS classes from your site.\n\n\n\n //global class names\n\n\t//this.main_menu_class = \"myclassname\"\n\t//this.main_items_class = \"myclassname\"\n\t//this.main_items_rollover_class = \"myclassname\"\n\n\t//this.sub_menu_class = \"myclassname\"\n\t//this.sub_items_class = \"myclassname\"\n\t//this.sub_items_rollover_class = \"myclassname\"\n\n\n //specific menu items\n\n\t//this.item_classX_X = \"myclassname\"\n\t//this.item_rollover_classX_X = \"myclassname\"\n\n\n\n/*---------------------------------------------\nExposed Menu Events - Custom Script Attachment\n---------------------------------------------*/\n\n\n\tthis.show_menu = \"\";\n\tthis.hide_menu = \"\";\n\n\n //available specific settings\n\n\n\t//this.show_menuX = \"alert('show id')\";\n\t//this.hide_menuX = \"alert('hide id')\";\n\n\n\n/*------------------------------------------------\nMenu Width & Height Adjustments for DOM Browsers\n-------------------------------------------------*/\n\n /*Note: The following settings are optional and are made available\n for tweaking the menu to perfection on all browsers and platforms.\n The menu will function without error regardless of the settings below.\n\n Opera and other DOM browsers take different approaches\n to how they calculate widths and heights of items which have\n CSS padding and borders defined. With the settings below\n re-define the total left-right and top-bottom combined border \n and padding values. These values are used by DOM browsers\n (ns7, opera, Mozilla, etc.) to correct the menu dimensions.*/\n\n\n\n //Menu Width & Height Adjustments (padding + borders)\n\n\tthis.pb_width_main_menu = 12;\t\n\tthis.pb_width_sub_menus = 16;\n\n\tthis.pb_height_main_menu = 12;\n\tthis.pb_height_sub_menus = 16;\n\n\t\n\tthis.pb_width_menuX = 0;\n\tthis.pb_height_menuX = 0;\n\tthis.pb_width_main_itemsX = 0;\n\tthis.pb_width_sub_itemsX = 0;\n\n\n\n //Item Width Adjustments (padding + borders)\n\n\tthis.pb_width_main_items = 12;\n\tthis.pb_width_sub_items = 12;\n\n\n\n //Opera 5 & 6 - alternate HTML display (Opera 7 displays menu 100%)\n\n\tthis.opera_old_display_html = \"Please update your opera browser.\";\n\n\n\n/*---------------------------------------------\nMain Menu Group and Items\n---------------------------------------------*/\n\n\n //Main Menu Group 0\n\n\t\n\tthis.item0 = \"HISTORY\"\n\t//this.url0 = \"myurl.html\"\t\n\n\tthis.item1 = \"ISSUES\"\n\t//this.url1 = \"myurl.html\"\t\n\t\n\tthis.item2 = \"CREATORS\"\n\t//this.url2 = \"myurl.html\"\t\n\t\n\tthis.item3 = \"FANS\"\n\t//this.url3 = \"myurl.html\"\t\n\t\n\tthis.item4 = \"MERCH\"\n\t//this.url4 = \"myurl.html\"\t\n\t\n\tthis.item5 = \"MEDIA\"\n\t//this.url5 = \"myurl.html\"\t\n\t\n\tthis.item6 = \"ART\"\n\t//this.url6 = \"myurl.html\"\t\n\t\n\tthis.item7 = \"FUN/GAMES\"\n\t//this.url7 = \"myurl.html\"\t\n\t\n\n/*---------------------------------------------\nSub Menu Group and Items\n---------------------------------------------*/\n\n //Sub Menu 0\n\n\tthis.menu_xy0 = \"-82,17\"\n\tthis.menu_width0 = 150\n\n\tthis.item0_0 = \"DD's Origin & Powers\"\n\tthis.item0_1 = \"Daredevil's Costume\"\n this.item0_2 = \"Cast Bios\"\n\tthis.item0_3 = \"Plot Summary\"\n\tthis.item0_4 = \"Nelson & Murdock\"\n\tthis.item0_5 = \"Issue Chronology\"\n\tthis.item0_6 = \"Guest Checklist\"\n\tthis.item0_7 = \"First Meetings\"\n\tthis.item0_8 = \"DD & Spidey\"\n\tthis.item0_9 = \"Other Daredevils\"\n\tthis.item0_10 = \"Women of DD\"\n this.item0_11 = \"Sales\"\n\n\tthis.icon_abs0_4 = 0\n\tthis.icon_abs0_8 = 0\n\n\tthis.url0_0 = 'origin.htm'\n\tthis.url0_1 = 'costume.htm'\n\tthis.url0_2 = 'cast.htm'\n\tthis.url0_3 = 'plot.htm'\n\tthis.url0_4 = ''\n\tthis.url0_5 = 'chrono.htm'\n\tthis.url0_6 = 'guests.htm'\n\tthis.url0_7 = 'firstmeetings.htm'\n\tthis.url0_8 = ''\n\tthis.url0_9 = 'otherdds.htm'\n\tthis.url0_10= 'women.htm'\n\tthis.url0_11= 'spideysales.htm'\n\n //Sub Menu 0_4\n\n\tthis.menu_xy0_4 = \"-4,2\"\n\tthis.menu_width0_4 = 150\n\n\tthis.item0_4_0 = \"The Law Offices of...\"\n\tthis.item0_4_1 = \"Famous Clients\"\n\tthis.item0_4_2 = \"Nelson vs. Murdock\"\n\tthis.item0_4_3 = \"Legal Terms/Definitions\"\n\n\tthis.url0_4_0 = 'legalcareer.htm'\n\tthis.url0_4_1 = 'legalclients.htm'\n\tthis.url0_4_2 = 'legalversus.htm'\n\tthis.url0_4_3 = 'legalterms.htm'\n\n\n //Sub Menu 0_8\n\n\tthis.menu_xy0_8 = \"-4,2\"\n\tthis.menu_width0_8 = 150\n\n\tthis.item0_8_0 = \"Comparison\"\n\tthis.item0_8_1 = \"Significant Events\"\n\tthis.item0_8_2 = \"Appearances Together\"\n\tthis.item0_8_3 = \"Spider-Man vs. DD\"\n\tthis.item0_8_4 = \"Saving Each Other\"\n this.item0_8_5 = \"Sales\"\n\n\tthis.url0_8_0 = 'spideycompare.htm'\n\tthis.url0_8_1 = 'spideyevents.htm'\n\tthis.url0_8_2 = 'spideyappear.htm'\n\tthis.url0_8_3 = 'spideyvsdd.htm'\n\tthis.url0_8_4 = 'spideysaves.htm'\n\tthis.url0_8_5 = 'spideysales.htm'\n\n //Sub Menu 1\n\t\n\tthis.menu_xy1 = \"-82,17\"\n\tthis.menu_width1 = 150\n \n\tthis.item1_0 = \"Recommended Reading\"\n\tthis.item1_1 = \"Volume 1\"\n\tthis.item1_2 = \"Volume 2\"\n\tthis.item1_3 = \"Annuals\"\n\tthis.item1_4 = \"Specials/Mini-Series\"\t\n\tthis.item1_5 = \"Graphic Novels\"\n\tthis.item1_6 = \"Cross-Appearances\"\n\tthis.item1_7 = \"International Issues\"\n\tthis.item1_8 = \"Trade Paperbacks\"\n\tthis.item1_9 = \"Hardcovers\"\n\tthis.item1_10= \"Reprints\"\t\n\tthis.item1_11= \"Cybercomics\"\n\n\tthis.icon_abs1_6 = 0\n\tthis.icon_abs1_7 = 0\n\n\tthis.url1_0 = 'recommended.htm'\n\tthis.url1_1 = 'volume1.htm'\n\tthis.url1_2 = 'volume2.htm'\n\tthis.url1_3 = 'annuals.htm'\n\tthis.url1_4 = 'specials.htm'\n\tthis.url1_5 = 'graphic.htm'\n\tthis.url1_6 = ''\n\tthis.url1_7 = ''\n\tthis.url1_8 = 'tpbs.htm'\n\tthis.url1_9 = 'hardcovers.htm'\n\tthis.url1_10= 'reprints.htm'\n\tthis.url1_11= 'online.htm'\n\n //Sub Menu 1_6\n\n\tthis.menu_xy1_6 = \"-4,2\"\n\tthis.menu_width1_6 = 150\n\n\tthis.item1_6_0 = \"Appearance Checklist\"\n\tthis.item1_6_1 = \"Major Appearances\"\n\tthis.item1_6_2 = \"Minor Appearances\"\n\tthis.item1_6_3 = \"Cameo/Bit Appearances\"\n\tthis.item1_6_4 = \"Non-Appearances\"\n\tthis.item1_6_5 = \"Alternate Appearances\"\n\tthis.item1_6_6 = \"Honorable Mentions\"\n\tthis.item1_6_7 = \"Parodies/Spoofs\"\n\tthis.item1_6_8 = \"Pinups\"\n\n\tthis.url1_6_0 = 'appear.htm'\n\tthis.url1_6_1 = 'appmaj.htm'\n\tthis.url1_6_2 = 'appmin.htm'\n\tthis.url1_6_3 = 'appbit.htm'\n\tthis.url1_6_4 = 'appnon.htm'\n\tthis.url1_6_5 = 'appalt.htm'\n\tthis.url1_6_6 = 'mentions.htm'\n\tthis.url1_6_7 = 'parodies.htm'\n\tthis.url1_6_8 = 'artpinup.htm'\n\n //Sub Menu 1_7\n\n\tthis.menu_xy1_7 = \"-4,2\"\n\tthis.menu_width1_7 = 150\n\n\tthis.item1_7_0 = \"Brazil (Brasil)\"\n\tthis.item1_7_1 = \"Finland (Suomi)\"\n\tthis.item1_7_2 = \"France\"\n\tthis.item1_7_3 = \"Germany (Deutschland)\"\n\tthis.item1_7_4 = \"Italy (Italia)\"\n\tthis.item1_7_5 = \"Norway (Nörge)\"\n\tthis.item1_7_6 = \"Spain (Espańa)\"\n\tthis.item1_7_7 = \"Sweden (Sverige)\"\n\tthis.item1_7_8 = \"United Kingdom\"\n\tthis.item1_7_9 = \"Uruguay\"\n\n\tthis.url1_7_0 = 'intl_bra.htm'\n\tthis.url1_7_1 = 'intl_fin.htm'\n\tthis.url1_7_2 = 'intl_fra.htm'\n\tthis.url1_7_3 = 'intl_ger.htm'\n\tthis.url1_7_4 = 'intl_ita.htm'\n\tthis.url1_7_5 = 'intl_nor.htm'\n\tthis.url1_7_6 = 'intl_esp.htm'\n\tthis.url1_7_7 = 'intl_swe.htm'\n\tthis.url1_7_8 = 'intl_uk.htm'\n\tthis.url1_7_9 = 'intl_uru.htm'\n\n\n\n //Sub Menu 2\n\n\tthis.menu_xy2 = \"-82,17\"\n\tthis.menu_width2 = 125\n\t\n\tthis.item2_0 = \"Creator Checklist\"\n\tthis.item2_1 = \"Interviews\"\n\tthis.item2_2 = \"Creator Bios\"\n\tthis.item2_3 = \"Guestbook Entries\"\n\n\tthis.url2_0 = 'creators.htm'\n\tthis.url2_1 = 'interviews.htm'\n\tthis.url2_2 = 'creabios.htm'\n\tthis.url2_3 = 'halloffame.htm'\n\n\n\n //Sub Menu 3\n\n\tthis.menu_xy3 = \"-82,17\"\n\tthis.menu_width3 = 150\n\t\n\tthis.item3_0 = \"Fan Art\"\n\tthis.item3_1 = \"Fan Fiction\"\n\tthis.item3_2 = \"Custom Figures\"\n\tthis.item3_3 = \"Body Art (Tattoos)\"\n\tthis.item3_4 = \"Custom Trading Cards\"\n\tthis.item3_5 = \"Published Fan Letters\"\n\tthis.item3_6 = \"Fan Parodies\"\n\tthis.item3_7 = \"Misc. Fan Creations\"\n\tthis.item3_8 = \"Guestbook\"\n\n\tthis.url3_0 = 'artfan.htm'\n\tthis.url3_1 = 'fanfiction.htm'\n\tthis.url3_2 = 'fanfigs.htm'\n\tthis.url3_3 = 'artbody.htm'\n\tthis.url3_4 = 'fancards.htm'\n\tthis.url3_5 = 'fanletters.htm'\n\tthis.url3_6 = 'fanparodies.htm'\n\tthis.url3_7 = 'fanmisc.htm'\n\tthis.url3_8 = 'http://books.dreambook.com/kevinqhall/ddbook.html'\n\n\n\n //Sub Menu 4\n\n\tthis.menu_xy4 = \"-82,17\"\n\tthis.menu_width4 = 180\n\n\tthis.item4_0 = \"For Sale or Trade\"\n\tthis.item4_1 = \"Cards, Stickers, & Pogs\"\n\tthis.item4_2 = \"Toys, Games, & Puzzles\"\n\tthis.item4_3 = \"Action Figures\"\n\tthis.item4_4 = \"Diecast Vehicles\"\n\tthis.item4_5 = \"Pins & Patches\"\n\tthis.item4_6 = \"Stamps & Coins\"\n\tthis.item4_7 = \"Food & Candy\"\n\tthis.item4_8 = \"Clothes & Apparel\"\n\tthis.item4_9 = \"T-Shirts\"\n\tthis.item4_10= \"Costumes\"\n\tthis.item4_11= \"Calendars\"\n\tthis.item4_12= \"Household Items\"\n\tthis.item4_13= \"Stationery\"\n\tthis.item4_14= \"Wall Hangings/Window Clings\"\n\n\tthis.icon_abs4_1 = 0\n\n\tthis.url4_0 = 'mercwant.htm'\n\tthis.url4_1 = 'merccard.htm'\n\tthis.url4_2 = 'merctoys.htm'\n\tthis.url4_3 = 'mercfigs.htm'\n\tthis.url4_4 = 'diecast.htm'\n\tthis.url4_5 = 'mercpins.htm'\n\tthis.url4_6 = 'stamps.htm'\n\tthis.url4_7 = 'mercfood.htm'\n\tthis.url4_8 = 'mercclth.htm'\n\tthis.url4_9 = 'merctees.htm'\n\tthis.url4_10= 'merccost.htm'\n\tthis.url4_11= 'merccal.htm'\n\tthis.url4_12= 'merchous.htm'\n\tthis.url4_13= 'mercstat.htm'\n\tthis.url4_14= 'mercwall.htm'\n\t\n //Sub Menu 4_1\n\n\tthis.menu_xy4_1 = \"-4,2\"\n\tthis.menu_width4_1 = 160\n\n\tthis.item4_1_0 = \"Custom Trading Cards\"\n\tthis.item4_1_1 = \"Trading Cards: 1960s\"\n\tthis.item4_1_2 = \"Trading Cards: 1970s\"\n\tthis.item4_1_3 = \"Trading Cards: 1980s\"\n\tthis.item4_1_4 = \"Trading Cards: 1990-1992\"\n\tthis.item4_1_5 = \"Trading Cards: 1993-1995\"\n\tthis.item4_1_6 = \"Trading Cards: 1996-2000\"\n\tthis.item4_1_7 = \"Trading Cards: 2001-2003\"\n\tthis.item4_1_8 = \"Trading Cards: DD Movie\"\n\tthis.item4_1_9 = \"Phone Cards\"\n\tthis.item4_1_10= \"Promotional Cards\"\n\tthis.item4_1_11= \"Collectible Card Games\"\n\tthis.item4_1_12= \"Stickers\"\n\tthis.item4_1_13= \"Pogs\"\n\n\tthis.url4_1_0 = 'fancards.htm'\n\tthis.url4_1_1 = 'cards60s.htm'\n\tthis.url4_1_2 = 'cards70s.htm'\n\tthis.url4_1_3 = 'cards80s.htm'\n\tthis.url4_1_4 = 'cards90-92.htm'\n\tthis.url4_1_5 = 'cards93-95.htm'\n\tthis.url4_1_6 = 'cards96-00.htm'\n\tthis.url4_1_7 = 'cards01-03.htm'\n\tthis.url4_1_8 = 'cardsdd.htm'\n\tthis.url4_1_9 = 'cardsphone.htm'\n\tthis.url4_1_10= 'cardspromo.htm'\n\tthis.url4_1_11= 'cardsccg.htm'\n\tthis.url4_1_12= 'stickers.htm'\n\tthis.url4_1_13= 'pogs.htm'\n\n\n\n\n //Sub Menu 5\n\n\tthis.menu_xy5 = \"-82,17\"\n\tthis.menu_width5 = 165\n\n\tthis.item5_0 = \"Books\"\n\tthis.item5_1 = \"Movies\"\n\tthis.item5_2 = \"Television\"\n\tthis.item5_3 = \"Video Games/CyberComics\"\n\tthis.item5_4 = \"Fanzines\"\n\tthis.item5_5 = \"Feature Articles\"\n\tthis.item5_6 = \"Sightings\"\n\tthis.item5_7 = \"Music\"\n\tthis.item5_8 = \"Braille\"\n\tthis.item5_9 = \"Newspaper\"\n\n\tthis.icon_abs5_0 = 0\n\n\tthis.url5_0 = ''\n\tthis.url5_1 = 'movies.htm'\n\tthis.url5_2 = 'tv.htm'\n\tthis.url5_3 = 'online.htm'\n\tthis.url5_4 = 'fanzines.htm'\n\tthis.url5_5 = 'articles.htm'\n\tthis.url5_6 = 'sightings.htm'\n\tthis.url5_7 = 'music.htm'\n\tthis.url5_8 = 'braille.htm'\n\tthis.url5_9 = 'newspaper.htm'\n\n //Sub Menu 5_0\n\n\tthis.menu_xy5_0 = \"-4,2\"\n\tthis.menu_width5_0 = 145\n\n\tthis.item5_0_0 = \"Pocketbooks/Fiction\"\n\tthis.item5_0_1 = \"Graphic Novels\"\n\tthis.item5_0_2 = \"Trade Paperbacks\"\n\tthis.item5_0_3 = \"Hardcovers\"\n\tthis.item5_0_4 = \"Miscellaneous Books\"\n\tthis.item5_0_5 = \"Activity/Coloring Books\"\n\n\tthis.url5_0_0 = 'fiction.htm'\n\tthis.url5_0_1 = 'graphic.htm'\n\tthis.url5_0_2 = 'tpbs.htm'\n\tthis.url5_0_3 = 'hardcovers.htm'\n\tthis.url5_0_4 = 'miscbooks.htm'\n\tthis.url5_0_5 = 'coloring.htm'\n\n\n //Sub Menu 6\n\n\tthis.menu_xy6 = \"-82,17\"\n\tthis.menu_width6 = 150\n\n\tthis.item6_0 = \"Fan Art\"\n\tthis.item6_1 = \"Statues & Figures\"\n\tthis.item6_2 = \"Portfolios, Prints, & Lithographs\"\n\tthis.item6_3 = \"Posters\"\n\tthis.item6_4 = \"Sketchagraph Gallery\"\n\tthis.item6_5 = \"Splash Pages\"\n\tthis.item6_6 = \"Sketches/Drawings\"\n\tthis.item6_7 = \"Pinups\"\n\tthis.item6_8 = \"Authentix Cover Gallery\"\n\tthis.item6_9 = \"Body Art (Tattoos)\"\n\tthis.item6_10= \"Preview Art\"\n\tthis.item6_11= \"Licensed Images\"\n\n\tthis.url6_0 = 'artfan.htm'\n\tthis.url6_1 = 'artsculp.htm'\n\tthis.url6_2 = 'artpro.htm'\n\tthis.url6_3 = 'artpost.htm'\n\tthis.url6_4 = 'artsgrph.htm'\n\tthis.url6_5 = 'artsplsh.htm'\n\tthis.url6_6 = 'artsktch.htm'\n\tthis.url6_7 = 'artpinup.htm'\n\tthis.url6_8 = 'artauth.htm'\n\tthis.url6_9 = 'artbody.htm'\n\tthis.url6_10= 'artpreview.htm'\n\tthis.url6_11= 'artlic.htm'\n\n //Sub Menu 7\n\n\tthis.menu_xy7 = \"-142,17\"\n\tthis.menu_width7 = 160\n\n\tthis.item7_0 = \"Top Ten...\"\n\tthis.item7_1 = \"Quotes\"\n\tthis.item7_2 = \"Lawyer Jokes\"\n\tthis.item7_3 = \"Bloopers\"\n\tthis.item7_4 = \"Parodies/Spoofs\"\n\tthis.item7_5 = \"Trivia\"\n\tthis.item7_6 = \"Online Puzzles/Games\"\n\tthis.item7_7 = \"Printable Puzzles\"\n\n\tthis.icon_abs7_0 = 0\n\tthis.icon_abs7_6 = 0\n\tthis.icon_abs7_7 = 0\n\n\tthis.url7_0 = ''\n\tthis.url7_1 = 'quotes.htm'\n\tthis.url7_2 = 'shyster.htm'\n\tthis.url7_3 = 'bloopers.htm'\n\tthis.url7_4 = 'parodies.htm'\n\tthis.url7_5 = 'trivia.htm'\n\tthis.url7_6 = 'puzzles.htm'\n\tthis.url7_7 = ''\n\n //Sub Menu 7_0\n\n\tthis.menu_xy7_0 = \"-269,3\"\n\tthis.menu_width7_0 = 150\n\n\tthis.item7_0_0 = \"Ways to Defeat Stiltman\"\n\tthis.item7_0_1 = \"Favorite DD Stories\"\n\tthis.item7_0_2 = \"Toughest Foes\"\n\tthis.item7_0_3 = \"Favorite DD Story Arcs\"\n\tthis.item7_0_4 = \"Favorite DD Villains\"\n\tthis.item7_0_5 = \"Fav. DD Supporting Cast\"\n\tthis.item7_0_6 = \"Favorite DD Team-Ups\"\n\tthis.item7_0_7 = \"Underrated DD Creators\"\n\tthis.item7_0_8 = \"Aerial Moves\"\n\n\tthis.url7_0_0 = 'ttstilts.htm'\n\tthis.url7_0_1 = 'ttissues.htm'\n\tthis.url7_0_2 = 'tttough.htm'\n\tthis.url7_0_3 = 'ttarcs.htm'\n\tthis.url7_0_4 = 'ttbadguy.htm'\n\tthis.url7_0_5 = 'ttsuppor.htm'\n\tthis.url7_0_6 = 'ttteamup.htm'\n\tthis.url7_0_7 = 'ttunder.htm'\n\tthis.url7_0_8 = 'ttdaringmoves.htm'\n\n //Sub Menu 7_6\n\n\tthis.menu_xy7_6 = \"-299,3\"\n\tthis.menu_width7_6 = 180\n\n\tthis.item7_6_0 = \"Concentration: DD Covers\"\n\tthis.item7_6_1 = \"Concentration: Sketchagraphs\"\n\tthis.item7_6_2 = \"Word Search: DD Villains\"\n\tthis.item7_6_3 = \"Word Search: Women of DD\"\n\tthis.item7_6_4 = \"Word Search: DD Creators\"\n\n\tthis.url7_6_0 = 'puzconcentration1.htm'\n\tthis.url7_6_1 = 'puzconcentration2.htm'\n\tthis.url7_6_2 = 'puzsrch1online.htm'\n\tthis.url7_6_3 = 'puzsrch2online.htm'\n\tthis.url7_6_4 = 'puzsrch3online.htm'\n\n //Sub Menu 7_7\n\n\tthis.menu_xy7_7 = \"-299,3\"\n\tthis.menu_width7_7 = 180\n\n\tthis.item7_7_0 = \"Matching: Marvel Nemeses\"\n\tthis.item7_7_1 = \"Matching: Marvel Couples\"\n\tthis.item7_7_2 = \"Matching: Weapons of Choice\"\n\tthis.item7_7_3 = \"Word Search: DD Villains\"\n\tthis.item7_7_4 = \"Word Search: Women of DD\"\n\tthis.item7_7_5 = \"Word Search: DD Creators\"\n\n\tthis.url7_7_0 = 'puzmtch1.htm'\n\tthis.url7_7_1 = 'puzmtch2.htm'\n\tthis.url7_7_2 = 'puzmtch3.htm'\n\tthis.url7_7_3 = 'puzsrch1.htm'\n\tthis.url7_7_4 = 'puzsrch2.htm'\n\tthis.url7_7_5 = 'puzsrch3.htm'\n\n\n\n}///////////////////////// END Menu Data /////////////////////////////////////////", "function SetLibraryMenuNode(libraryData, naviPlus) {\n //Create the new ul\n NewUL = document.createElement(\"ul\")\n //Add the LIs to the new ul\n if (libraryData.Children) {\n for (i = 0; i<libraryData.Children.length; i++) {\n //Create elements\n NewA = document.createElement(\"a\")\n NewA.href=\"/page/\"+libraryData.Children[i].ID+\"/view\"\n\n NewLI = document.createElement(\"li\")\n\n NewPlus = document.createElement(\"div\")\n NewPlus.classList.add(\"naviPlus\")\n NewPlus.appendChild(document.createTextNode(\"+\"))\n $(NewPlus).on(\"click\", {ID: libraryData.Children[i].ID, newPlus: NewPlus}, function(eventData) {return ToggleLibraryMenu(eventData.data.ID, eventData.data.newPlus);} );\n\n NewSpan = document.createElement(\"span\")\n NewSpan.classList.add(\"naviLabel\")\n NewSpan.appendChild(document.createTextNode(libraryData.Children[i].Name))\n\n NewLI.appendChild(NewA)\n NewA.appendChild(NewPlus)\n NewA.appendChild(NewSpan)\n NewLI.appendChild(document.createElement(\"ul\"))\n NewUL.appendChild(NewLI);\n }\n }\n\n if (LoggedIn) {\n //Add create page node\n newCreatePage = document.getElementById(\"createPageTemplate\").content.firstElementChild.cloneNode(true)\n $(newCreatePage).find(\"input[name='ParentID']\").get(0).value = libraryData.CurrentPage.ID\n NewUL.appendChild(newCreatePage);\n }\n //Toggle state is closed, so we need to open\n $(naviPlus).html(\"-\")\n //Find parent li\n $($(naviPlus).parents(\"li\")[0]).children(\"ul\").replaceWith(NewUL)\n}", "attach() {\n this._menu.appendTo(\"body\");\n }", "_prepareMenu() {\n var _this = this;\n // if(!this.options.holdOpen){\n // this._menuLinkEvents();\n // }\n this.$submenuAnchors.each(function(){\n var $link = $(this);\n var $sub = $link.parent();\n if(_this.options.parentLink){\n $link.clone().prependTo($sub.children('[data-submenu]')).wrap('<li class=\"is-submenu-parent-item is-submenu-item is-drilldown-submenu-item\" role=\"menu-item\"></li>');\n }\n $link.data('savedHref', $link.attr('href')).removeAttr('href').attr('tabindex', 0);\n $link.children('[data-submenu]')\n .attr({\n 'aria-hidden': true,\n 'tabindex': 0,\n 'role': 'menu'\n });\n _this._events($link);\n });\n this.$submenus.each(function(){\n var $menu = $(this),\n $back = $menu.find('.js-drilldown-back');\n if(!$back.length){\n switch (_this.options.backButtonPosition) {\n case \"bottom\":\n $menu.append(_this.options.backButton);\n break;\n case \"top\":\n $menu.prepend(_this.options.backButton);\n break;\n default:\n console.error(\"Unsupported backButtonPosition value '\" + _this.options.backButtonPosition + \"'\");\n }\n }\n _this._back($menu);\n });\n\n this.$submenus.addClass('invisible');\n if(!this.options.autoHeight) {\n this.$submenus.addClass('drilldown-submenu-cover-previous');\n }\n\n // create a wrapper on element if it doesn't exist.\n if(!this.$element.parent().hasClass('is-drilldown')){\n this.$wrapper = $(this.options.wrapper).addClass('is-drilldown');\n if(this.options.animateHeight) this.$wrapper.addClass('animate-height');\n this.$element.wrap(this.$wrapper);\n }\n // set wrapper\n this.$wrapper = this.$element.parent();\n this.$wrapper.css(this._getMaxDims());\n }", "function lijstSubMenuItem() {\n\n if ($mLess.text() == \"meer\") {\n $mLess.text(\"minder\")\n } else {\n $mLess.text(\"meer\");\n\n }\n $list.toggleClass('hidden')\n $resum.get(0).scrollIntoView('slow');\n event.preventDefault()\n }", "function initmenu(levels,height,width,delay,type)\r\n{\r\nif (populatemenuitems==\"true\")\r\n{\r\nfor (i=0;i<=levels-1;i++)\r\n{\r\nMENU_ITEMS[i] = ITEMS[i+1];\r\n}\r\n}\r\n\r\n//setting the height\r\nglobheight=height;\r\ngloblevel=levels;\r\nglobwidth=width;\r\nglobdelay=delay;\r\n\r\nif (populatemenuitems==\"false\")\r\n{\r\n if (type==\"horizontal\")\r\n {\r\n //Defaults for horizontal\r\n MENU_POS['block_left'] = [0, 0];\r\n MENU_POS['top'] = [0];\r\n MENU_POS['left'] = [globwidth];\r\n globtype=\"horizontal\";\r\n }\r\n else\r\n { \r\n //Defaults for vertical\r\n MENU_POS['block_left'] = [0, globwidth];\r\n MENU_POS['top'] = [0, 0];\r\n MENU_POS['left'] = [0, 0];\r\n globtype=\"vertical\";\r\n }\r\n}\r\n}", "ready() {\n super.ready();\n\n const that = this;\n\n that._element = 'menu';\n that._edgeMacFF = JQX.Utilities.Core.Browser.Edge ||\n JQX.Utilities.Core.Browser.Firefox && navigator.platform.toLowerCase().indexOf('mac') !== -1;\n that._containers = [];\n that._containersInBody = [];\n that._openedContainers = [];\n that._containersFixedHeight = [];\n that._menuItemsGroupsToExpand = [];\n that._additionalScrollButtons = [];\n\n that._createElement();\n }", "function addArrayToWikiaNavUl_TopLevel(topMenuItem, menuItemsArray, wikiNavUl){\n var newNavMenuItem = document.createElement(\"li\"); // Create the new menu item\n var newNavMenuItem_HTML = '<a href=\"' + topMenuItem[0] + '\">' + topMenuItem[1] + '</a><ul class=\"subnav-2 accent\" style=\"visibility: visible; display: none;\">'; // Add the first level menu item\n for (x in menuItemsArray){\n for (y in menuItemsArray[x]){\n if(y == 0){ // If it is the first item in the array make sure it uses the correct classes\n newNavMenuItem_HTML += '<li><a class=\"subnav-2a\" href=\"' + menuItemsArray[x][y][0] + '\">' + menuItemsArray[x][y][1];\n //if(menuItemsArray[x].length > 1) newNavMenuItem_HTML += '<img class=\"chevron\" src=\"data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D\"></a><ul class=\"subnav subnav-3\" style=\"top: 28px; display: none;\">'; // If it has subitems, add the down arrow icon, and add a third level list\n\t\t\t\t if(menuItemsArray[x].length > 1) newNavMenuItem_HTML += '<img class=\"chevron\" src=\"data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D\"></a><ul class=\"subnav subnav-3\" style=\"display: none;\">'; // If it has subitems, add the down arrow icon, and add a third level list\n else newNavMenuItem_HTML += '</a></li>'; // if it is the only item in the list close the li\n } else {\n newNavMenuItem_HTML += '<li><a class=\"subnav-3a\" href=\"' + menuItemsArray[x][y][0] + '\">' + menuItemsArray[x][y][1] + '</a></li>';\n if(menuItemsArray[x].length - 1 <= y) newNavMenuItem_HTML += '</ul></li>'; // If it is the last element in the array, close the unsorted list and the second level menu item\n }\n }\n }\n newNavMenuItem.innerHTML = newNavMenuItem_HTML + '</ul>'; // Close the list\n wikiNavUl.appendChild(newNavMenuItem); // Add it to the menu\n\t //newNavMenuItem.getElementsByTagName(\"ul\")[0].setAttribute('display', \"none\");\n }", "hideSubMenu_() {\n const items =\n this.querySelectorAll('cr-menu-item[sub-menu][sub-menu-shown]');\n items.forEach((menuItem) => {\n const subMenuId = menuItem.getAttribute('sub-menu');\n if (subMenuId) {\n const subMenu = /** @type {!Menu|null} */\n (document.querySelector(subMenuId));\n if (subMenu) {\n subMenu.hide();\n }\n menuItem.removeAttribute('sub-menu-shown');\n }\n });\n this.currentMenu = this;\n }", "constructor(){\n super();\n this.menu = [\n {link: '/', title: 'Home'},\n ];\n }", "constructor(){\n //class variable that holds the Menu Items\n this.itemList = [];\n }", "function initFromOptions(item, options) {\n initFromCommon(item, options);\n if (options.submenu !== void 0) {\n item.submenu = options.submenu;\n }\n}", "renderSubMenu() {\n\t\tlet element = '';\n\t\tif (this.props.level === 1) {\n\t\t\telement = (\n\t\t\t\t<div className={`menu__wrapper-item ${this.state.rightAlign ? 'menu__wrapper-item--right' : ''}`}>\n\t\t\t\t\t<Menu \n\t\t\t\t\t\tnavigate={this.props.navigate}\n\t\t\t\t\t\titemClick={this.props.itemClick}\n\t\t\t\t\t\tselectedPath={this.props.selectedPath}\n\t\t\t\t\t\tcurrentPath={this.props.currentPath}\n\t\t\t\t\t\tdata={this.props.data.children}\n\t\t\t\t\t\tlevel={this.props.level+1} />\n\n\t\t\t\t\t<div className=\"menu__commercial-area\" dangerouslySetInnerHTML={{__html: 'this.props.commercial'}}></div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t} else {\n\t\t\telement = (\n\t\t\t\t<Menu \n\t\t\t\t\tnavigate={this.props.navigate}\n\t\t\t\t\titemClick={this.props.itemClick}\n\t\t\t\t\tselectedPath={this.props.selectedPath}\n\t\t\t\t\tcurrentPath={this.props.currentPath}\n\t\t\t\t\tdata={this.props.data.children}\n\t\t\t\t\tlevel={this.props.level+1} />\n\t\t\t);\n\t\t}\n\t\t\n\n\t\treturn this.hasChildren ? element : '';\n\t}", "function createMenu(store) {\n\n\tvar menu_html = '<ul id=\"header_menu\">';\n\tvar li_arr = new Array();\n\tvar sub_arr = new Array();\n\n\t// items\n\tstore.each(function(record) {\n\t\t\t\tif (record.get('parent') == '0' || record.get('parent') == '') {\n\t\t\t\t\tli_arr.push(record);\n\t\t\t\t}\n\t\t\t});\n\n\t// sub items\n\tfor (var i = 0; i < li_arr.length; i++) {\n\t\tvar subs = new Array();\n\t\tvar item = li_arr[i];\n\t\tstore.each(function(record) {\n\t\t\t\t\tif (record.get('parent') == item.get('id')) {\n\t\t\t\t\t\tsubs.push(record);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tsub_arr[i] = subs;\n\t}\n\n\t// ....sub sub items\n\n\t// console.log(li_arr);\n\t// console.log(sub_arr[0]);\n\n\t// build dom\n\tfor (var i = 0; i < li_arr.length; i++) {\n\n\t\tif (sub_arr[i].length > 0) {\n\t\t\tmenu_html += Ext.String.format('<li><a href=\"#\">{0}</a>', li_arr[i]\n\t\t\t\t\t\t\t.get('text'), li_arr[i].get('action'));\n\t\t\tmenu_html += '<ul>';\n\t\t\tfor (var j = 0; j < sub_arr[i].length; j++) {\n\n\t\t\t\tmenu_html += Ext.String\n\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t'<li><a href=\"#\" class=\"can_link\" onclick=\"showView(\\'{1}\\')\">{0}</a></li>',\n\t\t\t\t\t\t\t\tsub_arr[i][j].get('text'), sub_arr[i][j]\n\t\t\t\t\t\t\t\t\t\t.get('action'));\n\t\t\t}\n\t\t\tmenu_html += '</ul>';\n\t\t} else {\n\t\t\tmenu_html += Ext.String\n\t\t\t\t\t.format(\n\t\t\t\t\t\t\t'<li><a href=\"#\" class=\"can_link\" onclick=\"showView(\\'{1}\\')\">{0}</a>',\n\t\t\t\t\t\t\tli_arr[i].get('text'), li_arr[i].get('action'));\n\t\t}\n\t\tmenu_html += '</li>';\n\t}\n\n\tmenu_html += '</ul>';\n\t// console.log(menu_html);\n\treturn menu_html;\n}", "function initMobileMenuItemList() {\n\n //TODO:\n //var mobileMenuItem = $('.sub-menu__mobile__menu > .sub-menu__mobile__menu__item');\n\n //console.log(mobileMenuItem);\n\n //var menuMobile = $(\".sub-menu__mobile__menu\");\n\n //var displayName = document.querySelector('.sub-menu__mobile__selected-name');\n\n //if (mobileMenuItem.length === 0) {\n // $(\".sub-menu > .sub-menu__item\").each(function (index) {\n // var el = $(this);\n\n // var isMenuActive = el.hasClass('sub-menu__item--active');\n\n // var isMenuInactive = el.hasClass('sub-menu__item--inactive');\n\n // var link = el.children();\n\n // // create new a\n // var a = document.createElement('a');\n // a.className = 'sub-menu__mobile__menu__item-link proposalDocument';\n // a.dataset.index = index;\n // a.dataset.url = link[0].dataset.url;\n // a.innerText = link[0].textContent;\n // a.onclick = handleGetProposalMobile;\n\n // if (isMenuActive) {\n // displayName.textContent = link[0].textContent;\n // }\n\n // // create new li\n // var li = document.createElement('li');\n\n // li.className = 'sub-menu__mobile__menu__item';\n\n // if (isMenuActive && !isMenuInactive) {\n // li.className += ' sub-menu__mobile__menu__item--selected';\n // }\n\n // if (isMenuInactive) {\n // li.className += ' sub-menu__mobile__menu__item--inactive';\n // }\n\n // li.dataset.index = parseInt(el[0].dataset.index, 10);\n\n // li.appendChild(a);\n\n // // append\n // menuMobile.append(li);\n // });\n //} else {\n\n // removeSelectedClassForMenuMobile();\n\n // // find index of selected menu - large\n // // add selected class for menu mobile item\n // $('.sub-menu__mobile__menu > .sub-menu__mobile__menu__item').eq(selectedIndex).addClass('sub-menu__mobile__menu__item--selected');\n\n // // set the name of selected menu\n // var displayText = $('.sub-menu > .sub-menu__item').eq(selectedIndex).children().text();\n // displayName.textContent = displayText;\n\n\n //}\n }", "function setup_menu() {\n $('div[data-role=\"arrayitem\"]').contextMenu('context-menu1', {\n 'remove item': {\n click: remove_item,\n klass: \"menu-item-1\" // a custom css class for this menu item (usable for styling)\n },\n }, menu_options);\n $('div[data-role=\"prop\"]').contextMenu('context-menu2', {\n 'remove item': {\n click: remove_item,\n klass: \"menu-item-1\" // a custom css class for this menu item (usable for styling)\n },\n }, menu_options);\n }", "function initializeMainMenu() {\r\n\r\n \t\"use strict\";\r\n \tvar $mainMenu = jQuery('#main-menu').children('ul');\r\n\r\n \tif(Modernizr.mq('only all and (max-width: 1024px)') ) {\r\n\r\n \t\r\n\r\n \t\t/* Responsive Menu Events */\r\n \t\tvar addActiveClass = false;\r\n \t\r\n \t\tjQuery('.subMenu').css('display', 'none');\r\n \t\tjQuery(\"li:not(.menu-item-object-neko_homesection) a.hasSubMenu, .menu-item-language-current.menu-item-has-children\").unbind('click');\r\n \t\tjQuery('li',$mainMenu).unbind('mouseenter mouseleave');\r\n\r\n\r\n \t\tjQuery(\"a.hasSubMenu\").on(\"click\", function(e) {\r\n\r\n \t\t\tvar $this = jQuery(this);\t\r\n \t\t\te.preventDefault();\r\n\r\n\r\n \t\t\taddActiveClass = $this.parent(\"li\").hasClass(\"Nactive\");\r\n\r\n\r\n \t\t\t$this.parent(\"li\").removeClass(\"Nactive\");\r\n \t\t\t$this.next('.subMenu').slideUp('fast');\r\n\r\n\r\n\r\n \t\t\tif(!addActiveClass) {\r\n \t\t\t\t$this.parents(\"li\").addClass(\"Nactive\");\r\n \t\t\t\t$this.next('.subMenu').slideDown('fast');\r\n\r\n \t\t\t}else{\r\n \t\t\t\t$this.parent().parent('li').addClass(\"Nactive\");\r\n \t\t\t}\r\n\r\n \t\t\treturn;\r\n \t\t});\r\n\r\n\t\t/** condition for wpml dropdown menu **/\r\n\t\tjQuery(\".menu-item-language-current.menu-item-has-children\").on(\"click touchend\", function(e) {\r\n\r\n\t\t\tvar $this = jQuery(this);\t\r\n\t\t\te.preventDefault();\r\n\r\n\t\t\taddActiveClass = $this.hasClass(\"Nactive\");\r\n\r\n\r\n\t\t\t$this.removeClass(\"Nactive\");\r\n\t\t\t$this.children('.sub-menu').slideUp('fast');\r\n\t\t\t\r\n\r\n\t\t\tif(!addActiveClass) {\r\n\t\t\t\t$this.addClass(\"Nactive\");\r\n\t\t\t\t$this.children('.sub-menu').slideDown('fast');\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t});\r\n\r\n\r\n \t}else{\r\n\r\n\r\n \t\tjQuery(\"li\", $mainMenu).removeClass(\"Nactive\");\r\n \t\tjQuery('li:not(.menu-item-object-neko_homesection) a', $mainMenu).unbind('click');\r\n \t\tjQuery('.subMenu, .sub-menu').css('display', 'none');\r\n\r\n \t\tjQuery('li',$mainMenu).hover(\r\n\r\n \t\t\tfunction() {\r\n\r\n \t\t\t\tvar $this = jQuery(this),\r\n \t\t\t\t$subMenu = $this.children('.subMenu, .sub-menu');\r\n\r\n\r\n \t\t\t\tif( $subMenu.length ){\r\n\r\n \t\t\t\t$this.addClass('hover').stop();\t\r\n\r\n \t\t\t\t}else {\r\n\r\n \t\t\t\t\tif($this.parent().is(jQuery(':gt(1)', $mainMenu))){\r\n\r\n \t\t\t\t\t\t$this.stop(false, true).fadeIn('slow');\r\n\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n\r\n\r\n \t\t\t\tif($this.parent().is(jQuery(':gt(1)', $mainMenu))){\r\n\r\n \t\t\t\t\t$subMenu.stop(true, true).fadeIn(200,'easeInOutQuad'); \r\n \t\t\t\t\t\r\n \t\t\t\t\tif($this.parents(\"li.primary\").hasClass('nk-submenu-right')){\r\n \t\t\t\t\t\t$subMenu.css('left', -$subMenu.parent().outerWidth(true));\r\n \t\t\t\t\t}else{\r\n \t\t\t\t\t\t$subMenu.css('left', $subMenu.parent().outerWidth(true));\r\n \t\t\t\t\t}\r\n\r\n\r\n \t\t\t\t}else{\r\n\r\n \t\t\t\t\t$subMenu.stop(true, true).delay( 300 ).fadeIn(200,'easeInOutQuad'); \t\t\t\t\t\r\n\r\n \t\t\t\t}\r\n\r\n \t\t\t}, function() {\r\n\r\n \t\t\t\tvar $this = jQuery(this),\r\n \t\t\t\t$subMenu = $this.children('ul');\r\n\r\n \t\t\t\tif($this.parent().is(jQuery(':gt(1)', $mainMenu))){\r\n\r\n\r\n \t\t\t\t\t$this.children('ul').hide();\r\n \t\t\t\t\t$this.children('ul').css('left', 0);\r\n\r\n\r\n \t\t\t\t}else{\r\n\r\n \t\t\t\t\t$this.removeClass('hover');\r\n \t\t\t\t\t$subMenu.stop(true, true).delay( 300 ).fadeOut();\r\n \t\t\t\t}\r\n\r\n \t\t\t\tif( $subMenu.length ){$this.removeClass('hover');}\r\n\r\n \t\t\t});\r\n\r\n \t}\r\n }", "function registerMenu(menuName, menuItemArray) {\n /*\n <li class=\"menu-home\">\n\n <a>Home</a>\n \n\n <ul class=\"menu-chapter\">\n <li><a href=\"#\"><span>Home</span></a></li>\n <li><a href=\"#\"><span>About</span></a></li>\n <li><a href=\"#\"><span>Info</span></a></li>\n </ul>\n </li>\n\n */\n var str = \"<li class='menu-home'>\"; //the opening tag\n str += \"<a>\" + menuName + \"</a>\"; //the title\n str += \"<ul class='menu-chapter'>\"; //and the start of submenu\n\n var idsList = [];\n\n for (index = 0; index < menuItemArray.length; ++index) {\n var item = menuItemArray[index];\n str += \"<li><a href='\" + item.target + \"' \" + (item.newTab ? \"target='_blank'\" : \"\") + \"><span>\" + item.name + \"</span></a></li>\";\n }\n\n\n str += \"</ul></li>\"; //the closing tag\n\n //and add to DOM\n $(\"#topnav\").append(str);\n\n //and parse dynamic functions\n for (index = 0; index < idsList.length; ++index) {\n $(\"#\" + idsList[index].id).click(idsList[index].func);\n }\n\n //and close\n navbarClosed = false;\n processMenuHooks();\n closeOrOpenNavbar();\n}", "function init(){\r\n\t// Load the data from the text file\r\n\tloadJSON(function(response){\r\n\t\t// Parse JSON string into object\r\n\t\tvar content = JSON.parse(response);\r\n\t\tvar header = content.header;\r\n\t\tvar menu = content.menu;\r\n\t\tvar title = content.title;\r\n\t\tvar body = content.body;\r\n\t\tvar footer = content.footer;\r\n\t\t\r\n\t\t// Initiate the menu value\r\n\t\tvar menuContent = \"\";\r\n\t\tvar subMenuContent = '';\r\n\t\t\r\n\t\t//Get all the items for the menu\r\n\t\tfor (i=0; i < menu.length; i++){\r\n\t\t\t// If the item has a submenu \r\n\t\t\tif(menu[i].submenu != null && menu[i].submenu.length > 0)\r\n\t\t\t{\r\n\t\t\t\titem = '<a href=\"'+menu[i].url+'\">'+menu[i].title+'<i class=\"down\"></i></a>';\r\n\t\t\t\t\r\n\t\t\t\tfor (j=0; j < menu[i].submenu.length; j++) \r\n\t\t\t\t{\r\n\t\t\t\t\tsubMenuContent += '<a href=\"'+menu[i].submenu[j].url+'\">'+menu[i].submenu[j].title+'</a>';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\titem = '<div class=\"dropdown\"><button class=\"dropbtn\">'+item+'</button><div class=\"dropdown-content\">'+subMenuContent+'</div></div>';\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\titem = '<a href=\"'+menu[i].url+'\">'+menu[i].title+'</a>';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmenuContent += item;\r\n\t\t}\r\n\t\t\r\n\t\t// Prepare the menu to be sent to the page\r\n\t\tmenuContent += '<a href=\"javascript:void(0);\" class=\"icon\" onclick=\"showMenu()\">&#9776;</a>';\r\n\t\t\r\n\t\t// Add the data to the html nodes on the main page\r\n\t\tdocument.getElementById('header').innerHTML = \"<h1>\"+header+\"</h1>\";\r\n\t\tdocument.getElementById('title').innerHTML = title;\r\n\t\tdocument.getElementById('text').innerHTML = body;\r\n\t\tdocument.getElementById('footer').innerHTML = footer;\r\n\t\tdocument.getElementById('topnav').innerHTML = menuContent;\r\n\t\t\r\n\t\t// Remove the loader \r\n\t\tsetTimeout(function(){document.getElementById(\"loader\").style.display = \"none\"}, 3000);\r\n\t\t\r\n\t\t// show the page\r\n\t\tsetTimeout(function(){document.getElementById(\"container\").style.display = \"block\"}, 3000);\r\n\r\n\t});\r\n}", "function setSubmenuBoundries(li) { var bodyWidth = jQueryBuddha(\"body\").width(); var headerOffset = 1000; if (jQueryBuddha(li).find(\">ul.mm-submenu.simple\").length > 0 || jQueryBuddha(li).find(\">ul.mm-submenu.tabbed\").length > 0) { if (jQueryBuddha(li).closest(\".horizontal-mega-menu\").length > 0) { /* get header offset */ /* IF YOU REMOVE .parent(). IT WILL AFFECT THE MENU FROM alex-woo-jewelry.myshopify.com */ jQueryBuddha(li).parent().parents().each(function () { var offsetLeft = jQueryBuddha(this).offset().left + parseInt(jQueryBuddha(this).css(\"padding-left\")); if (offsetLeft < headerOffset && offsetLeft > 0) { headerOffset = offsetLeft; } }); if (headerOffset == 1000 || bodyWidth <= 768) { headerOffset = 0; } /* if (customHeaderOffset && customHeaderOffset<bodyWidth) { headerOffset = (bodyWidth-customHeaderOffset)/2; } MADE THE BELOW MODIFICATION FOR CLIENT https://www.mwfundraising.com/ */ if (customHeaderOffset) { if (customHeaderOffset < bodyWidth) { headerOffset = (bodyWidth - customHeaderOffset) / 2; } else { headerOffset = 0; } } /* set menu width */ if (jQueryBuddha(li).find(\">ul.mm-submenu.simple\").length > 0) { var submenu = jQueryBuddha(li).find(\">ul.mm-submenu.simple\"); } else { var submenu = jQueryBuddha(li).find(\">ul.mm-submenu.tabbed\"); } submenu.css({\"width\": \"auto\", \"left\": \"auto\", \"right\": \"auto\"}); /*submenu.removeAttr(\"style\"); submenu.find(\">li\").removeAttr(\"style\");*/ if (headerOffset * 2 > bodyWidth) { headerOffset = 0; } var headerWidth = bodyWidth - headerOffset * 2; var itemsPerRow = 5; if (headerWidth >= 1020) { /* submenu.attr(\"columns\",5).css(\"width\",headerWidth+\"px\"); */ var style = submenu.attr(\"columns\", 5).attr(\"style\"); style += \"width:\" + headerWidth + \"px !important;\"; submenu.attr(\"style\", style); itemsPerRow = 5; } else if (headerWidth >= 816) { var style = submenu.attr(\"columns\", 4).attr(\"style\"); style += \"width:\" + headerWidth + \"px !important;\"; submenu.attr(\"style\", style); itemsPerRow = 4; } else if (headerWidth >= 612) { var style = submenu.attr(\"columns\", 3).attr(\"style\"); style += \"width:\" + headerWidth + \"px !important;\"; submenu.attr(\"style\", style); itemsPerRow = 3; } else { var style = submenu.attr(\"columns\", 2).attr(\"style\"); style += \"width:\" + headerWidth + \"px !important;\"; submenu.attr(\"style\", style); itemsPerRow = 2; } if (jQueryBuddha(li).find(\">ul.mm-submenu.tabbed\").length > 0) { --itemsPerRow; } /* set simple submenu boundry */ var offsetLeft = jQueryBuddha(li).offset().left + jQueryBuddha(li).outerWidth() / 2; if (offsetLeft < (bodyWidth / 2)) { var left = bodyWidth - (bodyWidth - jQueryBuddha(li).offset().left) - headerOffset; submenu.css(\"left\", -left + \"px\"); } else { var right = bodyWidth - jQueryBuddha(li).offset().left - jQueryBuddha(li).outerWidth() - headerOffset; submenu.css(\"right\", -right + \"px\"); } /* set min height for each element */ jQueryBuddha(li).find(\"ul.mm-submenu.simple>li\").removeAttr(\"style\"); jQueryBuddha(li).find(\".mm-list-name\").removeAttr(\"style\"); /* if simple menu */ if (jQueryBuddha(li).find(\">ul.mm-submenu.simple\").length > 0) { var rowMinHeight = 0; var mmListNameHeight = 0; if (fontSize <= 14) { fontSize = 8; } else if (fontSize > 14 && fontSize <= 18) { fontSize += 6; } else if (fontSize > 18 && fontSize <= 20) { fontSize += 10; } jQueryBuddha(li).find(\"ul.mm-submenu.simple>li\").each(function (i, item) { if (i % itemsPerRow == 0) { rowMinHeight = 0; mmListNameHeight = 0; } if (jQueryBuddha(this).find(\".mm-list-name\").length > 0) { if (jQueryBuddha(this).find(\".mm-list-name\").height() > mmListNameHeight) { mmListNameHeight = jQueryBuddha(this).find(\".mm-list-name\").height(); jQueryBuddha(this).find(\".mm-list-name\").css(\"height\", mmListNameHeight); var previousItems = i; if (previousItems % itemsPerRow != 0) { while (previousItems % itemsPerRow != 0) { jQueryBuddha(li).find(\"ul.mm-submenu.simple\").find(\">li:nth-child(\" + previousItems + \")\").find(\".mm-list-name\").css(\"height\", mmListNameHeight); previousItems--; } } } else { jQueryBuddha(this).find(\".mm-list-name\").css(\"height\", mmListNameHeight); } } if (jQueryBuddha(this).outerHeight() > rowMinHeight) { rowMinHeight = jQueryBuddha(this).outerHeight(); jQueryBuddha(this).css(\"min-height\", rowMinHeight+fontSize); var previousItems = i; if (previousItems % itemsPerRow != 0) { while (previousItems % itemsPerRow != 0) { jQueryBuddha(li).find(\"ul.mm-submenu.simple\").find(\">li:nth-child(\" + previousItems + \")\").css(\"min-height\", rowMinHeight+fontSize); previousItems--; } } } else { jQueryBuddha(this).css(\"min-height\", rowMinHeight+fontSize); } }); /* if tabbed menu */ } else { jQueryBuddha(li).find(\"ul.mm-submenu.tabbed>li\").each(function (i, tab) { var rowMinHeight = 0; var mmListNameHeight = 0; if (fontSize <= 14) { fontSize = 6; } else if (fontSize > 14 && fontSize <= 18) { fontSize += 2; } else if (fontSize > 18 && fontSize <= 20) { fontSize += 6; } jQueryBuddha(tab).find(\"ul.mm-submenu.simple>li\").each(function (j, item) { if (j % itemsPerRow == 0) { rowMinHeight = 0; mmListNameHeight = 0; } if (jQueryBuddha(this).find(\".mm-list-name\").length > 0) { if (jQueryBuddha(this).find(\".mm-list-name\").height() > mmListNameHeight) { mmListNameHeight = jQueryBuddha(this).find(\".mm-list-name\").height(); jQueryBuddha(this).find(\".mm-list-name\").css(\"height\", mmListNameHeight); var previousItems = j; if (previousItems % itemsPerRow != 0) { while (previousItems % itemsPerRow != 0) { jQueryBuddha(this).parent().find(\">li:nth-child(\" + previousItems + \")\").find(\".mm-list-name\").css(\"height\", mmListNameHeight); previousItems--; } } } else { jQueryBuddha(this).find(\".mm-list-name\").css(\"height\", mmListNameHeight); } } if (jQueryBuddha(this).outerHeight() > rowMinHeight) { rowMinHeight = jQueryBuddha(this).outerHeight(); jQueryBuddha(this).css(\"min-height\", rowMinHeight+fontSize); var previousItems = j; if (previousItems % itemsPerRow != 0) { while (previousItems % itemsPerRow != 0) { jQueryBuddha(tab).find(\">ul.mm-submenu.simple\").find(\">li:nth-child(\" + previousItems + \")\").css(\"min-height\", rowMinHeight+fontSize); previousItems--; } } } else { jQueryBuddha(this).css(\"min-height\", rowMinHeight+fontSize); } }); }); /* add arrows */ jQueryBuddha(li).find(\"ul.mm-submenu.tabbed>li\").addClass(\"fa fa-angle-right\"); } } else { jQueryBuddha(li).find(\"ul.mm-submenu.tabbed\").css({\"left\": \"auto\", \"right\": \"auto\"}); var currentStyle = jQueryBuddha(li).find(\"ul.mm-submenu.tabbed\").attr(\"style\"); var newStyle = \"\"; if (currentStyle != undefined) { newStyle += currentStyle + \";height:auto !important;width:auto !important\"; } else { newStyle += \"height:auto !important;width:auto !important\"; } jQueryBuddha(li).find(\"ul.mm-submenu.tabbed\").attr(\"style\", newStyle); jQueryBuddha(li).find(\"ul.mm-submenu.simple\").css({\"left\": \"auto\", \"right\": \"auto\"}); var currentStyle = jQueryBuddha(li).find(\"ul.mm-submenu.simple\").attr(\"style\"); var newStyle = \"\"; if (currentStyle != undefined) { newStyle += currentStyle + \";width:auto !important\"; } else { newStyle += \";width:auto !important\"; } jQueryBuddha(li).find(\"ul.mm-submenu.simple\").attr(\"style\", newStyle); jQueryBuddha(li).find(\"ul.mm-submenu.simple>li\").removeAttr(\"style\"); if (jQueryBuddha(li).width() >= 700) { jQueryBuddha(li).find(\"ul.mm-submenu.simple\").attr(\"columns\", 3); jQueryBuddha(\".vertical-mega-menu ul.mm-submenu.mm-contact\").attr(\"columns\", 2); } else if (jQueryBuddha(li).width() >= 500) { jQueryBuddha(li).find(\"ul.mm-submenu.simple\").attr(\"columns\", 2); jQueryBuddha(\".vertical-mega-menu ul.mm-submenu.mm-contact\").attr(\"columns\", 2); } else { jQueryBuddha(li).find(\"ul.mm-submenu.simple\").removeAttr(\"columns\"); jQueryBuddha(\".vertical-mega-menu ul.mm-submenu.mm-contact\").removeAttr(\"columns\"); } } } else if (jQueryBuddha(li).find(\"ul.mm-submenu.tree\").length > 0) { jQueryBuddha(li).find(\"ul.mm-submenu\").removeAttr(\"style\"); /* tree direction var start if(setTreeDirection == \"set_tree_right\") { jQueryBuddha(li).find(\"ul.mm-submenu\").removeClass(\"tree-open-left\"); jQueryBuddha(li).find(\"ul.mm-submenu.tree li\").removeClass(\"fa fa-angle-right fa-angle-left\"); jQueryBuddha(li).find(\"ul.mm-submenu.tree li\").each(function(){ if (jQueryBuddha(this).find(\"ul.mm-submenu\").length>0) { jQueryBuddha(this).addClass(\"fa fa-angle-right\"); } }); } else if(setTreeDirection == \"set_tree_left\") { jQueryBuddha(li).find(\"ul.mm-submenu\").addClass(\"tree-open-left\"); jQueryBuddha(li).find(\"ul.mm-submenu.tree li\").removeClass(\"fa fa-angle-right fa-angle-left\"); jQueryBuddha(li).find(\"ul.mm-submenu.tree li\").each(function(){ if (jQueryBuddha(this).find(\"ul.mm-submenu\").length>0) { jQueryBuddha(this).addClass(\"fa fa-angle-left\"); } }); } else if(setTreeDirection == \"set_tree_auto\") { tree direction var end */ /* on touch devices refresh tree direction only on main menu item touch, not on children touch. avoids tree direction issues on 3 level menus. same behavior is on desktop hover. */ if (jQueryBuddha(li).parents(\".buddha-menu-item.mega-hover\").length == 0) { var offsetLeft = jQueryBuddha(li).offset().left + jQueryBuddha(li).outerWidth() / 2; if ((offsetLeft < (bodyWidth / 2) && (setTreeDirection == \"set_tree_auto\" || setTreeDirection == undefined)) || setTreeDirection == \"set_tree_right\") { jQueryBuddha(li).find(\"ul.mm-submenu\").removeClass(\"tree-open-left\"); jQueryBuddha(li).find(\"ul.mm-submenu.tree li\").removeClass(\"fa fa-angle-right fa-angle-left\"); jQueryBuddha(li).find(\"ul.mm-submenu.tree li\").each(function () { if (jQueryBuddha(this).find(\"ul.mm-submenu\").length > 0) { jQueryBuddha(this).addClass(\"fa fa-angle-right\"); } }); } else { jQueryBuddha(li).find(\"ul.mm-submenu\").addClass(\"tree-open-left\"); jQueryBuddha(li).find(\"ul.mm-submenu.tree li\").removeClass(\"fa fa-angle-right fa-angle-left\"); jQueryBuddha(li).find(\"ul.mm-submenu.tree li\").each(function () { if (jQueryBuddha(this).find(\"ul.mm-submenu\").length > 0) { jQueryBuddha(this).addClass(\"fa fa-angle-left\"); } }); } } } }", "showAll() {\n this.down(this.$element.find('[data-submenu]'));\n }", "function addMenuItems(itemsArray) {\r\n let container = document.getElementById(\"menu-container\");\r\n\r\n let item;\r\n let a;\r\n\r\n for(let i = 0; i < itemsArray.length; i++) {\r\n item = document.createElement(\"div\");\r\n item.classList.add(\"menu-item\");\r\n\r\n a = document.createElement(\"a\");\r\n a.innerText = itemsArray[i].text;\r\n a.href = itemsArray[i].href;\r\n\r\n item.appendChild(a);\r\n container.appendChild(item);\r\n\r\n if(itemsArray[i].submenu != null) {\r\n addSubmenu(item, 2, itemsArray[i].submenu);\r\n }\r\n }\r\n \r\n}", "function menuOptions() {}", "function init_menus(trees) {\n menus.pane = new Tweakpane.Pane({\n container: div_tweakpane,\n }).addFolder({ \n title: \"Control panel\", expanded: view.control_panel.show\n });\n\n const tab = menus.pane.addTab({ pages: [\n { title: \"Layout\" },\n { title: \"Selections\" },\n { title: \"Advanced\" },\n ]});\n create_menu_basic(tab.pages[0], trees);\n create_menu_selection(tab.pages[1]);\n create_menu_advanced(tab.pages[2])\n\n\n //const tab = menus.pane.addTab({ pages: [\n //{ title: \"Tree view\" },\n //{ title: \"Representation\" },\n //{ title: \"Selection\" },\n //]});\n //create_menu_main(tab.pages[0], trees);\n //create_menu_representation(tab.pages[1]);\n //create_menu_selection(tab.pages[2]);\n}", "function onOpen() { CUSTOM_MENU.add(); }", "function submenuLinksSetAttribute () {\n $('.js-submenu-visible > .js-select-current').each(function () {\n $(this).attr('data-width', $(this).outerWidth())\n })\n }", "buildNav() {\n this.htmlData.root.innerHTML = this.htmlCode(this.htmlData.data);\n this.initHtmlElements();\n this.addMenuListeners();\n this.htmlData.toggleButtonOpen.addEventListener(\"click\", () =>\n this.buttonListener(event)\n );\n this.htmlData.toggleButtonClose.addEventListener(\"click\", () =>\n this.buttonListener(event)\n );\n }", "function display_menu_infos() {\n var menu_item_html = \"\";\n if (data.menu_info != undefined) {\n for (var i = 0; i < data.menu_info.length; i++) {\n menu_item_html += '<ul id=\"menuItem' + i;\n menu_item_html += '\" onclick=\"selectMenu(' + i + ')\">';\n menu_item_html += data.menu_info[i]['name'] + '</ul>';\n }\n }\n $('#horizontal_menu_bar').html(menu_item_html);\n}", "componentDidLoad() {\r\n // get parent menu element\r\n const navGroup = this.element.closest('dxp-nav-group');\r\n const subNavItems = this.element.querySelectorAll('.mega-sub-menu-link');\r\n const links = this.element.querySelectorAll('a');\r\n // Update prop value as true of 'dxp-nav-group' element\r\n this.utility.parentMenuItem(navGroup);\r\n // Add the active class to Main menu & Sub menu link of current web page\r\n this.utility.currentPageMenuLink(links);\r\n // Set the position of level-3 menu-items and the number of menu items of accessibility compliance\r\n // Work for nested element implementation\r\n this.utility.setPosNSize(subNavItems);\r\n }", "function creatMenuItem(element) {\n let section = element.getAttribute('data-nav');\n let menuItem = document.createElement('li');\n menuItem.classList.add('menu__link');\n menuItem.innerHTML = `<a>${section}</a>`;\n navigationMenu.appendChild(menuItem);\n}", "function initialize(){\n addItem(\"Помідори\");\n addItem(\"Картопля з Марсу\");\n addItem(\"Королі помідорів\");\n }", "function _init() {\n var self = this\n , $self = $(self.template(sel_self))\n , template = $(self.template(sel_template)).text()\n ;\n\n // creates items\n _.forEach(self['_items'], function (item) {\n var $item = $(ly.template(template, item));\n $item.appendTo($self);\n });\n\n // handler\n $(self.template(sel_thumbbuttons)).on('click', function (e) {\n e.stopImmediatePropagation();\n return self.bindTo(_clickItem)(this);\n });\n }", "showSubMenu() {\n const item = this.selectedItem;\n const subMenu = this.getSubMenuFromItem(item);\n if (subMenu) {\n this.subMenu = subMenu;\n item.setAttribute('sub-menu-shown', 'shown');\n this.positionSubMenu_(item, subMenu);\n subMenu.show();\n subMenu.parentMenuItem = item;\n this.moveSelectionToSubMenu_(subMenu);\n }\n }", "function init(target){\n var $target = $(target);\n $target.appendTo('body');\n $target.addClass('menu-top');\t// the top menu\n\n var menus = [];\n adjust($target);\n\n var time = null;\n for(var i= 0, len = menus.length; i<len; i++){\n var menu = menus[i];\n wrapMenu(menu);\n menu.children('div.menu-item').each(function(){\n bindMenuItemEvent(target, $(this));\n });\n\n menu.bind('mouseenter', function(){\n if (time){\n clearTimeout(time);\n time = null;\n }\n }).bind('mouseleave', function(){\n time = setTimeout(function(){\n hideAll(target);\n }, 100);\n });\n }\n\n\n function adjust(menu){\n menus.push(menu);\n menu.find('>div').each(function(){\n var item = $(this);\n var submenu = item.find('>div');\n if (submenu.length){\n submenu.insertAfter(target);\n item[0].submenu = submenu;\n adjust(submenu);\n }\n });\n }\n\n\n /**\n * wrap a menu and set it's status to hidden\n * the menu not include sub menus\n */\n function wrapMenu(menu){\n menu.addClass('menu').find('>div').each(function(){\n var item = $(this);\n if (item.hasClass('menu-sep')){\n item.html('&nbsp;');\n } else {\n // the menu item options\n var itemOpts = $.extend({}, $.parser.parseOptions(this, ['name', 'iconCls', 'href']), {\n disabled:(item.prop('disabled') ? true : undefined)\n });\n item.attr('name', itemOpts.name || '').attr('href', itemOpts.href || '');\n\n var text = item.addClass('menu-item').html();\n item.empty().append($('<div class=\"menu-text\"></div>').html(text));\n\n if (itemOpts.iconCls) {\n $('<div class=\"menu-icon\"></div>').addClass(itemOpts.iconCls).appendTo(item);\n }\n if (itemOpts.disabled) {\n setDisabled(target, item[0], true);\n }\n\n if (item[0].submenu){\n $('<div class=\"menu-rightarrow\"></div>').appendTo(item);\t// has sub menu\n }\n\n item._outerHeight(22);\n }\n });\n menu.hide();\n }\n }", "function onSubmenuBeforeShow(p_sType, p_sArgs) {\n\n\tvar oBody,\n oElement,\n oShadow,\n oUL;\n \n\n if (this.parent) {\n\n oElement = this.element;\n\n /*\n Get a reference to the Menu's shadow element and \n set its \"height\" property to \"0px\" to syncronize \n it with the height of the Menu instance.\n */\n\n oShadow = oElement.lastChild;\n oShadow.style.height = \"0px\";\n\n \n /*\n \tStop the Animation instance if it is currently \n animating a Menu.\n */ \n \n if (oAnim && oAnim.isAnimated()) { \n oAnim.stop();\n oAnim = null; \n }\n\n\t\t\t/*\n Set the body element's \"overflow\" property to \n \"hidden\" to clip the display of its negatively \n positioned <ul> element.\n */ \n\n\t\t\t\toBody = this.body;\n\n\n\t\t\t\t// Check if the menu is a submenu of a submenu.\n\n\t\t\t\tif (this.parent && \n\t\t\t\t\t\t!(this.parent instanceof YAHOO.widget.MenuBarItem)) {\n \n\n\t\t/*\n\t\t\t\tThere is a bug in gecko-based browsers where \n\t\t\t\tan element whose \"position\" property is set to \n\t\t\t\t\"absolute\" and \"overflow\" property is set to \n\t\t\t\t\"hidden\" will not render at the correct width when\n\t\t\t\tits offsetParent's \"position\" property is also \n\t\t\t\tset to \"absolute.\" It is possible to work around \n\t\t\t\tthis bug by specifying a value for the width \n\t\t\t\tproperty in addition to overflow.\n\t\t*/\n\n\t\t\t\t\t\tif (ua.gecko) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\toBody.style.width = oBody.clientWidth + \"px\";\n\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\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\tSet a width on the submenu to prevent its \n\t\t\t\t\t\t\t\twidth from growing when the animation \n\t\t\t\t\t\t\t\tis complete.\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (ua.ie == 7) {\n\n\t\t\t\t\t\t\t\toElement.style.width = oElement.clientWidth + \"px\";\n\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\n \n\t\t\t\toBody.style.overflow = \"hidden\";\n\n\n\t\t\t\t/*\n\t\t\t\t\t\tSet the <ul> element's \"marginTop\" property \n\t\t\t\t\t\tto a negative value so that the Menu's height\n\t\t\t\t\t\tcollapses.\n\t\t\t\t*/ \n\n\t\t\t\toUL = oBody.getElementsByTagName(\"ul\")[0];\n\n\t\t\t\toUL.style.marginTop = (\"-\" + oUL.offsetHeight + \"px\");\n\t\t\n\t\t}\n\n}", "function menuItem( li ) {\n\t\t\t// Cache DOM elements\n\t\t\tvar $li = $( li );\n\t\t\tvar $link = $li.children( 'a' );\n\t\t\tvar $parent = $li.parents( 'ul.sub-menu' );\n\t\t\tvar $sub = $li.children( 'ul' );\n\t\t\tvar $last = $parent.find( 'a' ).last();\n\t\t\tvar $toggle = $li.children( '.dropdown-toggle' );\n\t\t\tvar $toptog = $parent.find( '.dropdown-toggle' );\n\t\t\t// Bind event handlers\n\t\t\t$toggle.on( 'click', toggleSubMenu );\n\t\t\t$link.on( 'focus', showSubMenu );\n\t\t\t$link.on( 'mousedown', preventFocus );\n\t\t\t$link.on( 'click touchstart', showSubMenu );\n\t\t\t$link.on( 'blur', blurMenu );\n\t\t\t// $( 'body' ).on( 'click touchstart', blurMenu );\n\t\t\t// Determine if a submenu is visible or not\n\t\t\tfunction isVisible( $el ) {\n\t\t\t\t// If has visibility : hidden or display : none, or opacity : 0 -> return false ( not visible )\n\t\t\t\tif( $el.css( 'visibility') === 'hidden' || $el.css( 'display' ) === 'none' || $el.css( 'opacity' ) === '0' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tfunction preventFocus( event ) {\n\t\t\t\tif( event.isTrigger === undefined ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Define how toggle buttons handle click events\n\t\t\tfunction toggleSubMenu( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif( $sub.hasClass( 'focused' ) ) {\n\t\t\t\t\t$sub.slideUp( 300, function() {\n\t\t\t\t\t\t$sub.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t\t\t$li.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t\t});\n\t\t\t\t\t$toggle.removeClass( 'focused' ).attr( 'aria-expanded', 'false' );\n\t\t\t\t\t$li.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t$sub.slideDown(300, function() {\n\t\t\t\t\t$sub.addClass( 'focused' ).attr( 'aria-hidden', 'false' );\n\t\t\t\t});\n\t\t\t\t$toggle.addClass( 'focused' ).attr( 'aria-expanded', 'true' );\n\t\t\t\t$li.addClass( 'focused' ).attr( 'aria-expanded', 'true' );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Define how to handle clicks (for touch support)\n\t\t\tfunction showSubMenu( event ) {\n\n\t\t\t\t// If this has no sub item, there's nothing to do\n\t\t\t\tif( $sub === undefined ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// If we have toggle buttons, we can let the click pass through\n\t\t\t\tif( $toggle !== undefined && $toggle.length !== 0 && isVisible( $toggle ) && event.type !== 'focus' ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// If this sub menu is already visible, there's nothing to do\n\t\t\t\tif( isVisible( $sub ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// If we made it here, we can capture the click and open the sub menu instead\n\t\t\t\tif( event.type !== 'focus' ) {\n\t\t\t\t\t$link.focus();\n\t\t\t\t}\n\t\t\t\tevent.preventDefault();\n\t\t\t\t$sub.addClass( 'focused' ).attr( 'aria-hidden', 'false' );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Define behavior on blur\n\t\t\tfunction blurMenu( event ) {\n\t\t\t\t// If there is no parent or sub, we can just bail\n\t\t\t\tif( $parent === undefined && $sub === undefined ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t// Get element that is gaining focus\n\t\t\t\t\tvar target = $( ':focus' );\n\t\t\t\t\t// If target is within scope of this nav item, lets bail\n\t\t\t\t\tif( $parent.find( target ).length || $sub.find( target ).length || target.hasClass( 'dropdown-toggle' ) ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t// If we made it here, let's close the parent & sub\n\t\t\t\t\t$parent.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t\t$sub.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t}, 1 );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// Simple force close\n\t\t\tfunction close() {\n\t\t\t\t// If there is no parent or sub, we can just bail\n\t\t\t\tif( $parent === undefined && $sub === undefined ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$link.blur();\n\t\t\t\t// If we made it here, let's close the parent & sub\n\t\t\t\t$parent.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t$sub.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t}\n\t\t\t// Define methods we expose\n\t\t\treturn {\n\t\t\t\tclose : close,\n\t\t\t};\n\t\t}", "function buildSubmenu() {\n\n // Affix submenu\n $('.submenu').affix({\n offset: { top: $('.subnav').offset().top }\n });\n\n\n // Create parent submenu items\n $('.content > h2').each(function () {\n var href = $(this).attr('id'),\n title = $(this).text(),\n link = '<a href=\"#' + href + '\">' + title + '</a>',\n items = '',\n submenu = [];\n\n //\n function subMenu(id, title) {\n return {\n id: id,\n title: title\n }\n }\n\n // Add to submenu Array\n $(this).nextUntil('h2', 'h3').each(function () {\n var subhref = href + '_' + $(this).text().replace(/\\,/g, '').replace(/\\&/g, '').replace(/\\ /g, '-').replace(/\\_/g, '-').toLowerCase(),\n subtitle = $(this).text();\n submenu.push(subMenu(subhref, subtitle));\n });\n\n items += '<li class=\"level1\">';\n items += link;\n // Create child submenu items (2nd level)\n if (submenu.length) {\n items += '<ul class=\"nav\">';\n submenu.forEach(function (item) {\n var itemHref = item['id'];\n var itemTitle = item['title'];\n var submenuItem = '<li><a href=\"#' + itemHref + '\">' + itemTitle + '</a></li>';\n items += submenuItem;\n });\n items += '</ul>';\n }\n items += '</li>';\n\n $('.submenu').append(items);\n });\n\n }", "initMenu() {\n this.on('menu-selected', event => {\n // Focus on search bar if in most popular tab (labeled All)\n if (event.choice === 'most-popular') {\n this.focusSearchBar();\n }\n\n this.currentlySelected = event.choice;\n }, this);\n\n // call init menu from sdk\n initNavbar(this.menu);\n }", "function initMenu() {\n var ProjectionSelector = vjs.extend(vjs.getComponent('MenuButton'), {\n constructor : function(player, options) {\n player.availableProjections = options.availableProjections || [];\n vjs.getComponent('MenuButton').call(this, player, options);\n var items = this.el().firstChild\n var wrapper = vjs.createEl(\"div\", {\n className : 'vjs-control-content'\n })\n this.el().replaceChild(wrapper, items)\n wrapper.appendChild(items)\n }\n });\n\n vjs.registerComponent('ProjectionSelector', ProjectionSelector);\n\n var ProjectionSelection = vjs.extend(vjs.getComponent('Button'), {\n constructor : function(player, options) {\n this.availableProjections = options.availableProjections || [];\n },\n className : 'vjs-res-button vjs-menu-button vjs-control',\n role : 'button',\n 'aria-live' : 'polite', // let the screen reader user know that the text of the button may change\n tabIndex : 0\n });\n\n vjs.registerComponent('ProjectionSelection', ProjectionSelection);\n\n //Top Item - not selectable\n var ProjectionTitleMenuItem = vjs.extend(vjs.getComponent('MenuItem'), {\n constructor : function(player, options) {\n vjs.getComponent('MenuItem').call(this, player, options);\n this.off('click'); //no click handler\n }\n });\n\n vjs.registerComponent('ProjectionTitleMenuItem', ProjectionTitleMenuItem);\n\n //Menu Item\n var ProjectionMenuItem = vjs.extend(vjs.getComponent('MenuItem'), {\n constructor : function(player, options){\n options.label = options.res;\n options.selected = (options.res.toString() === player.getCurrentRes().toString());\n vjs.getComponent('MenuItem').call(this, player, options);\n this.resolution = options.res;\n this.on('click', this.onClick);\n player.on('changeProjection', vjs.bind(this, function() {\n if (this.resolution === player.getCurrentRes()) {\n this.selected(true);\n } else {\n this.selected(false);\n }\n }));\n }\n });\n\n // Handle clicks on the menu items\n ProjectionMenuItem.prototype.onClick = function() {\n var player = this.player(),\n button_nodes = player.controlBar.projectionSelection.el().firstChild.children,\n button_node_count = button_nodes.length;\n\n // Save the newly selected resolution in our player options property\n player.current_proj = this.resolution\n changeProjection(this.resolution);\n player.trigger('changeProjection');\n\n // Update the button text\n while ( button_node_count > 0 ) {\n button_node_count--;\n if ( 'vjs-current-res' === button_nodes[button_node_count].className ) {\n button_nodes[button_node_count].innerHTML = this.resolution;\n break;\n }\n }\n };\n\n vjs.registerComponent('ProjectionMenuItem', ProjectionMenuItem);\n\n // Create a menu item for each available projection\n vjs.getComponent('ProjectionSelector').prototype.createItems = function() {\n var player = this.player(),\n items = [];\n\n // Add the menu title item\n items.push( new vjs.getComponent('ProjectionTitleMenuItem')( player, {\n el : vjs.createEl( 'li', {\n className : 'vjs-menu-title vjs-res-menu-title',\n innerHTML : 'Projections'\n })\n }));\n\n // Add an item for each available resolution\n player.availableProjections.forEach(function (proj) {\n items.push( new vjs.getComponent('ProjectionMenuItem')( player, {\n res : proj\n }));\n });\n\n return items;\n };\n\n }", "function initializeMenu() {\n robotMenu = Menus.addMenu(\"Robot\", \"robot\", Menus.BEFORE, Menus.AppMenuBar.HELP_MENU);\n\n CommandManager.register(\"Select current statement\", SELECT_STATEMENT_ID, \n robot.select_current_statement);\n CommandManager.register(\"Show keyword search window\", TOGGLE_KEYWORDS_ID, \n search_keywords.toggleKeywordSearch);\n CommandManager.register(\"Show runner window\", TOGGLE_RUNNER_ID, \n runner.toggleRunner);\n CommandManager.register(\"Run test suite\", RUN_ID,\n runner.runSuite)\n robotMenu.addMenuItem(SELECT_STATEMENT_ID, \n [{key: \"Ctrl-\\\\\"}, \n {key: \"Ctrl-\\\\\", platform: \"mac\"}]);\n \n robotMenu.addMenuDivider();\n\n robotMenu.addMenuItem(RUN_ID,\n [{key: \"Ctrl-R\"},\n {key: \"Ctrl-R\", platform: \"mac\"},\n ]);\n\n robotMenu.addMenuDivider();\n\n robotMenu.addMenuItem(TOGGLE_KEYWORDS_ID, \n [{key: \"Ctrl-Alt-\\\\\"}, \n {key: \"Ctrl-Alt-\\\\\", platform: \"mac\" }]);\n robotMenu.addMenuItem(TOGGLE_RUNNER_ID,\n [{key: \"Alt-R\"},\n {key: \"Alt-R\", platform: \"mac\"},\n ]);\n }", "function MenuItem_MenuItem(theMenuData, theParent)\n{\n\tthis.MenuData = theMenuData; \t\t//our menudata\n\tthis.Parent = theParent; \t\t\t//the parent menu item\n\tthis.SubMenus = new Array(); \t\t//array of submenus\n\tthis.Text = \"\"; \t\t\t\t\t//the text of the menu\n\tthis.ShortCut = \"\"; \t\t\t\t//its shortcut\n\tthis.Exception = new Array(); \t//the exception for the action\n\tthis.State = __MENU_NODE_SEPARATOR; //default state: separator\n\tthis.LeftImageIndex = -1; \t\t\t//the index of the left image (-1 for none)\n\tthis.RightImageIndex = -1; \t\t\t//the index of the right image (-1 for none)\n\tthis.BackgroundColor = null; \t\t//The background color (null to use default)\n\tthis.ForegroundColor = null; \t\t//The foreground color (null to use default)\n\tthis.PopupMenu = null; \t\t\t\t//our popup menu\n\tthis.MenuBarHTML = null; \t\t\t//Our menubar item\n\tthis.MenuPopupHTML = null; \t\t\t//Our popup menu item\n\tthis.ChildImageHTML = null; \t\t//Our child Image\n\tthis.ShortCutMaps = {};\t\t\t\t//our children's shortcuts\n\t//has parent?\n\tif (this.Parent)\n\t{\n\t\t//add ourselves to the parent's submenu array\n\t\tthis.Parent.SubMenus.push(this);\n\t}\n\n}", "constructor(){\n\t\tthis.menuIcon = document.querySelector(\".page-navigation__menu-icon\");\n\t\tthis.menuContent = document.querySelector(\".page-navigation\");\n\t\tthis.events(); // call events in constructor method\n\t}", "initMenus(menus) {\n let xhtml = null\n let manageMenu = menus[2];\n if (manageMenu && manageMenu.sub_menus && manageMenu.sub_menus.length) {\n xhtml = manageMenu.sub_menus.map((menu, index) => {\n return (\n <SelectMenuLink key={index} menu={menu} />\n )\n })\n }\n return xhtml\n }", "function StartMenu() {\n //this.menu = new Menu('start-menu');\n this.shutDownMenu = new Menu('shutdown-menu');\n this.shutDownButton = new MenuButton('options-button', this.shutDownMenu);\n Menu.apply(this, ['start-menu']);\n}", "function navigationMenu() {\n \"use strict\";\n jQuery('.mobile-menu .mobile-menu-inner').addClass('treeview-list');\n jQuery(\".mobile-menu .mobile-menu-inner.treeview-list\").treeview({\n animated: \"slow\",\n collapsed: true,\n unique: true\n });\n}", "function initMenuUI() {\n clearMenu();\n let updateBtnGroup = $(\".menu-update-btn-group\");\n let modifyBtnGroup = $(\".menu-modify-btn-group\");\n let delBtn = $(\"#btn-delete-menu\");\n\n setMenuTitle();\n $(\"#btn-update-menu\").text(menuStatus == \"no-menu\" ? \"创建菜单\" : \"更新菜单\");\n menuStatus == \"no-menu\" ? hideElement(modifyBtnGroup) : unhideElement(modifyBtnGroup);\n menuStatus == \"no-menu\" ? unhideElement(updateBtnGroup) : hideElement(updateBtnGroup);\n menuStatus == \"no-menu\" ? setDisable(delBtn) : setEnable(delBtn);\n }", "function PopupMenu() {\n\t\tthis.id = \"popupmenu\";\n\t\tthis.items = null;\n\t\tthis.attachListItems = attachListItemsToPopupMenu;\n\t\tthis.write = writePopupMenu;\n\t\tthis.show = showPopupMenu;\n\t\tthis.hide = hidePopupMenu;\n\t\tthis.allocate = allocatePopupMenu;\n\t}", "function createMenu($this){\n if(isList($this)){\n \n //generate select element as a string to append via jQuery\n var selectString = '<select id=\"mobileMenu-'+$this.attr('id')+'\" class=\"mobileMenu\">';\n \n //create first option (no value)\n selectString += '<option value=\"\">'+settings.topOptionText+'</option>';\n \n //loop through list items\n $this.find('li').each(function(){\n \n //when sub-item, indent\n var levelStr = '';\n var len = $(this).parents('ul, ol').length;\n for(i=1;i<len;i++){levelStr += settings.indentString;}\n \n //get url and text for option\n var link = $(this).find('a:first-child').attr('href');\n var text = levelStr + $(this).clone().children('ul, ol').remove().end().text();\n \n //add option\n selectString += '<option value=\"'+link+'\">'+text+'</option>';\n });\n \n selectString += '</select>';\n \n //append select element to ul/ol's container\n $this.parent().append(selectString);\n \n //add change event handler for mobile menu\n $('#mobileMenu-'+$this.attr('id')).change(function(){\n goToPage($(this));\n });\n \n //hide current menu, show mobile menu\n showMenu($this);\n } else {\n alert('mobileMenu will only work with UL or OL elements!');\n }\n }", "function VixenMenuClass(objMenu)\n{\n\t//Config\n\tthis.config = \n\t{ \n\t\t'Level1': \n\t\t{\n\t\t\t'left': 10,\n\t\t\t'width': 50,\n\t\t\t'height': 50,\n\t\t\t'spacing': 5,\n\t\t\t'backgroundColor': \"#FFFFFF\"\n\t\t},\n\t\t'Level2': \n\t\t{\n\t\t\t'left': 0,\n\t\t\t'width': 160,\n\t\t\t'height': 20,\n\t\t\t'spacing': 5,\n\t\t\t'backgroundColor': \"#D5E0F8\"\n\t\t},\n\t\t'waitOpen': 0,\n\t\t'waitCloseLevel': 500,\n\t\t'waitClose': 1500,\n\t\t'waitCloseWhenSelected': 400,\n\t\t'highlightColor': \"#FFFFCC\"\n\t};\n\t\n\tthis.objMenu = objMenu;\n\t\n\tthis.SetMenu = function(objMenu)\n\t{\n\t\tthis.objMenu = objMenu;\n\t}\n\t\n\tthis.Render = function()\n\t{\n\t\t//debug ('firsttime');\n\t\tvar strKey;\n\t\tvar objNode;\n\t\tvar elmNode;\n\t\tvar top = this.config.Level1.spacing;\n\t\t\n\t\t//Find menu container\n\t\telmMenu = document.getElementById('VixenMenu');\n\t\telmMenu.style['overflow'] = 'visible';\n\t\t\n\t\t//Render the initial menu (top-level)\n\t\tfor (strKey in this.objMenu)\n\t\t{\n\t\t\t//Build new element\n\t\t\tobjNode = document.createElement('a');\n\t\t\tobjNode.setAttribute('className', 'ContextMenuItem');\n\t\t\tobjNode.setAttribute('class', 'ContextMenuItem');\n\t\t\tobjNode.setAttribute('Id', 'VixenMenu_' + strKey);\n\n\t\t\t//Build the image for the new element\n\t\t\tobjNodeImage = document.createElement('img');\n\t\t\tobjNodeImage.setAttribute('src', 'img/template/' + strKey.toLowerCase().replace(/ /g, '_') + '.png');\n\n\t\t\tobjNode.appendChild(objNodeImage);\n\n\t\t\t//Attach to elmMenu\n\t\t\telmMenu.appendChild(objNode);\n\t\t\telmNode = document.getElementById('VixenMenu_' + strKey);\n\t\t\t\n\t\t\t//Add styles\n\t\t\t//new_node.style[c_attrib] = value\n\t\t\telmNode.style['top'] \t\t\t\t= top;\n\t\t\telmNode.style['left'] \t\t\t\t= this.config.Level1.left;\n\t\t\telmNode.style['width'] \t\t\t\t= this.config.Level1.width;\n\t\t\telmNode.style['height'] \t\t\t= this.config.Level1.height;\n\t\t\telmNode.style['backgroundColor']\t= this.config.Level1.backgroundColor;\n\t\t\telmNode.style['position'] \t\t\t= 'absolute';\n\t\t\telmNode.style['zIndex']\t\t\t\t= 2;\n\t\t\telmNode.DefaultBackgroundColor\t\t= this.config.Level1.backgroundColor;\n\t\t\t\n\t\t\ttop = top + this.config.Level1.height + this.config.Level1.spacing;\n\t\t\t\n\t\t\t//Add events\n\t\t\telmNode.onclick = function(event) {Vixen.Menu.HandleClick(this)};\n\t\t\telmNode.onmouseover = function(event) {Vixen.Menu.HandleMouseOver(this)};\n\t\t\telmNode.onmouseout = function(event) {Vixen.Menu.HandleMouseOut(this)};\n\t\t\telmNode.style.cursor = \"default\";\n\t\t\t\n\t\t\t//Add some more crap\n\t\t\telmNode.action = this.objMenu[strKey];\n\t\t\tif (typeof(elmNode.action) == 'string')\n\t\t\t{\n\t\t\t\t// Don't set the link if the action opens a popup\n\t\t\t\tif (elmNode.action.substr(0, 11) == \"javascript:\")\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// The item is an action, not a menu. Set the link\n\t\t\t\t\telmNode.setAttribute('href', this.objMenu[strKey]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telmNode.level = 1;\n\t\t}\n\t}\n\t\n\tthis.RenderSubMenu = function(elmMenuItem)\n\t{\n\t\tvar strKey;\n\t\tvar objTextNode;\n\t\tvar elmNode;\n\t\tvar top = 0;\n\n\t\tif (typeof(elmMenuItem) == 'string')\n\t\t{\n\t\t\telmMenuItem = document.getElementById(elmMenuItem);\t\n\t\t}\n\n\t\tvar object = document.getElementById('VixenMenu__' + elmMenuItem.level);\n\t\tif (object)\n\t\t{\n\t\t\tobject.parentNode.removeChild(object);\n\t\t}\n\t\t\n\t\t//Create and attach the container div for the rest of the submenu to sit in\n\t\tvar objContainer = document.createElement('div');\n\t\tobjContainer.setAttribute('Id', 'VixenMenu__' + elmMenuItem.level);\n\t\tobjContainer.style.top\t\t\t\t= this.RemovePx(elmMenuItem.style['top']);\n\t\tobjContainer.style.left\t\t\t\t= this.RemovePx(elmMenuItem.style['left']) + this.RemovePx(elmMenuItem.style['width']) + this.config.Level2.spacing;\n\t\tobjContainer.style.position\t\t\t= 'absolute';\n\t\tobjContainer.style.overflow\t\t\t= 'visible';\n\t\tobjContainer.style.backgroundColor\t= \"#FFFFFF\";\n\t\tobjContainer.style.width\t\t\t= this.config.Level2.width + this.config.Level2.spacing;\n\t\tobjContainer.style.zIndex\t\t\t= 2;\n\n\t\telmMenuItem.parentNode.appendChild(objContainer);\n\t\tvar elmContainer = document.getElementById('VixenMenu__' + elmMenuItem.level);\n\t\t//elmContainer.style['top'] = this.RemovePx(elmMenuItem.style['top']);\n\t\t//elmContainer.style['left'] = this.RemovePx(elmMenuItem.style['left']) + this.RemovePx(elmMenuItem.style['width']) + this.config.Level2.spacing;\n\t\t//elmContainer.style['position'] = 'absolute';\n\t\t//elmContainer.style['overflow'] = 'visible';\n\n\t\tvar intContainerHeight = 0;\n\t\t\n\t\t//Render the menu\n\t\tfor (strKey in elmMenuItem.action)\n\t\t{\n\t\t\t//Build new element\n\t\t\telmNode = document.createElement('div');\n\t\t\telmNode.setAttribute('Id', elmMenuItem.id + \"_\" + strKey);\n\t\t\t\n\t\t\tobjTextNode = document.createTextNode(strKey);\n\t\t\t\n\t\t\t// Add an anchor element to the menu item div if the action of the menu item is a string and does not envoke any javascript\n\t\t\t// This is done, so the user has the option of opening the page in a new tab\n\t\t\t// It is also done in a very hacky fashion as the user has to right click on the text; it can't just be anywhere on the menu item\n\t\t\tif ((typeof(elmMenuItem.action[strKey]) == 'string') && (elmMenuItem.action[strKey].substr(0, 11) != \"javascript:\"))\n\t\t\t{\n\t\t\t\telmLink = document.createElement('a');\n\t\t\t\telmLink.setAttribute('href', elmMenuItem.action[strKey]);\n\t\t\t\telmLink.setAttribute('id', \"ContextMenuItemLink\");\n\t\t\t\t//elmLink.appendChild(objTextNode);\n\t\t\t\telmLink.innerHTML = strKey;\n\t\t\t\telmNode.appendChild(elmLink);\n\t\t\t\t//elmLink.style['color']\t= \"#000000\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Add text to the node\n\t\t\t\telmNode.appendChild(objTextNode);\n\t\t\t}\n\t\t\t\n\t\t\t//Add styles\n\t\t\t//new_node.style[c_attrib] = value\n\t\t\telmNode.style['top'] \t\t\t= top;\n\t\t\telmNode.style['left'] \t\t\t= this.config.Level2.left; \n\t\t\telmNode.style['width'] \t\t\t= this.config.Level2.width;\n\t\t\telmNode.style['height'] \t\t= this.config.Level2.height;\n\t\t\telmNode.style['backgroundColor'] = this.config.Level2.backgroundColor;\n\t\t\telmNode.style['position']\t\t= 'absolute';\n\t\t\telmNode.style['zIndex']\t\t\t= 3;\n\t\t\telmNode.DefaultBackgroundColor\t= this.config.Level2.backgroundColor;\n\n\t\t\ttop = top + this.config.Level2.height + this.config.Level2.spacing;\n\t\t\t\n\t\t\t//Add events\n\t\t\telmNode.onclick\t\t\t= function(event) {Vixen.Menu.HandleClick(this)};\n\t\t\telmNode.onmouseover\t\t= function(event) {Vixen.Menu.HandleMouseOver(this)};\n\t\t\telmNode.onmouseout\t\t= function(event) {Vixen.Menu.HandleMouseOut(this)};\n\t\t\t\n\t\t\t//Add some more crap\n\t\t\telmNode.action = elmMenuItem.action[strKey];\n\t\t\telmNode.level = elmMenuItem.level + 1;\n\t\t\telmNode.style.cursor = \"default\";\n\n\t\t\t// set the class\n\t\t\telmNode.className \t= 'ContextMenuItem';\n\t\t\telmNode.Class \t\t= 'ContextMenuItem';\n\t\t\t\n\t\t\t// Add the menu item element to the container\n\t\t\telmContainer.appendChild(elmNode);\n\t\t}\n\t}\n\t\n\tthis.Close = function(intLevel)\n\t{\n\t\tvar object = document.getElementById('VixenMenu__' + intLevel);\n\t\tif (object)\n\t\t{\n\t\t\tobject.parentNode.removeChild(object);\n\t\t}\n\t}\n\t\n\tthis.HandleClick = function(objMenuItem)\n\t{\n\t\tclearTimeout(this.timeoutOpen);\n\t\tclearTimeout(this.timeoutClose);\n\t\tif (typeof(objMenuItem.action) == 'string')\n\t\t{\n\t\t\t// Check if the menu item is a href or a call to javascript code\n\t\t\tif (objMenuItem.action.substr(0, 11) == \"javascript:\")\n\t\t\t{\n\t\t\t\t// Execute objMenuItem.action as javascript\n\t\t\t\teval(objMenuItem.action.substr(11));\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\t// Follow the link\n\t\t\t\tdocument.location.href = objMenuItem.action;\n\t\t\t}\n\t\t\tthis.timeoutClose = setTimeout(\"Vixen.Menu.Close(1)\", this.config.waitCloseWhenSelected);\t\t\t\n\t\t}\n\t\telse if (typeof(objMenuItem.action) == 'object')\n\t\t{\n\t\t\t//display submenu\n\t\t\t// no need, it adds unnecessary overhead\n\t\t\t//this.RenderSubMenu(objMenuItem);\t\t\t\n\t\t}\n\t}\n\t\n\tthis.HandleMouseOver = function(objMenuItem)\n\t{\n\t\tclearTimeout(this.timeoutClose);\n\t\t\n\t\t//objMenuItem.setAttribute('className', 'ContextMenuItemHighlight');\n\t\t//objMenuItem.setAttribute('class', 'ContextMenuItemHighlight');\n\t\t\n\t\tobjMenuItem.style['backgroundColor'] = this.config.highlightColor;\n\t\t\n\t\tif (typeof(objMenuItem.action) == 'string')\n\t\t{\n\t\t\tthis.timeoutOpen = setTimeout(\"Vixen.Menu.Close('\" + objMenuItem.level + \"');\", this.config.waitCloseLevel);\n\t\t}\n\t\tif (typeof(objMenuItem.action) == 'object')\n\t\t{\n\t\t\tclearTimeout(this.timeoutOpen);\n\n\t\t\t//display submenu\n\t\t\tthis.timeoutOpen = setTimeout(\"Vixen.Menu.RenderSubMenu('\" + objMenuItem.id + \"');\", this.config.waitOpen);\t\t\t\n\t\t}\n\t}\n\t\n\tthis.HandleMouseOut = function(objMenuItem)\n\t{\n\t\tclearTimeout(this.timeoutOpen);\n\t\t\n\t\t//objMenuItem.setAttribute('className', 'ContextMenuItem');\n\t\t//objMenuItem.setAttribute('class', 'ContextMenuItem');\n\t\tobjMenuItem.style['backgroundColor'] = objMenuItem.DefaultBackgroundColor;\n\t\t\n\t\tthis.timeoutClose = setTimeout(\"Vixen.Menu.Close(1)\", this.config.waitClose);\n\n\t}\n\t\n\tthis.RemovePx = function(value)\n\t{\n\t\tif (value != Number(value))\n\t\t{\n\t\t\t\treturn Number(value.slice(0,-2))\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\treturn Number(value);\n\t\t}\n\t} \n}", "function generateSubNav(item, i, array) {\n\n // Create new list item\n var subItem = document.createElement('Li');\n\n // Set the new list items attributes\n subItem.setAttribute('class', 'navitem secondary');\n subItem.setAttribute('role', 'menuitem');\n subItem.setAttribute('tabindex', '-1');\n\n // Create new link element with item url\n var a = document.createElement('a');\n a.setAttribute('href', item.url);\n\n // Add item label as the text\n a.appendChild(document.createTextNode(item.label));\n\n // Add event listener to a to hide menu card when clicked and navigating to new page\n a.onclick = function() {\n if (isMobile()) {\n console.log('is mobile');\n toggleNavbar();\n }\n };\n\n // Add the link to the new list item\n subItem.appendChild(a);\n\n // Append subItem to subMenu\n subMenu.appendChild(subItem);\n }", "function init() {\n var anchor;\n\n for (var i = 0; i < nav.length; i++) {\n anchor = \"<a href='#' data-id='\" + i + \"'>\" + nav[i].innerHTML + \"</a>\";\n nav[i].innerHTML = anchor;\n nav[i].firstChild.addEventListener(\"click\", swapOnClick);\n }\n\n nav[0].firstChild.classList.add(\"active\");\n }", "function createMenu($this){\n if(isList($this)){\n\n //generate select element as a string to append via jQuery\n var selectString = '<select id=\"mobileMenu_'+$this.attr('id')+'\" class=\"mobileMenu\">';\n\n //create first option (no value)\n selectString += '<option value=\"\">'+settings.topOptionText+'</option>';\n\n //loop through list items\n $this.find('li').each(function(){\n\n //when sub-item, indent\n var levelStr = '';\n var len = $(this).parents('ul, ol').length;\n for(i=1;i<len;i++){levelStr += settings.indentString;}\n\n //get url and text for option\n var link = $(this).find('a:first-child').attr('href');\n var text = levelStr + $(this).clone().children('ul, ol').remove().end().text();\n\n //add option\n selectString += '<option value=\"'+link+'\">'+text+'</option>';\n });\n\n selectString += '</select>';\n\n //append select element to ul/ol's container\n $this.parent().append(selectString);\n\n //add change event handler for mobile menu\n $('#mobileMenu_'+$this.attr('id')).change(function(){\n goToPage($(this));\n });\n\n //hide current menu, show mobile menu\n showMenu($this);\n } else {\n alert('mobileMenu will only work with UL or OL elements!');\n }\n }", "function JmpMenu()\n {\n this.ruleID = 'JmpMenu';\n }", "function Scene_Menu() {\n this.initialize.apply(this, arguments);\n}", "function initMainNavigation(container) {\n\n // Add dropdown toggle that displays child menu items. Used on mobile and screenreaders.\n var dropdownToggle = $('<button />', {'class': 'dropdown-toggle', 'aria-expanded': false})\n //.append(seasaltpressScreenReaderText.icon)\n .append($('<span />', {'class': 'screen-reader-text', text: seasaltpressScreenReaderText.expand}));\n\n container.find('.menu-item-has-children > a, .page_item_has_children > a').after(dropdownToggle);\n\n // Set the active submenu dropdown toggle button initial state.\n container.find('.current-menu-ancestor > button, .current-menu-parent')\n .addClass('toggled-on')\n .attr('aria-expanded', 'true')\n .find('.screen-reader-text')\n .text(seasaltpressScreenReaderText.collapse);\n // Set the active submenu initial state.\n container.find('.current-menu-ancestor > .sub-menu').addClass('toggled-on').slideDown(); //added slidedown\n\n\n container.find('.dropdown-toggle').click(function (e) {\n var _this = $(this),\n screenReaderSpan = _this.find('.screen-reader-text');\n\n e.preventDefault();\n _this.toggleClass('toggled-on');\n _this.closest('li').toggleClass('toggled-on'); //added for styling the item clicked\n _this.closest('li').children('.children, .sub-menu').toggleClass('toggled-on').slideToggle();\n\n _this.attr('aria-expanded', _this.attr('aria-expanded') === 'false' ? 'true' : 'false');\n\n screenReaderSpan.text(screenReaderSpan.text() === seasaltpressScreenReaderText.expand ? seasaltpressScreenReaderText.collapse : seasaltpressScreenReaderText.expand);\n });\n }", "function init() {\n\tapp.addSubMenu({\n\t\tcName: \"Redaction Tools\",\n\t\tcParent: \"Edit\",\n\t\tnPos: 0\n\t});\n\n\tapp.addMenuItem({\n\t\tcName: \"Auto Redaction\",\n\t\tcParent: \"Redaction Tools\",\n\t\tcPos: 1,\n\t\tcExec: \"redactionHelper()\"\n\t});\n}", "function buildMenu() {\r\n var theMenu = new String('');\r\n var firstLevelCounter = new Number(0);\r\n var firstLevelHighlight = new Boolean(true);\r\n var closeTag = new Boolean();\r\n for (var i in linx) {\r\n switch(linx[i].charAt(0)) {\r\n case '%':\r\n if (closeTag == true) { theMenu += '</span></ul>'; };\r\n theMenu += '<ul><a id=\"menuFirstLevelHeading\" title=\"Expand ' + i + '\" onmouseover=\"(window.status=' + \"'\" + i + \"'\" + '); return true;\" onmouseout=\"(window.status=' + \"'\" + \"'\" + '); return true;\" href=\"javascript:void(0)\" onclick=\"toggle(' + \"'\" + mHl[firstLevelCounter] + \"'\" + '); return false;\"><img src=\"/gifjpg/menu_closed.gif\" alt=\"Expand ' + i + '\" border=\"0\" />' + i + '</a><span id=\"' + mHl[firstLevelCounter] + '\">';\r\n firstLevelCounter++;\r\n closeTag = true;\r\n break;\r\n case '$':\r\n if (closeTag == true) { theMenu += '</span></ul>'; };\r\n if (menuItemHighlighter(linx[i].slice(1))) {\r\n theMenu += '<ul id=\"menuLink\"><img src=\"/gifjpg/menu_link.gif\" alt=\"' + i + '\" border=\"0\"><a id=\"menuHighlight\" href=\"' + linx[i].slice(1) + '\">' + i + '</a></ul>';\r\n firstLevelHighlight = false;\r\n } else {\r\n theMenu += '<ul id=\"menuLink\"><img src=\"/gifjpg/menu_link.gif\" alt=\"' + i + '\" border=\"0\"><a href=\"' + linx[i].slice(1) + '\">' + i + '</a></ul>';\r\n }\r\n closeTag = false;\r\n break;\r\n default:\r\n if (menuItemHighlighter(linx[i])) {\r\n theMenu += '<li id=\"menuHighlight\">' + i.link(linx[i]) + '</li>';\r\n } else {\r\n theMenu += '<li>' + i.link(linx[i]) + '</li>';\r\n }\r\n closeTag = true;\r\n break;\r\n }\r\n }\r\n \r\n if (closeTag == true) { theMenu += '</span></ul>'; };\r\n document.write(theMenu);\r\n if (menuItemHighlighter(\"/reportforms/\")) { toggle(\"menuOne\"); };\r\n if (firstLevelHighlight) { toggle(\"menuHighlight\"); };\r\n}", "function initializeMenu() {\n\n // create top menu\n\n var topMenu = document.getElementsByTagName(\"nav\");\n topMenu[0].innerHTML = \"<div class='navbar'>\\\n <div class='dropdown menuItem'>\\\n <button class='dropbutton'>Courses &#9662;</button>\\\n <div class='dropdown-content'>\\\n <a href='../../webpages/CSE681.htm#syllabus'>CSE681&nbsp;Syllabus</a>\\\n <a href='../../webpages/CSE681.htm'>CSE681-SMA</a>\\\n <a href='../../webpages/CSE686.htm'>CSE686-IP</a>\\\n <a href='../../webpages/CSE687.htm'>CSE687-OOD</a>\\\n <a href='../../webpages/CSE775.htm'>CSE775-DO</a>\\\n <a href='../../webpages/CSE776.htm'>CSE776-DP</a>\\\n <a href='../../webpages/Code.htm'>Code</a>\\\n <a href='../../webpages/Presentations.htm'>Presentations</a>\\\n <a href='../../webpages/OfficeHours.htm'>Office Hours</a>\\\n <a href='../../webpages/FawcettHome.htm'>Site Home</a>\\\n <a href='../../Webpages/SiteMap.htm'>Site Map</a>\\\n </div>\\\n </div>\\\n <div class='dropdown menuItem'>\\\n <button class='dropbutton'>Lectures &#9662;</button>\\\n <div class='dropdown-content'>\\\n <a class='lectItem' href='CSE681codeL1.htm'>L01&nbsp;-&nbsp;Introduction</a>\\\n <a class='lectItem' href='CSE681codeL2.htm'>L02&nbsp;-&nbsp;SW&nbsp;Arch</a>\\\n <a class='lectItem' href='CSE681codeL3.htm'>L03&nbsp;-&nbsp;SW&nbsp;Arch</a>\\\n <a class='lectItem' href='CSE681codeL4.htm'>L04&nbsp;-&nbsp;C#&nbsp;Language</a>\\\n <a class='lectItem' href='CSE681codeL5.htm'>L05&nbsp;-&nbsp;C#&nbsp;Language</a>\\\n <a class='lectItem' href='CSE681codeL6.htm'>L06&nbsp;-&nbsp;C#&nbsp;Language</a>\\\n <a class='lectItem' href='CSE681codeL7.htm'>L07&nbsp;-&nbsp;XML</a>\\\n <a class='lectItem' href='CSE681codeL8.htm'>L08&nbsp;-&nbsp;Linq</a>\\\n <a class='lectItem' href='CSE681codeL9.htm'>L09&nbsp;-&nbsp;Threads</a>\\\n <a class='lectItem' href='CSE681codeL10.htm'>L10&nbsp;-&nbsp;Threads</a>\\\n <a class='lectItem' href='CSE681codeL11.htm'>L11&nbsp;-&nbsp;WCF</a>\\\n <a class='lectItem' href='CSE681codeL12.htm'>L12&nbsp;-&nbsp;WCF</a>\\\n <a class='lectItem' href='CSE681codeL13.htm'>L13&nbsp;-&nbsp;Win&nbsp;GUIs</a>\\\n <a class='lectItem' href='CSE681codeL14.htm'>L14&nbsp;-&nbsp;WPF</a>\\\n <a class='lectItem' href='CSE681codeL15.htm'>L15&nbsp;-&nbsp;WPF</a>\\\n <a class='lectItem' href='CSE681codeL16.htm'>L16&nbsp;-&nbsp;Projects&nbsp;#3&nbsp;&amp;&nbsp;#4</a>\\\n <a class='lectItem' href='CSE681codeL17.htm'>L17&nbsp;-&nbsp;Async&nbsp;Systems</a>\\\n <a class='lectItem' href='CSE681codeL18.htm'>L18&nbsp;-&nbsp;Test&nbsp;Harness</a>\\\n <a class='lectItem' href='CSE681codeL19.htm'>L19&nbsp;-&nbsp;Midterm&nbsp;Review</a>\\\n <a class='lectItem' href='CSE681codeL20.htm'>L20&nbsp;-&nbsp;Midterm</a>\\\n <a class='lectItem' href='CSE681codeL21.htm'>L21&nbsp;-&nbsp;CLR</a>\\\n <a class='lectItem' href='CSE681codeL22.htm'>L22&nbsp;-&nbsp;Interop</a>\\\n <a class='lectItem' href='CSE681codeL23.htm'>L23&nbsp;-&nbsp;System&nbsp;Structure</a>\\\n <a class='lectItem' href='CSE681codeL24.htm'>L24&nbsp;-&nbsp;Midterm&nbsp;Results</a>\\\n <a class='lectItem' href='CSE681codeL25.htm'>L25&nbsp;-&nbsp;Qing</a>\\\n <a class='lectItem' href='CSE681codeL26.htm'>L26&nbsp;-&nbsp;Enterprise&nbsp;Systems</a>\\\n <a class='lectItem' href='CSE681codeL27.htm'>L27&nbsp;-&nbsp;FP&nbsp;Help</a>\\\n <a class='lectItem' href='CSE681codeL28.htm'>L28&nbsp;-&nbsp;Where&nbsp;Next?</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:medium;'>&nbsp;</div>\\\n </div>\\\n </div>\\\n <div class='dropdown menuItem'>\\\n <button class='dropbutton'>Projects &#9662;</button>\\\n <div class='dropdown-content'>\\\n <a class='projItem' href='Project1-F2018.htm'>Project&nbsp;#1</a>\\\n <a class='projItem' href='Project2-F2018.htm'>Project&nbsp;#2</a>\\\n <a class='projItem' href='Project3-F2018.htm'>Project&nbsp;#3</a>\\\n <a class='projItem' href='Project4-F2018.htm'>Project&nbsp;#4</a>\\\n <a href='../Projects/ArchGradeSheet.pdf'>Arch&nbsp;Grade&nbsp;Sheet</a>\\\n <a href='../Projects/CSE681gs.pdf'>Code&nbsp;Grade&nbsp;Sheet</a>\\\n <a href='../../Repository/Tools/CodeAnalyzerExesAndCleanBat'>CodeAnalExes&nbsp;+&nbsp;Clean.bat</a>\\\n <a href='../../webpages/Code.htm'>Code</a>\\\n <a href='../../webpages/Presentations.htm'>Presentations</a>\\\n <a href='../../webpages/OfficeHours.htm'>Office Hours</a>\\\n <a href='Project1Sample.htm'>Project&nbsp;#1&nbsp;Sample</a>\\\n <a href='Project2Sample.htm'>Project&nbsp;#2&nbsp;Sample</a>\\\n <a href='Project3Sample.htm'>Project&nbsp;#3&nbsp;Sample</a>\\\n <a href='Project4Sample.htm'>Project&nbsp;#4&nbsp;Sample</a>\\\n <a href='../../webpages/videos.htm'>Lecture&nbsp;Videos</a>\\\n <a href='../../webpages/GettingStartedProjects.htm'>Getting&nbsp;Started</a>\\\n <a href='../../webpages/AdviceProjects.htm'>Advice</a>\\\n <a href='../../webpages/SubmittingProjects.htm'>Submitting&nbsp;Projects</a>\\\n <a href='../../webpages/Upload.htm'>Uploading&nbsp;Projects</a>\\\n <a href='../../webpages/GradingPolicy.htm'>Grading&nbsp;Policy</a>\\\n <a href='https://docs.microsoft.com/en-us/visualstudio/ide/visual-studio-ide'>Visual Studio</a>\\\n <a href='https://docs.microsoft.com/en-us/visualstudio/'>Visual&nbsp;Studio&nbsp;Documentation&nbsp;&nbsp;&nbsp;</a>\\\n <a href='https://docs.microsoft.com/en-us/visualstudio/#pivot=languages'>Visual&nbsp;Studio&nbsp;Languages</a>\\\n <a href='https://en.cppreference.com/w/'>cppreference.com</a>\\\n <a href='https://docs.microsoft.com/en-us/dotnet/csharp/'>C#&nbsp;Guide</a>\\\n <a href='https://docs.microsoft.com/en-us/dotnet/framework/'>.Net&nbsp;Framework</a>\\\n <a href='https://sourcemaking.com/refactoring/smells'>Code&nbsp;Smells</a>\\\n <a href='../../webpages/SummerProjects.htm'>Summer&nbsp;Projects</a>\\\n <a href='../../webpages/SummerReading.htm'>Summer&nbsp;Reading</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:small;'>&nbsp;</div>\\\n </div>\\\n </div>\\\n <div class='dropdown menuItem'>\\\n <button class='dropbutton'>CodeSnaps &#9662;</button>\\\n <div class='dropdown-content'>\\\n <a href='CodeSnap-HelloWorld.cs.htm'>Hello&nbsp;World</a>\\\n <a href='CodeSnap-ClassDemo.cs.htm'>Class&nbsp;Demo</a>\\\n <a href='CodeSnap-Generics.cs.htm'>Generics&nbsp;Demo</a>\\\n <a href='CodeSnap-Inheritance.cs.htm'>Inheritance</a>\\\n <a href='CodeSnap-Delegates.cs.htm'>Delegates</a>\\\n <a href='CodeSnap-NavigateWithDelegates.cs.htm'>NavigateWithDelegates</a>\\\n <a href='CodeSnap-LambdaCapture.cs.htm'>Lambda&nbsp;Capture</a>\\\n <a href='CodeSnap-List.cs.htm'>Lists</a>\\\n <a href='CodeSnap-StartingThreads.cs.htm'>Starting&nbsp;Threads</a>\\\n <a href='CodeSnap-BlockingQueue.cs.htm'>Blocking&nbsp;Queue</a>\\\n <a href='CodeSnap-BasicHttpProgService.IService.cs.htm'>BasicHttp&nbsp;Service</a>\\\n </div>\\\n </div>\\\n <div class='dropdown menuItem'>\\\n <button class='dropbutton'>Notes &#9662;</button>\\\n <div class='dropdown-content'>\\\n <a href='CourseSynopsis.htm'>Course Summary</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:medium;'>--&nbsp;Study&nbsp;Guides&nbsp;---</div>\\\n <a href='StudyGuideOCD.htm'>OCD&nbsp;Study&nbsp;Guide</a>\\\n <a href='StudyGuideNotes.htm'>SW&nbsp;Architecture&nbsp;Study&nbsp;Guide</a>\\\n <a href='StudyGuideSMA.htm'>SMA&nbsp;Study&nbsp;Guide</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:medium;'>--&nbsp;Basic&nbsp;Concepts&nbsp;---</div>\\\n <a href='Note-WhatIsProgram.htm'>What&nbsp;is&nbsp;a&nbsp;Program?</a>\\\n <a href='Note-SizeMatters.htm'>Size&nbsp;matters</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:medium;'>--&nbsp;C#&nbsp;Language&nbsp;---</div>\\\n <a href='GettingStartedWithCSharp.htm'>Getting Started with C#</a>\\\n <a href='Classes.htm'>Classes</a>\\\n <a href='Inheritance.htm'>Inheritance</a>\\\n <a href='ThreeTierHierarchy.htm'>Three&nbsp;Tier&nbsp;Hierarchy</a>\\\n <a href='CompoundObjects.htm'>Compound&nbsp;objects</a>\\\n <a href='Generics.htm'>Generics</a>\\\n <a href='Delegates.htm'>Delegates</a>\\\n <a href='Lambdas.htm'>Lambdas</a>\\\n <a href='Note-Inconsistencies.htm'>C#&nbsp;inconsistencies</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:medium;'>--&nbsp;Design&nbsp;Concepts&nbsp;---</div>\\\n <a href='UML-Diagrams.htm'>UML&nbsp;diagrams</a>\\\n <a href='Note-Partitions.htm'>Partitions</a>\\\n <a href='Note-SngRespPrin.htm'>Single&nbsp;Responsibility&nbsp;Principle</a>\\\n <a href='Note-Sharing.htm'>Sharing</a>\\\n <a href='Note-Robust.htm'>Robustness</a>\\\n <a href='Note-Delegation.htm'>Delegation</a>\\\n <a href='Note-Components.htm'>Components</a>\\\n <a href='Note-LooselyCoupled.htm'>Loose&nbsp;coupling</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:medium;'>--&nbsp;Software&nbsp;Systems&nbsp;---</div>\\\n <a href='../../Webpages/BlogMessagePassingComm.htm'>Msg&nbsp;passing&nbsp;comm</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:medium;'>--&nbsp;Implementation&nbsp;---</div>\\\n <a href='Note-GettingStarted.htm'>Getting&nbsp;Started&nbsp;in&nbsp;SMA</a>\\\n <a href='Note-PkgStructMatters.htm'>Package&nbsp;structure</a>\\\n <a href='Note-TopDown.htm'>Top&nbsp;Down</a>\\\n <a href='Note-BottomUp.htm'>Bottom&nbsp;Up</a>\\\n <a href='Note-IncDev.htm'>Incremental&nbsp;Development</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:small;'>&nbsp;</div>\\\n </div>\\\n </div>\\\n <div class='dropdown menuItem'>\\\n <button class='dropbutton'>Resources &#9662;</button>\\\n <div class='dropdown-content'>\\\n <a href='https://chrome.google.com/webstore/detail/gliffy-diagrams/bhmicilclplefnflapjmnngmkkkkpfad?hl=en'>Gliffy&nbsp;Diagramming&nbsp;Chrome&nbsp;Extension</a>\\\n <a href='https://www.tutorialspoint.com/csharp/index.htm'>C#&nbsp;Tutorial&nbsp;-tutorialspoint</a>\\\n <a href='http://www.cheat-sheets.org/saved-copy/msnet-formatting-strings.pdf'>.Net&nbsp;String&nbsp;Formats</a>\\\n <a href='http://www.regexlib.com/CheatSheet.aspx?AspxAutoDetectCookieSupport=1'>RegEx&nbsp;Cheat&nbsp;Sheet</a>\\\n <a href='http://ezzylearning.com/CheatSheets/Core%20CSharp%20and%20.NET%20Quick%20Reference.pdf'>C#&nbsp;Cheat&nbsp;Sheet</a>\\\n <a href='../../webpages/Help/VisualStudioHelpSlides.pdf'>Visual Studio Help Slides</a>\\\n <a href='../../Webpages/SummerReading.htm'>Summer Reading</a>\\\n <a href='../../Webpages/SummerProjects.htm'>Summer Projects</a>\\\n <a href='../presentations/Docker-Corley'>Mike&nbsp;Corley&apos;s&nbsp;Docker&nbsp;Presentation</a>\\\n </div>\\\n </div>\\\n <div class='dropdown menuItem'>\\\n <button class='dropbutton'>Directories &#9662;</button>\\\n <div class='dropdown-content'>\\\n <span>&nbsp;&nbsp;--&nbsp;Code&nbsp;------------------&nbsp;&nbsp;&nbsp;</span>\\\n\t\t\t\t <a href='../../Repository/CSharp'>Repository/CSharp</a>\\\n\t\t\t\t <a href='../../Repository/Cpp'>Repository/Cpp</a>\\\n\t\t\t\t <a href='../../Repository/Tools'>Repository/Tools</a>\\\n\t\t\t\t <a href='../../Webpages/Code.htm#CSharpDemos'>ProjectHelp</a>\\\n <span>&nbsp;&nbsp;--&nbsp;Residential&nbsp;Courses&nbsp;-&nbsp;&nbsp;&nbsp;</span>\\\n\t\t\t\t <a href='../../CSE681/'>CSE681-SMA</a>\\\n\t\t\t\t <a href='../../CSE686/'>CSE686-IP</a>\\\n\t\t\t\t <a href='../../CSE687/'>CSE687-OOD</a>\\\n\t\t\t\t <a href='../../CSE775/'>CSE775-DO</a>\\\n\t\t\t\t <a href='../../CSE776/'>CSE776-DP</a>\\\n\t\t\t\t <a href='../../CSE784/'>CSE784-SS</a>\\\n\t\t\t\t <a href='../../SummerProjects/'>Summer Projects</a>\\\n <span>&nbsp;&nbsp;--&nbsp;OnLine&nbsp;courses&nbsp;------&nbsp;&nbsp;&nbsp;</span>\\\n\t\t\t\t <a href='../../CSE681-OnLine/'>CSE681-SMA-OnLine</a>\\\n\t\t\t\t <a href='../../CSE687-OnLine/'>CSE687-OOD-OnLine</a>\\\n <span>&nbsp;&nbsp;--&nbsp;Short&nbsp;course&nbsp;---------&nbsp;&nbsp;&nbsp;</span>\\\n\t\t\t\t <a href='../../ShortCourse/'>C++ Short Course</a>\\\n <span>&nbsp;&nbsp;--&nbsp;Other&nbsp;Folders&nbsp;--------&nbsp;&nbsp;&nbsp;</span>\\\n\t\t\t\t <a href='../../'>Handouts</a>\\\n\t\t\t\t <a href='../../Coretechnologies/'>CoreTech</a>\\\n </div>\\\n </div>\\\n <div class='dropdown menuItem'>\\\n <button class='dropbutton'>Blog &#9662;</button>\\\n <div class='dropdown-content'>\\\n <a href='../../webpages/Blog.htm'>First Things</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:small;'>-- Design -----------</div>\\\n <a href='../../webpages/BlogDesign.htm'>SW Design</a>\\\n <a href='../../webpages/BlogPrinciples.htm'>Design Principles</a>\\\n <a href='../../webpages/BlogOOD.htm'>OO Design</a>\\\n <a href='../../webpages/BlogObjectModels.htm'>Object Models</a>\\\n <a href='../../webpages/BlogGlobals.htm'>Scopes and Global Data</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:small;'>-- Engineering SW ---</div>\\\n <a href='../../webpages/BlogOCD.htm'>Concept Document</a>\\\n <a href='../../webpages/BlogTesting.htm'>SW Testing</a>\\\n <a href='../../webpages/SummerReading.htm'>Summer Reading</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:small;'>-- Software Sys -----</div>\\\n <a href='../../webpages/BlogStructure.htm'>SW Structure</a>\\\n <a href='../../webpages/BlogMessagePassingComm.htm'>Msg-Passing Comm</a>\\\n <a href='../../webpages/BlogActiveObjects.htm'>Active Objects</a>\\\n <div style='padding:0px 10px; margin:0px; font-size:small;'>-- Reusable Pkgs ----</div>\\\n <a href='../../webpages/BlogNoSql.htm'>noSQL Database</a>\\\n <a href='../../webpages/BlogParser.htm'>Parsing</a>\\\n <a href='../../webpages/BlogCodeAnalyzer.htm'>Code Analyzer</a>\\\n <a href='../../webpages/BlogMTree.htm'>M-ary Trees</a>\\\n <a href='../../webpages/BlogGraph.htm'>Directed Graphs</a>\\\n <a href='../../webpages/BlogFileSystem.htm'>C++ FileSystem</a>\\\n </div>\\\n </div>\\\n <div class='dropdown menuItem'>\\\n <button class='dropbutton'>About &#9662;</button>\\\n <div class='dropdown-content'>\\\n <a href='../../webpages/FawcettAbout.htm'>Jim Fawcett</a>\\\n <a href='../../webpages/Research.htm'>Research</a>\\\n <a href='../../webpages/Help.html'>Help</a>\\\n <a href='#' onclick='toggleNavKeys()'>Nav Keys</a>\\\n <a href='../../webpages/SiteDesign.htm'>Site Design</a>\\\n <a href='../../webpages/FawcettHome.htm'>Site Home</a>\\\n <a href='../../Webpages/SiteMap.htm' class='menuItem'>Site Map</a>\\\n </div>\\\n </div>\\\n <button class='pageScroll' onclick='scrollPageTop()'>Top</button>\\\n <button class='pageScroll' onclick='scrollPageBottom()'>Bottom</button>\\\n <a id='prevLink' class='nextprev' href='#'>Prev</a>\\\n <a id='nextLink' class='nextprev' href='#'>Next</a>\\\n <button class='menuScroll' onclick='scrollMenuLeft()'>&lt;</button>\\\n <button class='menuUnscroll' onclick='scrollMenuRight()'>&gt;</button>\\\n </div >\\\n <div style='clear:all;'></div>\"\n\n // hide Next and Prev links if page has no next or previous pages\n // otherwise load href from page link\n\n var nxt = document.getElementById(\"Next\");\n if (nxt === null) {\n document.getElementById(\"nextLink\").style.display = \"none\";\n }\n else {\n document.getElementById(\"nextLink\").href = nxt.href;\n }\n\n var prv = document.getElementById(\"Prev\");\n if (prv === null) {\n document.getElementById(\"prevLink\").style.display = \"none\";\n }\n else {\n document.getElementById(\"prevLink\").href = prv.href;\n }\n // show footer with copyright notice and revision date\n\n var rvsd = document.getElementsByTagName(\"info-bar\");\n var date = document.lastModified;\n rvsd[0].innerHTML = \"copyright &copy; Jim Fawcett, 2018&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Page Revised: \" + date;\n\n setNavKeys();\n\n // listen for keyboard events:\n // - key actions are defined in ScriptsKeyboard.js\n\n document.addEventListener('keydown', (event) => { keyAction(event); }, false);\n document.addEventListener('mousedown', (event) => { mouseAction(event); }, false);\n //document.oncontextmenu='return false;'\n // bind more-less click event\n\n var elems = document.getElementsByTagName(\"more-less\");\n for (var i = 0; i < elems.length; ++i) {\n elems[i].addEventListener(\"click\", (event) => { toggleVisibility(event); }, false);\n }\n}", "function addArrayToWikiaNavUl_TopLevel(topMenuItem, menuItemsArray, wikiNavUl){\n var newNavMenuItem = document.createElement(\"li\"); // Create the new menu item\n var newNavMenuItem_HTML = '<a href=\"' + topMenuItem[0] + '\">' + topMenuItem[1] + '</a><ul class=\"subnav-2 accent\" style=\"visibility: visible; display: none;\">'; // Add the first level menu item\n for (x in menuItemsArray){\n for (y in menuItemsArray[x]){\n if(y == 0){ // If it is the first item in the array make sure it uses the correct classes\n newNavMenuItem_HTML += '<li><a class=\"subnav-2a\" href=\"' + menuItemsArray[x][y][0] + '\">' + menuItemsArray[x][y][1];\n\t\t\t\t if(menuItemsArray[x].length > 1) newNavMenuItem_HTML += '<img class=\"chevron\" src=\"data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D\"></a><ul class=\"subnav subnav-3\" style=\"display: none;\">'; // If it has subitems, add the down arrow icon, and add a third level list\n else newNavMenuItem_HTML += '</a></li>'; // if it is the only item in the list close the li\n } else {\n newNavMenuItem_HTML += '<li><a class=\"subnav-3a\" href=\"' + menuItemsArray[x][y][0] + '\">' + menuItemsArray[x][y][1] + '</a></li>';\n if(menuItemsArray[x].length - 1 <= y) newNavMenuItem_HTML += '</ul></li>'; // If it is the last element in the array, close the unsorted list and the second level menu item\n }\n }\n }\n newNavMenuItem.innerHTML = newNavMenuItem_HTML + '</ul>'; // Close the list\n wikiNavUl.appendChild(newNavMenuItem); // Add it to the menu\n }", "initialize ( ) {\n this.navList = navigationItems;\n // Send JSON city data to prepare navigation items\n this.prepareNavigationPanel(navigationItems);\n }", "function BuildNavigationMenu() {\r\n let content = '';\r\n const sectionsList = getAllSections();\r\n sectionsList.forEach(function (section) {\r\n const newLi = this.document.createElement('li');\r\n newLi.id = `li${section.id}`;\r\n newLi.dataset.section = section.id;\r\n newLi.innerHTML = `<a id='aSection${liCount}' href='#${section.id}' data-section='${section.id}' class='menu__link'> ${section.dataset.nav} </a>`;\r\n liCount++;\r\n content += newLi.outerHTML;\r\n })\r\n this.document.querySelector('#navbar__list').innerHTML = content;\r\n}", "function buildMenu() {\n for (let section of sectionTxt) {\n let item = document.createElement(\"li\");\n item.innerHTML = section.firstElementChild.innerText;\n // item.href = `#${section.id}`;\n menuItens.appendChild(item);\n menuItens.firstChild.classList.add(\"active\");\n }\n}", "function RenderMenu()\n{\n var menu = \"\";//Initialise var\n //Build html output based on page items list.\n menu += '<div class=\"show-for-small\">';\n menu += '<form><label>Choose an article:<select id=\"micromenu\">';\n //Small menu loop\n for (var i = 0; i < PagesList.length; i++)\n {\n if (PagesList[i][1] == curPage)\n {\n menu += '<option value=\"' + PagesList[i][1] + '\" selected>';\n }\n else\n {\n menu += '<option value=\"' + PagesList[i][1] + '\">';\n }\n menu += PagesList[i][1];\n menu += '</option>';\n }\n menu += '</select></label>';\n menu += '</form></div>';\n menu += '<ul class=\"side-nav hide-for-small\">';\n //Large menu loop\n for (var ii = 0; ii < PagesList.length; ii++)\n {\n if (PagesList[ii][1] == curPage)\n {\n menu += '<li class=\"active\">';\n }\n else\n {\n menu += '<li>';\n }\n menu += '<a onClick=\"SetPage(\\'' + PagesList[ii][1] + '\\')\">';\n menu += PagesList[ii][1];\n menu += '</a>';\n menu += '</li>';\n }\n menu += '</ul>';\n return menu;\n}", "function Scene_GFMenu() {\n this.initialize.apply(this, arguments);\n}" ]
[ "0.6975112", "0.6917933", "0.6901138", "0.6817762", "0.6762443", "0.67478174", "0.6644594", "0.6644372", "0.65117735", "0.6494994", "0.6296573", "0.62743604", "0.62415844", "0.6232315", "0.62134165", "0.61482924", "0.61411774", "0.6102161", "0.6084086", "0.60815626", "0.6080278", "0.6078999", "0.60362256", "0.6035048", "0.59947544", "0.59623057", "0.59621555", "0.59428984", "0.5941339", "0.59381676", "0.59265643", "0.59137255", "0.5902394", "0.58743846", "0.584736", "0.5844872", "0.5834541", "0.5823457", "0.58218914", "0.5800321", "0.57993317", "0.57905376", "0.5787429", "0.57727534", "0.5766726", "0.57653946", "0.5764339", "0.57631963", "0.5747692", "0.57331383", "0.5728762", "0.57134026", "0.5710493", "0.57082504", "0.5704693", "0.5701308", "0.5700901", "0.5691034", "0.5679736", "0.5674578", "0.56627494", "0.56600547", "0.56564087", "0.5655484", "0.56541145", "0.56383735", "0.56315726", "0.5627198", "0.5622932", "0.5613683", "0.56123567", "0.5608633", "0.5605858", "0.56046283", "0.56042725", "0.5598893", "0.55945665", "0.55844074", "0.5569783", "0.5565248", "0.55648655", "0.5547501", "0.55427414", "0.5541628", "0.5533706", "0.5530977", "0.55305624", "0.55242807", "0.551958", "0.5519097", "0.55185324", "0.5516616", "0.5510455", "0.5508482", "0.55053407", "0.55048865", "0.5504356", "0.54916316", "0.5491171", "0.54905885" ]
0.7301351
0
Open this submenu, in the case of this submenu being toplevel.
openTopLevel() { throw new NotImplementedError(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openMenu() {\n g_IsMenuOpen = true;\n}", "open() {\n const that = this;\n\n if (that.opened) {\n return;\n }\n\n that._open();\n }", "openSubMenu(element, item) {\n const me = this,\n subMenu = item.menu;\n\n if (subMenu) {\n if (!subMenu.isVisible) {\n const event = { item, element };\n\n if (me.trigger('beforeSubMenu', event) === false) {\n return;\n }\n if (item.onBeforeSubMenu && item.onBeforeSubMenu(event) === false) {\n return;\n }\n subMenu.show();\n }\n\n /**\n * Currently open sub menu, if any\n * @member {Common.widget.Menu} currentSubMenu\n * @readonly\n */\n return (me.currentSubMenu = subMenu);\n }\n }", "openSubMenu(element, item) {\n const me = this,\n subMenu = item.menu;\n\n if (subMenu) {\n if (!subMenu.isVisible) {\n const event = {\n item,\n element\n };\n\n if (me.trigger('beforeSubMenu', event) === false) {\n return;\n }\n\n if (item.onBeforeSubMenu && item.onBeforeSubMenu(event) === false) {\n return;\n }\n\n subMenu.show();\n }\n /**\n * Currently open sub menu, if any\n * @member {Core.widget.Menu} currentSubMenu\n * @readonly\n */\n\n return me.currentSubMenu = subMenu;\n }\n }", "function openMenu () {\n $(this).toggleClass('open');\n $('ul, .social-links').toggleClass('active open');\n }", "open() {\n this._open();\n }", "function openMenuBar() {\n setOpen(!open)\n }", "function setUpSubMenuClick () {\n\t\t mainNavItems.click(function(event){\n\t var subMenu = jQuery(this).children('.sub-menu');\n\t if(subMenu.length > 0 &&!subMenu.hasClass('open')) {\n\t //event.preventDefault();\n\t subMenu.addClass('open');\n\t jQuery(this).addClass('open');\n\t jQuery(this).siblings().removeClass('open');\n\t \tjQuery(this).siblings().children('.sub-menu').removeClass('open');\n\t } else if (subMenu.length > 0 && subMenu.hasClass('open')){\n\t \t//event.preventDefault();\n\t subMenu.removeClass('open');\n\t jQuery(this).removeClass('open');\n\t }\n\t });\n\n\t\t jQuery('.utility-nav').children('.menu-item-has-children').children('a').click(function(e){\n\t\t \tif(!jQuery(this).parent().hasClass('open')) {\n\t\t \t\te.preventDefault();\n\t\t \t\tjQuery(this).parent().addClass('open');\n\t\t\t\tjQuery(this).parent().siblings().removeClass('open');\n\t\t\t\tvar subMenu = jQuery(this).parent().children('.sub-menu');\n\t\t\t\tif(!subMenu.hasClass('open')) {\n\t\t\t \tjQuery(this).addClass('open');\n\t\t\t \tsubMenu.addClass('open');\n\t\t\t \tjQuery(this).siblings().children('.sub-menu').removeClass('open');\n\t\t\t }\n\t\t \t}\n\t\t\t/*jQuery(this).addClass('open');\n\t\t\tjQuery(this).siblings().removeClass('open');\n\t\t\tvar subMenu = jQuery(this).children('.sub-menu');\n\t\t if(!subMenu.hasClass('open')) {\n\t\t \tjQuery(this).addClass('open');\n\t\t \tsubMenu.addClass('open');\n\t\t \tjQuery(this).siblings().children('.sub-menu').removeClass('open');\n\t\t } else {\n\t\t \treturn;\n\t\t }*/\n\t\t});\n\t}", "function openMenu() {\n if (menu_visible)\n return;\n menuGroup.add(mesh_menu);\n mesh_menu.position.set(mouse_positions[1].x, mouse_positions[1].y, mouse_positions[1].z);\n mesh_menu.lookAt(camera.position);\n menu_visible = true;\n }", "function openMenu() {\n vm.showMenu=!vm.showMenu;\n }", "function openMenu(menu_item){\n\t\t\t\n\t\t\t// Get menu box\n\t\t\tvar menu_box = menu_item.find('> ul, > div').stop(true, true);\n\t\t\t\n\t\t\t// This will make the selected menu always on top of the\n\t\t\t// non selected menu\n\t\t\t$(menu_item).parent()\n\t\t\t\t\t\t.find(\"ul, div\")\n\t\t\t\t\t\t.css(\"z-index\", settings.zindex);\n\t\t\tmenu_box.css(\"z-index\", (settings.zindex+1));\n\n\t\t\t// If animation is function\n\t\t\tif(typeof settings.openAnimation == 'function'){\n\t\t\t\t$(menu_item).addClass(settings.openMenuClass)\n\t\t\t\tsettings.openAnimation.call(menu_box);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$(menu_item).is('.' + settings.openMenuClass)){\n\t\t\t\t switch(settings.openAnimation){\n\t\t\t\t\t case 'fade':\n\t\t\t\t\t\t fadeAnimation(menu_box, true);\n\t\t\t\t\t\t break;\n\t\t\t\t\t case 'size':\n\t\t\t\t\t\t sizeAnimation(menu_box, true);\n\t\t\t\t\t\t break;\t\n\t\t\t\t\t default:\n\t\t\t\t\t\t slideAnimation(menu_box, true);\n\t\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t}\n\t\t\t\t\n\t\t}", "exec() {\n this.event.preventDefault();\n let node = false;\n\n if (this.item.getDepth() > 1) {\n this.event.stopPropagation();\n this.parentNav.closeSubNav();\n node = this.getElement('parentItem');\n }\n else {\n this.masterNav.closeAllSubNavs();\n node = this.getElement('first', this.item.parentNode);\n }\n\n if (node) {\n node.focus();\n }\n }", "open() {\n super.open(this.pageUrl);\n }", "function openNextLevel(event) {\n event.preventDefault();\n var $this = $(this);\n $('#au-site-nav li').removeClass('active');\n \n if( $this.next('ul').hasClass('is-hidden') ) {\n $this.addClass('selected').attr('aria-expanded', 'true').next('ul').removeClass('is-hidden').attr('aria-hidden', 'false').end().parent('.has-children').parent('ul').addClass('moves-out');\n $this.parent('.has-children').siblings('.has-children').children('ul').addClass('is-hidden').attr('aria-hidden', 'true').end().children('a').removeClass('selected');\n } else {\n $this.removeClass('selected').attr('aria-expanded', 'false').next('ul').addClass('is-hidden').attr('aria-hidden', 'true').end().parent('.has-children').parent('ul').removeClass('moves-out');\n }\n }", "function openFirstMenu(event) {\n setIsFirstMenuOpen(!isFirstMenuOpen)\n setFirstMenuAnchorEl(event.currentTarget)\n }", "function openNode()\n\t\t\t{\n\t\t\t\tif(!(subTree = node?node.children('ul').first():tree).length)return;\n\t\t\t\tif((i = path.shift()) !== undefined &&\n\t\t\t\t\t(node = subTree.children().eq(i)).length &&\t\t\t\t\n\t\t\t\t\t(btn = node.children('span.tTreeToggle').first()[0]))\t\t\t\t\n\t\t\t\t\t\ttoggle.call(btn,true,openNode);\n\t\t\t\telse if(node.length && options.scroll)\n\t\t\t\t{\n\t\t\t\t\t(i==0?(node.parent().parent()):node.prev())[0].scrollIntoView();\n\t\t\t\t}\n\t\t\t}", "function openSubmenu(menu, item) {\n var rect = clientViewportRect();\n var size = mountAndMeasure(menu, rect.height);\n var box = phosphor_domutil_1.boxSizing(menu.node);\n var itemRect = item.getBoundingClientRect();\n var x = itemRect.right - SUBMENU_OVERLAP;\n var y = itemRect.top - box.borderTop - box.paddingTop;\n if (x + size.width > rect.x + rect.width) {\n x = itemRect.left + SUBMENU_OVERLAP - size.width;\n }\n if (y + size.height > rect.y + rect.height) {\n y = itemRect.bottom + box.borderBottom + box.paddingBottom - size.height;\n }\n showMenu(menu, x, y);\n}", "open () {\n return super.open();\n }", "open () {\n return super.open();\n }", "function MenuItem_OpenMenu(bForce)\n{\n\t//interactions blocked?\n\tif (!bForce && __SIMULATOR.UserInteractionBlocked())\n\t{\n\t\t//ignore it\n\t}\n\telse\n\t{\n\t\t//has submenus?\n\t\tif (this.SubMenus.length > 0)\n\t\t{\n\t\t\t//are we already opened?\n\t\t\tvar bAlreadyOpen = false;\n\t\t\t//has any opened popup menu?\n\t\t\tif (this.MenuData.OpenedPopups.length > 0)\n\t\t\t{\n\t\t\t\t//this a menu bar?\n\t\t\t\tif (this.MenuBarHTML)\n\t\t\t\t{\n\t\t\t\t\t//Inform Popup Manager to close all\n\t\t\t\t\t__POPUPS.CloseAll();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//first check if we are already opened\n\t\t\t\t\tfor (var i = 0, c = this.MenuData.OpenedPopups.length; i < c; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.MenuData.OpenedPopups[i] == this)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//mark it as already opened\n\t\t\t\t\t\t\tbAlreadyOpen = true;\n\t\t\t\t\t\t\t//end the loop\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//not yet open?\n\t\t\t\t\tif (!bAlreadyOpen)\n\t\t\t\t\t{\n\t\t\t\t\t\t//we need to ensure we close all up to our parent\n\t\t\t\t\t\twhile (this.MenuData.OpenedPopups[this.MenuData.OpenedPopups.length - 1] != this.Parent)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Inform Popup Manager to close last\n\t\t\t\t\t\t\t__POPUPS.CloseLast();\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\t//not already open?\n\t\t\tif (!bAlreadyOpen)\n\t\t\t{\n\t\t\t\t//need to create a new popup menu?\n\t\t\t\tif (!this.PopupMenu)\n\t\t\t\t{\n\t\t\t\t\t//create it\n\t\t\t\t\tthis.PopupMenu = this.CreatePopupMenu();\n\t\t\t\t}\n\t\t\t\t//push it into our queue\n\t\t\t\tthis.MenuData.OpenedPopups.push(this);\n\t\t\t\t//this a menubar?\n\t\t\t\tif (this.MenuBarHTML)\n\t\t\t\t{\n\t\t\t\t\t//Inform Popup Manager to close all\n\t\t\t\t\t__POPUPS.CloseAll();\n\t\t\t\t\t//Inform Popup Manager to display it\n\t\t\t\t\t__POPUPS.ShowPopup(this.PopupMenu, this.MenuData);\n\t\t\t\t\t//now force its position under us\n\t\t\t\t\t__POPUPS.PositionLastRelative(this.MenuBarHTML, __POSITION_DOWN);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//Inform Popup Manager to display it\n\t\t\t\t\t__POPUPS.ShowPopup(this.PopupMenu, this.MenuData);\n\t\t\t\t\t//now force its position to our right\n\t\t\t\t\t__POPUPS.PositionLastRelative(this.MenuPopupHTML, __POSITION_RIGHT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//trying to open a menubar without children?\n\t\telse if (this.MenuBarHTML)\n\t\t{\n\t\t\t//Inform Popup Manager to close all\n\t\t\t__POPUPS.CloseAll();\n\t\t}\n\t}\n}", "openMenu() {\n\t\t// prevent rerender when called multiple times\n\t\tif (!this.state.isMenuOpen) {\n\t\t\tthis.setState({ isMenuOpen: true });\n\t\t}\n\t}", "openMenu() {\n\t\t// prevent rerender when called multiple times\n\t\tif (!this.state.isMenuOpen) {\n\t\t\tthis.setState({ isMenuOpen: true });\n\t\t}\n\t}", "_initMenu() {\n this.menu.parentMenu = this.triggersSubmenu() ? this._parentMenu : undefined;\n this.menu.direction = this.dir;\n this._setMenuElevation();\n this._setIsMenuOpen(true);\n this.menu.focusFirstItem(this._openedBy || 'program');\n }", "function showSubMenu( event ) {\n\n\t\t\t\t// If this has no sub item, there's nothing to do\n\t\t\t\tif( $sub === undefined ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// If we have toggle buttons, we can let the click pass through\n\t\t\t\tif( $toggle !== undefined && $toggle.length !== 0 && isVisible( $toggle ) && event.type !== 'focus' ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// If this sub menu is already visible, there's nothing to do\n\t\t\t\tif( isVisible( $sub ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// If we made it here, we can capture the click and open the sub menu instead\n\t\t\t\tif( event.type !== 'focus' ) {\n\t\t\t\t\t$link.focus();\n\t\t\t\t}\n\t\t\t\tevent.preventDefault();\n\t\t\t\t$sub.addClass( 'focused' ).attr( 'aria-hidden', 'false' );\n\t\t\t\treturn false;\n\t\t\t}", "open () {\n\t\t\tthis.el.classList.add('dropdown_open');\n\t\t this.trigger(\"open\");\n\t\t\tdocument.addEventListener('click', this._documentClick);\n\t\t}", "open() {\n super.open('/');\n }", "open () {\n super.open('login');\n }", "function subMenuOpenClicked(name) {\n categoryClicked(name)\n setTimeout(() => {\n menuOpenClicked();\n document.getElementById('leftSubSideBar').style.left = \"0\"; \n }, 100)\n }", "openMenu() {\n this._itemContainer.visible = true;\n this.accessible.expanded = true;\n this._label.accessible.expanded = true;\n }", "async open() {\n if (super.open) {\n await super.open();\n }\n await this.toggle(true);\n }", "open() {\n super.open(\"/\");\n }", "open() {\n this.opened = true;\n }", "_levelOneOpenDropDown(focusedItem) {\n if (focusedItem && focusedItem instanceof JQX.MenuItemsGroup) {\n this._selectionHandler({ target: focusedItem, isTrusted: true });\n }\n }", "open () {\n super.open();\n }", "function OpenSideMenu() {\n if ($(\"body\").hasClass(\"mode-translation\")) {\n ToggleSideMenu(true);\n }\n}", "open() {\n this.expanded = true;\n }", "open() {\n\t\tif (this._opened) return\n\t\tthis._opened = true\n\t\tthis.addClass('open')\n\t\tthis.trigger(ToggleComponent.ToggleEvent, this, this._opened)\n\t}", "function handleOpenMenu() {\n setOpenMenu(!openMenu);\n }", "expandMenu() {\r\n\t}", "function openTopMenu() {\n $(\"#\"+current_menu+\">ul\").show();\n //alert (menuId);\n}", "openMenu() {\n this.isNavMenuOpen = true;\n window.requestAnimationFrame(() => this.expand());\n }", "onMenuItemClick(e) {\n var $el = $(e.currentTarget);\n\n this.$container.find('.item').removeClass('active');\n this.$container.find('.submenu').closest('.item').removeClass('open');\n\n $el.addClass('active');\n\n if ($el.find('.submenu').length) {\n $el.toggleClass('open');\n }\n }", "function openMenu(subMenu) {\r\n const newSubMenu = subMenu.replace(\".\", \"\");\r\n const subMenuElement = document.querySelector(subMenu);\r\n subMenuElement.classList.add(\"nav-open\");\r\n\r\n // Adds a click event listener to the left arrow in\r\n // the mobile sub-menus, which calls the closeMenu function,\r\n // on click.\r\n document\r\n .querySelector(`.close-${newSubMenu}`)\r\n .addEventListener(\"click\", function () {\r\n closeMenu(subMenu);\r\n });\r\n}", "function openNav() {\n\t\n\tvar html=\"\";\n\n\n\tStore.treeIterate(function(node){\n\t\thtml+='<li class=\"list-group-item node-treeview4\" data-nodeid=\"0\" style=\"color:undefined;background-color:undefined;\" data-cell=\"'+node.cell+'\">'+node.title+'</li>';\t\t\n\t});\n\t\n\t// Store.iterate(function(index,row){\n\t// \tvar value=row[\"id\"];\n\t//\n\t// \tif (value){\n\t// \t\thtml+='<li class=\"list-group-item node-treeview4\" data-nodeid=\"0\" style=\"color:undefined;background-color:undefined;\">Article '+index+'</li>';\n\t// \t\t// html+=\"<button class='btn btn-default'> Article \"+value+\". </button>\";\n\t// \t}\n\t// });\n\n\tvar el=$(\"#mySidenav\");\n\tel.html('<ul class=\"list-group\">'+\n\t\t\thtml+\n\t\t\t'</ul>');\n\t\n\tel.css(\"width\",\"200px\");\n\t\n document.getElementById(\"main\").style.marginLeft = \"200px\";\n}", "function setup_sidebar_menu() {\n\tvar $ = jQuery,\n\t\t$items_with_submenu = public_vars.$sidebarMenu.find('li:has(ul)'),\n\t\tsubmenu_options = {\n\t\t\tsubmenu_open_delay: 0.25,\n\t\t\tsubmenu_open_easing: Sine.easeInOut,\n\t\t\tsubmenu_opened_class: 'opened'\n\t\t},\n\t\troot_level_class = 'root-level',\n\t\tis_multiopen = public_vars.$mainMenu.hasClass('multiple-expanded');\n\n\tpublic_vars.$mainMenu.find('> li').addClass(root_level_class);\n\n\t$items_with_submenu.each(function (i, el) {\n\t\tvar $this = $(el),\n\t\t\t$link = $this.find('> a'),\n\t\t\t$submenu = $this.find('> ul');\n\n\t\t$this.addClass('has-sub');\n\n\t\t$link.click(function (ev) {\n\t\t\tev.preventDefault();\n\n\t\t\tif (!is_multiopen && $this.hasClass(root_level_class)) {\n\t\t\t\tvar close_submenus = public_vars.$mainMenu.find('.' + root_level_class).not($this).find('> ul');\n\n\t\t\t\tclose_submenus.each(function (i, el) {\n\t\t\t\t\tvar $sub = $(el);\n\t\t\t\t\tmenu_do_collapse($sub, $sub.parent(), submenu_options);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!$this.hasClass(submenu_options.submenu_opened_class)) {\n\t\t\t\tvar current_height;\n\n\t\t\t\tif (!$submenu.is(':visible')) {\n\t\t\t\t\tmenu_do_expand($submenu, $this, submenu_options);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmenu_do_collapse($submenu, $this, submenu_options);\n\t\t\t}\n\t\t});\n\n\t});\n\n\t// Open the submenus with \"opened\" class\n\tpublic_vars.$mainMenu.find('.' + submenu_options.submenu_opened_class + ' > ul').addClass('visible');\n\n\t// Well, somebody may forgot to add \"active\" for all inhertiance, but we are going to help you (just in case) - we do this job for you for free :P!\n\tif (public_vars.$mainMenu.hasClass('auto-inherit-active-class')) {\n\t\tmenu_set_active_class_to_parents(public_vars.$mainMenu.find('.active'));\n\t}\n\n\t// Search Input\n\tvar $search_input = public_vars.$mainMenu.find('#search input[type=\"text\"]'),\n\t\t$search_el = public_vars.$mainMenu.find('#search');\n\n\tpublic_vars.$mainMenu.find('#search form').submit(function (ev) {\n\t\tvar is_collapsed = public_vars.$pageContainer.hasClass('sidebar-collapsed');\n\n\t\tif (is_collapsed) {\n\t\t\tif ($search_el.hasClass('focused') == false) {\n\t\t\t\tev.preventDefault();\n\t\t\t\t$search_el.addClass('focused');\n\n\t\t\t\t$search_input.focus();\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t});\n\n\t$search_input.on('blur', function (ev) {\n\t\tvar is_collapsed = public_vars.$pageContainer.hasClass('sidebar-collapsed');\n\n\t\tif (is_collapsed) {\n\t\t\t$search_el.removeClass('focused');\n\t\t}\n\t});\n}", "function openMenu() {\n\n\t\t$(\"#menu-items\").css(\"display\",\"block\");\n \n $(\"#app-canvas\").velocity({\n\t\t\tleft:\"85%\",\n }, {\n duration: 300,\n complete: function() {\n\t\t\t\tsetTimeout(function(){\n isMenuOpen=true;\n },150);\n\t\t\t}\n }); \n }", "open () {\n return super.open('login');\n }", "open () {\n return super.open('login');\n }", "open() {\n super.open('user/login');\n }", "open() {\n // var _this = this;\n /**\n * Fires to close other open dropdowns, typically when dropdown is opening\n * @event Dropdown#closeme\n */\n this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id'));\n this.$anchor.addClass('hover')\n .attr({'aria-expanded': true});\n // this.$element/*.show()*/;\n this._setPosition();\n this.$element.addClass('is-open')\n .attr({'aria-hidden': false});\n\n if(this.options.autoFocus){\n var $focusable = Foundation.Keyboard.findFocusable(this.$element);\n if($focusable.length){\n $focusable.eq(0).focus();\n }\n }\n\n if(this.options.closeOnClick){ this._addBodyHandler(); }\n\n if (this.options.trapFocus) {\n Foundation.Keyboard.trapFocus(this.$element);\n }\n\n /**\n * Fires once the dropdown is visible.\n * @event Dropdown#show\n */\n this.$element.trigger('show.zf.dropdown', [this.$element]);\n }", "function _open(e) {\n e.preventDefault();\n e.stopPropagation();\n\n // Find any other opened instances of select and close it\n $('.' + classOpen + ' select')[pluginName]('close');\n\n isOpen = true;\n itemsHeight = $items.outerHeight();\n\n _isInViewport();\n\n var scrollTop = $win.scrollTop();\n e.type == 'click' && $original.focus();\n $win.scrollTop(scrollTop);\n\n $doc.off(bindSufix).on(clickBind, _close);\n\n clearTimeout(closeTimer);\n if (options.openOnHover){\n $outerWrapper.off(bindSufix).on('mouseleave' + bindSufix, function(e){\n closeTimer = setTimeout(function(){ $doc.click() }, 500);\n });\n }\n\n $outerWrapper.addClass(classOpen);\n _detectItemVisibility(selected);\n\n options.onOpen.call(this);\n }", "_subscribeToMenuOpen() {\n const exitCondition = merge(this._allItems.changes, this.closed);\n this._allItems.changes\n .pipe(startWith(this._allItems), mergeMap((list) => list\n .filter(item => item.hasMenu())\n .map(item => item.getMenuTrigger().opened.pipe(mapTo(item), takeUntil(exitCondition)))), mergeAll(), switchMap((item) => {\n this._openItem = item;\n return item.getMenuTrigger().closed;\n }), takeUntil(this.closed))\n .subscribe(() => (this._openItem = undefined));\n }", "function menuOpenByFileName( theFilename )\r\n{\r\n\t// Due to timing issues, the tree frame may not loaded when the context frame is.\r\n\tif ( !treeReady )\r\n\t{\r\n\t\tsetTimeout(\"menuOpenByFileName('\" + theFilename + \"')\", 500);\r\n\t}\r\n\r\n\t// Sanity check. Replace all spaces with the ^ characters\r\n\ttheFilename = theFilename.replace(/ /gi,'^');\r\n\r\n\t// Find the object based on the file name.\r\n\tvar theNode = TreeFindItemByFilename( theFilename );\r\n\r\n\tmenuExpand ( theNode );\r\n}", "function openMenu(object) {\r\n if ($(document).width() > $responsiveWidth) {\r\n if (!object.closest(\".menu__dropdown__control\").hasClass(\"active\")) {\r\n // Closes all other open menus.\r\n $menuDropDown.slideUp().closest(\".menu__dropdown__control\").removeClass(\"active\");\r\n // Open the menu being hovered.\r\n object.closest(\".menu__dropdown__control\").addClass(\"active\")\r\n .find(\".menu__dropdown\").slideDown().attr(\"aria-hidden\",\"false\");\r\n }\r\n }\r\n }", "showSubMenu() {\n const item = this.selectedItem;\n const subMenu = this.getSubMenuFromItem(item);\n if (subMenu) {\n this.subMenu = subMenu;\n item.setAttribute('sub-menu-shown', 'shown');\n this.positionSubMenu_(item, subMenu);\n subMenu.show();\n subMenu.parentMenuItem = item;\n this.moveSelectionToSubMenu_(subMenu);\n }\n }", "function onOpen() {\n createMenu();\n}", "open () {\n return super.open('');\n }", "open() {\n if (!this._open) {\n this._open = true;\n this._applyContainer(this.container);\n this.openChange.emit(true);\n this._setCloseHandlers();\n if (this._anchor) {\n this._anchor.nativeElement.focus();\n }\n }\n }", "open() {\n var self = this;\n if (self.isLocked || self.isOpen || self.settings.mode === 'multi' && self.isFull()) return;\n self.isOpen = true;\n setAttr(self.control_input, {\n 'aria-expanded': 'true'\n });\n self.refreshState();\n applyCSS(self.dropdown, {\n visibility: 'hidden',\n display: 'block'\n });\n self.positionDropdown();\n applyCSS(self.dropdown, {\n visibility: 'visible',\n display: 'block'\n });\n self.focus();\n self.trigger('dropdown_open', self.dropdown);\n }", "function openExcursionsMenu($event) {\n ActivityTracker(EventLogFactory.action.excursionsList.contextMenu());\n list.excursionMenu.show($event);\n }", "open() {\n super.open(\"login\");\n }", "get menuOpen() {\n return this._menuOpen;\n }", "function open_current() {\n var page = location.pathname.match(/[^\\/]+$/)[0];\n jQuery('div.toc a[href=\"' + page + '\"]') //\n .parentsUntil('ul.toc', 'li.collapsible').addClass('show');\n }", "_open() {\n this.$.dropdown.open();\n this.$.cursor.setCursorAtIndex(0);\n Polymer.dom.flush();\n this.$.cursor.target.focus();\n }", "open () {\n this.opened = true;\n }", "toggleMainMenu(event) {\n event.preventDefault();\n\n if (this.isClosing || !this.isNavMenuOpen) {\n this.openMenu();\n } else if (this.isExpanding || this.isNavMenuOpen) {\n this.closeMenu();\n }\n }", "function show()\r\n{\r\n // show the sub menu\r\n this.getElementsByTagName('ul')[0].style['visibility'] = 'visible';\r\n var currentNode=this;\r\n while(currentNode)\r\n {\r\n if( currentNode.nodeName=='LI')\r\n {\r\n currentNode.getElementsByTagName('a')[0].className = 'linkOver';\r\n }\r\n currentNode=currentNode.parentNode;\r\n }\r\n // clear the timeout\r\n eval ( \"clearTimeout( timeout\"+ this.id +\");\" );\r\n hideAllOthersUls( this );\r\n}", "open() {\n if (!this.disabled) {\n this.expanded = true;\n }\n }", "function openMobileMenu() {\n\t\tsetClick(!click);\n\t}", "function openMenu(level) {\n $(\".sidebar-menu\").stop().animate({ left: \"-\" + (($(\".sidebar-menu\").width() + 20) * level) });\n}", "function OCM_simpleDropdownOpen() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('#mobile-menu').show();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('header#top .slide-out-widget-area-toggle:not(.std-menu) .lines-button').addClass('close');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('body.material').length > 0) {\r\n\t\t\t\t\t\t$('header#top .slide-out-widget-area-toggle a').addClass('menu-push-out');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$('.slide-out-widget-area-toggle > div > a').removeClass('animating');\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t\t\r\n\t\t\t\t}", "_openTillSelectedPage(selectedRoute) {\n\n var navList = this.navList;\n\n var path = pathToLeafNode(navList, selectedRoute);\n\n path.forEach(function (node) {\n node.opened = true;\n });\n\n this.set('navList', []);\n this.async(function () {\n this.set('navList', navList);\n });\n }", "toggleMenu() {\n return this._menuOpen ? this.closeMenu() : this.openMenu();\n }", "hasSubMenuOpened() {\n return this.state.activeSubMenuIndex != null;\n }", "open() {\n return super.open('');\n }", "initMenu() {\n let menuGroups = this._items.map(menuGroup => {\n let items = menuGroup.map(menuItem => {\n let item = HTMLBuilder.li(\"\", \"menu-item\");\n item.html(menuItem.label);\n\n if (menuItem.action) {\n item.data(\"action\", menuItem.action)\n .click(e => {\n if (!item.hasClass(\"disabled\")) {\n this.controller.doAction(menuItem.action);\n this.closeAll();\n }\n });\n\n let shortcut = this.controller.shortcutCommands[menuItem.action];\n if (shortcut) {\n HTMLBuilder.span(\"\", \"hint\")\n .html(convertShortcut(shortcut))\n .appendTo(item);\n }\n }\n\n if (menuItem.submenu) {\n let submenu = new this.constructor(this, item, menuItem.submenu);\n item.addClass(\"has-submenu\").mouseenter(e => {\n if (!item.hasClass(\"disabled\")) {\n this.openSubmenu(submenu);\n }\n });\n this._submenus.push(submenu);\n }\n\n item.mouseenter(e => {\n if (this._activeSubmenu && item !== this._activeSubmenu.parentItem) {\n this.closeSubmenus();\n }\n });\n\n this.makeItem(item, menuItem);\n\n return item;\n });\n return HTMLBuilder.make(\"ul.menu-group\").append(items);\n });\n\n this._menu = HTMLBuilder.div(`submenu ${this.constructor.menuClass}`, menuGroups);\n\n // make sure submenus appear after the main menu\n this.attach();\n this._submenus.forEach(submenu => {\n submenu.attach();\n });\n }", "openCurtains() {\n this.openCurtainsH(this.root);\n }", "triggersSubmenu() {\n return !!(this._menuItemInstance && this._parentMenu);\n }", "function openSideMenu($mdMenu, event) {\n $mdMenu.open(event);\n }", "function toggleMenuOpen(el, event)\n{\n event.stopPropagation();\n\n let li = el.parentElement.parentElement.parentElement;\n let ul = $(li).find('ul.nav-treeview');\n\n $(li).toggleClass('menu-open');\n $(ul).slideToggle(300);\n\n setTimeout(function()\n {\n if($(li).hasClass('menu-open'))\n {\n $(ul).attr(\"style\", \"display:block;\")\n }\n else\n {\n $(ul).attr(\"style\", \"display:none;\")\n }\n }, 301)\n}", "open () {\r\n if (this.isOpen) {\r\n return;\r\n }\r\n this.trigger('before:open', this);\r\n\r\n let panelViewOptions = _.extend(_.result(this.options, 'panelViewOptions') || {}, {\r\n parent: this\r\n });\r\n this.panelView = new this.options.panelView(panelViewOptions);\r\n this.panelView.on('all', (...args) => {\r\n args[0] = `panel:${args[0]}`;\r\n this.triggerMethod(...args);\r\n });\r\n this.$el.addClass(classes.OPEN);\r\n\r\n let wrapperView = new WrapperView({\r\n view: this.panelView,\r\n className: 'popout__wrp'\r\n });\r\n this.popupId = WindowService.showTransientPopup(wrapperView, {\r\n fadeBackground: this.options.fade,\r\n hostEl: this.el\r\n });\r\n this.__adjustDirectionPosition(wrapperView.$el);\r\n this.__adjustFlowPosition(wrapperView.$el);\r\n\r\n this.listenToElementMoveOnce(this.el, this.close);\r\n this.listenTo(GlobalEventService, 'window:mousedown:captured', this.__handleGlobalMousedown);\r\n if (!this.__isNestedInButton(document.activeElement)) {\r\n this.focus();\r\n } else {\r\n this.focus(document.activeElement);\r\n }\r\n this.__suppressHandlingBlur = false;\r\n this.isOpen = true;\r\n this.trigger('open', this);\r\n }", "open() {\n document.body.classList.add(FolderSettings.CSS.panelOpenedModifier);\n this.opened = true;\n\n\n /**\n * Fill Folder's title input\n */\n this.folderTitleInput.value = codex.notes.aside.currentFolder.title || '';\n }", "click() {\n this._super(...arguments);\n window.open(this.get('href'), this.get('target') || '_self');\n return true;\n }", "function openNav() {\n $('#nav-list li').removeClass('treelisthidden');\n storage.setItem(treesettings, '1');\n $('#sideNavigation').css('display', 'block');\n\n $('#sideNavigation').css('width', '300px');\n $('body.support_kb').find('.cover').css('display', 'none');\n $('body.support_kb').find('#sidefoot').css({\n 'width': '300px',\n 'margin-left': ''\n });\n $('#sidefoot').css('display', 'block');\n $('.footer-inner').css('padding-left', '300px');\n $('body').find('main').css('width', 'calc(100% - 100px)');\n $('body.support_kb').find('#sideNavigation').css('margin-left', '0');\n $('body').find('main').css('width', 'calc(100% - 350px)');\n\n (function() {\n try {\n $('#sideNavigation').resizable(\"enable\");\n } catch (err) {\n setTimeout(arguments.callee, 200)\n }\n })();\n\n $('#side-toggle').attr('class', 'fa fa-angle-double-left');\n\n }", "function MenuOpen(){\r\n \t$(menu).offset({left:rawMouseX, top:rawMouseY});\r\n \tvar items = $('.circleNavi a');\r\n \tfor(var i = 0, l = items.length; i < l; i++) {\r\n \t\t$(items[i]).animate({\r\n \t\t\tleft:(-100*Math.cos(Math.PI + (1/(l-1))*i*(Math.PI))).toFixed(4) + \"px\",\r\n \t\t\ttop:(100*Math.sin(Math.PI + (1/(l-1))*i*(Math.PI))).toFixed(4) + \"px\"\r\n \t\t});\r\n \t}\r\n \t$(menu).addClass('open');\r\n }", "function _open(e) {\n e.preventDefault();\n e.stopPropagation();\n\n // Find any other opened instances of select and close it\n $('.' + classOpen + ' select')[pluginName]('close');\n\n isOpen = true;\n itemsHeight = $items.outerHeight();\n\n _isInViewport();\n\n // Prevent window jump when focusing original select\n var scrollTop = $win.scrollTop();\n e.type == 'click' && $original.focus();\n $win.scrollTop(scrollTop);\n\n $doc.on(clickBind, _close);\n\n // Delay close effect when openOnHover is true\n if (options.openOnHover){\n clearTimeout(closeTimer);\n $outerWrapper.off(bindSufix).on('mouseleave' + bindSufix, function(){\n closeTimer = setTimeout(_close, 500);\n });\n }\n\n // Toggle options box visibility\n $outerWrapper.addClass(classOpen);\n _detectItemVisibility(selected);\n\n // options.onOpen.call(this, element);\n options.onOpen(element);\n }", "function mainmenu(){\n\t\t\t\tJ(\"#main_menu ul li ul\").css({display: \"none\"}); // Opera Fix\n\t\t\t\t\tJ(\"#main_menu ul li\").hover(function(){\n\t\t\t\t\t\tJ(this).find('ul:first').css({visibility: \"visible\",display: \"none\"}).show(300);\n\t\t\t\t\t\t},function(){\n\t\t\t\t\t\tJ(this).find('ul:first').css({visibility: \"hidden\"});\n\t\t\t\t\t});\n\t\t\t\t}", "open() {\n return super.open(\"login\");\n }", "function togglemenu(){\n this.isopen = !this.isopen;\n }", "function handleMenuClick(event) {\n setMenuOpen(event.currentTarget);\n }", "open () {\n return super.open('log-in');\n }", "function toggleOpen(){\n\t\tconsole.log('open')\n\t\tthis.toggleClass('open');\n\t}", "open () {\n return super.open('/login');\n }", "function openSubMenu() {\n $('.subMenu').addClass('openMe');\n $('.subMenu').removeClass('closeMe');\n\n}", "function toggleSubmenu(element) { submenuToggled = true; var submenu = jQueryBuddha(element).closest(\"li\").find(\"ul.mm-submenu\").first(); if (!submenu.hasClass(\"submenu-opened\")) { jQueryBuddha(element).closest(\"li\").addClass(\"mm-hovering\"); jQueryBuddha(element).find(\">.fa\").removeClass(\"fa-plus-circle\").addClass(\"fa-minus-circle\"); submenu.addClass(\"submenu-opened\"); } else { jQueryBuddha(element).closest(\"li\").removeClass(\"mm-hovering\"); jQueryBuddha(element).find(\">.fa\").removeClass(\"fa-minus-circle\").addClass(\"fa-plus-circle\"); submenu.removeClass(\"submenu-opened\"); } setTimeout(function () { submenuToggled = false; }, 100); jQueryBuddha(document).trigger(\"toggleSubmenu\", [element]); return false; }", "function onOpen() { CUSTOM_MENU.add(); }", "function showSubMenu() {\n\tvar objThis = this;\t\n\tfor (var i = 0; i < objThis.childNodes.length; i++) {\n\t\tif (objThis.childNodes.item(i).nodeName == \"UL\")\t{\t\t\t\t\t\t\t\n\t\t\tobjThis.childNodes.item(i).style.display = \"block\";\n\t\t}\t\t\n\t}\t\n}", "function _submenuToggle() {\n\n\t\tvar $this = $( this ),\n\t\t\tothers = $this.closest( '.menu-item' ).siblings();\n\t\t_toggleAria( $this, 'aria-pressed' );\n\t\t_toggleAria( $this, 'aria-expanded' );\n\t\t$this.toggleClass( 'activated' );\n\t\t$this.next( '.sub-menu' ).slideToggle( 'fast' );\n\n\t\tothers.find( '.' + subMenuButtonClass ).removeClass( 'activated' ).attr( 'aria-pressed', 'false' );\n\t\tothers.find( '.sub-menu' ).slideUp( 'fast' );\n\n\t}", "function _submenuToggle() {\n\n\t\tvar $this = $( this ),\n\t\t\tothers = $this.closest( '.menu-item' ).siblings();\n\t\t_toggleAria( $this, 'aria-pressed' );\n\t\t_toggleAria( $this, 'aria-expanded' );\n\t\t$this.toggleClass( 'activated' );\n\t\t$this.next( '.sub-menu' ).slideToggle( 'fast' );\n\n\t\tothers.find( '.' + subMenuButtonClass ).removeClass( 'activated' ).attr( 'aria-pressed', 'false' );\n\t\tothers.find( '.sub-menu' ).slideUp( 'fast' );\n\n\t}", "function clickToggleSubmenus() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!$('#header-outer[data-format=\"left-header\"]').length > 0 &&\r\n\t\t\t\t\t!$('body.material[data-slide-out-widget-area-style*=\"slide-out-from-right\"]').length > 0 &&\r\n\t\t\t\t\t!$('#slide-out-widget-area[data-dropdown-func=\"separate-dropdown-parent-link\"]').length > 0) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Remove megamenu class.\r\n\t\t\t\t\t$('#header-outer[data-format=\"left-header\"] nav li.megamenu').removeClass('megamenu');\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $ocm_link_selector;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('#slide-out-widget-area[data-dropdown-func=\"separate-dropdown-parent-link\"]').length > 0) {\r\n\t\t\t\t\t\t$ocm_link_selector = '#slide-out-widget-area .off-canvas-menu-container li.menu-item-has-children > .ocm-dropdown-arrow';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$ocm_link_selector = 'body.material #slide-out-widget-area[class*=\"slide-out-from-right\"] .off-canvas-menu-container li.menu-item-has-children > a';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Click event.\r\n\t\t\t\t\t$('#header-outer[data-format=\"left-header\"] nav li.menu-item-has-children > a, ' + $ocm_link_selector).on('click', function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($(this).parent().hasClass('open-submenu')) {\r\n\t\t\t\t\t\t\t$(this).parent().find('.sub-menu').css({\r\n\t\t\t\t\t\t\t\t'max-height': '0'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t$(this).parent().removeClass('open-submenu');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Get max height.\r\n\t\t\t\t\t\t\tvar $that = $(this);\r\n\t\t\t\t\t\t\tvar $maxSubMenuHeight;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$that.parent()\r\n\t\t\t\t\t\t\t\t.find('> .sub-menu')\r\n\t\t\t\t\t\t\t\t.addClass('no-trans');\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$that.parent().find('> .sub-menu').css({\r\n\t\t\t\t\t\t\t\t\t'max-height': 'none',\r\n\t\t\t\t\t\t\t\t\t'position': 'absolute',\r\n\t\t\t\t\t\t\t\t\t'visibility': 'hidden'\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$maxSubMenuHeight = $that.parent().find('> .sub-menu').height();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$that.parent()\r\n\t\t\t\t\t\t\t\t\t.find('> .sub-menu')\r\n\t\t\t\t\t\t\t\t\t.removeClass('no-trans');\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$that.parent().find('> .sub-menu').css({\r\n\t\t\t\t\t\t\t\t\t'max-height': '0',\r\n\t\t\t\t\t\t\t\t\t'position': 'relative',\r\n\t\t\t\t\t\t\t\t\t'visibility': 'visible'\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}, 25);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Reset Max Height.\r\n\t\t\t\t\t\t\t\t$that.closest('ul')\r\n\t\t\t\t\t\t\t\t\t.find('li.menu-item-has-children')\r\n\t\t\t\t\t\t\t\t\t.removeClass('open-submenu');\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$that.closest('ul').find('li.menu-item-has-children > .sub-menu').css({\r\n\t\t\t\t\t\t\t\t\t'max-height': '0'\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$that.parent().addClass('open-submenu');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$that.parent()\r\n\t\t\t\t\t\t\t\t\t.find('> .sub-menu')\r\n\t\t\t\t\t\t\t\t\t.css('max-height', $maxSubMenuHeight);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Add height to open parents.\r\n\t\t\t\t\t\t\t\tif ($that.parents('ul').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$that.parents('ul:not(.sf-menu)').each(function () {\r\n\t\t\t\t\t\t\t\t\t\t$(this).css('max-height');\r\n\t\t\t\t\t\t\t\t\t\t$(this).css('max-height', parseInt($(this).height() + parseInt($(this).css('padding-top')) * 2 + $maxSubMenuHeight) + 'px');\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\t\r\n\t\t\t\t\t\t\t}, 50);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Start open for current page items.\t\r\n\t\t\t\t\tif($('#header-outer[data-format=\"left-header\"] nav .sf-menu > .current-menu-ancestor.menu-item-has-children > ul > li.current-menu-item').length > 0) {\r\n\t\t\t\t\t\t$('#header-outer[data-format=\"left-header\"] nav .sf-menu > .current-menu-ancestor.menu-item-has-children > a').trigger('click');\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}" ]
[ "0.6710982", "0.65928006", "0.65794134", "0.6576348", "0.63735604", "0.63311595", "0.63244146", "0.6310133", "0.6270878", "0.6226644", "0.61915517", "0.6176953", "0.6128036", "0.6121118", "0.60982436", "0.60707384", "0.6070736", "0.6063347", "0.6063347", "0.6056426", "0.60393226", "0.60393226", "0.60326576", "0.6022138", "0.6008534", "0.600426", "0.5998848", "0.5991656", "0.59829605", "0.59772575", "0.5977156", "0.5974388", "0.59569323", "0.59545094", "0.59452516", "0.59362113", "0.5934784", "0.5924438", "0.59239614", "0.59122336", "0.588895", "0.5883549", "0.58822167", "0.585825", "0.5843405", "0.5829329", "0.5821051", "0.5821051", "0.58118665", "0.57990354", "0.5789387", "0.5785884", "0.5767202", "0.5766338", "0.5760726", "0.5754998", "0.5747891", "0.5727653", "0.57259595", "0.5725756", "0.57233304", "0.5719551", "0.57048243", "0.57047945", "0.57046497", "0.5700536", "0.5692621", "0.56671333", "0.5666912", "0.56626564", "0.5659159", "0.5654667", "0.5649566", "0.56433916", "0.56291837", "0.5617274", "0.56094193", "0.5599687", "0.55954474", "0.5589282", "0.5587246", "0.5585824", "0.557128", "0.5562898", "0.5562322", "0.5554659", "0.5554507", "0.5554144", "0.5545273", "0.55442715", "0.5512498", "0.5509792", "0.5504738", "0.5499255", "0.5497551", "0.5497475", "0.54888046", "0.5482122", "0.5482122", "0.54796517" ]
0.5680061
67
METHODS Add this menu to the page.
attach() { this._menu.appendTo("body"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onOpen() { CUSTOM_MENU.add(); }", "addPage() {\n\t\tthrow new Error('You cannot directly add pages in a RichMenu');\n\t}", "addMenuItem(menuItem){\r\n\r\n }", "add(menu) {\n // Make sure we have a menu ID\n menu = React.cloneElement(menu, { id: menu.props.id || menu.props.label });\n\n // If top-level menu already exists...\n const menuIndex = findMenuIndex(this.menu, menu);\n if (menuIndex > -1) {\n // Merge new menu with existing menu\n const existingMenu = this.menu[menuIndex];\n this.menu[menuIndex] = mergeMenus(existingMenu, menu);\n } else {\n // New top-level menu\n this.menu.push(menu);\n }\n\n // Sort menu by order, then by label (alphabetically)\n this.menu = sortMenus(this.menu);\n\n return this;\n }", "function addMenu ( menuID, options ) {\n\t\tvar o = options || {},\n\n\t\t\tvisible = typeof o.visible === 'boolean' ?\n\t\t\t\to.visible :\n\t\t\t\ttrue,\n\t\t\tstate = o.state || 'open',\n\n\t\t\t//\tTODO: Remove when muContent has a better way of getting sizes\n\t\t\tsizeOpen = o.sizeOpen || 50,\n\t\t\tsizeClosed = o.sizeClosed || 10;\n\t\t\t//\tENDTODO: Remove when muContent has a better way of getting sizes\n\n\n\t\tmenus.items[ menuID ] = {\n\t\t\tvisible: visible,\n\t\t\tstate: state,\n\t\t\tchildren: {},\n\n\t\t\t//\tTODO: Remove when muContent has a better way of getting sizes\n\t\t\tstyles: {\n\t\t\t\topen: sizeOpen,\n\t\t\t\tclosed: sizeClosed\n\t\t\t}\n\t\t\t//\tENDTODO: Remove when muContent has a better way of getting sizes\n\t\t};\n\t\tmenus.order.push( menuID );\n\n\n\t\tsetAllOrders();\n\n\t\t$rootScope.$broadcast( 'MU_menuAdded', { menuID: menuID } );\n\n\n\t\treturn muSystem;\n\t}", "function install_menu() {\n var config = {\n name: 'dashboard_level',\n submenu: 'Settings',\n title: 'Dashboard Level',\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "function OsNavAdditionInfo() {\r\n $('.os-menu a[href=\"#\"]').on('click', function (event) {\r\n event.preventDefault();\r\n });\r\n $('.os-menu li').has('ul').addClass('li-node').parent().addClass('ul-node');\r\n //$('.os-menu .mega-menu:not(.menu-fullwidth)').parent().css('position', 'relative')\r\n }", "function _addNavigation() {}", "attach() {\n if (this.#id)\n V2Web.addNavigation(this.#title, '#' + this.#id);\n\n document.body.appendChild(this.#section);\n }", "function AddMenuItem(htmlElementParent, name, cssClass, functionOnClick, elementType ) {\r\n\tif (elementType==null) elementType = \"div\";\r\n\tvar item = document.createElement(elementType);\r\n\tif (cssClass!=null) item.className=cssClass;\r\n\tif (name!=null) item.innerHTML=name;\r\n\thtmlElementParent.appendChild(item);\r\n\t//MenuSetPosition(item);\r\n\tif (functionOnClick!=null) { //ignore inactive menu\r\n\t\tif (MENU_TUTORIAL == null) item.onclick=functionOnClick; //in game\r\n\t\telse {\r\n\t\t\tMENU_TUTORIAL[name] = item; //in tuto only\r\n\t\t\titem.fakeClick = functionOnClick;\r\n\t\t}\r\n\t\tMENU_ITEMS.push(item);\r\n\t\t//console.log(\"DEBUG Util.AddMenuItem : item = \" + item + \" \" + name);\r\n\t}\r\n\treturn item;\r\n}", "addMenuItem( item ){\n this.itemList.push(item);\n }", "function install_menu() {\n let config = {\n name: script_id,\n submenu: 'Settings',\n title: script_title,\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "function addMenu(){\n var appMenu = new gui.Menu({ type: 'menubar' });\n if(os.platform() != 'darwin') {\n // Main Menu Item 1.\n item = new gui.MenuItem({ label: \"Options\" });\n var submenu = new gui.Menu();\n // Submenu Items.\n submenu.append(new gui.MenuItem({ label: 'Preferences', click :\n function(){\n // Add preferences options.\n // Edit Userdata and Miscellaneous (Blocking to be included).\n\n var mainWin = gui.Window.get();\n\n\n var preferWin = gui.Window.open('./preferences.html',{\n position: 'center',\n width:901,\n height:400,\n focus:true\n });\n mainWin.blur();\n }\n }));\n\n submenu.append(new gui.MenuItem({ label: 'User Log Data', click :\n function(){\n var mainWin = gui.Window.get();\n\n var logWin = gui.Window.open('./userlogdata.html',{\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus:true\n });\n }\n }));\n\n submenu.append(new gui.MenuItem({ label: 'Exit', click :\n function(){\n gui.App.quit();\n }\n }));\n\n item.submenu = submenu;\n appMenu.append(item);\n\n // Main Menu Item 2.\n item = new gui.MenuItem({ label: \"Transfers\"});\n var submenu = new gui.Menu();\n // Submenu 1.\n submenu.append(new gui.MenuItem({ label: 'File Transfer', click :\n function(){\n var mainWin = gui.Window.get();\n var aboutWin = gui.Window.open('./filetransfer.html',{\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus: true\n });\n mainWin.blur();\n }\n }));\n item.submenu = submenu;\n appMenu.append(item);\n\n // Main Menu Item 3.\n item = new gui.MenuItem({ label: \"Help\" });\n var submenu = new gui.Menu();\n // Submenu 1.\n submenu.append(new gui.MenuItem({ label: 'About', click :\n function(){\n var mainWin = gui.Window.get();\n var aboutWin = gui.Window.open('./about.html', {\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus: true\n });\n mainWin.blur();\n }\n }));\n item.submenu = submenu;\n appMenu.append(item);\n gui.Window.get().menu = appMenu;\n }\n else {\n // menu for mac.\n }\n\n}", "function addMenu(title, options) {\n var createProperties = {\n contexts: [\"all\"],\n title: adguard.i18n.getMessage(title)\n };\n if (options) {\n if (options.id) {\n createProperties.id = options.id;\n }\n if (options.parentId) {\n createProperties.parentId = options.parentId;\n }\n if (options.disabled) {\n createProperties.enabled = false;\n }\n if (options.messageArgs) {\n createProperties.title = adguard.i18n.getMessage(title, options.messageArgs);\n }\n if (options.contexts) {\n createProperties.contexts = options.contexts;\n }\n if ('checkable' in options) {\n createProperties.checkable = options.checkable;\n }\n if ('checked' in options) {\n createProperties.checked = options.checked;\n }\n }\n var callback;\n if (options && options.action) {\n callback = contextMenuCallbackMappings[options.action];\n } else {\n callback = contextMenuCallbackMappings[title];\n }\n if (typeof callback === 'function') {\n createProperties.onclick = callback;\n }\n adguard.contextMenus.create(createProperties);\n }", "function add_menu(){\n\t/******* add menu ******/\n\t// menu itsself\n\tvar menu=$(\"#menu\");\n\tif(menu.length){\n\t\trem_menu();\n\t};\n\n\tmenu=$(\"<div></div>\");\n\tmenu.attr(\"id\",\"menu\");\n\tmenu.addClass(\"menu\");\n\t\n\t//////////////// rm setup //////////////////\n\tvar f=function(){\n\t\tvar box=$(\"#rm_box\");\n\t\tif(box.length){\n\t\t\tbox.toggle();\t\n\t\t}\n\t};\n\tadd_sidebar_entry(menu,f,\"rules\",\"style\");\n\tvar box=$(\"<div></div>\");\n\tbox.attr(\"id\",\"rm_box\");\n\tbox.text(\"loading content ... hang on\");\n\tbox.hide();\n\tmenu.append(box);\t\n\t//////////////// rm setup //////////////////\n\n\t//////////////// area setup //////////////////\n\tvar f=function(){\n\t\tvar box=$(\"#areas_box\");\n\t\tif(box.length){\n\t\t\tbox.toggle();\t\n\t\t}\n\t};\n\tadd_sidebar_entry(menu,f,\"areas\",\"home\");\n\tvar box=$(\"<div></div>\");\n\tbox.attr(\"id\",\"areas_box\");\n\tbox.text(\"loading content ... hang on\");\n\tbox.hide();\n\tmenu.append(box);\t\n\t//////////////// area setup //////////////////\n\n\t//////////////// camera setup //////////////////\n\tvar f=function(){\n\t\tvar box=$(\"#cameras_box\");\n\t\tif(box.length){\n\t\t\tbox.toggle();\t\n\t\t}\n\t};\n\tadd_sidebar_entry(menu,f,\"units\",\"camera_enhance\");\n\tvar box=$(\"<div></div>\");\n\tbox.attr(\"id\",\"cameras_box\");\n\tbox.text(\"loading content ... hang on\");\n\tbox.hide();\n\tmenu.append(box);\t\n\t//////////////// camera setup //////////////////\n\n\t//////////////// user setup //////////////////\n\tvar f=function(){\n\t\tvar box=$(\"#users_box\");\n\t\tif(box.length){\n\t\t\tbox.toggle();\t\n\t\t\tlogin_entry_button_state(\"-1\",\"show\");\t// scale the text fields for the \"new\" entry = -1\n\t\t}\n\t};\n\tadd_sidebar_entry(menu,f,\"users\",\"group\");\n\tvar box=$(\"<div></div>\");\n\tbox.attr(\"id\",\"users_box\");\n\tbox.text(\"loading content ... hang on\");\n\tbox.hide();\n\tmenu.append(box);\t\n\t//////////////// user setup //////////////////\n\n\n\t//////////////// logout //////////////////\n\tvar f=function(){\n\t\t\tg_user=\"nongoodlogin\";\n\t\t\tg_pw=\"nongoodlogin\";\n\t\t\tc_set_login(g_user,g_pw);\n\t\t\ttxt2fb(get_loading(\"\",\"Signing you out...\"));\n\t\t\tfast_reconnect=1;\n\t\t\tcon.close();\n\n\t\t\t// hide menu\n\t\t\trem_menu();\n\t};\n\tadd_sidebar_entry(menu,f,\"log-out\",\"vpn_key\");\n\t//////////////// logout //////////////////\n\n\t////////////// hidden data_fields /////////////\n\tvar h=$(\"<div></div>\");\n\th.attr(\"id\",\"list_cameras\");\n\th.hide();\n\tmenu.append(h);\n\n\th=$(\"<div></div>\");\n\th.attr(\"id\",\"list_area\");\n\th.hide();\n\tmenu.append(h);\n\t////////////// hidden data_fields /////////////\n\n\n\tmenu.insertAfter(\"#clients\");\n\t\n\n\tvar hamb=$(\"<div></div>\");\n\thamb.click(function(){\n\t\treturn function(){\n\t\t\ttoggle_menu();\n\t\t}\n\t}());\n\thamb.attr(\"id\",\"hamb\");\n\thamb.addClass(\"hamb\");\n\tvar a=$(\"<div></div>\");\n\tvar b=$(\"<div></div>\");\n\tvar c=$(\"<div></div>\");\n\ta.addClass(\"hamb_l\");\n\tb.addClass(\"hamb_l\");\n\tc.addClass(\"hamb_l\");\n\thamb.append(a);\n\thamb.append(b);\n\thamb.append(c);\n\thamb.insertAfter(\"#clients\");\n\t/******* add menu ******/\n}", "function addItem(futureMenuItem) {\n\t\tfutureMenuItem.setMenu(this);\n\t\tthis.items.add(futureMenuItem, true);\n\t}", "function addMenu () {\n $('.add-button').click(() => {\n $('.add-menu').toggle()\n })\n\n $('.add-lesson').click(() => {\n const newLesson = prompt('What would you like to name your new lesson?')\n\n draftData.lessons.push({\n lessonTitle: newLesson,\n parts: [\n {\n partTitle: 'My Great Part',\n partContent: 'Text goes here.'\n }\n ]\n })\n\n loadCreateSideBar(draftData)\n })\n\n $('.add-part').click(() => {\n let newPartLocation = prompt('Which lesson should the part be added to?')\n\n if (newPartLocation > draftData.lessons.length) {\n alert('Please pick a lesson that exists.')\n } else {\n const newPartTitle = prompt('What would you like to name your new part?')\n\n draftData.lessons[newPartLocation - 1].parts.push({\n partTitle: newPartTitle,\n partContent: 'Text goes here.'\n })\n\n loadCreateSideBar(draftData)\n }\n })\n}", "function insertMenue(xSize) {\n\t\tvar data = getMainAndSub();\n\n\t\t//var src= locParams.prefix + \"flash/menu.swf\";\n\t\tvar url = new URL(locParams.prefix + \"flash/menu.swf\", true, true);\n\n\t\tif (data[0] != -1 && data[1] != -1) {\n\t\t\turl.setParameter(\"main\", data[0], true);\n\t\t\turl.setParameter(\"sub\", data[1], true);\n\t\t}\n\n\t\tif (url.path.indexOf(\"/servlet/CMServeRES\") > -1)\n\t\t\turl.setParameter(\"foo\", Math.random(), true);\n\n\t\tif (locParams.gloPre)\n\t\t\turl = new URL(locParams.prefixSrc + \".swf\", true, true);\n\n\n\t\t_insertObjectFlash(url.toString(),elemParams.OBJECTMENU,xSize,elemParams.menueHeight,\"noscale\",\"t\");\n\t}", "async registerMenu() {\r\n this.activateDefaultMenu();\r\n // re-render menu list by changing state\r\n this.nestedMenus = [...this.getRenderedMenuItems()];\r\n }", "function menuAddClaass() {\n _menu.find(\"li\").has(\"ul\").addClass(\"hasChild\");\n _megamenu.find(\"li\").has(\"ul\").addClass(\"hasChild\");\n }", "addMenu(menu, options = {}) {\n if (ArrayExt.firstIndexOf(this.menus, menu) > -1) {\n return;\n }\n let rank = 'rank' in options ? options.rank : 100;\n let rankItem = { menu, rank };\n let index = ArrayExt.upperBound(this._items, rankItem, Private.itemCmp);\n // Upon disposal, remove the menu and its rank reference.\n menu.disposed.connect(this._onMenuDisposed, this);\n ArrayExt.insert(this._items, index, rankItem);\n /**\n * Create a new menu.\n */\n this.insertMenu(index, menu);\n }", "function installMenu() {\n wkof.Menu.insert_script_link({\n name: script_name,\n submenu: \"Settings\",\n title: script_name,\n on_click: openSettings,\n });\n }", "function setupMenu() {\n // console.log('setupMenu');\n\n document.getElementById('menuGrip')\n .addEventListener('click', menuGripClick);\n\n document.getElementById('menuPrint')\n .addEventListener('click', printClick);\n\n document.getElementById('menuHighlight')\n .addEventListener('click', menuHighlightClick);\n\n const menuControls = document.getElementById('menuControls');\n if (Common.isIE) {\n menuControls.style.display = 'none';\n } else {\n menuControls.addEventListener('click', menuControlsClick);\n }\n\n document.getElementById('menuSave')\n .addEventListener('click', menuSaveClick);\n\n document.getElementById('menuExportSvg')\n .addEventListener('click', exportSvgClick);\n\n document.getElementById('menuExportPng')\n .addEventListener('click', exportPngClick);\n\n PageData.MenuOpen = (Common.Settings.Menu === 'Open');\n}", "function addMenuItem(menuId, options) {\n options = options || {};\n\n // Validate that the menu exists\n service.validateMenuExistence(menuId);\n\n // Push new menu item\n service.menus[menuId].items.push({\n title: options.title || '',\n state: options.state || '',\n type: options.type || 'item',\n icon: options.icon || '',\n class: options.class,\n roles: ((options.roles === null || typeof options.roles === 'undefined') ? service.defaultRoles : options.roles),\n position: options.position || 0,\n items: [],\n shouldRender: shouldRender\n });\n\n // Add submenu items\n if (options.items) {\n for (var i in options.items) {\n if (options.items.hasOwnProperty(i)) {\n service.addSubMenuItem(menuId, options.state, options.items[i]);\n }\n }\n }\n\n // Return the menu object\n return service.menus[menuId];\n }", "function init() {\n let menu = $E('menu', {\n id: kUI.prefMenu.id,\n label: kUI.prefMenu.label,\n accesskey: kUI.prefMenu.accesskey\n });\n\n if (kSiteList.length) {\n let popup = $E('menupopup');\n\n $event(popup, 'command', onCommand);\n\n kSiteList.forEach(({name, disabled}, i) => {\n let menuitem = popup.appendChild($E('menuitem', {\n label: name + (disabled ? ' [disabled]' : ''),\n type: 'checkbox',\n checked: !disabled,\n closemenu: 'none'\n }));\n\n menuitem[kDataKey.itemIndex] = i;\n });\n\n menu.appendChild(popup);\n }\n else {\n $E(menu, {\n tooltiptext: kUI.prefMenu.noSiteRegistered,\n disabled: true\n });\n }\n\n $ID('menu_ToolsPopup').appendChild(menu);\n }", "createMenus (){\n \n $.each(MenuData.menus, ( menuName, menuItems )=>{\n \n $('#gameNav-'+menuName+'Panel > .menu-links').html('');\n \n $.each(menuItems,( index, item )=>{\n \n var realRoute,itemLink,action,routeId;\n \n if(item.hideIfNotAuthenticated && !this.get('session.isAuthenticated')){\n return true;\n }\n \n if(item.label){\n // Translate item label\n let key = \"menu.\"+Ember.String.dasherize(menuName)+\".\"+Ember.String.dasherize(item.label);\n item.tLabel = this.get('i18n').t(key);\n }\n \n // Serialize route name for use as CSS id name\n item.cssRoute = item.route.replace(/\\./g,'_');\n \n // Track actionable link\n let addEvent = true;\n \n if(item.menuRoute){\n \n // For routes which don't appear in the menu but will cause a different menu link to highlight\n itemLink = $('<a id=\"menuItem_'+item.cssRoute+'\" class=\"menu-link game-nav hidden\" data-menu-route=\"'+item.menuRoute+'\"></a>');\n addEvent = false;\n \n } else if(item.tempRoute){\n itemLink = $('<a href=\"/'+item.tempRoute+'\" id=\"menuItem_'+item.cssRoute+'\" class=\"btn-a menu-link game-nav\">'+item.tLabel+'</a>');\n action = 'transitionAction';\n realRoute = item.tempRoute;\n \n } else if(item.route){\n itemLink = $('<a href=\"/'+item.route+'\" id=\"menuItem_'+item.cssRoute+'\" class=\"btn-a menu-link game-nav\">'+item.tLabel+'</a>');\n action = 'transitionAction';\n realRoute = item.route;\n \n if(item.params && item.params.id){\n routeId = item.params.id;\n }\n \n } else if(item.action) {\n itemLink = $('<a class=\"btn-a menu-link game-nav\">'+item.tLabel+'</a>');\n let actionName = 'menuAction'+item.label.alphaNumeric();\n action = actionName;\n this.set(actionName,item.action);\n }\n \n if(itemLink){\n \n if(addEvent){\n itemLink.on('click',(e)=>{\n e.preventDefault();\n this.sendAction(action,realRoute,routeId);\n \n if(routeId){\n Ember.Blackout.transitionTo(realRoute,routeId);\n } else {\n Ember.Blackout.transitionTo(realRoute);\n }\n \n this.selectMenuLink(item.route);\n return false;\n });\n }\n \n $('#gameNav-'+menuName+'Panel > .menu-links').append(itemLink);\n }\n \n });\n });\n\n // Manually update hover watchers\n Ember.Blackout.refreshHoverWatchers();\n \n }", "function install_menu() {\n var config = {\n name: 'lesson_lock',\n submenu: 'Settings',\n title: 'Lesson Lock',\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "function registerMenu(menuName, menuItemArray) {\n /*\n <li class=\"menu-home\">\n\n <a>Home</a>\n \n\n <ul class=\"menu-chapter\">\n <li><a href=\"#\"><span>Home</span></a></li>\n <li><a href=\"#\"><span>About</span></a></li>\n <li><a href=\"#\"><span>Info</span></a></li>\n </ul>\n </li>\n\n */\n var str = \"<li class='menu-home'>\"; //the opening tag\n str += \"<a>\" + menuName + \"</a>\"; //the title\n str += \"<ul class='menu-chapter'>\"; //and the start of submenu\n\n var idsList = [];\n\n for (index = 0; index < menuItemArray.length; ++index) {\n var item = menuItemArray[index];\n str += \"<li><a href='\" + item.target + \"' \" + (item.newTab ? \"target='_blank'\" : \"\") + \"><span>\" + item.name + \"</span></a></li>\";\n }\n\n\n str += \"</ul></li>\"; //the closing tag\n\n //and add to DOM\n $(\"#topnav\").append(str);\n\n //and parse dynamic functions\n for (index = 0; index < idsList.length; ++index) {\n $(\"#\" + idsList[index].id).click(idsList[index].func);\n }\n\n //and close\n navbarClosed = false;\n processMenuHooks();\n closeOrOpenNavbar();\n}", "function setup_menu() {\n $('div[data-role=\"arrayitem\"]').contextMenu('context-menu1', {\n 'remove item': {\n click: remove_item,\n klass: \"menu-item-1\" // a custom css class for this menu item (usable for styling)\n },\n }, menu_options);\n $('div[data-role=\"prop\"]').contextMenu('context-menu2', {\n 'remove item': {\n click: remove_item,\n klass: \"menu-item-1\" // a custom css class for this menu item (usable for styling)\n },\n }, menu_options);\n }", "_addToMenuArea(widget, options) {\n var _a;\n if (!widget.id) {\n console.error('Widgets added to app shell must have unique id property.');\n return;\n }\n options = options || {};\n const rank = (_a = options.rank) !== null && _a !== void 0 ? _a : DEFAULT_RANK;\n this._menuHandler.addWidget(widget, rank);\n this._onLayoutModified();\n if (this._menuHandler.panel.isHidden) {\n this._menuHandler.panel.show();\n }\n }", "didInsertElement() {\n this._super(...arguments);\n this.registerWithMenu();\n }", "static createMenus() {\n mobileNavigation.appendChild(menu.cloneNode(true));\n menuToggle.addEventListener(\"click\", () => {\n $(\".mobile-navigation\").slideToggle();\n })\n }", "function addMenu(menuId, options) {\n options = options || {};\n\n // Create the new menu\n service.menus[menuId] = {\n roles: options.roles || service.defaultRoles,\n items: options.items || [],\n shouldRender: shouldRender\n };\n\n // Return the menu object\n return service.menus[menuId];\n }", "function onOpen() {\n createMenu();\n}", "function createMenu(){\n\t\n\t\n\t//add menu items by section names\n\tfor(const section of sectionsList){\n\t\t// Create a <li> \n\t\tlet listItem = document.createElement(\"li\"); \n\t\t// Create a <a> \n\t\tlet address = document.createElement(\"a\");\n\t\t//set address location\n\t\taddress.setAttribute(\"href\",\"#\"+section.getAttribute('id')); // Scroll to section on link click\n\t\t//set address showing name\n\t\taddress.textContent = section.getAttribute('data-nav');\n\t\t//add to the list item\n\t\tlistItem.appendChild(address);\n\t\t//add to the menu\n\t\tmyMenu.appendChild(listItem);\n\t}\n}", "function menuOptions() {}", "function addProfileMenuToMasthead () {\n\t\tvar profileMenuLinks = createProfileMenuAnony();\n\t\t\n\t\t// Stop if there's no sign-in links b/c it means there's nothing to put in a menu.\n\t\tif (profileMenuLinks === \"\") {\n\t\t\treturn;\n\t\t}\n\n\t\t// Put the links inside a UL and inject into DOM.\n\t\t$profileMenu.append('<ul id=\"ibm-signin-minimenu-container\" role=\"menu\" aria-label=\"Profile\" class=\"ibm-padding-top-0\">' + profileMenuLinks + '</ul>');\n\n\t\t// If the greeting config is NOT enabled, stop and leave the default \"anonymous\" menu there.\n\t\t// Publish menu ready event so DW and PW can modify.\n\t\t// Self subscribe for weird pub/sub bug.\n\t\tIBM.common.module.masthead.subscribe(\"profileMenuReady\", \"self\", function(){});\n\n\t\tif (!IBM.common.util.config.isEnabled(\"greeting\")) {\n\t\t\tmyEvents.publish(\"profileMenuReady\");\n\t\t\treturn;\n\t\t}\n\t}", "function addMenu() {\n $('.heading-column:first-child').append(\n '<a class=\"menu-button pull-left\" data-toggle=\"dropdown\" id=\"menu-dropdown\">' +\n '<i class=\"fa fa-bars fa-sm\"></i>' +\n '</a>' +\n '<ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"menu-dropdown\">' +\n '<li role=\"presentation\" class=\"dropdown-header\">'+ repositoryName +'</li>' +\n '<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"/repos\">Repository search</a></li>' +\n '<li role=\"presentation\"><a id=\"close-issues\" role=\"menuitem\" tabindex=\"-1\" href=\"#\">Close done issues</a></li>' +\n '<li role=\"presentation\"><a class=\"toggle-done\" role=\"menuitem\" tabindex=\"-1\" href=\"#\">Toggle done items</a></li>' +\n '<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"/logout\">Logout</a></li>' +\n '</ul>'\n );\n}", "function NewSection() {\r\n section.NewSection();\r\n menu.NewMenu();\r\n}", "function addNewLink() {\n var parent = _$('nav')\n parent.append(document.createElement('a'))\n}", "function loadMenu(){\n\t\tpgame.state.start('menu');\n\t}", "function GM_registerMenuCommand(){\n // TODO: Elements placed into the page\n }", "function UserBlogMenuItem() {\n\t$('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('<li><a href=\"/wiki/Special:MyBlog\">Ваш блог</a></li>');\n}", "function showAddNewmenu(){\n\t\t\n\t\t$(\".myAccntMenuUl li a\").removeClass(\"active\");\n\t\t$(\".ownerTabContent\").hide();\n\t\t$(\"#owner_menu\").addClass(\"active\"); \n\t\t$(\"#owner_dash_content\").hide();\n\t\t$(\"#menuEdit\").hide();\n\t\t$(\".restaurantMenuContent\").hide();\n\t\t$(\"#owner_menu_content\").show();\n\t\t$(\"#menuAddNew\").show();\n\t}", "function initMenu(){\n\toutlet(4, \"vpl_menu\", \"clear\");\n\toutlet(4, \"vpl_menu\", \"append\", \"properties\");\n\toutlet(4, \"vpl_menu\", \"append\", \"help\");\n\toutlet(4, \"vpl_menu\", \"append\", \"rename\");\n\toutlet(4, \"vpl_menu\", \"append\", \"expand\");\n\toutlet(4, \"vpl_menu\", \"append\", \"fold\");\n\toutlet(4, \"vpl_menu\", \"append\", \"---\");\n\toutlet(4, \"vpl_menu\", \"append\", \"duplicate\");\n\toutlet(4, \"vpl_menu\", \"append\", \"delete\");\n\n\toutlet(4, \"vpl_menu\", \"enableitem\", 0, myNodeEnableProperties);\n\toutlet(4, \"vpl_menu\", \"enableitem\", 1, myNodeEnableHelp);\n outlet(4, \"vpl_menu\", \"enableitem\", 3, myNodeEnableBody);\t\t\n outlet(4, \"vpl_menu\", \"enableitem\", 4, myNodeEnableBody);\t\t\n}", "function menuCreate(menu) {\n if (typeof menu !== \"undefined\") {\n elements[menu.id] = new Menu()\n for(let i = 0; i < menu.items.length; i++) {\n elements[menu.id].append(menuItemCreate(menu.items[i]))\n }\n return elements[menu.id]\n }\n return null\n}", "function showMainMenu(){\n addTemplate(\"menuTemplate\");\n showMenu();\n}", "function addContent() {\n var topic = dm4c.empty_topic(type.uri),\n page = TR.create_page_model(topic, assoc_def, uri, parent, TR.mode.FORM)\n pages.push(page)\n TR.render_page_model(page, TR.mode.FORM, level, $addDiv, true)\n }", "function init() {\n var menu = new Item();\n menu.submenu = $('#bottomBar ul.menu');\n\n var accountMenuItem = menu.addItem('account', undefined, 'account');\n var settingsMenuItem = menu.addItem('settings', undefined, 'settings');\n var downloadsMenuItem = menu.addItem('downloads',undefined, 'downloads');\n var aboutUsMenuItem = menu.addItem('about_us', undefined, 'aboutus');\n\n /*\n * Accounts\n */\n accountMenuItem.addItem('invitation', account.showInviteDialog);\n if (account.isLoggedIn()) {\n accountMenuItem.addItem('change_login_data', account.editProfile);\n accountMenuItem.addItem('delete_account', account.deleteAccount);\n accountMenuItem.addSeparator();\n var logOutParent = (settings.os === \"web\") ? menu : accountMenuItem;\n logOutParent.addItem('logout', function() {\n sync.fireSync(true);\n }, 'logout');\n } else {\n accountMenuItem.addItem('sign_in', account.showRegisterDialog);\n }\n\n // Language Menu\n var languageMenuItem = settingsMenuItem.addItem('language', undefined, 'language');\n var languages = language.availableLang, languageItem;\n $.each(languages, function(code) {\n languageItem = languageMenuItem.addItem(languages[code].translation);\n languageItem.el.attr(\"class\", code);\n });\n languageMenuItem.el.delegate('li', 'click', function(e) {\n language.setLanguage(e.currentTarget.className);\n });\n\n\n settingsMenuItem.addSeparator();\n settingsMenuItem.addItem('add_item_method', dialogs.openSelectAddItemMethodDialog);\n settingsMenuItem.addItem('switchdateformat', dialogs.openSwitchDateFormatDialog);\n settingsMenuItem.addItem('sidebar_position', dialogs.openSidebarPositionDialog);\n settingsMenuItem.addItem('delete_prompt_menu', dialogs.openDeletePromptDialog);\n\n var isNaturalDateRecognitionEnabled = settings.getInt('enable_natural_date_recognition', 0);\n var enableNaturalDateRecognitionMenuString = 'enable_natural_date_recognition';\n var enableNaturalDateRecognitionMenuItem;\n if (isNaturalDateRecognitionEnabled === 1) {\n enableNaturalDateRecognitionMenuString = 'disable_natural_date_recognition';\n }\n enableNaturalDateRecognitionMenuItem = settingsMenuItem.addItem(enableNaturalDateRecognitionMenuString, function () {\n var isNaturalDateRecognitionEnabled = settings.getInt('enable_natural_date_recognition', 0);\n if (isNaturalDateRecognitionEnabled === 1) {\n settings.setInt('enable_natural_date_recognition', 0);\n enableNaturalDateRecognitionMenuItem.setLabel('enable_natural_date_recognition');\n } else {\n settings.setInt('enable_natural_date_recognition', 1);\n enableNaturalDateRecognitionMenuItem.setLabel('disable_natural_date_recognition');\n }\n });\n settingsMenuItem.addSeparator();\n\n // Reset Window Positions\n settingsMenuItem.addItem('reset_window_size', undefined);\n settingsMenuItem.addItem('reset_note_window', undefined);\n\n // Create Tutorials\n //settingsMenuItem.addItem('create_tutorials', database.recreateTuts);\n\n /*\n * About Wunderlist\n */\n\n aboutUsMenuItem.addItem('knowledge_base', 'http://support.6wunderkinder.com/kb');\n //aboutUsMenuItem.addItem('privacy_policy', 'http://www.6wunderkinder.com');\n aboutUsMenuItem.addItem('wunderkinder_tw', 'http://www.twitter.com/6Wunderkinder');\n aboutUsMenuItem.addItem('wunderkinder_fb', 'http://www.facebook.com/6Wunderkinder');\n aboutUsMenuItem.addSeparator();\n aboutUsMenuItem.addItem('changelog', 'http://www.6wunderkinder.com/wunderlist/changelog');\n aboutUsMenuItem.addItem('backgrounds', dialogs.openBackgroundsDialog);\n aboutUsMenuItem.addItem('about_wunderlist', dialogs.openCreditsDialog);\n aboutUsMenuItem.addItem('about_wunderkinder', 'http://www.6wunderkinder.com/');\n\n\n /*\n * Downloads\n */\n downloadsMenuItem.addItem('iphone', 'http://itunes.apple.com/us/app/wunderlist-to-do-listen/id406644151');\n downloadsMenuItem.addItem('ipad', 'http://itunes.apple.com/us/app/wunderlist-hd/id420670429');\n downloadsMenuItem.addItem('android', 'http://market.android.com/details?id=com.wunderkinder.wunderlistandroid');\n if (settings.os !== 'darwin') {\n downloadsMenuItem.addItem('macosx', 'http://www.6wunderkinder.com/wunderlist/');\n }\n if (settings.os !== 'windows') {\n downloadsMenuItem.addItem('windows', 'http://www.6wunderkinder.com/wunderlist/');\n }\n if (settings.os !== 'linux') {\n downloadsMenuItem.addItem('linux', 'http://www.6wunderkinder.com/wunderlist/');\n }\n }", "function makeMenu(menuItem){\r\n\t\tvar menuLi = document.createElement(\"li\");\r\n\t\tmenuLi.className = \"menuItem\";\r\n\t\tmenuLi.id = menuItem.id;\r\n\t\tvar divMenuItem = document.createElement(\"div\");\r\n\t\t//TODO:mc_\r\n\t\tdivMenuItem.id = \"mc_\" + menuItem.id;\r\n\t\r\n\t\tvar divMenuIcon = document.createElement(\"div\");\r\n\t\t//TODO:mi_\r\n\t\tdivMenuIcon.id = \"mi_\" + menuItem.id;\r\n\t\tdivMenuIcon.className = \"menuItemIcon_blank\";\r\n\t\t\r\n\t\tdivMenuItem.appendChild(divMenuIcon);\r\n\t\t\r\n\t\tvar title = menuItem.directoryTitle || menuItem.title;\r\n\t\tvar divMenuTitle = document.createElement(\"div\");\r\n\t\tdivMenuTitle.id = \"m_\" + menuItem.id;\r\n\t\tif (menuItem.href && !menuItem.linkDisabled) {\r\n\t\t\tvar aTag = document.createElement('a');\r\n\t\t\taTag.appendChild(document.createTextNode(title));\r\n\t\t\tif(/^javascript:/i.test( menuItem.href )){\r\n\t\t\t\taTag.removeAttribute('href');\r\n\t\t\t\taTag.className = 'scriptlink';\r\n\t\t\t\tvar aTagOnClick = function(e) {\r\n\t\t\t\t\teval( menuItem.href );\r\n\t\t\t\t}\r\n\t\t\t\tIS_Event.observe(aTag, \"click\", aTagOnClick, false, \"_menu\");\r\n\t\t\t\tIS_Event.observe(aTag, \"mouseover\", function(){this.className = 'scriptlinkhover';}.bind(aTag), false, \"_menu\");\r\n\t\t\t\tIS_Event.observe(aTag, \"mouseout\", function(){this.className = 'scriptlink';}.bind(aTag), false, \"_menu\");\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\taTag.href = menuItem.href;\r\n\t\t\t\tif(menuItem.display == \"self\") {\r\n\t\t\t\t\taTag.target = \"_self\";\r\n\t\t\t\t} else if(menuItem.display == \"newwindow\"){\r\n\t\t\t\t\taTag.target = \"_blank\";\r\n\t\t\t\t} else {\r\n\t\t\t\tif(menuItem.display == \"inline\")\r\n\t\t\t\t\taTag.target=\"ifrm\";\r\n\t\t\t\t\tvar aTagOnClick = function(e) {\r\n\t\t\t\t\t\tIS_Portal.buildIFrame(aTag);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tIS_Event.observe(aTag, \"click\", aTagOnClick, false, \"_menu\");\r\n\t\t\t\t}\r\n\t\t\t\tIS_Event.observe(aTag, \"mousedown\", function(e){Event.stop(e);}, false, \"_menu\");\r\n\t\t\t}\r\n\t\t\tdivMenuTitle.appendChild(aTag);\r\n\t\t}else{\r\n\t\t\tdivMenuTitle.appendChild(document.createTextNode(title));\r\n\t\t}\r\n\t\tdivMenuTitle.className = \"menuTitle\";\r\n\t\t\r\n\t\tdivMenuItem.appendChild(divMenuTitle);\r\n\t\t\r\n\t\tif ( menuItem.type ){\r\n//\t\t\tvar handler = IS_SiteAggregationMenu.menuDragInit(menuItem, divMenuIcon, divMenuItem);\r\n\t\t\tvar handler = IS_SiteAggregationMenu.getDraggable(menuItem, divMenuIcon, divMenuItem);\r\n\r\n\t\t\tIS_Event.observe(menuLi, \"mousedown\", function(e){\r\n\t\t\t\tEvent.stop(e);\r\n\t\t\t}, false, \"_menu\");\t\r\n\r\n\t\t\tvar returnToMenuFunc = IS_SiteAggregationMenu.getReturnToMenuFuncHandler( divMenuIcon, menuItem.id, handler );\r\n\t\t\tvar displayTabName = IS_SiteAggregationMenu.getDisplayTabNameHandler( divMenuIcon, menuItem.id, handler, returnToMenuFunc, \"_menu\" );\r\n\t\t\t\r\n\t\t\tdivMenuIcon.className = \"menuItemIcon\";\r\n\t\t\tmenuLi.style.cursor = \"move\";\r\n\t\t\tIS_Widget.setIcon(divMenuIcon, menuItem.type, {multi:menuItem.multi});\r\n\t\t\t\r\n\t\t\tif(IS_Portal.isChecked(menuItem) && !/true/.test(menuItem.multi)){\r\n\t\t\t\thandler.destroy();\r\n\t\t\t\tElement.addClassName(divMenuIcon, 'menuItemIcon_dropped');\r\n\t\t\t\tIS_Event.observe(divMenuIcon, 'mouseover', displayTabName, false, \"_menu\");\r\n\t\t\t\tmenuLi.style.cursor = \"default\";\r\n\t\t\t}\r\n\r\n\t\t\t//The time of 200 to 300millsec is lost because addListener execute new Array\r\n\t\t\tfunction getPostDragHandler(menuItemId, handler){\r\n\t\t\t\treturn function(){ postDragHandler(menuItemId, handler);};\r\n\t\t\t}\r\n\t\t\tfunction postDragHandler(menuItemId, handler){\r\n\t\t\t\t//fix 209 The widget can not be dropped to a tab sometimes if it is allowed to be dropped plurally.\r\n\t\t\t\tif( /true/i.test( menuItem.multi ) )\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\r\n\t\t\t\ttry{\r\n//\t\t\t\t\tEvent.stopObserving(menuLi, \"mousedown\", handler, false);\r\n\t\t\t\t\thandler.destroy();\r\n\t\t\t\t\t\r\n\t\t\t\t\tElement.addClassName(divMenuIcon, 'menuItemIcon_dropped');\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(\"mc_\" + menuItemId).parentNode.style.background = \"#F6F6F6\";\r\n\t\t\t\t\t//$(\"m_\" + menuItemId).style.color = \"#5286bb\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tIS_Event.observe(divMenuIcon, 'mouseover', displayTabName, false, \"_menu\");\r\n\t\t\t\t}catch(e){\r\n\t\t\t\t\tmsg.debug(IS_R.getResource(IS_R.ms_menuIconException,[menuItemId,e]));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmenuLi.style.cursor = \"default\";\r\n\t\t\t}\r\n\t\t\tIS_EventDispatcher.addListener('dropWidget', menuItem.id, getPostDragHandler(menuItem.id,handler), true);\r\n\t\t\tif( menuItem.properties && menuItem.properties.url ) {\r\n\t\t\t\tvar url = menuItem.properties.url;\r\n\t\t\t\tIS_EventDispatcher.addListener( IS_Widget.DROP_URL,url,( function( menuItem,handler ) {\r\n\t\t\t\t\t\treturn function( widget ) {\r\n\t\t\t\t\t\t\tif( !IS_Portal.isMenuType( widget,menuItem )) return;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpostDragHandler(menuItem.id, handler);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})( menuItem,handler ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfunction getCloseWidgetHandler(menuItemId, handler){\r\n\t\t\t\treturn function(){ closeWidgetHandler(menuItemId, handler);};\r\n\t\t\t}\r\n\t\t\tfunction closeWidgetHandler(menuItemId, handler){\r\n\t\t\t\ttry{\r\n//\t\t\t\t\tIS_Event.observe(menuLi, \"mousedown\", handler, false, \"_menu\");\r\n\t\t\t\t\tEvent.observe(handler.handle, \"mousedown\", handler.eventMouseDown);\r\n\t\t\t\t\tIS_Draggables.register(handler);\r\n\t\t\t\t\t\r\n\t\t\t\t\tElement.removeClassName(divMenuIcon, 'menuItemIcon_dropped');\r\n\t\t\t\t\t\r\n//\t\t\t\t\tdivMenuIcon.className = (/MultiRssReader/.test(menuItem.type))? \"menuItemIcon_multi_rss\" : \"menuItemIcon_rss\";\r\n\t\t\t\t\tmenuLi.style.cursor = \"move\"\r\n\t\t\t\t\t\r\n\t\t\t\t\tdivMenuIcon.title = \"\";\r\n\t\t\t\t\tIS_Event.stopObserving(divMenuIcon, 'mouseover', displayTabName, false, \"_menu\");\r\n\t\t\t\t}catch(e){\r\n\t\t\t\t\tmsg.debug(IS_R.getResource(IS_R.ms_menuIconException,[menuItemId,e]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tIS_EventDispatcher.addListener('closeWidget', menuItem.id, getCloseWidgetHandler(menuItem.id, handler), true);\r\n\t\t\tif( menuItem.properties && menuItem.properties.url ) {\r\n\t\t\t\tvar url = menuItem.properties.url;\r\n\t\t\t\tIS_EventDispatcher.addListener( IS_Widget.CLOSE_URL,url,( function( menuItem,handler ) {\r\n\t\t\t\t\t\treturn function( widget ) {\r\n\t\t\t\t\t\t\tif( !IS_Portal.isMenuType( widget,menuItem )) return;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcloseWidgetHandler(menuItem.id, handler);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})( menuItem,handler ) );\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif ( IS_SiteAggregationMenu.menuItemTreeMap[menuItem.id] && IS_SiteAggregationMenu.menuItemTreeMap[menuItem.id].length > 0) {\r\n\t\t\tvar divSubMenuIcon = document.createElement(\"div\");\r\n\t\t\tdivSubMenuIcon.className = \"subMenuIcon\";\r\n\t\t\tdivMenuItem.appendChild(divSubMenuIcon);\r\n\t\t}\r\n\t\r\n\t\tmenuLi.appendChild(divMenuItem);\r\n\t\tIS_Event.observe(menuLi,\"mouseout\", getMenuItemMOutHandler(menuLi), false, \"_menu\");\r\n\t\tIS_Event.observe(menuLi,\"mouseover\", getMenuItemMoverFor(menuLi, menuItem), false, \"_menu\");\r\n\t\treturn menuLi;\r\n\t}", "function createMenu($this){\n if(isList($this)){\n \n //generate select element as a string to append via jQuery\n var selectString = '<select id=\"mobileMenu-'+$this.attr('id')+'\" class=\"mobileMenu\">';\n \n //create first option (no value)\n selectString += '<option value=\"\">'+settings.topOptionText+'</option>';\n \n //loop through list items\n $this.find('li').each(function(){\n \n //when sub-item, indent\n var levelStr = '';\n var len = $(this).parents('ul, ol').length;\n for(i=1;i<len;i++){levelStr += settings.indentString;}\n \n //get url and text for option\n var link = $(this).find('a:first-child').attr('href');\n var text = levelStr + $(this).clone().children('ul, ol').remove().end().text();\n \n //add option\n selectString += '<option value=\"'+link+'\">'+text+'</option>';\n });\n \n selectString += '</select>';\n \n //append select element to ul/ol's container\n $this.parent().append(selectString);\n \n //add change event handler for mobile menu\n $('#mobileMenu-'+$this.attr('id')).change(function(){\n goToPage($(this));\n });\n \n //hide current menu, show mobile menu\n showMenu($this);\n } else {\n alert('mobileMenu will only work with UL or OL elements!');\n }\n }", "function installMenuItem( myMenuItem ) {\n \n // 1. Create the script menu action\n var menuAction = app.scriptMenuActions.add( myMenuItem.title );\n \n // 2. Attach the event listener\n for (var myEvent in myMenuItem.handlers) {\n menuAction.eventListeners.add( myEvent, myMenuItem.handlers[ myEvent ]);\n }\n \n // 3. Create the menu item\n var myMenu = app.menus.item( \"$ID/Main\" ).submenus.item( myMenuItem.menuID );\n if (myMenuItem.separatorAbove) {\n myMenu.menuSeparators.add();\n }\n myMenu.menuItems.add( menuAction );\n \n return true;\n }", "function createMenu($this){\n if(isList($this)){\n\n //generate select element as a string to append via jQuery\n var selectString = '<select id=\"mobileMenu_'+$this.attr('id')+'\" class=\"mobileMenu\">';\n\n //create first option (no value)\n selectString += '<option value=\"\">'+settings.topOptionText+'</option>';\n\n //loop through list items\n $this.find('li').each(function(){\n\n //when sub-item, indent\n var levelStr = '';\n var len = $(this).parents('ul, ol').length;\n for(i=1;i<len;i++){levelStr += settings.indentString;}\n\n //get url and text for option\n var link = $(this).find('a:first-child').attr('href');\n var text = levelStr + $(this).clone().children('ul, ol').remove().end().text();\n\n //add option\n selectString += '<option value=\"'+link+'\">'+text+'</option>';\n });\n\n selectString += '</select>';\n\n //append select element to ul/ol's container\n $this.parent().append(selectString);\n\n //add change event handler for mobile menu\n $('#mobileMenu_'+$this.attr('id')).change(function(){\n goToPage($(this));\n });\n\n //hide current menu, show mobile menu\n showMenu($this);\n } else {\n alert('mobileMenu will only work with UL or OL elements!');\n }\n }", "function addItem(sText, sUrl, browserNav, active) {\n var item = new TransMenuItem(sText, sUrl, this, browserNav, active);\n item._index = this.items.length;\n this.items[item._index] = item;\n }", "function addMenuItemUsingJQuery(textForItem) {\n // var $newItem = $('<li>').text(textForItem);\n $('#main-menu').append($('<li>').text(textForItem));\n}", "function addMenuItem(rest, item) {\n if (rest.itemRefs[item.name] == undefined) {\n rest.itemRefs[item.name] = item.type\n rest.menus[item.type].push(item)\n }\n}", "function RenderMenu()\n{\n var menu = \"\";//Initialise var\n //Build html output based on page items list.\n menu += '<div class=\"show-for-small\">';\n menu += '<form><label>Choose an article:<select id=\"micromenu\">';\n //Small menu loop\n for (var i = 0; i < PagesList.length; i++)\n {\n if (PagesList[i][1] == curPage)\n {\n menu += '<option value=\"' + PagesList[i][1] + '\" selected>';\n }\n else\n {\n menu += '<option value=\"' + PagesList[i][1] + '\">';\n }\n menu += PagesList[i][1];\n menu += '</option>';\n }\n menu += '</select></label>';\n menu += '</form></div>';\n menu += '<ul class=\"side-nav hide-for-small\">';\n //Large menu loop\n for (var ii = 0; ii < PagesList.length; ii++)\n {\n if (PagesList[ii][1] == curPage)\n {\n menu += '<li class=\"active\">';\n }\n else\n {\n menu += '<li>';\n }\n menu += '<a onClick=\"SetPage(\\'' + PagesList[ii][1] + '\\')\">';\n menu += PagesList[ii][1];\n menu += '</a>';\n menu += '</li>';\n }\n menu += '</ul>';\n return menu;\n}", "function loadNavMenu(){\n $('.overlay-menu').append('<h1>Navigation</h1>');\n \n $('.overlay-menu').append('<h2>Arena Mode Comming soon!</h2><h1><i class=\"fa fa-gamepad fa-lg\"></i></h1>')\n //set back button\n createBackBtn(); \n}", "function HistoryDropdownMenuItem() {\n\t$('ul.wikia-menu-button li:first-child ul li:first-child').after('<li><a href=\"/index.php?title='+ encodeURIComponent (wgPageName) +'&action=history\">History</a></li>');\n}", "function HistoryDropdownMenuItem() {\n\t$('ul.wikia-menu-button li:first-child ul li:first-child').after('<li><a href=\"/index.php?title='+ encodeURIComponent (wgPageName) +'&action=history\">History</a></li>');\n}", "function renderNavigationMenu() {\n\n }", "function menuSetup() {\n\t\t\tmenu.classList.remove(\"no-js\");\n\n\t\t\tmenu.querySelectorAll(\"ul\").forEach((submenu) => {\n\t\t\t\tconst menuItem = submenu.parentElement;\n\n\t\t\t\tif (\"undefined\" !== typeof submenu) {\n\t\t\t\t\tlet button = convertLinkToButton(menuItem);\n\n\t\t\t\t\tsetUpAria(submenu, button);\n\n\t\t\t\t\t// bind event listener to button\n\t\t\t\t\tbutton.addEventListener(\"click\", toggleOnMenuClick);\n\t\t\t\t\tmenu.addEventListener(\"keyup\", closeOnEscKey);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "setupMenu () {\n let dy = 17;\n // create buttons for the action categories\n this.menu.createButton(24, 0, () => this.selectionMode = 'info', this, null, 'info');\n this.menu.createButton(41, 0, () => this.selectionMode = 'job', this, null, 'job');\n // create buttons for each command\n for (let key of Object.keys(this.jobCommands)) {\n let button = this.menu.createButton(0, dy, () => this.jobCommand = key, this, this.jobCommands[key].name);\n dy += button.height + 1;\n }\n // set the hit area for the menu\n this.menu.calculateHitArea();\n // menu is closed by default\n this.menu.hideMenu();\n }", "function setupPageNavs () {\n\t\t// For any nested list items, wrap the link text in a span so that we can put a border under the text on hover.\n\t\t$mobilemenu.find(\".ibm-mobilemenu-section li li a\").wrapInner(\"<span>\");\n\n\t\tIBM.common.util.a11y.makeTreeAccessible({\n\t\t\tel: $mobilemenu.find(\".ibm-mobilemenu-pagenav > ul\")\n\t\t});\n\t}", "function menu(id, pageName){\n\t\t/* for each 'item' inside the menuItemsLeft variable do... \n\t\tIt means each item inside the array is observed and necessary\n\t\tmodifications are done */\n\t\tmenuItemsLeft.forEach((item)=>{\n\n\t\t\t//creating li and a tags for navigation\n\t\t\tvar li = document.createElement(\"li\");\n\t\t\tvar a = document.createElement(\"a\");\n\n\t\t\t/* if \"item\" in menuItemsLeft is equal to \"home\", add\n\t\t\thref attribute as index.html; else if it is equal to\n\t\t\tpageName parameter, add \"active\" \"class\"(materialize) to 'li' tag\n\t\t\tand\titem.html attribute to \"a\" tag; else add to \"a\" tag \n\t\t\t\"dropdown-button\" class(materialize),link and \"data-activates\" attributes*/\n\t\t\tif (item.toLowerCase() === \"home\") {\n\t\t\t\ta.setAttribute(\"href\", \"index.html\");\n\t\t\t} else if (item.toLowerCase() === pageName){\n\t\t\t\tli.setAttribute(\"class\", \"active\");\n\t\t\t\ta.setAttribute(\"href\", item.toLowerCase()+\".html\");\n\t\t\t} else {\n\t\t\t\ta.setAttribute(\"class\", \"dropdown-button\");\n\t\t\t\ta.setAttribute(\"href\", item.toLowerCase()+\".html\");\n\t\t\t\ta.setAttribute(\"data-activates\", item.toLowerCase());\n\t\t\t};\n\n\t\t\t//adding item to 'a' tag as inner element\n\t\t\ta.innerHTML = item;\n\n\t\t\t//adding 'a' tag to 'li' tag as a child element\n\t\t\tli.appendChild(a);\n\n\t\t\t//adding 'li' tag to 'id' parameter as a child element\n\t\t\tid.appendChild(li);\n\t\t});\n\t}", "constructor(){\n\t\tthis.menuIcon = document.querySelector(\".page-navigation__menu-icon\");\n\t\tthis.menuContent = document.querySelector(\".page-navigation\");\n\t\tthis.events(); // call events in constructor method\n\t}", "function addUnavToMasthead () {\n\t\t// Replace the HTML coded UL#ibm-menu-links with our new UL, no ID used in new UL.\n\t\tmastheadLinklist.unav.$el = $(mastheadLinklist.unav.html).insertBefore(\"#ibm-menu-links\").attr(\"aria-label\", \"Site toolbar\");\n\t\t$(\"#ibm-menu-links\").addClass(\"ibm-hide\");\n\t}", "function initialize() {\n activateMenus();\n}", "function generateMenuItems() {\n for (let section of sectionsList) {\n let menuItem = createMenuItem(section.id, section.dataset.nav);\n\n menuBar.appendChild(menuItem);\n }\n}", "function addVerticalNavigation(){\n $body.append('<div id=\"' + SECTION_NAV + '\"><ul></ul></div>');\n var nav = $(SECTION_NAV_SEL);\n\n nav.addClass(options.navigation.position);\n\n for (var i = 0; i < $(SECTION_SEL).length; i++) {\n var link = '';\n if (options.anchors.length) {\n link = options.anchors[i];\n }\n\n var li = '<li><a href=\"#' + link + '\"><span></span></a>';\n\n // Only add tooltip if needed (defined by user)\n var tooltip = options.navigation.tooltips[i];\n\n\n if (typeof tooltip !== 'undefined' && tooltip !== '') {\n console.log(\"we\");\n li += '<div class=\"' + SECTION_NAV_TOOLTIP + ' ' + options.navigation.position + '\">' + tooltip + '</div>';\n }\n\n li += '</li>';\n\n nav.find('ul').append(li);\n }\n\n nav.find(SECTION_NAV_TOOLTIP_SEL).css('color', options.navigation.textColor);\n\n //centering it vertically\n $(SECTION_NAV_SEL).css('margin-top', '-' + ($(SECTION_NAV_SEL).height()/2) + 'px');\n\n //activating the current active section\n $(SECTION_NAV_SEL).find('li').eq($(SECTION_ACTIVE_SEL).index(SECTION_SEL)).find('a').addClass(ACTIVE);\n\n nav.find('span').css('border-color', options.navigation.bulletsColor);\n }", "function createMenuPage() {\n\n\n\n //Create page holder\n const menuContainer = document.createElement('div');\n menuContainer.classList.add('menuContainer');\n\n // Add div for item names\n const itemNames = document.createElement('div');\n itemNames.classList.add('itemNames');\n menuContainer.appendChild(itemNames);\n\n //1\n const item1 = document.createElement('div');\n item1.classList.add('item');\n item1.innerText = \"Bacon Burger\";\n itemNames.appendChild(item1);\n\n //2\n const item2 = document.createElement('div');\n item2.classList.add('item');\n item2.innerText = \"Mushroom Burger\";\n itemNames.appendChild(item2);\n\n //3\n const item3 = document.createElement('div');\n item3.classList.add('item');\n item3.innerText = \"Banzai Burger\";\n itemNames.appendChild(item3);\n\n // Add text to middle section\n const middleText = document.createElement('div');\n menuContainer.appendChild(middleText);\n middleText.classList.add('menuContainerInner');\n\n // Loop to create specified number of menu items\n for (let i = 0; i < 3; i++) {\n let menuItem = document.createElement('div');\n menuItem.classList.add('menuItems');\n middleText.appendChild(menuItem);\n list[i] = menuItem;\n }\n\n\n //Add Image1\n const image1 = document.createElement('img');\n image1.src = '/src/bacon-burger.jpg'\n image1.classList.add('menuPic');\n list[0].appendChild(image1);\n\n //Add Image2\n const image2 = document.createElement('img');\n image2.src = '/src/mushroom-burger.jpeg'\n image2.classList.add('menuPic');\n list[1].appendChild(image2);\n\n //Add Image3\n const image3 = document.createElement('img');\n image3.src = '/src/banzai.png'\n image3.classList.add('menuPic');\n list[2].appendChild(image3);\n\n // Append the menu container to the main content container\n content.appendChild(menuContainer);\n\n // Add footer to main content container\n let footer = document.createElement('div');\n footer.classList.add('footer');\n content.appendChild(footer);\n\n\n\n }", "function StartMenu() {\n //this.menu = new Menu('start-menu');\n this.shutDownMenu = new Menu('shutdown-menu');\n this.shutDownButton = new MenuButton('options-button', this.shutDownMenu);\n Menu.apply(this, ['start-menu']);\n}", "function onOpen() {\n // Add a menu with some items, some separators, and a sub-menu.\n DocumentApp.getUi().createMenu('Utilities')\n .addItem('Insert Date', 'insertDateAtCursor')\n .addItem('Insert Time', 'insertTimeAtCursor')\n .addToUi();\n}", "expandMenu() {\r\n\t}", "addButton(newButton) {\n // Add to button array\n this.buttons[newButton.id] = newButton;\n // Add node to parent\n if (this.menuParent === false || this.menuParentNextSiblingNode === null) {\n this.box.addButtonNode(newButton);\n } else {\n this.box.insertButtonNode(newButton, this.menuParentNextSiblingNode);\n }\n }", "function TagMenu_initializeUI(newLinkStr) {\r\n var tagNames = new Array()\r\n var tagValues = new Array();\r\n \r\n var dom = dw.getDocumentDOM();\r\n\r\n // get the current selection\r\n var selNode, offsets;\r\n selNode = this.getSelectedTag();\r\n if (selNode) { //if selection is inside a tag, select the entire tag\r\n offsets = dw.nodeToOffsets(selNode);\r\n dw.setSelection(offsets[0],offsets[1]);\r\n }\r\n \r\n if (this.tagList.length == 1 && this.tagList[0] == \"A\") {\r\n\r\n // if no tag selection, ensure the selection is linkable\r\n if (!selNode) {\r\n selStr = dwscripts.trim(dwscripts.fixUpSelection(dom,false,true));\r\n if (selStr && !stringCanBeLink(selStr)) {\r\n offsets = dom.getSelection();\r\n dw.setSelection(offsets[1],offsets[1]); //move the insertion point after the selection\r\n selStr = \"\";\r\n }\r\n }\r\n\r\n // add a new link or a selection as the first item in the list\r\n if (selNode || !selStr) { //if sel is link, or no valid selection\r\n\r\n newLinkStr = (newLinkStr != null) ? newLinkStr : \"New Link\";\r\n\r\n //add generic new link item to menu\r\n tagNames.push(dwscripts.sprintf(MM.LABEL_CreateNewLink,newLinkStr));\r\n\t\t \r\n newLinkStr = dwscripts.entityNameDecode(newLinkStr);\r\n\t tagValues.push(\"createAtSelection+\"+newLinkStr);\r\n\r\n } else { //else selection could be converted to link, so add it\r\n var displayString = dwscripts.trim(selStr);\r\n displayString = displayString.replace(/\\s+/,\" \"); //replace all newlines and whitespace with a single space\r\n displayString = dwscripts.entityNameDecode(displayString);\r\n tagNames.push(MM.LABEL_SelectionLink+' \"' + displayString + '\"');\r\n tagValues.push(\"createAtSelection+\"+selStr);\r\n\r\n }\r\n }\r\n\r\n // add all other tags to menu\r\n var nodes = this.getTagElements();\r\n for (var i=0; i < nodes.length; i++) {\r\n\r\n tagNames.push(this.getNiceName(nodes[i], i));\r\n tagValues.push(nodes[i]);\r\n\r\n }\r\n \r\n // set the list control\r\n this.listControl = new ListControl(this.paramName); \r\n this.listControl.setAll(tagNames, tagValues);\r\n\r\n // if link currently selected, pick it in the list\r\n if (selNode) {\r\n this.pickValue(selNode);\r\n }\r\n}", "function setMenu() {\n //添加快捷键\n\tlet applicationOptions = [\n\t\t{ label: \"About Kungfu\", click: showKungfuInfo},\n\t\t{ label: \"Settings\", accelerator: \"CmdOrCtrl+,\", click: openSettingDialog },\n\t\t{ label: \"Close\", accelerator: \"CmdOrCtrl+W\", click: function() { console.log(BrowserWindow.getFocusedWindow().close()); }}\n\t]\n\n\tif(platform === 'mac') {\n\t\tapplicationOptions.push(\n\t\t\t{ label: \"Quit\", accelerator: \"Command+Q\", click: function() { app.quit(); }},\n\t\t)\n\t}\n\n\tconst template = [\n\t{\n\t\tlabel: \"Kungfu\",\n\t\tsubmenu: applicationOptions\n\t}, \n\t{\n\t\tlabel: \"Edit\",\n\t\tsubmenu: [\n\t\t\t{ label: \"Copy\", accelerator: \"CmdOrCtrl+C\", selector: \"copy:\" },\n\t\t\t{ label: \"Paste\", accelerator: \"CmdOrCtrl+V\", selector: \"paste:\" },\n\t\t]\n\t}];\n\t\n\tMenu.setApplicationMenu(Menu.buildFromTemplate(template))\n}", "function addNavbarItem() {\n sections.forEach((section, i) => {\n const navbarItem = document.createElement('li');\n navbarItem.setAttribute('class', 'menu__item');\n navbarItem.innerHTML = `<a href=#section${i + 1} class=\"menu__link\">${section.dataset.nav}</a>`;\n fragment.appendChild(navbarItem);\n });\n}", "function newMenu(){\n\tvar menu = '<div id=\"bottom-menu\">'+\n\t'<a href=\"javascript:history.back()\"><span id=\"backbtn\" onclick=\"goBack();\"></span></a>'+\n\t'<div class=\"arrow\"></div>'+\n\t\t'<ul>'+\n\t\t\t'<li class=\"timeline\"><a href=\"'+PAGE.timeline+'\">'+lan('time line', 'ucw')+'</a></li>'+\n\t\t\t'<li class=\"toptags\"><a href=\"'+PAGE.toptags+'\">'+lan('TOPTAGS_TITLE')+'</a></li>'+\n\t\t\t'<li class=\"hot\"><a href=\"#\">'+lan('hot','ucw')+'</a></li>'+\n\t\t\t// '<li class=\"news\"><a href=\"news.html\">'+lan('NEWS')+'</a></li>'+\n\t\t\t'<li class=\"notifications\"><a href=\"'+PAGE.notify+'\">'+lan('NOTIFICATIONS')+'</a></li>'+\n\t\t\t'<li class=\"groups\"><a href=\"#\">'+lan('groups','ucw')+'</a></li>'+\n\t\t\t'<li class=\"chat\"><a href=\"'+(CORDOVA?'cometchat/i.html':'cometchat/')+'\">'+lan('chat')+'</a></li>'+\n\t\t\t'<li class=\"profile\"><a href=\"'+PAGE.profile+'?id='+$.local('code')+'\">'+lan('profile')+'</a></li>'+\n\t\t\t'<li class=\"friends\"><a href=\"'+PAGE.userfriends+'?type=friends&id_user='+$.local('code')+'\">'+lan('friends','ucw')+'</a></li>'+\n\t\t\t// '<li class=\"createtag\"><a href=\"newtag.html\">'+lan('newTag')+'</a></li>'+\n\t\t\t'<li class=\"store\"><a href=\"store.html\">'+lan('store')+'</a></li>'+\n\t\t\t'<li class=\"logout\"><a href=\"#\" onclick=\"javascript:logout();\">'+lan('logout')+'</a></li>'+\n\t\t'</ul>'+\n\t'</div>';\n\t$('body').append(menu);\n\t$('#bottom-menu ul li.hot').click(function(){\n\t\tvar content='',news=false,hot=false;\n\t\tif (!$('#page-news').length){\n\t\t\tnews=true;\n\t\t\tcontent+='<div><h4>'+lang.NEWS+'</h4><ul id=\"newsInfo\"></ul></div>';\n\t\t}\n\t\tif (!$('#page-trendings').length){\n\t\t\thot=true;\n\t\t\tcontent+='<div><h4>'+lan('hot','ucw')+'</h4><ul id=\"trendings\"></ul></div>';\n\t\t}\n\t\tmyDialog({\n id:'prevNewsAndHot-dialogs',\n content :content,\n scroll:true,\n after:function(){\n \tif (hot) getTrendings(3,true)\n \tif (news){\n \t\tvar action={refresh:{refresh:true},more:{}},$info=$('#newsInfo'),on={};\n \t\tgetNews('reload',action.more,on,$info,true);\n \t\t$info.on('click','li[data-type]',function(){\n\t\t\t\t\t\tvar type=this.dataset.type,\n\t\t\t\t\t\t\tsource=this.dataset.source,\n\t\t\t\t\t\t\turl='';\n\t\t\t\t\t\tswitch(type){\n\t\t\t\t\t\t\tcase 'tag':url=PAGE['tag']+'?id='+source; break;\n\t\t\t\t\t\t\tcase 'usr':url=PAGE['profile']+'?id='+source; break;\n\t\t\t\t\t\t\tcase 'product':url=PAGE['detailsproduct']+'?id='+source; break;\n\t\t\t\t\t\t\tdefault: alert(type);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(url){ redir(url); }\n\t\t\t\t\t});\n \t}\n },\n buttons:[],\n backgroundClose: true\n });\n\t});\n\n\t//Grupos\n\t$('#bottom-menu ul li.groups').click(function(){\n\t\tvar content='';\n\t\t\n\t\tcontent+='<di><h4>'+lan('mygroups','ucw')+'</h4><ul id=\"myGroups\"></ul></div>';\n\t\tcontent+='<di><h4>'+lan('allgroups','ucw')+'</h4><ul id=\"allGroups\"></ul></div>';\n\t\t\n\t\tmyDialog({\n id:'groups-dialogs',\n content :content,\n scroll:true,\n after:function(){\n \tgetGroups($.local('code'),true);\n },\n buttons:[],\n backgroundClose: true\n });\n\t});\n}", "function Menu() {\n\t\t\n\t\tvar buildMenu = function (source, type) {\n\t\t\tvar b = new Builder();\n\t\t\tb.loadData (source, type);\n\t\t\treturn b.build();\n\t\t}\n\t\t\n\t\tvar attachMenu = function (menu, type, target, icons) {\n\t\t\tvar s = new Shell();\n\t\t\ts.link(menu, type, target, icons);\n\t\t}\n\t\t\n\t\t/**\n\t\t * Load a menu defined in XML format.\n\t\t * @param source\n\t\t * \t\tAn object containing XML menu(s) to be loaded for various OS-es.\n\t\t * @return\n\t\t * \t\tA NativeMenu object built from the given XML source.\n\t\t */\n\t\tthis.createFromXML = function ( source ) {\n\t\t\treturn buildMenu ( source, Builder.XML );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Same as air.ui.Menu.fromXML, except it handles JSON data.\n\t\t */\n\t\tthis.createFromJSON = function ( source ) {\n\t\t\treturn buildMenu ( source, Builder.JSON );\n\t\t}\n\t\t\n\t\t/**\n\t\t * - on Windows: sets the given nativeMenu object as the NativeWindow's \n\t\t * menu;\n\t\t * - on Mac: inserts the items of the given nativeMenu object between \n\t\t * the 'Edit' and 'Window' default menus;\n\t\t * @param nativeMenu\n\t\t * \t\tA NativeMenu returned by one of the air.ui.Menu.from... \n\t\t * \t\tfunctions.\n\t\t * @param overwrite\n\t\t * \t\tA boolean that will change the behavior on Mac. If true, the \n\t\t * \t\tdefault menus will be replaced entirely by the given nativeMenu\n\t\t */\n\t\tthis.setAsMenu = function ( nativeMenu, overwrite ) {\n\t\t\tif (!arguments.length) {\n\t\t\t\tthrow (new Error( \n\t\t\t\t\t\"No argument given for the 'setAsMenu()' method.\"\n\t\t\t\t));\n\t\t\t}\n\t\t\tvar style = overwrite? Shell.MENU | Shell.OVERWRITE : Shell.MENU;\n\t\t\tattachMenu (nativeMenu, style);\n\t\t}\n\t\t\n\t\t/**\n\t\t * Displays the given menu as a contextual menu when the user right \n\t\t * clicks a certain DOM element.\n\t\t * @param nativeMenu\n\t\t * \t\tA NativeMenu returned by one of the air.ui.Menu.from... \n\t\t * \t\tfunctions.\n\t\t * @param domElement\n\t\t * \t\tThe DOM Element to link with the given nativeMenu. The \n\t\t * \t\tcontextual menu will only show when the user right clicks over \n\t\t * \t\tdomElement. This attribute is optional. If missing, the context\n\t\t * \t\tmenu will display on every right-click over the application.\n\t\t */\n\t\tthis.setAsContextMenu = function ( nativeMenu, domElement ) {\n\t\t\tif (!arguments.length) {\n\t\t\t\tthrow (new Error( \n\t\t\t\t\t\"No argument given for the 'setAsContextMenu()' method.\"\n\t\t\t\t));\n\t\t\t}\n\t\t\tif (arguments.length < 2) { domElement = Shell.UNSPECIFIED };\n\t\t\tattachMenu (nativeMenu, Shell.CONTEXT, domElement);\n\t\t}\n\t\t\n\t\t/**\n\t\t * Sets the given nativeMenu as the \n\t\t * ''NativeApplication.nativeApplication.icon.menu'' property.\n\t\t * @param nativeMenu\n\t\t * \t\tA NativeMenu returned by one of the air.ui.Menu.from... \n\t\t * \t\tfunctions.\n\t\t * @param icons\n\t\t * \t\tAn array holding icon file paths or bitmap data objects.\n\t\t * \t\tIf specified, these will be used as the application's\n\t\t * \t\ttray/dock icons.\n\t\t * @throws\n\t\t * \t\tIf no bitmap data was set for the ''icon'' object and no default\n\t\t * \t\ticons are specified in the application descriptor.\n\t\t */\n\t\tthis.setAsIconMenu = function ( nativeMenu, icons ) {\n\t\t\tif (!arguments.length) {\n\t\t\t\tthrow (new Error( \n\t\t\t\t\t\"No argument given for the 'setAsIconMenu()' method.\"\n\t\t\t\t));\n\t\t\t}\n\t\t\tattachMenu (nativeMenu, Shell.ICON, null, icons);\n\t\t}\n\t\t\n\t}", "initialize() {\n super.initialize();\n\n this.dom.menu.setAttribute(\"role\", \"menubar\");\n\n this.createChildElements(Menubar);\n this.handleFocus();\n this.handleClick();\n if (this.isHoverable) this.handleHover();\n this.handleKeydown();\n this.handleKeyup();\n\n this.elements.menuItems[0].dom.link.tabIndex = 0;\n }", "createNavigation() {\n var nav = super.createNavigation();\n nav.right.push(new NavButton('Continue', this.next, true, true));\n this.navigation = nav;\n }", "function SetLibraryMenuNode(libraryData, naviPlus) {\n //Create the new ul\n NewUL = document.createElement(\"ul\")\n //Add the LIs to the new ul\n if (libraryData.Children) {\n for (i = 0; i<libraryData.Children.length; i++) {\n //Create elements\n NewA = document.createElement(\"a\")\n NewA.href=\"/page/\"+libraryData.Children[i].ID+\"/view\"\n\n NewLI = document.createElement(\"li\")\n\n NewPlus = document.createElement(\"div\")\n NewPlus.classList.add(\"naviPlus\")\n NewPlus.appendChild(document.createTextNode(\"+\"))\n $(NewPlus).on(\"click\", {ID: libraryData.Children[i].ID, newPlus: NewPlus}, function(eventData) {return ToggleLibraryMenu(eventData.data.ID, eventData.data.newPlus);} );\n\n NewSpan = document.createElement(\"span\")\n NewSpan.classList.add(\"naviLabel\")\n NewSpan.appendChild(document.createTextNode(libraryData.Children[i].Name))\n\n NewLI.appendChild(NewA)\n NewA.appendChild(NewPlus)\n NewA.appendChild(NewSpan)\n NewLI.appendChild(document.createElement(\"ul\"))\n NewUL.appendChild(NewLI);\n }\n }\n\n if (LoggedIn) {\n //Add create page node\n newCreatePage = document.getElementById(\"createPageTemplate\").content.firstElementChild.cloneNode(true)\n $(newCreatePage).find(\"input[name='ParentID']\").get(0).value = libraryData.CurrentPage.ID\n NewUL.appendChild(newCreatePage);\n }\n //Toggle state is closed, so we need to open\n $(naviPlus).html(\"-\")\n //Find parent li\n $($(naviPlus).parents(\"li\")[0]).children(\"ul\").replaceWith(NewUL)\n}", "_initMenu() {\n this.menu.parentMenu = this.triggersSubmenu() ? this._parentMenu : undefined;\n this.menu.direction = this.dir;\n this._setMenuElevation();\n this._setIsMenuOpen(true);\n this.menu.focusFirstItem(this._openedBy || 'program');\n }", "function BuildMenu() {\r\n const container = document.createElement(\"div\");\r\n container.className = 'menu';\r\n\r\n const ul = document.createElement(\"ul\");\r\n container.appendChild(ul);\r\n\r\n for(const post of posts) {\r\n const menuItem = document.createElement(\"li\");\r\n \r\n const span = document.createElement(\"span\");\r\n span.className = 'method';\r\n span.innerText = post.data.type.type\r\n\r\n const color = post.GetMethodColor()\r\n\r\n if( color !== '' )\r\n span.setAttribute(color, '');\r\n\r\n const text = document.createTextNode(post.data.path);\r\n\r\n menuItem.appendChild(span);\r\n menuItem.appendChild(text);\r\n\r\n ul.appendChild(menuItem);\r\n\r\n menuItem.addEventListener(\"click\", () => {\r\n post.BuildHTML()\r\n .then( html => document.querySelector(\".content\").innerHTML = html )\r\n });\r\n }\r\n\r\n document.body.insertBefore(container, document.querySelector(\".content\"));\r\n}", "initMenu() {\n let menuGroups = this._items.map(menuGroup => {\n let items = menuGroup.map(menuItem => {\n let item = HTMLBuilder.li(\"\", \"menu-item\");\n item.html(menuItem.label);\n\n if (menuItem.action) {\n item.data(\"action\", menuItem.action)\n .click(e => {\n if (!item.hasClass(\"disabled\")) {\n this.controller.doAction(menuItem.action);\n this.closeAll();\n }\n });\n\n let shortcut = this.controller.shortcutCommands[menuItem.action];\n if (shortcut) {\n HTMLBuilder.span(\"\", \"hint\")\n .html(convertShortcut(shortcut))\n .appendTo(item);\n }\n }\n\n if (menuItem.submenu) {\n let submenu = new this.constructor(this, item, menuItem.submenu);\n item.addClass(\"has-submenu\").mouseenter(e => {\n if (!item.hasClass(\"disabled\")) {\n this.openSubmenu(submenu);\n }\n });\n this._submenus.push(submenu);\n }\n\n item.mouseenter(e => {\n if (this._activeSubmenu && item !== this._activeSubmenu.parentItem) {\n this.closeSubmenus();\n }\n });\n\n this.makeItem(item, menuItem);\n\n return item;\n });\n return HTMLBuilder.make(\"ul.menu-group\").append(items);\n });\n\n this._menu = HTMLBuilder.div(`submenu ${this.constructor.menuClass}`, menuGroups);\n\n // make sure submenus appear after the main menu\n this.attach();\n this._submenus.forEach(submenu => {\n submenu.attach();\n });\n }", "function startMenu() {\n createManager();\n}", "function creatMenuItem(element) {\n let section = element.getAttribute('data-nav');\n let menuItem = document.createElement('li');\n menuItem.classList.add('menu__link');\n menuItem.innerHTML = `<a>${section}</a>`;\n navigationMenu.appendChild(menuItem);\n}", "function addMotivationButton() {\r\n\tvar menuElem = new Element('li',{'id':'menu_motivation'});\r\n\t\r\n\tvar moBtn = new Element('a',{'title':'', 'class':'button_wrap button', 'style':'white-space:nowrap;', href:'javascript:MoCheck.openMotivationWindow(\\'motivation\\', \\'work\\');'});\r\n\tmoBtn.innerHTML = ' <span style=\"display:inline; float:left; width:9px; height:25px; margin-left:22px; background-image: url(\\'../images/button/left_normal.png\\');\"></span>' +\r\n\t\t\t\t\t '\t<span class=\\\"button_middle\\\" style=\"display:inline; float:left; width:78px; background-image: url(\\'../images/button/middle_normal.png\\');\">Trabajos Fav</span>' +\r\n\t\t\t\t\t '\t<span class=\\\"button_right\\\" style=\"display:inline; width: 9px; height:25px; float:left; background-image: url(\\'../images/button/right_normal.png\\');\"></span>';\r\n\tmoBtn.injectInside(menuElem);\r\n\tmenuElem.injectAfter($('menu_forts'));\r\n\t$('workbar_right').setStyle('margin-top', '27px');\r\n\t\r\n}", "includeMenuItemEnd () {\n this.html += `\n </ul>\n </div>\n </div>\n `\n }", "function addToGame(object) {\n\tgame_menu.addChild(object);\n\tstage.update();\n}", "function insertContentForMember() {\n /**\n * <div>Orbit Metrics (orbit level, reach, love)</div>\n */\n const detailsMenuOrbitMetrics = createOrbitMetrics(\n $orbit_level,\n $reach,\n $love\n );\n\n $detailsMenuElement.appendChild(detailsMenuOrbitMetrics);\n\n /**\n * <div>Tag list</div>\n */\n\n if ($tag_list.length > 0) {\n const detailsMenuTagList = createTagList($tag_list);\n\n $detailsMenuElement.appendChild(detailsMenuTagList);\n }\n\n /**\n * <span class=\"dropdown-divider\"></span>\n */\n const dropdownDivider1 = window.document.createElement(\"span\");\n dropdownDivider1.setAttribute(\"role\", \"none\");\n dropdownDivider1.classList.add(\"dropdown-divider\");\n $detailsMenuElement.appendChild(dropdownDivider1);\n\n /**\n * <span>Contributed X times to this repository</span>\n */\n if (isRepoInWorkspace) {\n const detailsMenuRepositoryContributions = createDropdownItem(\n $contributions_on_this_repo_total === 1\n ? \"First contribution to this repository\"\n : `Contributed ${getThreshold(\n $contributions_on_this_repo_total\n )} times to this repository`\n );\n $detailsMenuElement.appendChild(detailsMenuRepositoryContributions);\n }\n\n /**\n * <span>Contributed Y times to Z repository</span>\n */\n const detailsMenuTotalContributions = createDropdownItem(\n `Contributed ${getThreshold($contributions_total)} times on GitHub`\n );\n $detailsMenuElement.appendChild(detailsMenuTotalContributions);\n\n /**\n * <span class=\"dropdown-divider\"></span>\n */\n const dropdownDivider2 = window.document.createElement(\"span\");\n dropdownDivider2.setAttribute(\"role\", \"none\");\n dropdownDivider2.classList.add(\"dropdown-divider\");\n $detailsMenuElement.appendChild(dropdownDivider2);\n\n /**\n * <a href=\"…\">Add to to X’s content</a>\n */\n const detailsMenuLinkContent = window.document.createElement(\"a\");\n detailsMenuLinkContent.setAttribute(\"aria-label\", \"See profile on Orbit\");\n detailsMenuLinkContent.setAttribute(\"role\", \"menuitem\");\n detailsMenuLinkContent.classList.add(\n \"dropdown-item\",\n \"dropdown-item-orbit\",\n \"btn-link\"\n );\n detailsMenuLinkContent.textContent = `Add to ${gitHubUsername}’s content`;\n detailsMenuLinkContent.addEventListener(\"click\", handleAddCommentToMember);\n $detailsMenuElement.appendChild(detailsMenuLinkContent);\n\n /**\n * <a href=\"…\">See X’s profile on Orbit</a>\n */\n const detailsMenuLinkProfile = window.document.createElement(\"a\");\n detailsMenuLinkProfile.setAttribute(\"aria-label\", \"See profile on Orbit\");\n detailsMenuLinkProfile.setAttribute(\"role\", \"menuitem\");\n detailsMenuLinkProfile.setAttribute(\n \"href\",\n `${ORBIT_API_ROOT_URL}/${normalizedWorkspace}/members/${gitHubUsername}`\n );\n detailsMenuLinkProfile.setAttribute(\"target\", \"_blank\");\n detailsMenuLinkProfile.setAttribute(\"rel\", \"noopener\");\n detailsMenuLinkProfile.classList.add(\n \"dropdown-item\",\n \"dropdown-item-orbit\",\n \"btn-link\"\n );\n detailsMenuLinkProfile.textContent = `See ${gitHubUsername}’s profile on Orbit`;\n $detailsMenuElement.appendChild(detailsMenuLinkProfile);\n }", "function AddMenuOption(win, menu, value, html) {\n var op = AppendNewElement(win, menu, 'OPTION');\n op.value = value;\n op.innerHTML = html;\n\n return op;\n}", "function clickAddnewMenu(){\n\t\t\n\t\t$(\"#menuAddNew\").show();\n\t\t//$(\".categorydropList\").load(jssitebaseUrl+\"/ajaxActionRestaurant.php?action=categoryDropList\");\n\t\t$(\"#menuEdit\").hide();\n\t\t//$(\"#addnew_buttun\").hide();\n\t\t$(\".restaurantMenuContent\").hide();\n\t}", "function addVerticalNavigation(){\n $body.append('<div id=\"' + SECTION_NAV + '\"><ul></ul></div>');\n var nav = $(SECTION_NAV_SEL);\n\n nav.addClass(function() {\n return options.showActiveTooltip ? SHOW_ACTIVE_TOOLTIP + ' ' + options.navigationPosition : options.navigationPosition;\n });\n\n for (var i = 0; i < $(SECTION_SEL).length; i++) {\n var link = '';\n if (options.anchors.length) {\n link = options.anchors[i];\n }\n\n var li = '<li><a href=\"#' + link + '\"><span></span></a>';\n\n // Only add tooltip if needed (defined by user)\n var tooltip = options.navigationTooltips[i];\n\n if (typeof tooltip !== 'undefined' && tooltip !== '') {\n li += '<div class=\"' + SECTION_NAV_TOOLTIP + ' ' + options.navigationPosition + '\">' + tooltip + '</div>';\n }\n\n li += '</li>';\n\n nav.find('ul').append(li);\n }\n\n //centering it vertically\n $(SECTION_NAV_SEL).css('margin-top', '-' + ($(SECTION_NAV_SEL).height()/2) + 'px');\n\n //activating the current active section\n $(SECTION_NAV_SEL).find('li').eq($(SECTION_ACTIVE_SEL).index(SECTION_SEL)).find('a').addClass(ACTIVE);\n }", "function addVerticalNavigation(){\n $body.append('<div id=\"' + SECTION_NAV + '\"><ul></ul></div>');\n var nav = $(SECTION_NAV_SEL);\n\n nav.addClass(function() {\n return options.showActiveTooltip ? SHOW_ACTIVE_TOOLTIP + ' ' + options.navigationPosition : options.navigationPosition;\n });\n\n for (var i = 0; i < $(SECTION_SEL).length; i++) {\n var link = '';\n if (options.anchors.length) {\n link = options.anchors[i];\n }\n\n var li = '<li><a href=\"#' + link + '\"><span></span></a>';\n\n // Only add tooltip if needed (defined by user)\n var tooltip = options.navigationTooltips[i];\n\n if (typeof tooltip !== 'undefined' && tooltip !== '') {\n li += '<div class=\"' + SECTION_NAV_TOOLTIP + ' ' + options.navigationPosition + '\">' + tooltip + '</div>';\n }\n\n li += '</li>';\n\n nav.find('ul').append(li);\n }\n\n //centering it vertically\n $(SECTION_NAV_SEL).css('margin-top', '-' + ($(SECTION_NAV_SEL).height()/2) + 'px');\n\n //activating the current active section\n $(SECTION_NAV_SEL).find('li').eq($(SECTION_ACTIVE_SEL).index(SECTION_SEL)).find('a').addClass(ACTIVE);\n }", "function addMenuItems(){\n alert('testing123');\n}", "constructor(){\n super();\n this.menu = [\n {link: '/', title: 'Home'},\n ];\n }", "function addVerticalNavigation(){\r\n $body.append('<div id=\"' + SECTION_NAV + '\"><ul></ul></div>');\r\n var nav = $(SECTION_NAV_SEL);\r\n\r\n nav.addClass(function() {\r\n return options.showActiveTooltip ? SHOW_ACTIVE_TOOLTIP + ' ' + options.navigationPosition : options.navigationPosition;\r\n });\r\n\r\n for (var i = 0; i < $(SECTION_SEL).length; i++) {\r\n var link = '';\r\n if (options.anchors.length) {\r\n link = options.anchors[i];\r\n }\r\n\r\n var li = '<li><a href=\"#' + link + '\"><span></span></a>';\r\n\r\n // Only add tooltip if needed (defined by user)\r\n var tooltip = options.navigationTooltips[i];\r\n\r\n if (typeof tooltip !== 'undefined' && tooltip !== '') {\r\n li += '<div class=\"' + SECTION_NAV_TOOLTIP + ' ' + options.navigationPosition + '\">' + tooltip + '</div>';\r\n }\r\n\r\n li += '</li>';\r\n\r\n nav.find('ul').append(li);\r\n }\r\n\r\n //centering it vertically\r\n $(SECTION_NAV_SEL).css('margin-top', '-' + ($(SECTION_NAV_SEL).height()/2) + 'px');\r\n\r\n //activating the current active section\r\n $(SECTION_NAV_SEL).find('li').eq($(SECTION_ACTIVE_SEL).index(SECTION_SEL)).find('a').addClass(ACTIVE);\r\n }", "function addVerticalNavigation(){\r\n $body.append('<div id=\"' + SECTION_NAV + '\"><ul></ul></div>');\r\n var nav = $(SECTION_NAV_SEL);\r\n\r\n nav.addClass(function() {\r\n return options.showActiveTooltip ? SHOW_ACTIVE_TOOLTIP + ' ' + options.navigationPosition : options.navigationPosition;\r\n });\r\n\r\n for (var i = 0; i < $(SECTION_SEL).length; i++) {\r\n var link = '';\r\n if (options.anchors.length) {\r\n link = options.anchors[i];\r\n }\r\n\r\n var li = '<li><a href=\"#' + link + '\"><span></span></a>';\r\n\r\n // Only add tooltip if needed (defined by user)\r\n var tooltip = options.navigationTooltips[i];\r\n\r\n if (typeof tooltip !== 'undefined' && tooltip !== '') {\r\n li += '<div class=\"' + SECTION_NAV_TOOLTIP + ' ' + options.navigationPosition + '\">' + tooltip + '</div>';\r\n }\r\n\r\n li += '</li>';\r\n\r\n nav.find('ul').append(li);\r\n }\r\n\r\n //centering it vertically\r\n $(SECTION_NAV_SEL).css('margin-top', '-' + ($(SECTION_NAV_SEL).height()/2) + 'px');\r\n\r\n //activating the current active section\r\n $(SECTION_NAV_SEL).find('li').eq($(SECTION_ACTIVE_SEL).index(SECTION_SEL)).find('a').addClass(ACTIVE);\r\n }" ]
[ "0.74133885", "0.7262759", "0.6769861", "0.67182606", "0.65837014", "0.6540529", "0.6514619", "0.6447271", "0.63913894", "0.63330895", "0.6289641", "0.62523067", "0.623188", "0.622712", "0.6212479", "0.6208633", "0.6181291", "0.6178908", "0.61659455", "0.6157785", "0.61538553", "0.6153474", "0.6146158", "0.6140682", "0.6125297", "0.6123141", "0.61055106", "0.6103256", "0.6101798", "0.6095878", "0.60943127", "0.60866916", "0.6073644", "0.60672253", "0.60615116", "0.60226226", "0.5971551", "0.5958468", "0.59539473", "0.5943459", "0.59284264", "0.5926879", "0.59261787", "0.5921326", "0.59199363", "0.5919521", "0.58754534", "0.58577585", "0.5845167", "0.58450955", "0.58340394", "0.5833728", "0.5828456", "0.58085483", "0.5801978", "0.5796323", "0.5793136", "0.5789154", "0.5778009", "0.5778009", "0.57762134", "0.577512", "0.57655275", "0.5763879", "0.57630146", "0.5762353", "0.5760651", "0.57596684", "0.57585984", "0.5750931", "0.5749218", "0.57408696", "0.57293296", "0.5729305", "0.57238835", "0.5719635", "0.5714751", "0.5713034", "0.5711409", "0.5700051", "0.5695782", "0.56915396", "0.5689019", "0.5688882", "0.56872016", "0.5680031", "0.5676629", "0.56759536", "0.56720555", "0.56660426", "0.56634516", "0.5663347", "0.56606907", "0.56580585", "0.56415564", "0.56415564", "0.56358224", "0.5632415", "0.56306624", "0.56306624" ]
0.71732485
2
Close the active submenu underneath this submenu.
closeSubmenus() { if (this._activeSubmenu) { this._activeSubmenu.close(); this._activeSubmenu = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeSubmenu(e) {\n let isClickInside = menu.contains(e.target);\n \n if (!isClickInside && menu.querySelector(\".submenu-active\")) {\n menu.querySelector(\".submenu-active\").classList.remove(\"submenu-active\");\n }\n }", "function closeSubmenu(e) {\r\n const isClickInside = e.target.parentElement.className.includes('sub') ? true : false;\r\n if (!isClickInside && menu.querySelector('.submenu-active')) {\r\n menu.querySelector('.submenu-active').classList.remove('submenu-active');\r\n }\r\n}", "function closeSubmenu(e) {\n let isClickInside = menu.contains(e.target);\n\n if (!isClickInside && menu.querySelector(\".submenu-active\")) {\n menu.querySelector(\".submenu-active\").classList.remove(\"submenu-active\");\n }\n}", "function closeSubmenu(e) {\n let isClickInside = menu.contains(e.target);\n\n if (!isClickInside && menu.querySelector('.subMenuActive')){\n menu.querySelector('.subMenuActive').classList.remove('subMenuActive');\n }\n}", "function hideMenu() {\n\t\t\tvar currentMenu = element.querySelector('.' + SETTINGS.open);\n\n\t\t\t// if there is a submenu opened, then close it\n\t\t\tif (currentMenu) {\n\t\t\t\tcurrentMenu.classList.remove(SETTINGS.open);\t\n\t\t\t}\n\t\t}", "function closeAllSubNav() {\n secondLevelNavMenus.forEach((el) => {\n // Return focus to the toggle button if the submenu contains focus.\n if (el.contains(document.activeElement)) {\n el.querySelector(\n '[data-drupal-selector=\"primary-nav-submenu-toggle-button\"]',\n ).focus();\n }\n toggleSubNav(el, false);\n });\n }", "function closeSubMenuOutMenuClick(e){\n\t\tif(!$(e.target).closest('.menu-item-has-children.active').length && $(window).width()>991){\n\t\t\t$('.sub-menu').slideUp(100);\n\t\t\t$('.menu-item-has-children').removeClass('active');\n\t\t}\n\t}", "function closemenu() {\n mcroyal.classList.remove('active');\n nav.classList.remove('active');\n }", "function closemenu(){\n\t\t\tif ( $menu && timer ){\n\t\t\t\t$menu.children('a').removeClass( settings.parentMO ).siblings('ul')[ settings.hide ]();\n\t\t\t\ttimer = clearTimeout( timer );\n\t\t\t\t$menu = false;\n\t\t\t}\n\t\t}", "_submenuCloseAll () {\n window.removeEventListener(\"resize\", this.resizeEventSubmenuOpen, { passive: true });\n this.submenus.forEach(submenu => submenu.classList.remove(\"submenu-open\"));\n this.submenuOpen = false;\n }", "function closeActive() {\n $(\".navigation li\").removeClass(\"active\");\n}", "function collapseSubMenu() {\n navbarMenu.querySelector('.menu-item-has-children.active .sub-menu').removeAttribute('style');\n navbarMenu.querySelector('.menu-item-has-children.active').classList.remove('active');\n }", "function closeExcursionsMenu() {\n !!list.excursionMenu && list.excursionMenu.hide();\n }", "closeMenu() {\n this._itemContainer.visible = false;\n this.accessible.expanded = false;\n this._label.accessible.expanded = false;\n }", "function closeMenu(subMenu) {\r\n const subMenuElement = document.querySelector(subMenu);\r\n subMenuElement.classList.remove(\"nav-open\");\r\n}", "function subMenuClosed(){\n setSubMenu(() => {\n return false;\n })\n }", "function closeMenu(){\n menu.classList.remove('active');\n}", "function closeMenu() {\n g_IsMenuOpen = false;\n}", "static close() {\n if (instance) {\n try {\n if (instance.onItemSelected) {\n instance.onItemSelected(undefined);\n }\n instance.parentElement.removeChild(instance);\n }\n catch(error) {\n console.error(`PopupMenu: ${error}\\n${error.stack}`);\n }\n instance = null;\n }\n }", "close () {\n\t\t\tthis.el.classList.remove('dropdown_open');\n\t\t\tthis.trigger(\"close\");\n\t\t\tdocument.removeEventListener('click', this._documentClick);\n\t\t}", "function closeMenu() {\r\n\t var menus = document.getElementsByClassName('menu');\r\n\t for (var i=0 ; i<menus.length ; i++) {\r\n\t\t menus[i].parentNode.removeChild(menus[i]);\r\n\t }\r\n }", "function _submenuToggle() {\n\n\t\tvar $this = $( this ),\n\t\t\tothers = $this.closest( '.menu-item' ).siblings();\n\t\t_toggleAria( $this, 'aria-pressed' );\n\t\t_toggleAria( $this, 'aria-expanded' );\n\t\t$this.toggleClass( 'activated' );\n\t\t$this.next( '.sub-menu' ).slideToggle( 'fast' );\n\n\t\tothers.find( '.' + subMenuButtonClass ).removeClass( 'activated' ).attr( 'aria-pressed', 'false' );\n\t\tothers.find( '.sub-menu' ).slideUp( 'fast' );\n\n\t}", "function _submenuToggle() {\n\n\t\tvar $this = $( this ),\n\t\t\tothers = $this.closest( '.menu-item' ).siblings();\n\t\t_toggleAria( $this, 'aria-pressed' );\n\t\t_toggleAria( $this, 'aria-expanded' );\n\t\t$this.toggleClass( 'activated' );\n\t\t$this.next( '.sub-menu' ).slideToggle( 'fast' );\n\n\t\tothers.find( '.' + subMenuButtonClass ).removeClass( 'activated' ).attr( 'aria-pressed', 'false' );\n\t\tothers.find( '.sub-menu' ).slideUp( 'fast' );\n\n\t}", "menuClose(event) {\n var navItem = document.getElementsByTagName('nav')[0];\n if (navItem.style.display === 'block') {\n navItem.style.display = 'none';\n navItem.classList.remove('menuhidden');\n }\n }", "function closeNav()\n {\n $('body')\n .removeClass('nav-expanded');\n }", "function closeTopMenu() {\n //alert (\"close\".menuId);\n $(\"#\"+current_menu+\">ul\").hide();\n}", "_closeDropDown () {\n this._mainDropDownActive = false\n this._sizeDropDownActive = false\n this._containerHeader.querySelector('.dropdown-sub1-content').style.display = 'none'\n this._containerHeader.querySelector('.dropdown-content').style.display = 'none'\n }", "static onClick_() {\n if (MenuManager.isMenuOpen()) {\n ActionManager.exitCurrentMenu();\n } else {\n Navigator.byItem.exitGroupUnconditionally();\n }\n }", "function hideSubmenu( obj ){ obj.css( 'opacity', '0' ).css( 'display', 'none' ); }", "function closeMenuEvent() {\n // Vars\n var firstLevelMenuItem = '#tablet-mobile-menu ul.menu li a';\n var page = jQuery(\"body, html\");\n\n jQuery('#menu-btn-toggle').removeClass('open');\n jQuery(firstLevelMenuItem).parent().removeClass('active-open');\n\n //TODO Change the skin position only when present\n jQuery(page).css(\"background-position\", \"center top\").css(\"position\", \"initial\");\n}", "closeBurgerMenu() {\n if (this.state.isOpen === true) {\n this.toggleBurgerMenu();\n\n }\n }", "function prodListClose(el) {\n\tif (!(el.target.matches('.sub-arrow') || el.target.matches('.menu-arrow'))) {\n\t\tprodMenuUl.forEach(menu => {\n\t\t\tmenu.classList.remove(\"active\")\n\t\t})\n\t\tmenuArrow.forEach(arrow =>{\n\t\t\tarrow.classList.remove(\"active\", \"param\")\n\t\t})\n\t}\n}", "function closeMenu() {\n\t\tburgerMenu.classList.remove(\"toggleOn\");\n\t\ttopNav.classList.remove(\"toggleOn\");\n\t\tcloseBtn.style.display = \"none\";\n\t}", "function closeMenu() {\n\n document.getElementById(\"overlay-menu\").classList.remove(\"show-overlay-menu\");\n document.getElementById(\"burger-menu\").classList.remove(\"d-none\");\n }", "function closeAll() {\n\t\t\t$.each( menuItems, function( index ) {\n\t\t\t\tmenuItems[index].close();\n\t\t\t});\n\t\t}", "close() {\n this.sideNav.close()\n }", "function handleMenuClose() {\n setMenuOpen(null);\n }", "closeMenu() {\n this.props.toggleMenu();\n this.setCurrentValues();\n }", "function closeArea(triggerClass) {\n //$('#primary-nav ul li > a').removeAttr('style'); // think this needs reversing?\n\n $('header .primary .sub-nav').fadeOut(animateTime / 6, easing);\n $('header .primary .nav a').removeClass('hover');\n $('header .primary .nav li a[data-class=\"active\"]').removeAttr('data-class').attr('class', 'active');\n\n currentlyOpen = false;\n hoveringClass = \"\"\n\n}", "closeMenu() {\n\t\t// prevent rerender when called multiple times\n\t\tif (this.state.isMenuOpen) {\n\t\t\tthis.setState({ isMenuOpen: false });\n\t\t}\n\t}", "closeMenu() {\n\t\t// prevent rerender when called multiple times\n\t\tif (this.state.isMenuOpen) {\n\t\t\tthis.setState({ isMenuOpen: false });\n\t\t}\n\t}", "navClose() {\n this.htmlData.header.classList.remove(\"open\");\n this.htmlData.overlay.classList.remove(\"show\");\n this.closeAllMenus();\n }", "function closeUserInfoSubMenu() {\n vm.showUserInfo = false;\n }", "close() {\n if(!this.$element.hasClass('is-open')){\n return false;\n }\n this.$element.removeClass('is-open')\n .attr({'aria-hidden': true});\n\n this.$anchor.removeClass('hover')\n .attr('aria-expanded', false);\n\n if(this.classChanged){\n var curPositionClass = this.getPositionClass();\n if(curPositionClass){\n this.$element.removeClass(curPositionClass);\n }\n this.$element.addClass(this.options.positionClass)\n /*.hide()*/.css({height: '', width: ''});\n this.classChanged = false;\n this.counter = 4;\n this.usedPositions.length = 0;\n }\n /**\n * Fires once the dropdown is no longer visible.\n * @event Dropdown#hide\n */\n this.$element.trigger('hide.zf.dropdown', [this.$element]);\n\n if (this.options.trapFocus) {\n Foundation.Keyboard.releaseFocus(this.$element);\n }\n }", "function closeMenu(e) {\n var target = e.target;\n var its_menu = target == menu || menu.contains(target);\n var its_hamburger = target == btn;\n var menu_is_active = menu.classList.contains('active');\n \n if (!its_menu && !its_hamburger && menu_is_active) {\n openMenu();\n }\n}", "function blurMenu( event ) {\n\t\t\t\t// If there is no parent or sub, we can just bail\n\t\t\t\tif( $parent === undefined && $sub === undefined ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t// Get element that is gaining focus\n\t\t\t\t\tvar target = $( ':focus' );\n\t\t\t\t\t// If target is within scope of this nav item, lets bail\n\t\t\t\t\tif( $parent.find( target ).length || $sub.find( target ).length || target.hasClass( 'dropdown-toggle' ) ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t// If we made it here, let's close the parent & sub\n\t\t\t\t\t$parent.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t\t$sub.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t}, 1 );\n\t\t\t\treturn true;\n\t\t\t}", "function closeCurrentLi () {\n if (!ae.currentLi)\n return;\n if (ae.currentLi.hasClass('sticky'))\n return;\n ae.currentLi.morph({\n width: '15px',\n backgroundColor: '#696969',\n onComplete: function () { delete ae.closingLi; }\n });\n ae.closingLi = ae.currentLi;\n delete ae.currentLi;\n}", "close() {\n var self = this;\n var trigger = self.isOpen;\n\n if (self.settings.mode === 'single' && self.items.length) {\n self.hideInput(); // Do not trigger blur while inside a blur event,\n // this fixes some weird tabbing behavior in FF and IE.\n // See #selectize.js#1164\n\n if (!self.tab_key) {\n self.blur(); // close keyboard on iOS\n }\n }\n\n self.isOpen = false;\n setAttr(self.control_input, {\n 'aria-expanded': 'false'\n });\n applyCSS(self.dropdown, {\n display: 'none'\n });\n self.clearActiveOption();\n self.refreshState();\n self.setTextboxValue('');\n if (trigger) self.trigger('dropdown_close', self.dropdown);\n }", "function closeallmenus() {\n\t\tif (active_tabcontent != null) {\n\t\t\tblocknone(active_tabcontent,active_tab1,'none','#000000','#ABCDEF','pointer');\n\t\t}\n\t}", "function subNav_slideUp(e) {\n $(this).removeClass('nav__item--show-sub');\n }", "function closeAccountDropdowns(){\n DOM.$navLinksWithChildren.removeClass(\"account-sub-menu-is-open\").parent().removeClass(\"account-sub-menu-is-open\");\n }", "close() {\n\t\tif (this._opened === false) return\n\t\tthis._opened = false\n\t\tthis.removeClass('open')\n\t\tthis.trigger(ToggleComponent.ToggleEvent, this, this._opened)\n\t}", "function closeMenu() {\n\n //Hide the menu\n setVisibility(document.getElementById(\"menuPopup\"), false);\n}", "closeBurgerMenu() {\n if (this.state.isOpen === true) {\n this.toggleBurgerMenu();\n }\n }", "closeMobileMenu() {\n this.$mobileMenu.find('.menu-item-has-children ul').slideUp(300).removeClass('open');\n this.$navbar.find('.ui.mobile.container').fadeOut(300);\n $('body').removeClass('mobile open');\n\n setTimeout(() => {\n this.$navbar.removeClass('mobile open');\n $('.mobile.slice').removeClass('active');\n }, 300);\n }", "function close() {\n $(this).parent().hide();\n}", "function closeMenu(selectedMenu){\n document.getElementById(selectedMenu).style.visibility=\"hidden\"; }", "destroy() {\n this.$element.find('[data-submenu]').slideDown(0).css('display', '');\n this.$element.find('a').off('click.zf.accordionMenu');\n\n Foundation.Nest.Burn(this.$element, 'accordion');\n Foundation.unregisterPlugin(this);\n }", "hideSubMenu_() {\n const items =\n this.querySelectorAll('cr-menu-item[sub-menu][sub-menu-shown]');\n items.forEach((menuItem) => {\n const subMenuId = menuItem.getAttribute('sub-menu');\n if (subMenuId) {\n const subMenu = /** @type {!Menu|null} */\n (document.querySelector(subMenuId));\n if (subMenu) {\n subMenu.hide();\n }\n menuItem.removeAttribute('sub-menu-shown');\n }\n });\n this.currentMenu = this;\n }", "submenuListener(event) {\n if (!event.target.parentNode.classList.contains(\"open\")) {\n this.closeAllMenus();\n event.target.setAttribute(\"aria-current\", \"page\");\n event.target.parentNode.setAttribute(\"aria-expanded\", \"true\");\n event.target.parentNode.classList.add(\"open\");\n } else {\n event.target.parentNode.classList.remove(\"open\");\n event.target.parentNode.removeAttribute(\"aria-expanded\");\n event.target.removeAttribute(\"aria-current\", \"page\");\n }\n }", "_hideAll() {\n var $elem = this.$element.find('.is-drilldown-submenu.is-active').addClass('is-closing');\n if(this.options.autoHeight) this.$wrapper.css({height:$elem.parent().closest('ul').data('calcHeight')});\n $elem.one(Foundation.transitionend($elem), function(e){\n $elem.removeClass('is-active is-closing');\n });\n /**\n * Fires when the menu is fully closed.\n * @event Drilldown#closed\n */\n this.$element.trigger('closed.zf.drilldown');\n }", "function closeMenubarDropdowns() {\n $.each(cmsobj.menubars, function () {\n var $menubar = $(this);\n var o = $menubar.data('config'); // recover config from active menubar\n\n if (o) {\n $menubar.find(o.dropdownSelector).each(function () {\n $(this)\n .data('edit-open', false)\n .removeClass(o.openCssClass)\n .children(o.dropdownContentSelector)\n .hide();\n });\n }\n });\n\n delete cmsobj.$activeMenubar;\n }", "function closeAllMenus() {\n hideCategoryNav();\n hideMobileMenuDropdown();\n }", "function toggleSubmenu(element) { submenuToggled = true; var submenu = jQueryBuddha(element).closest(\"li\").find(\"ul.mm-submenu\").first(); if (!submenu.hasClass(\"submenu-opened\")) { jQueryBuddha(element).closest(\"li\").addClass(\"mm-hovering\"); jQueryBuddha(element).find(\">.fa\").removeClass(\"fa-plus-circle\").addClass(\"fa-minus-circle\"); submenu.addClass(\"submenu-opened\"); } else { jQueryBuddha(element).closest(\"li\").removeClass(\"mm-hovering\"); jQueryBuddha(element).find(\">.fa\").removeClass(\"fa-minus-circle\").addClass(\"fa-plus-circle\"); submenu.removeClass(\"submenu-opened\"); } setTimeout(function () { submenuToggled = false; }, 100); jQueryBuddha(document).trigger(\"toggleSubmenu\", [element]); return false; }", "onMenuItemClick(e) {\n var $el = $(e.currentTarget);\n\n this.$container.find('.item').removeClass('active');\n this.$container.find('.submenu').closest('.item').removeClass('open');\n\n $el.addClass('active');\n\n if ($el.find('.submenu').length) {\n $el.toggleClass('open');\n }\n }", "function closeDropDownMenu(e) {\n if (active_drop_menu != null) {\n let bounding_rect = active_drop_menu.getBoundingClientRect();\n let click_x = e.clientX;\n let click_y = e.clientY;\n let input_x = bounding_rect.left;\n let input_y = bounding_rect.top;\n let input_w = bounding_rect.width;\n let input_h = bounding_rect.height;\n\n // check if mouse click happen outside the menu\n if (!(click_x > input_x && click_x < (input_x + input_w) && \n click_y > input_y && click_y < (input_y + input_h))) {\n \n // close the menu\n active_drop_menu.setAttribute(\"class\", \"remove-elem\");\n active_drop_menu = null;\n active_drop_menu_id = \"\";\n }\n }\n }", "function closeNav() {\n \n var cl = site.classList;\n if (cl.contains('open')) {\n cl.remove('open');\n }\n}", "function closeMenuAccount() {\n $('.authorization').mouseleave(function () {\n this.remove();\n });\n}", "close() {\n this.expanded = false;\n }", "function clickMenuClose() {\n navList.addEventListener('click', function () {\n if (!mq1.matches) {\n menu[0].classList.add('hide');\n header[0].style.overflow = 'hidden';\n }\n });\n}", "function toggleSubMenu() {\n //Open sub-menu\n $('.btn-logout').click(function () {\n $('.sub-menu').slideToggle(300);\n });\n //Close sub-menu by click anywhere on page\n $(document).on(\"click\", function (event) {\n var $trigger = $(\".sub-menu\").closest('li');;\n if ($trigger !== event.target && !$trigger.has(event.target).length) {\n $(\".sub-menu\").slideUp(300);\n }\n });\n}", "function OCM_simpleDropdownClose() {\r\n\t\t\t\t\t$('#mobile-menu').hide();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.slide-out-widget-area-toggle:not(.std-menu) .lines-button').removeClass('close');\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\tif ($('body.material').length > 0) {\r\n\t\t\t\t\t\t\t$('header#top .slide-out-widget-area-toggle a').removeClass('menu-push-out');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$('.slide-out-widget-area-toggle a').removeClass('animating');\r\n\t\t\t\t\t}, 350);\r\n\t\t\t\t}", "closeNavMain() {\n this.removeClass('appstate--nav-main--open');\n }", "function closeNav() {\r\n menu.classList.toggle(\"change\");\r\n checkQuery(query768);\r\n}", "_closeMenu() {\n this.setState({ openMenu: false });\n }", "function closeMenu() {\n $('#menuContainer').css('right', '-300px');\n }", "function toggleSubMenu( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif( $sub.hasClass( 'focused' ) ) {\n\t\t\t\t\t$sub.slideUp( 300, function() {\n\t\t\t\t\t\t$sub.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t\t\t$li.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t\t});\n\t\t\t\t\t$toggle.removeClass( 'focused' ).attr( 'aria-expanded', 'false' );\n\t\t\t\t\t$li.removeClass( 'focused' ).attr( 'aria-hidden', 'true' );\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t$sub.slideDown(300, function() {\n\t\t\t\t\t$sub.addClass( 'focused' ).attr( 'aria-hidden', 'false' );\n\t\t\t\t});\n\t\t\t\t$toggle.addClass( 'focused' ).attr( 'aria-expanded', 'true' );\n\t\t\t\t$li.addClass( 'focused' ).attr( 'aria-expanded', 'true' );\n\t\t\t\treturn false;\n\t\t\t}", "function closeNav() {\n sidenav.css(\"margin-left\", \"-270px\");\n sidenav.css(\"overflow\", \"hidden\");\n backButton.removeClass(\"active_background\");\n disableHamburger();\n menuOpen = false;\n}", "closeMenu() {\n this.setState({ menuOpen: false });\n }", "function closeMenu() {\r\n\tmenu.classList.remove('show');\r\n\tdocument.body.style.overflow = 'auto';\r\n\ticon.classList.toggle('close');\r\n}", "function closeMenu(event) {\n console.log(\"close menu\");\n menu.classList.remove('showMenu');\n event.preventDefault();\n}", "function CloseDropdown() {\n if ($(this).parent(\".n-search\").hasClass(\"open\")) {\n $(this).parent(\".n-search\").removeClass(\"open\");\n $(this).prev(\".dropdown-toggle\").attr(\"aria-expanded\", \"false\");\n }\n }", "function closeNav() {\n $('#sidefoot').css('display', 'block');\n $('.footer-inner').css('padding-left', '20px');\n $('#nav-list li').addClass('treelisthidden');\n storage.removeItem(treesettings);\n $('#sideNavigation').css('display', 'none');\n $('#sideNavigation').css('width', '300px');\n $('body.support_kb').find('#sidefoot').css('margin-left', '-250px');\n $('body.support_kb').find('.cover').css('display', 'block');\n //$('body.support_kb').find('#sideNavigation').css('margin-left','0');\n $('body.support_kb').find('#sideNavigation').css('margin-left', '-250px');\n $('body').find('main').css('width', 'calc(100% - 100px)');\n $('#side-toggle').attr('class', 'fa fa-angle-double-right');\n $(\"#sidefoot\").css(\"width\", \"50px\");\n\n (function() {\n try {\n $('#sideNavigation').resizable(\"disable\");\n } catch (err) {\n setTimeout(arguments.callee, 200)\n }\n })();\n }", "_close() {\n const that = this;\n\n that._positionDetection.removeOverlay();\n that._closeSubContainers(2);\n that._discardKeyboardHover(true);\n\n if (that._minimized && that._minimizedDropDownOpened) {\n that.$mainContainer.addClass('jqx-visibility-hidden');\n\n if (that._edgeMacFF) {\n that.$.mainContainer.style.left = '';\n that.$.mainContainer.style.top = '';\n that.$mainContainer.addClass('not-in-view');\n }\n\n that.$hamburgerIcon.removeClass('jqx-close-button');\n that._minimizedDropDownOpened = false;\n }\n }", "function CloseDropdown() {\n\t\t\tif ( $( this ).parent( \".n-search\" ).hasClass( \"open\" ) ) {\n\t\t\t\t$( this ).parent( \".n-search\" ).removeClass( \"open\" );\n\t\t\t\t$( this ).prev( \".dropdown-toggle\" ).attr( \"aria-expanded\", \"false\" );\n\t\t\t}\n\t\t}", "closeCurtains() {\n this.closeCurtainsH(this.root);\n }", "function closeMenu(distanceToMove) {\n\t\tif (self.container.y > (0 - dimensions.height - MENU_HEIGHT)) {\n\t\t\tself.container.y -= distanceToMove;\n\t\t\tstage.update();\n\t\t}\n\t\telse {\n\t\t\tself.container.y = 0 - dimensions.height - MENU_HEIGHT;\n\t\t\tself.state.closing = false;\n\t\t}\n\t}", "function closeMenuArea() {\n var trigger = $('.side-menu-trigger', menuArea);\n trigger.removeClass('side-menu-close').addClass('side-menu-open');\n if (menuArea.find('> .rt-cover').length) {\n menuArea.find('> .rt-cover').remove();\n }\n\n if( newfeatureObj.rtl =='yes' ) {\n $('.sidenav').css('transform', 'translateX(-100%)');\n }else {\n $('.sidenav').css('transform', 'translateX(100%)');\n }\n }", "function closeNav() {\n navigation.style.width = \"0\";\n main.style.left = \"0\";\n main.style.position = \"static\";\n main.style.filter = \"opacity(100%)\";\n triggered = 0;\n }", "function closeVerticalArea() {\n verticalMenuObject.removeClass('active');\n\n if(verticalLogo.length) {\n verticalLogo.removeClass('active');\n }\n }", "_close() {\n const that = this;\n\n that._discardKeyboardHover(true);\n\n if (that._minimized && that._minimizedDropDownOpened) {\n that._positionDetection.removeOverlay();\n that.$view.addClass('jqx-visibility-hidden');\n\n if (that._edgeMacFF) {\n that.$.view.style.left = '';\n that.$.view.style.top = '';\n that.$view.addClass('not-in-view');\n }\n\n that.$hamburgerIcon.removeClass('jqx-close-button');\n that._minimizedDropDownOpened = false;\n }\n }", "function SubMenuClick() {\n $('.navigation.nav .menu-parent').on('click',' > a',function(e) {\n e.preventDefault();\n var $this=$(this);\n if($this.parent().hasClass('active')==false) {\n $this\n .parent('li')\n .siblings()\n .removeClass('active')\n .children('a')\n .siblings('.sub-menu').slideUp();\n }\n $this.parent('li').toggleClass('active');\n $this.siblings('.sub-menu').slideToggle();\n });\n }", "function CloseDropdown() {\n if (document.body.classList.contains(\"fullscreen-nav\")) {\n ToggleDropdown();\n }\n}", "close() {\n if (!this.disabled) {\n this.expanded = false;\n }\n }", "function closeDrawerMenu() {\n\t\t\t$('.pure-toggle-label').click();\n\t\t}", "function closeMenus() {\n\t\tfor (var j = 0; j < dropdowns.length; j++) {\n\t\t\tdropdowns[j]\n\t\t\t\t.getElementsByClassName('dropdown-toggle')[0]\n\t\t\t\t.classList.remove('dropdown-open');\n\t\t\tdropdowns[j].classList.remove('open');\n\t\t}\n\t}", "_onResize () {\n this.close();\n this._hideItems();\n this._submenuCloseAll();\n }", "function closeIfClickedOutside(menu, e) {\r\n if (e.target.closest('.dropdown') === null && e.target !== this && menu.offsetParent !== null) {\r\n menu.style.display = 'none';\r\n }\r\n}", "function closeNav() {\n $('#mySidenav').fadeOut();\n $('#main').css('margin-left', '0');\n $('#main').css('margin-right', '0');\n $('#mySidenav').css('margin-left', '0');\n $('#mySidenav').css('margin-right', '0');\n}", "function closeMenuOutMenuClick(e){\n\t\tif(!$(e.target).closest('.menu-wrap').length && !$(e.target).closest('.fa-compass').length && $(window).width()<991){\n\t\t\tmenuWrap.slideUp(100);\n\t\t}\n\t}" ]
[ "0.7751952", "0.761558", "0.76103", "0.74736863", "0.7163817", "0.7067129", "0.7036395", "0.7036372", "0.6855157", "0.6827137", "0.6723293", "0.66428864", "0.6617966", "0.66058147", "0.64786553", "0.6442533", "0.6405709", "0.63689935", "0.6368808", "0.6319181", "0.6279469", "0.6252416", "0.6252416", "0.6248011", "0.6218595", "0.62117434", "0.6197768", "0.6178228", "0.6174498", "0.6151684", "0.61429137", "0.61157936", "0.611392", "0.6100606", "0.60990447", "0.60987014", "0.60886496", "0.6078181", "0.6072068", "0.6066911", "0.6066911", "0.60454994", "0.60443616", "0.60061234", "0.59988105", "0.5975572", "0.5975084", "0.59644383", "0.59606236", "0.5951565", "0.5932236", "0.5930379", "0.592207", "0.59142363", "0.590721", "0.5907", "0.58996373", "0.5897916", "0.5896088", "0.5895712", "0.58907956", "0.5884188", "0.5877328", "0.5877255", "0.5851139", "0.5850612", "0.5847485", "0.5846334", "0.58447295", "0.5843458", "0.5842571", "0.58386403", "0.5830712", "0.5824476", "0.58242935", "0.5822708", "0.58090216", "0.5802173", "0.5799615", "0.57935256", "0.5793056", "0.5792934", "0.57918555", "0.57908696", "0.57782096", "0.57769483", "0.57729095", "0.5762624", "0.57589364", "0.57459885", "0.5743237", "0.573988", "0.5739536", "0.57356507", "0.5735401", "0.57238185", "0.57168275", "0.57141227", "0.5708924", "0.57083434" ]
0.84054166
0
Here are declared all functions = Bootstraper =
function qll_main() {//qll_system_settings_delete(); try { opera.postError(''); qll_GMSupport=false;} catch(err) {} try { GM_listValues(); } catch(err) { qll_GMSupport=false; } qll_system_settings_update(); qll_system_settings_load(); qll_styles(); switch(qll_opt['system:language']) { case 'POL': qll_lang=qll_langmt[0]; qll_img=qll_imgmt[0]; break; case 'ENG': qll_lang=qll_langmt[1]; qll_img=qll_imgmt[1]; break; default: qll_lang=qll_langmt[0]; qll_img=qll_imgmt[0]; } qll_module_style(); // chicken auto reloader ^.^ error=document.getElementById('error'); if(error!=null) { var chk=setInterval(function() { $.ajax( { url: "http://www.erepublik.com/en", cache: false, success: function(html) { if(html.match(/<body id="error">/)==null) { clearInterval(chk); window.location.reload(); return; } } }); },1000); return; } url=location.pathname; page=url.replace(/\/[a-z][a-z][\/]?/,""); index=page.indexOf("/"); if(index>0) page=page.substr(0,index); // prevention in running QLL in ridiculous places if(location.pathname.match(/\/[a-z][a-z]\/chat\/open\/.*/) // chat window || location.pathname.match(/.*.js/) // .js files || location.pathname.match(/.*.css/) // .css files || location.hostname.match(/.*wiki\.erepublik\.com.*/) // wiki || location.hostname.match(/.*api\.erepublik\.com.*/) // api || location.hostname.match(/.*ads\.erepublik\.com.*/) // ads || location.hostname.match(/.*tickets\.erepublik\.com.*/) // tickets || location.pathname.match(/\/[a-z][a-z]\/tickets\/report\/.*/) // ticket ) { return; } if(window.parent != window) { // we are inside of frame try{qll_utility_qllformatting_preview();}catch(e){} return; } chk=document.getElementById('remember'); qll_system_menu(); // qll_module_ajax(); if(qll_opt['module:links']) try{qll_module_links_display();}catch(e){} if(qll_opt['utility:search']) try{qll_utility_search();}catch(e){} if(chk==null) { // not main page - logged in try{qll_module_erepmenu();}catch(e){} if(qll_opt['utility:keepalive']) try{qll_utility_keepalive();}catch(e){} try{qll_utility_qllformatting();}catch(e){} if(qll_opt['utility:notepad']) try{qll_utility_notepad();}catch(e){} if(qll_opt['system:checkupdates']) try{qll_system_checkupdates();}catch(e){} if(qll_opt['module:hotchicks:sidebar']) try{qll_module_hotchicks_sidebar();}catch(e){} // if(qll_opt['module:links']) qll_module_links(); //alert(location.pathname); switch(true) { case location.pathname.match(/en\/main\/messages-compose\/[0-9]+$/) !== null: if(qll_opt['utility:message:signature']) try{qll_utility_messages_signature();}catch(e){} break case location.pathname.match(/work$/) !== null: if(qll_opt['module:economic:work']) try{qll_module_economic_work();}catch(e){} break; } switch(page) { case '': if(qll_opt['utility:orders']) try{qll_utility_orders();}catch(e){} break; case 'write-article': case 'edit-article': if(qll_opt['utility:article:cache']) try{qll_utility_article_cache();}catch(e){} break; case 'article': if(qll_opt['utility:article:signature']) try{qll_utility_article_signature();}catch(e){} if(qll_opt['utility:article:quote']) try{qll_utility_article_quote();}catch(e){} break; /* case 'market': if(qll_opt['module:economic:marketplace'] && qll_opt['module:economic'] && qll_opt['module:gameinfo']) qll_module_economic_marketplace(); break;*/ case 'exchange': if(qll_opt['module:economic:monetary']) try{qll_module_economic_monetary();}catch(e){} break; /* case 'company': if(qll_opt['module:economic:company'] && qll_opt['module:economic'] && qll_opt['module:gameinfo']) qll_module_economic_company();*/ default: } } else { // main page - not logged in if(qll_opt['utility:radiochecked']) try{qll_utility_boxchecked();}catch(e){} } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "bootstrap() { }", "function Bootstrapper() {\n\tBootstrapperBase.call(this, Catberry);\n}", "function krnBootstrap() {\n hostLog(\"bootstrap\", \"host\"); // Use hostLog because we ALWAYS want this, even if _Trace is off.\n\n // Initialize our global queues.\n _KernelInterruptQueue = new Queue(); // A (currently) non-priority queue for interrupt requests (IRQs).\n _KernelBuffers = new Array(); // Buffers... for the kernel.\n _KernelInputQueue = new Queue(); // Where device input lands before being processed out somewhere.\n _Console = new CLIconsole(); // The command line interface / console I/O device.\n\n // Initialize the CLIconsole.\n _Console.init();\n\n // Initialize standard input and output to the _Console.\n _StdIn = _Console;\n _StdOut = _Console;\n\n // Load the Keyboard Device Driver\n krnTrace(\"Loading the Keyboard Driver...\");\n krnKeyboardDriver = new DeviceDriverKeyboard(); // Construct it. TODO: Should that have a _global-style name?\n krnKeyboardDriver.driverEntry(); // Call the driverEntry() initialization routine made in the constructor.\n krnTrace(krnKeyboardDriver.status);\n\t\n krnTrace(\"Loading the FS Driver...\");\n krnFileSystemDriver = new DeviceDriverFileSystem();\n krnFileSystemDriver.driverEntry(); // Call the driverEntry() initialization routine made in the constructor.\n krnTrace(krnFileSystemDriver.status);\n\t\n\n // Enable the OS Interrupts. (Not the CPU clock interrupt, as that is done in the hardware sim.)\n krnTrace(\"Enabling the interrupts.\");\n krnEnableInterrupts();\n\n // Launch the shell.\n krnTrace(\"Creating and Launching the shell.\");\n _OsShell = new Shell();\n _OsShell.init();\n\n // Finally, initiate testing.\n if (_GLaDOS) {\n _GLaDOS.afterStartup();\n }\n}", "boot() {\n\n }", "boot() {\n\t}", "function preBootstrap() {\n setTimeout(bootstrap, 200);\n}", "function bootstrap() {\n MODULE.Controller.init(MODULE.Model, MODULE.View);\n }", "async afterBootstrap () {}", "function bootlegMiddle() {\n ;\n}", "getBootstrap() {\n return {};\n }", "function bootstrap() {\n _deck = new Deck();\n window.Decss = _deck;\n _deck.init();\n }", "function BootstrapOptions() { }", "function BootstrapOptions() { }", "function initBootstrap()\r\n{\r\n\t// Activate tooltips\r\n\t$('[data-toggle=\"tooltip\"]').tooltip();\r\n}", "function BootstrapOptions() {}", "function BootstrapOptions() {}", "function BootstrapOptions() {}", "function BootstrapOptions(){}", "boot() {\n //\n }", "function hnBootstrap(count) {\n count = count || 0;\n\n if (W &&\n W.map &&\n W.map.events &&\n W.map.events.register &&\n W.loginManager &&\n W.loginManager.user &&\n require && WazeWrap.Ready) {\n console.debug('HN Tool: Initializing...');\n hnInit();\n\n\t\t} else if (count < 10) {\n\t\t\tconsole.debug('HN Tool: Bootstrap failed. Trying again...');\n\t\t\tsetTimeout(function () {hnBootstrap(++count);}, 1000);\n\t\t} else\n\t\t\tconsole.error('HN Tool: Bootstrap error.');\n }", "function handleBootstrap() {\n /*Bootstrap Carousel*/\n jQuery('.carousel').carousel({\n interval: 15000,\n pause: 'hover'\n });\n\n /*Tooltips*/\n jQuery('.tooltips').tooltip();\n jQuery('.tooltips-show').tooltip('show'); \n jQuery('.tooltips-hide').tooltip('hide'); \n jQuery('.tooltips-toggle').tooltip('toggle'); \n jQuery('.tooltips-destroy').tooltip('destroy'); \n\n /*Popovers*/\n jQuery('.popovers').popover();\n jQuery('.popovers-show').popover('show');\n jQuery('.popovers-hide').popover('hide');\n jQuery('.popovers-toggle').popover('toggle');\n jQuery('.popovers-destroy').popover('destroy');\n }", "function WMEEmptyStreet_bootstrap() {\n\tif(!window.Waze.map) {\n\t\tsetTimeout(WMEEmptyStreet_bootstrap, 1000);\n\t\treturn;\n\t}\n WMEEmptyStreet_init();\n log(\"Start\");\n}", "function Boot() {\n // empty, maybe inherit config file or something\n}", "function drupalgap_bootstrap() {\n try {\n // Load up any contrib and/or custom modules (the DG core moodules have\n // already been loaded at this point), load the theme and all blocks. Then\n // build the menu router, load the menus, and build the theme registry.\n drupalgap_load_modules();\n drupalgap_load_theme();\n drupalgap_load_blocks();\n menu_router_build();\n drupalgap_menus_load();\n drupalgap_theme_registry_build();\n\n // Attach device back button handler (Android).\n document.addEventListener('backbutton', drupalgap_back, false);\n }\n catch (error) { console.log('drupalgap_bootstrap - ' + error); }\n}", "_bootstrap() {\n global.Console.log(global.Console.color('Gorgon Server' + ' v' + this.GorgonConfig.data.version, 'green'));\n global.Console.log('Author: Ryan Rentfro <rrentfro at gmail dot com>');\n global.Console.log('Project: https://github.com/manufacturing-industry/gorgon');\n this._motd();\n global.Console.log('Press ' + global.Console.color('cntrl+c', 'yellow') + ' to exit the server');\n global.Version = this.GorgonConfig.data.version;\n }", "constructor() {\n this.bootstrap();\n }", "function boot(err, cesData, wageData) {\n if (cesData)\n window.originalCesData = cesData;\n if (wageData)\n window.originalWageData = wageData;\n processCesData();\n addFilterDropShadow();\n// renderTable(); //not needed\n renderGraphic();\n// renderSparkline(); //not needed\n bindEvents(); //TODO\n// startFixie(); //not needed\n transitionBetween(true); //TODO\n// toggleKey(); //not needed\n renderKey(); //not needed\n// cloneToStaticSpots(); //not needed\n}", "function requestBootstrapFiles() {\n\n // list of files taken from life_star config\n var bootstrapRewriteFiles = lively.Config.get(\"bootstrapFiles\").concat([\n 'core/lively/Traits.js', 'core/lively/DOMAbstraction.js', 'core/lively/IPad.js',\n 'core/lively/LogHelper.js',\n // bootstrap.js\n 'core/lively/defaultconfig.js', 'core/lively/localconfig.js', // FIXME: + user configs ?\n 'core/lively/bindings.js', 'core/lively/bindings/Core.js',\n 'core/lively/Main.js', 'core/lively/persistence/Serializer.js'\n // directly necessary for debugging BUT excluded for now:\n // 'core/lively/ast/Debugging.js', 'core/lively/ast/AcornInterpreter.js',\n // 'core/lively/ast/Rewriting.js',\n // 'core/lively/ast/acorn.js', 'core/lively/ast/StackReification.js'\n ]);\n\n bootstrapRewriteFiles.forEachShowingProgress({\n iterator: function(filename) {\n var file = URL.root.withFilename(filename);\n file = file.withFilename('DBG_' + file.filename());\n new WebResource(file).get(); // could be async but we have the progress bar\n }\n });\n }", "function bootstrap(mainModule){\n return mainModule.main();\n console.log('booted')\n }", "function doBootstrap() {\n\n\tAssets.Initialize(function() {\n\n\t\t// Initialize the scnees.\n\t\tFramework.Initialize();\n\t\tdocument.getElementById(\"canvas_container\").addEventListener(\"mousedown\", function(evt){\n\t\t\tFramework.DoMouseDown( evt.offsetX, evt.offsetY );\n\t\t});\n\n\t\tdocument.body.addEventListener(\"keydown\", function(evt) {\n\t\t\t\tvar key = evt.keyCode;\n\t\t\t\tFramework.DoKeyDown(key);\n\t\t});\n\n\t\tdocument.body.addEventListener(\"keyup\", function(evt) {\n\t\t\t\tvar key = evt.keyCode;\n\t\t\t\tFramework.DoKeyUp(key);\n\t\t});\n\n\n\t\tdocument.getElementById(\"canvas_container\").onmousedown = function(evt){\n\t\t\tif ( evt.offsetX === undefined || evt.offsetY === undefined ) {\n\t\t\t\tvar rect = document.getElementById(\"canvas_container\").getBoundingClientRect();\n\t\t\t\tFramework.DoMouseDown( evt.clientX - rect.left, evt.clientY - rect.top );\n\t\t\t} else {\n\t\t\t\tFramework.DoMouseDown( evt.offsetX, evt.offsetY );\n\t\t\t}\n\t\t};\n\n\t\tdocument.getElementById(\"canvas_container\").addEventListener(\"mousemove\", function(evt) {\n\t\t\tif ( evt.offsetX === undefined || evt.offsetY === undefined ) {\n\t\t\t\tvar rect = document.getElementById(\"canvas_container\").getBoundingClientRect();\n\t\t\t\tFramework.DoMouseMove( evt.clientX - rect.left, evt.clientY - rect.top );\n\t\t\t} else {\n\t\t\t\tFramework.DoMouseMove( evt.offsetX, evt.offsetY );\n\t\t\t}\n\t\t});\n\n\t\tfunction update_loop() {\n\t\t\tFramework.DoUpdate();\n\t\t\tsetTimeout( update_loop, 20 );\n\t\t}\n\n\t\tfunction draw_loop() {\n\t\t\tFramework.DoDraw();\n\t\t\tsetTimeout( draw_loop, 20 );\n\t\t}\n\n\t\tupdate_loop();\n\t\tdraw_loop();\n\n\t});\n\n}", "bootstrapLoaded() {\n this.client_.sendMessage('bootstrap-loaded');\n }", "function MapBootstrapper() {\n\tthis.callbacksOnMapInit = [];\n\tvar that = this;\n\n\twindow.mapBootstrapperCallback = function() {\n\t\tthat.callbacksOnMapInit.forEach(function(callback) {\n\t\t\tcallback();\n\t\t});\n\t\twindow.map.ready = true;\n\t};\n}", "function bootstrap() {\n //Apply front http listener\n const appFront = express();\n appFront.use(bodyParser.json());\n bodyParser.text();\n appFront.listen(process.env.HTTP_FRONT_PORT, function(){\n console.log('HTTP Front listener running on', process.env.HTTP_FRONT_PORT);\n });\n new Http.Front(appFront).init();\n\n\n //Apply Backend http listener\n const appBackend = express();\n appBackend.listen(process.env.HTTP_BACKEND_PORT, function(){\n console.log('HTTP Backend listener running on', process.env.HTTP_BACKEND_PORT);\n });\n new Http.Backend(appBackend).init();\n\n new Service.GarbageCollector().init();\n}", "function angularBootstrap() {\n window.angular.resumeBootstrap(angularModules);\n window.angular.module = $module;\n }", "initializing() {\n this.initializeBoilerplate();\n }", "bootstrap( opts ) {\n let key = APP_STATES.get( 'BOOTSTRAP' )\n\n return <Bootstrap key={ key } state={ key } />\n }", "boot () {\n\n // Description of the clients' environment\n this.deviceDetect = new DeviceDetect();\n\n // populate main data model, which describes the application structure\n this.model = new Model();\n this.model.loadJSON(config.json_url, this.bootContinued.bind(this));\n }", "function Burnisher () {}", "function init () {\n // Here below all inits you need\n }", "onBoot() {}", "function boot() {\n config();\n\n require([\"app\", \"modules/common/histogram\",\n \"modules/common/listTab\",\n \"modules/common/list\",\n \"modules/common/modal\",\n \"modules/common/region\",\n \"modules/common/iconbutton\",\n \"modules/common/togglebutton\",\n \"modules/common/toggleiconbutton\",\n \"modules/common/nativehtml\",\n \"modules/common/textArea\",\n \"modules/common/codeArea\",\n \"modules/common/gradient\",\n \"modules/common/color\"\n ], function (app) {\n app.start();\n })\n }", "bootstrap() {\n this._initHelmet();\n this._initCompress();\n this._initCookieParser();\n this._initCors();\n this._initJsonParser();\n this._initMethodOverride();\n\n return this;\n }", "function initialise(){\n\n $('.tooltipped').tooltip({delay: 50});\n $('.modal').modal();\n $('.carousel.carousel-slider').carousel({fullWidth: true});\n // initMap();\n\n }", "function init() {\n //UH HUH, THIS MY SHIT!\n }", "function view_get_started_with_bitly_brand_tools_init() {\n\t\t\n\t\t$(window).scroll(function () { \n\t\t\t\n\t\t});\n\t\t\n\t\t$(window).resize(function () { \n\t\t\t\n\t\t});\n\t\t\n\t\t// Setup Carousel for Bitly Values\n\t\t\n\t\t$(\"#page-home-trust-quotes\").carousel({\n\t\t\t\n\t\t\tspeed\t\t\t\t\t\t\t:\t8000,\n\t\t\tclass_active\t\t\t\t\t:\t'active',\n\t\t\tclass_inactive\t\t\t\t\t:\t'inactive',\n\t slide_animate_callback\t\t\t:\tfunction(){},\n\t\t\tnavigation_option_previous\t\t:\tnull,\n\t\t\tnavigation_option_next\t\t\t:\tnull,\n\t pagination\t\t\t\t\t\t:\tfalse,\n\t pagination_navigation\t\t\t:\tfalse,\n\t\t\tchild_selector\t\t\t\t\t:\t'.page-home-trust-quote'\n\t \n\t\t});\n\t\t\n\t}", "function bootstrapModule(id, factory) {\n //console.log('bootstrapModule', id, factory);\n\n if (!dependencies.hasOwnProperty(id)) {\n return;\n }\n \n dependencies[id].factory = factory;\n \n for (id in dependencies) {\n if (dependencies.hasOwnProperty(id)) {\n // this causes the function to exit if there are any remaining\n // scripts loading, on the first iteration. consider it\n // equivalent to an array length check\n if (typeof dependencies[id].factory === \"undefined\") {\n //console.log('waiting for', id);\n return;\n }\n }\n }\n\n // if we get past the for loop, bootstrapping is complete. get rid\n // of the bootstrap function and proceed.\n delete global.bootstrap;\n\n // Restore inital Boostrap\n if (initalBoostrap) {\n global.bootstrap = initalBoostrap; \n }\n\n // At least bootModule in order\n var mrPromise = bootModule(\"promise\").Promise,\n miniURL = bootModule(\"mini-url\"),\n mrRequire = bootModule(\"require\");\n\n callback(mrRequire, mrPromise, miniURL);\n }", "function boot()\n {\n\t// scriptweeder ui's iframe, don't run in there !\n\tif (in_iframe() && window.name == 'scriptweeder_iframe')\t// TODO better way of id ?\n\t return;\n\tif (location.hostname == \"\")\t// bad url, opera's error page. \n\t return;\n\tassert(typeof GM_getValue == 'undefined', // userjs_only\n\t \"needs to run as native opera UserJS, won't work as GreaseMonkey script.\");\n\tif (window.opera.scriptweeder && window.opera.scriptweeder.version_type == 'extension')\t\t// userjs_only\n\t{\n\t my_alert(\"ScriptWeeder extension detected. Currently it has precedence, so UserJS version is not needed.\");\n\t return;\n\t}\n\t\n\tsetup_event_handlers();\n\twindow.opera.scriptweeder = new Object();\t// external api\n\twindow.opera.scriptweeder.version = version_number;\n\twindow.opera.scriptweeder.version_type = version_type;\t\n\tdebug_log(\"start\");\t\n }", "function AlertBootstrap()\n{\n alert(\"You are going to use the bootstrapping procedure which may take a long time to compute.\\nNotice that the ALRT statistic test is much faster to compute and will return the exact same tree with statistical evaluation of branch support values very close to bootstrap ones.\\nWe strongly recommend to use the ALRT test for the explorative phase, and only use bootstrap for the final publishing tree.\");\n}", "setMeAsBootstrap() {\n this.config.is_bootstrap_node = true;\n // TODO: save storage.\n this.restartNode();\n }", "_boot(){\r\n\t\tvar core = this;\r\n\t\tif(core._app_conf._template_dir != -1){\r\n\t\t\t\tcore._app_initialized = true;\r\n\t\t} else {\r\n\t\t\t\tcore._rest(\"POST\", core._app_conf._api_url, [[\"api\", \"template_get_dir\"]], core._app_conf, \"_template_dir\");\r\n\r\n\t\t\t// Wait until all the config variables are all retrieved\r\n\t\t\tvar _tmpVarCheck = setInterval(function(){\r\n\r\n\t\t\t\tif(core._app_verbose) console.log(\"Initializing application...\");\r\n\t\t\t\tif(core._app_conf._template_dir != -1){\r\n\t\t\t\t\tcore._app_initialized = true;\r\n\t\t\t\t\tclearInterval(_tmpVarCheck);\r\n\t\t\t\t}\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}", "function bootstrapWarehouse()\n\t{\n\t\tvar _instance;\n\t\t\n\t\t return {\n\t instance: function (config) {\n\t \n\t \t if(_instance==null) {\n\t \t \t\n\t \t \t_instance = new warehouseClass(config);\n\t \t \t\n\t \t }\n\t \t \n\t \t return _instance;\n\t \t\n\t }\n\t };\n\t}", "boot() {\n\t\tthis.createPolicies();\n\t\tthis.bootDefaultControllers();\n\t\tthis.loadCommands([\n\t\t\tMakeControllerCommand,\n\t\t\tServeCommand\n\t\t]);\n\t}", "function buildBootstrap () {\n\tvar basePath = './node_modules/bootstrap/dist/',\n\t\toutFolder = './app/lib/bootstrap/';\n\n gulp.src([basePath + 'css/bootstrap.css', basePath + 'css/bootstrap-theme.css'])\n .pipe(sourcemaps.init({loadMaps : true}))\n .pipe(sourcemaps.write('./'))\n .pipe(gulp.dest(outFolder + 'css'));\n\n gulp.src(basePath + 'js/bootstrap.js', {base: basePath})\n \t.pipe(gulp.dest(outFolder));\n\n gulp.src(basePath + 'fonts/*').pipe(gulp.dest(outFolder + 'fonts'));\n}", "function init() {\n\n\t\t\t// WOW일때 컬러칩 active 안 되는 경우 처리\n\t\t\tif( $('.layout-2 #selectColor').length > 0 && $('.layout-2 #selectColor .active').length == 0 ){\n\t\t\t\t$('.layout-2 #selectColor').find('.swatch').first().addClass('active');\n\t\t\t}\n\n\t\t\tnew ss.PDPStandard.PDPFeaturesController();\n\t\t\tnew ss.PDPStandard.PDPAccessories();\n\n\t\t\tnew ss.PDPStandard.PDPThreeSixty();\n\t\t\tnew ss.PDPStandard.PDPGallery();\n\t\t\t//new ss.PDPStandard.PDPKeyVisual();\n\n\t\t\tif ($('.media-module').find('.sampleimages').length > 0) {\n\t\t\t\tnew ss.PDPStandard.PDPSampleImages();\n\t\t\t}\n\n\t\t\tcurrentMetrics = ss.metrics;\n\n\t\t\tbindEvents();\n\t\t\theroSize();\n\t\t\tthrottleCarousel();\n\n\t\t\tnew ss.PDPStandard.PDPCommon();\n\t\t\tnew ss.PDPStandard.PDPeCommerceWOW();\n\t\t\tss.PDPStandard.optionInitWOW();\n\t\t}", "init()\n { \n // Navbar\n this.navbar = new Navbar('#header .navbar');\n\n // Modal\n this.modal = new Modal('#kp-modal');\n\n // Input autofill detection\n $('input').on('animationstart', onAnimationStart, false);\n\n // Dismiss notices\n $('.form-error button, .form-notice button').on('click',function(e){\n $(this).parent().fadeOut().remove();\n });\n\n // Initialize video players\n $('.kp-video').each(function(i,v){\n new Player(i,v);\n });\n\n // Initialize galleries\n $('.kp-gallery').each(function(i,v){\n new Gallery(i,v);\n });\n\n $('a#clip-download').on('click', this.onClipDownloadClick.bind(this) );\n\n }", "initialise () {}", "bootUp() {\n // get all functuions of screen class\n // put all heroes in screen/visible\n this.screen.updateImages(this.earlyHeroes)\n // bind(this) -> force screen to use THIS of the GameManager\n this.screen.configurePlayButton(this.play.bind(this))\n this.screen.configureVerifySelectionButton(this.verifySelection.bind(this))\n }", "bootContinued () {\n\n this.router = new Router(this.model.sections);\n this.router.on('ROUTE_CHANGE', this.on_ROUTE_CHANGE.bind(this));\n\n this.menu = new Menu(this.model.sections, this.router.getRoute());\n this.menu.on('MENU_SELECT', this.router.navigate.bind(this.router));\n\n this.sectionsController = new SectionsController(this.model.sections);\n this.sectionsController.on('PRELOAD_ENTER', this.on_PRELOAD_ENTER.bind(this));\n this.sectionsController.on('PRELOAD_EXIT', this.on_PRELOAD_EXIT.bind(this));\n this.sectionsController.changeSection(this.router.getRoute());\n\n // passed manually to children: top to bottom.\n window.addEventListener('resize', this.on_RESIZE.bind(this));\n }", "function salientPageBuilderElInit() {\r\n\t\t\t\t\tflexsliderInit();\r\n\t\t\t\t\tsetTimeout(flickityInit, 100);\r\n\t\t\t\t\ttwentytwentyInit();\r\n\t\t\t\t\tstandardCarouselInit();\r\n\t\t\t\t\tproductCarouselInit();\r\n\t\t\t\t\tclientsCarouselInit();\r\n\t\t\t\t\tcarouselfGrabbingClass();\r\n\t\t\t\t\tsetTimeout(tabbedInit, 60);\r\n\t\t\t\t\taccordionInit();\r\n\t\t\t\t\tlargeIconHover();\r\n\t\t\t\t\tnectarIconMatchColoring();\r\n\t\t\t\t\tcoloredButtons();\r\n\t\t\t\t\tteamMemberFullscreen();\r\n\t\t\t\t\tflipBoxInit();\r\n\t\t\t\t\towlCarouselInit();\r\n\t\t\t\t\tmouseParallaxInit();\r\n\t\t\t\t\tulCheckmarks();\r\n\t\t\t\t\tmorphingOutlinesInit();\r\n\t\t\t\t\tcascadingImageInit();\r\n\t\t\t\t\timageWithHotspotEvents();\r\n\t\t\t\t\tpricingTableHeight();\r\n\t\t\t\t\tpageSubmenuInit();\r\n\t\t\t\t\tnectarLiquidBGs();\r\n\t\t\t\t\tnectarTestimonialSliders();\r\n\t\t\t\t\tnectarTestimonialSlidersEvents();\r\n\t\t\t\t\trecentPostsTitleOnlyEqualHeight();\r\n\t\t\t\t\trecentPostsInit();\r\n\t\t\t\t\tparallaxItemHoverEffect();\r\n\t\t\t\t\tfsProjectSliderInit();\r\n\t\t\t\t\tpostMouseEvents();\r\n\t\t\t\t\tmasonryPortfolioInit();\r\n\t\t\t\t\tmasonryBlogInit();\r\n\t\t\t\t\tportfolioCustomColoring();\r\n\t\t\t\t\tsearchResultMasonryInit();\r\n\t\t\t\t\tstickySidebarInit();\r\n\t\t\t\t\tportfolioSidebarFollow();\r\n\t\t\t\t}", "function init() {\n\n\n\n\t}", "function BootstrapThemeroller(){\n\t/*\n\t *check if less variables are provided in url #, if yes, then reload the style\n\t */\n\tthis.initTheme = function(){\n\t\tvar lessKeyValStringArray = location.hash.substring(1).split('&');\n\t\tvar lessKeyValStringArraySize = lessKeyValStringArray.length;\n\n\t\tfor(keyValStrinIndex=0;keyValStrinIndex<lessKeyValStringArraySize;keyValStrinIndex++){\n\t\t\tlessKeyValPair = lessKeyValStringArray[keyValStrinIndex].split('=');\n\t\t\tif(lessKeyValPair.length==2){\n\t\t\t\tvar selector = '[less-var=\"'+lessKeyValPair[0]+'\"]';\n\t\t\t\t$(selector).val(lessKeyValPair[1]).change();\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.getUpdatedLessVars = function(){\n\t\tvar finalLessMap = {};\n\t\t$('[themeroller=\"true\"] , .input-append.color input').each(function(index){\n\t\t var val = $(this).val();\n\t\t var lessVar = $(this).attr('less-var');\n\t\t\t \n\t\t if($.trim(val)!=''){\n\t\t\tfinalLessMap[lessVar] = val;\n\t\t }\n\t\t});\n\t\treturn finalLessMap;\n\t};\n\n\tthis.updateUrl = function(){\n\t\t\tvar finalLessMap = this.getUpdatedLessVars();\n\t\t\tvar lessString ='';\n\t\t\tfor(key in finalLessMap){\n\t\t\t\tlessString += key+ '='+finalLessMap[key]+'&';\n\n\t\t\t}\n\t\t\tlocation.hash = lessString;\n\t};\n\tthis.downloadTheme = function(){\n\t\t\tvar finalLessMap = themeRoller.getUpdatedLessVars();\n\t\t\tvar css = [\"reset.less\",\"scaffolding.less\",\"grid.less\",\"layouts.less\",\"type.less\",\"code.less\",\"labels-badges.less\",\"tables.less\",\"forms.less\",\"buttons.less\",\"sprites.less\",\"button-groups.less\",\"navs.less\",\"navbar.less\",\"breadcrumbs.less\",\"pagination.less\",\"pager.less\",\"thumbnails.less\",\"alerts.less\",\"progress-bars.less\",\"hero-unit.less\",\"tooltip.less\",\"popovers.less\",\"modals.less\",\"dropdowns.less\",\"accordion.less\",\"carousel.less\",\"wells.less\",\"close.less\",\"utilities.less\",\"component-animations.less\",\"responsive-utilities.less\",\"responsive-767px-max.less\",\"responsive-768px-979px.less\",\"responsive-1200px-min.less\",\"responsive-navbar.less\"]\n\t\t\t, js = [\"bootstrap-transition.js\",\"bootstrap-modal.js\",\"bootstrap-dropdown.js\",\"bootstrap-scrollspy.js\",\"bootstrap-tab.js\",\"bootstrap-tooltip.js\",\"bootstrap-popover.js\",\"bootstrap-alert.js\",\"bootstrap-button.js\",\"bootstrap-collapse.js\",\"bootstrap-carousel.js\",\"bootstrap-typeahead.js\"]\n\t\t\t, vars = finalLessMap\n\t\t\t, img = [\"glyphicons-halflings.png\",\"glyphicons-halflings-white.png\"];\n\t\t\t\n\t\t\t\n\t\t\t$.ajax({\n\t\t\ttype: 'POST'\n\t\t , url: 'http://bootstrap.herokuapp.com'\n\t\t , dataType: 'jsonpi'\n\t\t , params: {\n\t\t\t js: js\n\t\t\t, css: css\n\t\t\t, vars: vars\n\t\t\t, img: img\n\t\t }\n\t\t })\n\t\t};\n\n\tthis.updateColorPicker = function(){\n\t\t var val = $(this).val();\n\t\t var lessVar = $(this).attr('less-var');\n\t\t \n\t\t var parentEle = $(this).parent();\n\t\t if($.trim(val)==''){\n\t\t\tval = parentEle.attr('data-color');\n\t\t }\n\t\t\tvar colorpicker = parentEle.data('colorpicker');\n\t\t\tcolorpicker.update(val);\n\t\t\tvar lessMap = {};\n\t\t\tlessMap[lessVar] = val;\n\t\t\tless.modifyVars(lessMap);\n\t\t\tthemeRoller.updateUrl();\n\t };\n\tthis.updateTextFields = function(){\n\t\t var val = $(this).val();\n\t\t var lessVar = $(this).attr('less-var');\n\t\t\t \n\t\t if($.trim(val)==''){\n\t\t\tval = $(this).attr('placeholder');\n\t\t }\n\t\t\t\n\t\t\tvar lessMap = {};\n\t\t\tlessMap[lessVar] = val;\n\t\t\tless.modifyVars(lessMap);\n\t\t\tthemeRoller.updateUrl();\n\t };\n\t\n}", "function initBlacksmith(){\n\tupdateBlacksmith();\n}", "function modules() {\n // Bootstrap JS \n var bootstrapJS = gulp.src('./node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/js/*')\n .pipe(gulp.dest(paths.vendor + '/bootstrap/js'));\n\n // Bootstrap Select\n var bootstrapSelectJS = gulp.src('./node_modules/bootstrap-select/dist/js/*')\n .pipe(gulp.dest(paths.vendor + '/bootstrap-select/js'));\n var bootstrapSelectCSS = gulp.src('./node_modules/bootstrap-select/dist/css/*')\n .pipe(gulp.dest(paths.vendor + '/bootstrap-select/css'));\n\n // Bokeh\n var bokehJS = gulp.src('./node_modules/@bokeh/bokehjs/build/js/bokeh.min.js')\n .pipe(gulp.dest(paths.vendor + '/bokehjs'));\n\n // SB Admin 2 Bootstrap template\n var bootstrapSbAdmin2 = gulp.src([\n './node_modules/startbootstrap-sb-admin-2/js/*.js',\n './node_modules/startbootstrap-sb-admin-2/css/*.css'\n ]).pipe(gulp.dest(paths.vendor + '/startbootstrap-sb-admin-2'));\n\n // Bootstrap4 toggle\n var bootstrap4toggle = gulp.src([\n './node_modules/bootstrap4-toggle/js/*.js',\n './node_modules/bootstrap4-toggle/css/*.css'\n ]).pipe(gulp.dest(paths.vendor + '/bootstrap4-toggle'));\n\n // dataTables\n var dataTables = gulp.src([\n './node_modules/datatables.net/js/*.js',\n './node_modules/datatables.net-bs4/js/*.js',\n './node_modules/datatables.net-bs4/css/*.css'\n ])\n .pipe(gulp.dest(paths.vendor + '/datatables'));\n\n // dataTables-buttons\n var dataTablesButtons = gulp.src([\n './node_modules/datatables.net-buttons/js/*.js',\n './node_modules/datatables.net-buttons-bs4/js/*.js',\n './node_modules/datatables.net-buttons-bs4/css/*.css'\n ])\n .pipe(gulp.dest(paths.vendor + '/datatables-buttons'));\n\n // Font Awesome\n var fontAwesome = gulp.src('./node_modules/@fortawesome/**/*')\n .pipe(gulp.dest(paths.vendor + ''));\n\n // jQuery Easing\n var jqueryEasing = gulp.src('./node_modules/jquery.easing/*.js')\n .pipe(gulp.dest(paths.vendor + '/jquery-easing'));\n\n // jQuery\n var jquery = gulp.src([\n './node_modules/jquery/dist/*',\n '!./node_modules/jquery/dist/core.js'\n ])\n .pipe(gulp.dest(paths.vendor + '/jquery'));\n\n // jszip\n var jszip = gulp.src([\n './node_modules/jszip/dist/*.js',\n ])\n .pipe(gulp.dest(paths.vendor + '/jszip'));\n\n // d3 celestial\n var d3Celestial = gulp.src([\n './node_modules/d3-celestial/celestial*.js',\n './node_modules/d3-celestial/lib/d3*.js'\n ])\n .pipe(gulp.dest(paths.vendor + '/d3-celestial'));\n var d3CelestialData = gulp.src('./node_modules/d3-celestial/data/*.json')\n .pipe(gulp.dest(paths.vendor + '/d3-celestial/data'));\n var d3CelestialImage = gulp.src('./node_modules/d3-celestial/images/*')\n .pipe(gulp.dest(paths.cssDir + '/images'));\n\n // particles.js\n var particlesJs = gulp.src('./node_modules/particles.js/particles.js')\n .pipe(gulp.dest(paths.vendor + '/particles.js'));\n\n // PrismJs\n var prismJs = gulp.src('./node_modules/prismjs/prism.js')\n .pipe(gulp.dest(paths.vendor + '/prismjs'));\n var prismJsYaml = gulp.src('./node_modules/prismjs/components/prism-yaml.min.js')\n .pipe(gulp.dest(paths.vendor + '/prismjs'));\n var prismJsLineNum = gulp.src('./node_modules/prismjs/plugins/line-numbers/prism-line-numbers.min.js')\n .pipe(gulp.dest(paths.vendor + '/prismjs/line-numbers'));\n var prismJsCss = gulp.src('./node_modules/prismjs/themes/prism.css')\n .pipe(gulp.dest(paths.vendor + '/prismjs'));\n var prismJsLineNumCss = gulp.src('./node_modules/prismjs/plugins/line-numbers/prism-line-numbers.css')\n .pipe(gulp.dest(paths.vendor + '/prismjs/line-numbers'));\n\n return merge(bootstrapJS, bootstrapSbAdmin2, bootstrap4toggle, bokehJS, dataTables, dataTablesButtons, fontAwesome, jquery, jqueryEasing, jszip, d3Celestial, d3CelestialData, d3CelestialImage, particlesJs, prismJs, prismJsYaml, prismJsLineNum, prismJsCss, prismJsLineNumCss);\n}", "function startup(aData, aReason) {\n\tconsole.log('startup');\n\t\n\tselfPath = aData.resourceURI.spec; //has final slash at end so for use use as: \"aData.resourceURI.spec + 'bootstrap.js'\" this gets the bootstrap file //note the final slash being a backward \"/\" is very important\n\t\n\twindowListener.register();\n\tregisterAbout();\n\t\n\t//note: if you had any about:xpiler tabs open, you must reload them for it to use the updated stuff\n\t\n\tconsole.log('startup finished');\n}", "bootstrapKiosk() {\n this.loading = 'Bootstrapping application...';\n if (this.active_building && this.active_level) {\n if (localStorage) {\n localStorage.setItem('KIOSK.building', this.active_building.id);\n localStorage.setItem('KIOSK.level', this.active_level.id);\n if (this.active_rotation) {\n localStorage.setItem('KIOSK.orientation', this.active_rotation.value);\n }\n if (this.active_location) {\n localStorage.setItem('KIOSK.location', `${this.active_location.id}`);\n }\n }\n this._router.navigate(['/welcome']);\n }\n this.loading = null;\n }", "function init() {\n\t \t\n\t }", "init() {\n }", "function init() {\n\t\tmasonryConfig();\n\t\towlCarouselConfig();\n\t\tisotopeConfig();\n\t\tmagnificPopupConfig() \n\t\tcontactValidateConfig()\n\t\tparallaxEffect();\n\t\tinternalMenu();\n\t\tflipMenuInit()\n\t}", "function setupDefault() {\n}", "function _setup () {\n }", "function initialize() {\r\n\r\n \t}", "function bootstrap(module) {\n requestMediaDevice()\n .then(success)\n .catch(cameraError);\n\n // Load models and create a scenes for them\n if (navigator.mediaDevices.getUserMedia) {\n modelScenes = new Model3DScene(animationMixers);\n }\n\n function success(stream) {\n updateSaver();\n const video = document.getElementById('video');\n video.srcObject = stream;\n video.onloadedmetadata = () => {\n VIDEO_WIDTH = video.videoWidth;\n VIDEO_HEIGHT = video.videoHeight;\n calculateCameraScale();\n\n frameCaptureCanvas.width = VIDEO_WIDTH;\n frameCaptureCanvas.height = VIDEO_HEIGHT;\n video.play();\n init(module);\n };\n }\n\n function cameraError(err) {\n console.error(err);\n updateSaver(\"cameraError\");\n }\n}", "function setupBootstrapTooltips() {\n\t$('[data-toggle=\"tooltip\"]').tooltip({\n\t\tcontainer: 'body'\n\t});\n}", "function init() {\n distributeSpace();\n $(window).on('resize', distributeSpace);\n $(document)\n .on('pagechange', distributeSpace)\n .on('sidebar-event', distributeSpace)\n .on('servicesEvent', distributeSpace)\n .on('shown.bs.collapse', distributeSpace)\n .on('hidden.bs.collapse', distributeSpace);\n }", "async boot() {\n try {\n this.shutdownManager = new shutDownManager_1.ShutdownManager({ finUUID: this.finUUID, manifest: this.manifest });\n this.serviceLauncher = new serviceLauncher_1.ServiceLauncher({ finUUID: this.finUUID, manifest: this.manifest, shutdownManager: this.shutdownManager });\n window.bootEngine = this.bootEngine = new bootEngine_1.BootEngine(this.manifest, this.serviceLauncher, this.shutdownManager);\n this.registerBootTasks(this.bootEngine, this.manifest, this.serviceLauncher);\n this.bootEngine.run();\n }\n catch (err) {\n systemLog_1.default.error({ leadingBlankLine: true }, err);\n }\n }", "function bootstrap() {\n var url = window.location.href,\n tmp_constructor,\n root_gadget,\n declare_method_count = 0,\n embedded_channel,\n notifyReady,\n notifyDeclareMethod,\n gadget_ready = false;\n\n\n // Create the gadget class for the current url\n if (gadget_model_dict.hasOwnProperty(url)) {\n throw new Error(\"bootstrap should not be called twice\");\n }\n loading_gadget_promise = new RSVP.Promise(function (resolve, reject) {\n if (window.self === window.top) {\n // XXX Copy/Paste from declareGadgetKlass\n tmp_constructor = function () {\n RenderJSGadget.call(this);\n };\n tmp_constructor.declareMethod = RenderJSGadget.declareMethod;\n tmp_constructor.ready_list = [];\n tmp_constructor.ready = RenderJSGadget.ready;\n tmp_constructor.prototype = new RenderJSGadget();\n tmp_constructor.prototype.constructor = tmp_constructor;\n tmp_constructor.prototype.path = url;\n gadget_model_dict[url] = tmp_constructor;\n\n // Create the root gadget instance and put it in the loading stack\n root_gadget = new gadget_model_dict[url]();\n\n } else {\n // Create the communication channel\n embedded_channel = Channel.build({\n window: window.parent,\n origin: \"*\",\n scope: \"renderJS\"\n });\n // Create the root gadget instance and put it in the loading stack\n tmp_constructor = RenderJSEmbeddedGadget;\n root_gadget = new RenderJSEmbeddedGadget();\n\n // Bind calls to renderJS method on the instance\n embedded_channel.bind(\"methodCall\", function (trans, v) {\n root_gadget[v[0]].apply(root_gadget, v[1]).then(function (g) {\n trans.complete(g);\n }).fail(function (e) {\n trans.error(e.toString());\n });\n trans.delayReturn(true);\n });\n\n // Notify parent about gadget instanciation\n notifyReady = function () {\n if ((declare_method_count === 0) && (gadget_ready === true)) {\n embedded_channel.notify({method: \"ready\"});\n }\n };\n\n // Inform parent gadget about declareMethod calls here.\n notifyDeclareMethod = function (name) {\n declare_method_count += 1;\n embedded_channel.call({\n method: \"declareMethod\",\n params: name,\n success: function () {\n declare_method_count -= 1;\n notifyReady();\n },\n error: function () {\n declare_method_count -= 1;\n }\n });\n };\n\n notifyDeclareMethod(\"getInterfaceList\");\n notifyDeclareMethod(\"getRequiredCSSList\");\n notifyDeclareMethod(\"getRequiredJSList\");\n notifyDeclareMethod(\"getPath\");\n notifyDeclareMethod(\"getTitle\");\n\n // Surcharge declareMethod to inform parent window\n tmp_constructor.declareMethod = function (name, callback) {\n var result = RenderJSGadget.declareMethod.apply(\n this,\n [name, callback]\n );\n notifyDeclareMethod(name);\n return result;\n };\n }\n\n gadget_loading_klass = tmp_constructor;\n\n function init() {\n // XXX HTML properties can only be set when the DOM is fully loaded\n var settings = renderJS.parseGadgetHTMLDocument(document),\n j,\n key;\n for (key in settings) {\n if (settings.hasOwnProperty(key)) {\n tmp_constructor.prototype[key] = settings[key];\n }\n }\n tmp_constructor.template_element = document.createElement(\"div\");\n root_gadget.element = document.body;\n for (j = 0; j < root_gadget.element.childNodes.length; j += 1) {\n tmp_constructor.template_element.appendChild(\n root_gadget.element.childNodes[j].cloneNode(true)\n );\n }\n RSVP.all([root_gadget.getRequiredJSList(),\n root_gadget.getRequiredCSSList()])\n .then(function (all_list) {\n var i,\n js_list = all_list[0],\n css_list = all_list[1],\n queue;\n for (i = 0; i < js_list.length; i += 1) {\n javascript_registration_dict[js_list[i]] = null;\n }\n for (i = 0; i < css_list.length; i += 1) {\n stylesheet_registration_dict[css_list[i]] = null;\n }\n gadget_loading_klass = undefined;\n queue = new RSVP.Queue();\n function ready_wrapper() {\n return root_gadget;\n }\n queue.push(ready_wrapper);\n for (i = 0; i < tmp_constructor.ready_list.length; i += 1) {\n // Put a timeout?\n queue.push(tmp_constructor.ready_list[i]);\n // Always return the gadget instance after ready function\n queue.push(ready_wrapper);\n }\n queue.push(resolve, function (e) {\n reject(e);\n throw e;\n });\n return queue;\n }).fail(function (e) {\n console.warn(e);\n reject(e);\n });\n }\n document.addEventListener('DOMContentLoaded', init, false);\n });\n\n if (window.self !== window.top) {\n // Inform parent window that gadget is correctly loaded\n loading_gadget_promise.then(function () {\n gadget_ready = true;\n notifyReady();\n }).fail(function (e) {\n console.warn(e);\n embedded_channel.notify({method: \"failed\", params: e.toString()});\n throw e;\n });\n }\n\n }", "initializing() {\n // Have Yeoman greet the user.\n this.log(chalk.bold.green(`JHipster db-helper generator v${packagejs.version}`));\n\n // note : before this line we can't use jhipsterVar or jhipsterFunc\n this.composeWith('jhipster:modules',\n { jhipsterVar, jhipsterFunc },\n this.options.testmode ? { local: require.resolve('generator-jhipster/generators/modules') } : null\n );\n }", "function bootstrapForTest() {\n var tasks = [];\n\n //Define the tasks in order of execution\n tasks.push(createSuperAdminUserIfDoesNotExist);\n\n async.series(tasks, function () {\n log.info(\"Finished executing Bootstrap for 'test'\");\n });\n}", "function InitializeBDSServiceSwitchs() {\n $(\"[id*=chkDecision]\").bootstrapSwitch({\n onText: 'Yes',\n offText: 'No',\n onSwitchChange: OnChangeDecisionSwitchEvent\n });\n\n $(\"[id*=chkAllocate]\").bootstrapSwitch({\n onText: 'Yes',\n offText: 'No',\n onSwitchChange: OnChangeAllocateSwitch\n });\n\n $(\"[id*=chkClose]\").bootstrapSwitch({\n onText: 'Yes',\n offText: 'No',\n onSwitchChange: OnChangeCloseSwitch\n });\n}", "boot() {\n\t\tthis.createPolicies();\n\t\tthis.loadAppModelFactories();\n\t\tthis.loadCommands([\n\t\t\tMakeFactoryCommand,\n\t\t\tMakeMigrationCommand,\n\t\t\tMakeModelCommand,\n\t\t\tMakeSeederCommand,\n\t\t\tMigrateCommand,\n\t\t\tMigrateFreshCommand,\n\t\t\tMigrateRefreshCommand,\n\t\t\tMigrateRollbackCommand,\n\t\t\tMigrateStatusCommand,\n\t\t\tSeedCommand\n\t\t]);\n\t}", "function bootstrap({\n router,\n store,\n i18n,\n message\n}) {\n // Set application configuration\n setAppOptions({\n router,\n store,\n i18n\n })\n // Load route\n loadRoutes()\n // Load routing guard\n loadGuards(guards, {\n router,\n store,\n i18n,\n message\n })\n}", "function main() {\n buildNavbar();\n $(\"body\").append($(\"<div>\").addClass(\"container\").attr(\"id\", \"mainContainer2\"));\n createJumboTron();\n $(\"body\").append($(\"<div>\").addClass(\"container h-100 scrollspy\").attr(\"id\", \"mainContainer\"));\n buildMoviePage();\n\n }", "function init () {\n\n}", "function setup() {}", "init(){\n \n }", "function sprinkles() {\n\n\t}", "setup() {}", "setup() {}", "setup() {}", "function init() {\n \n\n}", "function init() {}", "function init() {}", "function init() {}", "function init() {}", "function init() {}", "function init() {}", "function init() {}", "function init() {}", "function init() {}", "function init() {}", "init() {\n\n }" ]
[ "0.75630903", "0.7146837", "0.70061165", "0.6960796", "0.6950936", "0.69363064", "0.68807197", "0.6859073", "0.6853958", "0.6784157", "0.67627156", "0.6759388", "0.6759388", "0.67141604", "0.6639376", "0.6639376", "0.6639376", "0.65785366", "0.65192395", "0.6483056", "0.6394365", "0.6326506", "0.6317948", "0.6310802", "0.6299937", "0.62574726", "0.62223184", "0.6213668", "0.61868316", "0.61556447", "0.6065646", "0.60641456", "0.6047227", "0.6042053", "0.6032035", "0.599828", "0.5948227", "0.59109807", "0.59094286", "0.59093434", "0.59009033", "0.5865007", "0.5818079", "0.5794332", "0.57941926", "0.5753419", "0.5739512", "0.57346076", "0.5719287", "0.5711672", "0.5702775", "0.5691699", "0.56832355", "0.5681383", "0.5680741", "0.56731534", "0.56729805", "0.56570435", "0.56499773", "0.5636112", "0.56324244", "0.5617501", "0.56159914", "0.56149864", "0.5604877", "0.5597281", "0.55943716", "0.55932975", "0.5588774", "0.558141", "0.55729365", "0.55713034", "0.55695826", "0.55685866", "0.5566721", "0.5560691", "0.5551654", "0.5550445", "0.55469483", "0.5544261", "0.5534025", "0.5531607", "0.5523035", "0.55228436", "0.5514668", "0.5507226", "0.55024165", "0.55024165", "0.55024165", "0.54974616", "0.5496614", "0.5496614", "0.5496614", "0.5496614", "0.5496614", "0.5496614", "0.5496614", "0.5496614", "0.5496614", "0.5496614", "0.5493847" ]
0.0
-1
= QLL System menu =
function qll_system_menu() { menu = document.createElement("div"); menu.setAttribute('id','QLLSMenu'); menu.setAttribute('name','QLLSMenu'); document.getElementsByTagName("body")[0].appendChild(menu); h = document.createElement("div"); h.setAttribute('id','QLLSMenuHolder_open'); h.setAttribute('class','QLLSMenuHolder'); h.innerHTML= '<div class="QLLSMenuMHeader" id="QLLSMenuMHeader_open">'+qll_lang[5]+'</div><div class="QLLSMenuContainer" id="QLLSMenuContainer_open"><div class="QLLSMenuHeader" id="QLLSMenuHeader_open">'+qll_lang[5]+'</div></div>'; h.setAttribute('onmouseover','document.getElementById("QLLSMenuContainer_open").setAttribute("style","display:block;");'); h.setAttribute('onmouseout','document.getElementById("QLLSMenuContainer_open").setAttribute("style","display:none;");'); menu.appendChild(h); $("#QLLSMenuHeader_open").click(qll_menu); ch = Number(document.getElementById("QLLSMenuContainer_open").offsetHeight)+5; if(window.innerHeight-60 < ch) ch = Number(Number(window.innerHeight)-60); GM_addStyle("#QLLSMenuContainer_open {height:"+ch+"px;}"); $("#QLLSMenuContainer_open").hide(); h = document.createElement("div"); h.setAttribute('id','QLLSMenuHolder_info'); h.setAttribute('class','QLLSMenuHolder'); h.innerHTML= '<div class="QLLSMenuMHeader" id="QLLSMenuMHeader_info">'+qll_lang[82]+'</div><div class="QLLSMenuContainer" id="QLLSMenuContainer_info"><div class="QLLSMenuHeader" id="QLLSMenuHeader_info">'+qll_lang[82]+'</div></div>'; h.setAttribute('onmouseover','document.getElementById("QLLSMenuContainer_info").setAttribute("style","display:block;");'); h.setAttribute('onmouseout','document.getElementById("QLLSMenuContainer_info").setAttribute("style","display:none;");'); menu.appendChild(h); info = document.getElementById('QLLSMenuContainer_info'); info.innerHTML = info.innerHTML + '<a class="QLLSMenuElement" id="QLLSMenuElement_changelog" href="#QLLSMenu">'+qll_lang[18]+'</a> \ <a class="QLLSMenuElement" href="http://www.erepublik.com/en/newspaper/186857/1" target="_blank">'+qll_lang[83]+'</a> \ <a class="QLLSMenuElement" href="http://economy.erepublik.com/en/citizen/donate/1376818" target="_blank">'+qll_lang[84]+'</a>'; $("#QLLSMenuElement_changelog").click(function(){qll_fun_showDisplayBox(qll_lang[18], qll_serverURI + '/changelog', true);}); ch = Number(document.getElementById("QLLSMenuContainer_info").offsetHeight)+5; if(window.innerHeight-60 < ch) ch = Number(Number(window.innerHeight)-60); GM_addStyle("#QLLSMenuContainer_info {height:"+ch+"px;}"); $("#QLLSMenuContainer_info").hide(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function help_menu() {\n console.log('Please use one of the following commands:')\n console.log('Summary: ./pandlss.sh -s <date> <time>')\n console.log('Breakdown: ./pandlss.sh -b <date> <time> <increment>')\n console.log('Breakdown one stock: ./pandlss.sh -b-os <stock> <date> <time> <increment>')\n}", "function menuOptions() {}", "function muSystem () {\n\t\treturn menus;\n\t}", "function printMenu() {\n console.log(\"\\n<====== PENDAFATARAN SISWA BARU ======>\");\n console.log(\"<====== SMKN 1 RPL ======>\");\n console.log(\"\\n<====== Menu ======>\");\n console.log(\"1. Registrasi\");\n console.log(\"2. Input Nilai\");\n console.log(\"3. Lihat Profil\");\n console.log(\"4. Informasi Kelulusan\");\n console.log(\"5. keluar\");\n }", "function displayMenu() {\n \"use strict\";\n window.console.log(\"Welcome to the Product Inventory Management System\");\n window.console.log(\"\");\n window.console.log(\"COMMAND MENU\");\n window.console.log(\"view - view all products\");\n window.console.log(\"update - update stock\");\n window.console.log(\"exit - exit the program\");\n window.console.log(\"\");\n}", "function initializeMenu() {\n robotMenu = Menus.addMenu(\"Robot\", \"robot\", Menus.BEFORE, Menus.AppMenuBar.HELP_MENU);\n\n CommandManager.register(\"Select current statement\", SELECT_STATEMENT_ID, \n robot.select_current_statement);\n CommandManager.register(\"Show keyword search window\", TOGGLE_KEYWORDS_ID, \n search_keywords.toggleKeywordSearch);\n CommandManager.register(\"Show runner window\", TOGGLE_RUNNER_ID, \n runner.toggleRunner);\n CommandManager.register(\"Run test suite\", RUN_ID,\n runner.runSuite)\n robotMenu.addMenuItem(SELECT_STATEMENT_ID, \n [{key: \"Ctrl-\\\\\"}, \n {key: \"Ctrl-\\\\\", platform: \"mac\"}]);\n \n robotMenu.addMenuDivider();\n\n robotMenu.addMenuItem(RUN_ID,\n [{key: \"Ctrl-R\"},\n {key: \"Ctrl-R\", platform: \"mac\"},\n ]);\n\n robotMenu.addMenuDivider();\n\n robotMenu.addMenuItem(TOGGLE_KEYWORDS_ID, \n [{key: \"Ctrl-Alt-\\\\\"}, \n {key: \"Ctrl-Alt-\\\\\", platform: \"mac\" }]);\n robotMenu.addMenuItem(TOGGLE_RUNNER_ID,\n [{key: \"Alt-R\"},\n {key: \"Alt-R\", platform: \"mac\"},\n ]);\n }", "function managerMenu(){\n\tinquirer.prompt([{\n\t\ttype: \"list\",\n\t\tname: \"mainSelection\",\n\t\tmessage: \"Please make a selection: \",\n\t\tchoices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\", \"Add New Product\"]\n\t}]).then(function(selection){\n\n\t\t// Call a particular function depending on user's selection\n\t\tswitch(selection.mainSelection){\n\t\t\tcase \"View Products for Sale\":\n\t\t\t\tviewProducts();\n\t\t\t\tbreak;\n\t\t\tcase \"View Low Inventory\":\n\t\t\t\tviewLowInventory();\n\t\t\t\tbreak;\n\t\t\tcase \"Add to Inventory\":\n\t\t\t\taddInventory();\n\t\t\t\tbreak;\n\t\t\tcase \"Add New Product\":\n\t\t\t\taddProduct();\n\t\t}\n\t});\n}", "function showMenu() {\n // clear the console\n console.log('\\033c');\n // menu selection\n inquirer\n .prompt([\n {\n type: \"list\",\n name: \"wish\",\n choices: [\"View Product Sales by Department\", \"Create New Department\", \"Exit\"],\n message: '\\nWhat would you like to do? '\n }\n ]).then( answer => {\n switch (answer.wish){\n case \"View Product Sales by Department\":\n showSale();\n break;\n case \"Create New Department\":\n createDept();\n break;\n case \"Exit\":\n connection.end();\n break;\n default:\n console.log( `\\x1b[1m \\x1b[31m\\nERROR! Invalid Selection\\x1b[0m`);\n }\n })\n}", "function simulat_menu_infos() {\n display_menu_infos();\n}", "function onOpen() {\n SpreadsheetApp.getUi().createMenu('Equipment requests')\n .addItem('Set up', 'setup_')\n .addItem('Clean up', 'cleanup_')\n .addToUi();\n}", "function setMenu() {\n //添加快捷键\n\tlet applicationOptions = [\n\t\t{ label: \"About Kungfu\", click: showKungfuInfo},\n\t\t{ label: \"Settings\", accelerator: \"CmdOrCtrl+,\", click: openSettingDialog },\n\t\t{ label: \"Close\", accelerator: \"CmdOrCtrl+W\", click: function() { console.log(BrowserWindow.getFocusedWindow().close()); }}\n\t]\n\n\tif(platform === 'mac') {\n\t\tapplicationOptions.push(\n\t\t\t{ label: \"Quit\", accelerator: \"Command+Q\", click: function() { app.quit(); }},\n\t\t)\n\t}\n\n\tconst template = [\n\t{\n\t\tlabel: \"Kungfu\",\n\t\tsubmenu: applicationOptions\n\t}, \n\t{\n\t\tlabel: \"Edit\",\n\t\tsubmenu: [\n\t\t\t{ label: \"Copy\", accelerator: \"CmdOrCtrl+C\", selector: \"copy:\" },\n\t\t\t{ label: \"Paste\", accelerator: \"CmdOrCtrl+V\", selector: \"paste:\" },\n\t\t]\n\t}];\n\t\n\tMenu.setApplicationMenu(Menu.buildFromTemplate(template))\n}", "function addMenu(){\n var appMenu = new gui.Menu({ type: 'menubar' });\n if(os.platform() != 'darwin') {\n // Main Menu Item 1.\n item = new gui.MenuItem({ label: \"Options\" });\n var submenu = new gui.Menu();\n // Submenu Items.\n submenu.append(new gui.MenuItem({ label: 'Preferences', click :\n function(){\n // Add preferences options.\n // Edit Userdata and Miscellaneous (Blocking to be included).\n\n var mainWin = gui.Window.get();\n\n\n var preferWin = gui.Window.open('./preferences.html',{\n position: 'center',\n width:901,\n height:400,\n focus:true\n });\n mainWin.blur();\n }\n }));\n\n submenu.append(new gui.MenuItem({ label: 'User Log Data', click :\n function(){\n var mainWin = gui.Window.get();\n\n var logWin = gui.Window.open('./userlogdata.html',{\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus:true\n });\n }\n }));\n\n submenu.append(new gui.MenuItem({ label: 'Exit', click :\n function(){\n gui.App.quit();\n }\n }));\n\n item.submenu = submenu;\n appMenu.append(item);\n\n // Main Menu Item 2.\n item = new gui.MenuItem({ label: \"Transfers\"});\n var submenu = new gui.Menu();\n // Submenu 1.\n submenu.append(new gui.MenuItem({ label: 'File Transfer', click :\n function(){\n var mainWin = gui.Window.get();\n var aboutWin = gui.Window.open('./filetransfer.html',{\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus: true\n });\n mainWin.blur();\n }\n }));\n item.submenu = submenu;\n appMenu.append(item);\n\n // Main Menu Item 3.\n item = new gui.MenuItem({ label: \"Help\" });\n var submenu = new gui.Menu();\n // Submenu 1.\n submenu.append(new gui.MenuItem({ label: 'About', click :\n function(){\n var mainWin = gui.Window.get();\n var aboutWin = gui.Window.open('./about.html', {\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus: true\n });\n mainWin.blur();\n }\n }));\n item.submenu = submenu;\n appMenu.append(item);\n gui.Window.get().menu = appMenu;\n }\n else {\n // menu for mac.\n }\n\n}", "function installMenu() {\n wkof.Menu.insert_script_link({\n name: script_name,\n submenu: \"Settings\",\n title: script_name,\n on_click: openSettings,\n });\n }", "function slashMenu(option) {\r\n switch (option) {\r\n case '?':\r\n console.clear();\r\n mystMenu('slash');\r\n console.pause();\r\n break;\r\n\tcase '/': // FOR /F /N /R /J\r\n\t mystMenu('2slash');\r\n\t\tconsole.putmsg(' ' + color.alert + 'Two-Slash Menu:\\1n //');\r\n\t\t//var keyword = console.getstr(maxlen=7).toUpperCase();\r\n\t\ttwoSlashMenu(console.getstr(maxlen=7,mode=K_NOCRLF).toUpperCase());\r\n break;\r\n case '1':\r\n case '!':\r\n\t\tbbs.exec('*d1liner');\r\n break;\r\n\tcase 'A':\r\n\t\tbbs.exec('?avatar_chooser');\r\n\t\tbreak;\r\n\tcase 'M':\r\n\tcase 'C':\r\n\t\tbbs.exec_xtrn('MRCCHAT');\t\t\r\n\t\tbreak;\r\n case 'O':\r\n logOffFast();\r\n break;\r\n // SYSTEM MENU\r\n case 'D':\r\n bbs.xtrn_sec();\r\n break;\r\n case 'F':\r\n xferMenu();\r\n break;\r\n case 'N':\r\n\t\tbbs.menu(\"437\");\r\n\t\tconsole.print(format(\"%s New Scan ALL \\1n\\r\\n\",color.alert));\r\n\t\tconsole.print(format(\"%s New Message Scan \\1n\\r\\n\",color.alert));\r\n bbs.scan_subs(SCAN_NEW, all = true);\r\n\t\tconsole.print(format(\"%s New File Scan \\1n\\r\\n\",color.alert));\r\n\t\tbbs.scan_dirs(FL_ULTIME,all=true);\r\n bbs.menu(conf.fontcode);\r\n break;\r\n case 'X':\r\n user.settings ^= USER_EXPERT;\r\n break;\r\n case 'R':\r\n\t\tbbs.scan_msgs();\r\n break;\t\t\r\n\tcase 'S':\r\n\t\tscoresMenu();\r\n\t\tbreak;\r\n case 'T':\r\n bbs.exec('?filearea-lb.js')\r\n\t\tbreak;\r\n case 'Q':\r\n bbs.qwk_sec();\r\n break;\r\n\tcase '\\r':\r\n return;\r\n default:\r\n alert(' NOT VALID');\r\n console.pause();\r\n break;\r\n }\r\n}", "function mainMenu() {\n\n inquirer\n .prompt({\n type: \"list\",\n name: \"task\",\n message: \"Plz, select your entry ?\",\n choices: [\n \"View Employees\",\n \"View Departments\",\n \"View Roles\",\n \"Add Employees\",\n \"Update EmployeeRole\",\n \"Add Role\",\n \"Exit\"]\n })\n .then(function ({ task }) {\n switch (task) {\n case \"View Employees\":\n viewEmployee();\n break;\n case \"View Departments\":\n viewDepartmnt();\n break;\n case \"View Roles\":\n viewRole();\n break;\n case \"Add Employees\":\n addEmployee();\n break;\n case \"Update EmployeeRole\":\n updateEmployeeRole();\n break;\n case \"Add Role\":\n addRole();\n break;\n case \"Exit\":\n connection.end();\n break;\n \n }\n });\n}", "function install_menu() {\n var config = {\n name: 'lesson_lock',\n submenu: 'Settings',\n title: 'Lesson Lock',\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "function menu() {\n inquirer\n .prompt({\n name: \"menuOptions\",\n type: \"list\",\n message: \"What would you like to do?\",\n choices: [\"View Products\", \"View Low Inventory\", \"Add Inventory\", \"Add New Product\"]\n })\n .then(function(answer) {\n // based on their answer, run appropriate function\n if (answer.menuOptions === \"View Products\") {\n viewProducts();\n }\n else if (answer.menuOptions === \"View Low Inventory\") {\n viewLowInventory();\n }\n else if (answer.menuOptions === \"Add Inventory\") {\n addInventory();\n }\n else if (answer.menuOptions === \"Add New Product\") {\n addNewProduct();\n }\n else {\n connection.end();\n }\n });\n}", "function mainMenu() {\n inquirer\n .prompt({\n name: \"action\",\n type: \"rawlist\",\n message: \"What would you like to do?\",\n choices: [\n \"Add Departments\",\n \"Add Roles\",\n \"Add Employees\",\n \"View Departments\",\n \"View Roles\",\n \"View Employees\",\n \"Update Role\",\n \"Update Manager\"\n // \"View Employees by Manager\"\n ]\n })\n // Case statement for selection of menu item\n .then(function(answer) {\n switch (answer.action) {\n case \"Add Departments\":\n addDepartments();\n break;\n case \"Add Roles\":\n addRoles();\n break;\n case \"Add Employees\":\n addEmployees();\n break;\n case \"View Departments\":\n viewDepartments();\n break;\n\n case \"View Roles\":\n viewRoles();\n break;\n case \"View Employees\":\n viewEmployees();\n break;\n case \"Update Role\":\n updateRole();\n break;\n case \"Update Manager\":\n updateManager();\n break;\n // case \"View Employees by Manager\":\n // viewEmployeesByManager();\n // break;\n }\n });\n}", "function mainMenu() {\n INQUIRER.prompt([{\n name: 'next',\n type: 'list',\n message: 'Welcome',\n choices: [\n 'View All Products',\n `View Low Inventory`,\n 'Add to Inventory',\n 'Add New Product',\n 'Exit'\n ]\n }]).then(function(input) {\n\n switch (input.next) {\n case 'View All Products':\n displayAll();\n break;\n\n case 'View Low Inventory':\n displayLow();\n break;\n\n case 'Add to Inventory':\n addToInventory();\n\n case 'Exit':\n connection.end();\n break;\n\n //add product\n default:\n addNewProduct();\n break;\n }\n });\n}", "function initMenu(){\n\toutlet(4, \"vpl_menu\", \"clear\");\n\toutlet(4, \"vpl_menu\", \"append\", \"properties\");\n\toutlet(4, \"vpl_menu\", \"append\", \"help\");\n\toutlet(4, \"vpl_menu\", \"append\", \"rename\");\n\toutlet(4, \"vpl_menu\", \"append\", \"expand\");\n\toutlet(4, \"vpl_menu\", \"append\", \"fold\");\n\toutlet(4, \"vpl_menu\", \"append\", \"---\");\n\toutlet(4, \"vpl_menu\", \"append\", \"duplicate\");\n\toutlet(4, \"vpl_menu\", \"append\", \"delete\");\n\n\toutlet(4, \"vpl_menu\", \"enableitem\", 0, myNodeEnableProperties);\n\toutlet(4, \"vpl_menu\", \"enableitem\", 1, myNodeEnableHelp);\n outlet(4, \"vpl_menu\", \"enableitem\", 3, myNodeEnableBody);\t\t\n outlet(4, \"vpl_menu\", \"enableitem\", 4, myNodeEnableBody);\t\t\n}", "function managerMenu() {\n\n inquirer\n .prompt([\n {\n type: \"list\",\n message: \"Please select from the following options:\",\n choices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\", \"Add New Product\", \"Exit Inventory Management\"],\n name: \"action\",\n }\n ])\n .then(function(inquirerResponse) {\n \n switch (inquirerResponse.action) {\n case \"View Products for Sale\":\n displayInventory();\n \n break;\n\n case \"View Low Inventory\":\n lowInventory();\n \n break;\n\n case \"Add to Inventory\":\n addInventory();\n \n break;\n\n case \"Add New Product\":\n addProduct();\n\n break;\n\n case \"Exit Inventory Management\":\n console.log(\"Exiting Inventory Management...Goodbye!\".bold.yellow);\n //only end connection when manager chooses to from main menu\n connection.end(); \n break;\n\n }\n \n });\n}", "function DfoMenu(/**string*/ menu)\r\n{\r\n\tSeS(\"G_Menu\").DoMenu(menu);\r\n\tDfoWait();\r\n}", "function menu(){\n inquirer.prompt({\n name: \"action\",\n type: \"list\",\n message: \"What would you like to do?\",\n choices: [\n \"View Products for Sale\",\n \"View Low Inventory\",\n \"Add to Inventory\",\n \"Add New Product\",\n \"exit\"\n ]\n }).then(function(answer){\n switch(answer.action){\n case \"View Products for Sale\":\n products();\n break;\n\n case \"View Low Inventory\":\n lowInventory();\n break;\n\n case \"Add to Inventory\":\n addToInventory();\n break;\n\n case \"Add New Product\":\n addProduct();\n break;\n\n case \"exit\":\n connection.end();\n break;\n }\n });\n}", "function menuhrres() {\r\n\r\n}", "function onOpen() {\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var menuEntries = [\n {\n name: \"Setup\",\n functionName: \"setup\"\n },\n {\n name: \"Authorize\",\n functionName: \"showSidebar\"\n },\n {\n name: \"Reset\",\n functionName: \"clearService\"\n },\n {\n name: \"Sync\",\n functionName: \"refreshTimeSeries\"\n },\n {\n name: \"Sync & Save\",\n functionName: \"syncAndSave\"\n }];\n ss.addMenu(\"Fitbit\", menuEntries);\n}", "function menu() {\n inquirer.prompt([\n {\n type: \"list\",\n name: \"choice\",\n message: \"Supervisor's Menu Options:\",\n choices: [\"View Product Sales By Department\", \"Create New Department\", \"Exit\"]\n }\n ]).then(function (answers) {\n if (answers.choice === \"View Product Sales By Department\") {\n displaySales();\n }\n else if (answers.choice === \"Create New Department\") {\n createDepartment();\n }\n else {\n connection.end();\n }\n });\n}", "function menu() {\n console.log (\"\\n 1 : Lister les contacts\");\n console.log (\" 2 : Ajouter un contact\");\n console.log (\" 0 : Quitter le Gestionnaire\");\n\n}", "function loadMenu(){\n\t\tpgame.state.start('menu');\n\t}", "showStandardMenu() {\n const menu = this._Menu.buildFromTemplate([\n {role: 'cut'},\n {role: 'copy'},\n {role: 'paste'},\n {type: 'separator'},\n {role: 'selectAll'},\n ]);\n menu.popup();\n }", "function init() {\n console.log('Welcome to your company employee manager.')\n menu()\n}", "function install_menu() {\n let config = {\n name: script_id,\n submenu: 'Settings',\n title: script_title,\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "function showMenu(arg)\r\n\t{\r\n\t\tswitch(arg)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t\t$('#menu').html(\"\");\r\n\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\t$('#menu').html(\"<h1 id='title' style='position:relative;top:20px;left:-40px;width:500px;'>Sheep's Snake</h1><p style='position:absolute;top:250px;left:-50px;font-size:1.1em;' id='playA'>Press A to play!</p><p style='position:absolute;top:280px;left:-50px;font-size:1.1em;' id='playB'>Press B for some help !</p>\");\r\n\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "function menu(){\n inquirer.prompt([\n {\n name:\"menuOption\",\n type:\"rawlist\",\n choices:[\"View inventory\", \"View low inventory\", \"Add to inventory\", \"Add new product\"],\n message:\"\\nHi! What would you like to do today?\"\n }\n ])\n .then(function(answer){\n //switch case for answer.option\n switch (answer.menuOption){\n case \"View inventory\":\n var query=\"Select item_id, product_name, price, stock_quantity From products\"; \n console.log(\"\\nInventory:\");\n viewProducts(query);\n break;\n case \"View low inventory\":\n var query=\"Select item_id, product_name, price, stock_quantity From products Where stock_quantity<5\";\n console.log(\"\\nLow Inventory:\");\n viewProducts(query);\n break;\n case \"Add to inventory\":\n var query = \"Select * From products\";\n addingInventory=true;\n viewProducts(query);\n break;\n default:\n newProduct();\n };\n });\n}", "function menuHandler() {\n console.log('menuHandler');\n\n agent.add('Questi sono alcuni dei modi in cui posso aiutarti nella tua visita al nostro store online')\n agent.add(new Suggestion(`Esplorazione delle categorie`));\n agent.add(new Suggestion(`Ricerca prodotto specifico`));\n agent.add(new Suggestion(`Suggerimento prodotto`));\n}", "function install_menu() {\n var config = {\n name: 'dashboard_level',\n submenu: 'Settings',\n title: 'Dashboard Level',\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "function menuOptions() {\n inquirer.prompt([\n {\n name: \"action\",\n type: \"list\",\n message: \"What would you like to do?\",\n choices: [\n \"View products for sale\",\n \"View inventory with stock lower than five\",\n \"Add to inventory to current product\",\n \"Add a new product\",\n \"EXIT\"\n\n ]\n }\n ]).then(function(answer) {\n switch (answer.action) {\n case \"View products for sale\":\n displayProducts();\n break;\n\n case \"View inventory with stock lower than five\":\n lowerStock();\n break;\n\n case \"Add to inventory to current product\":\n addItems();\n\n break;\n\n case \"Add a new product\":\n addProduct();\n break;\n\n case \"EXIT\":\n connection.end();\n break;\n }\n })\n}", "function createMenu() {\n var ui = SpreadsheetApp.getUi();\n\n ui.createMenu('Tools')\n .addItem('Fix Range Error', 'fixMe')\n .addSeparator()\n .addItem('About', 'about')\n .addToUi();\n}", "function mainProcess(){\n\n //2: It will then show the Menu = main_menu()\n //options in the main menu array\n main_menu(['Products ','View Credits ','Refund', 'Top-up']);\n\n //3: The user will select an item = main_menu()\n selection = getuserselection();\n\n //4: It will then go to what ever menu the user has selecetd\n menuSelection(selection);\n //If user selects Products this code will then show the products menu\nif(selection == 0){\n //get the choice from the user from the set array\n choice = getuserchoice();\n //From the choice\n purchase(choice);\n //5; It will show the remaining credit after purchase = purchase()\n showCredits();\n}\n}", "function displayMenu() {\n inquirer.prompt(menuChoices).then((response) => {\n switch (response.selection) {\n case \"View Departments\":\n //call function that shows all departments\n viewDepartments();\n break;\n\n case \"Add Department\":\n //call function that adds a department\n addDepartment();\n break;\n\n case \"View Roles\":\n getRole();\n break;\n\n case \"Add Role\":\n addRole();\n break;\n\n case \"View Employees\":\n viewEmployee();\n break;\n\n case \"Add Employee\":\n addEmployee();\n break;\n\n case \"Update Employee\":\n break;\n\n default:\n connection.end();\n process.exit();\n // quit the app\n }\n });\n}", "function showMainMenu(){\n console.log(\"Welcome to Employ-E-Manager\");\n\n inquirer.prompt(\n {type: \"rawlist\",\n name: \"mainmenu_action\",\n message: \"Please selection one of the below actions to perform:\",\n choices: [\n \"Add data to Department/Role/Employee\",\n \"View Department/Role/Employee information\",\n \"Update Employee information\",\n \"Delete Department/Role/Employee\",\n \"Report - Total utilized budget by Department\",\n \"Exit\"\n ]\n }\n ).then(function(answer){\n switch (answer.mainmenu_action){\n case \"Add data to Department/Role/Employee\":\n showAddMenu();\n break;\n \n case \"View Department/Role/Employee information\":\n showViewMenu();\n break;\n\n case \"Update Employee information\":\n showUpdateMenu();\n break;\n\n case \"Delete Department/Role/Employee\":\n showDeleteMenu();\n break;\n\n case \"Report - Total utilized budget by Department\":\n showReportMenu();\n break;\n\n case \"Exit\":\n exit();\n break;\n\n }\n }).catch(function(err){\n if (err){\n console.log(\"Main menu error: \" + err);\n }\n });\n}", "function appMenu() {\n inquirer\n .prompt({\n name: 'options',\n type: 'rawlist',\n message: 'What would you like to do?',\n choices: [\n 'Add a new department',\n 'Add a new role',\n 'Add a new employee',\n 'View all departments',\n 'View all roles',\n 'View all employees',\n 'Update an employee role',\n 'Exit',\n ],\n }).then((answer) => {\n switch (answer.options) {\n case 'Add a new department':\n addDept();\n break;\n\n case 'Add a new role':\n addRole();\n break;\n\n case 'Add a new employee':\n addEmployee();\n break;\n\n case 'View all departments':\n viewDept();\n break;\n\n case 'View all roles':\n viewRoles();\n break;\n\n case 'View all employees':\n viewEmployees();\n break;\n\n case 'Update an employee role':\n updateRole();\n break;\n\n case 'Exit':\n connection.end();\n break;\n\n };\n });\n}", "function displayMenu() {\n inquirer.prompt([\n {\n type: \"list\",\n message: \"What role are you populating today?\",\n name: \"userInput\",\n choices: [\"manager\", \"intern\", \"engineer\", \"exit application\"]\n\n }\n ])\n .then(function (response) {\n switch (response.userInput) {\n case \"manager\":\n addmanager()\n break;\n case \"intern\":\n addintern()\n break;\n case \"engineer\":\n addengineer()\n break;\n default:\n exitapp()\n }\n } )\n }", "function supervisorMenu() {\n inquirer\n .prompt({\n name: 'apple',\n type: 'list',\n message: 'What would you like to do?'.yellow,\n choices: ['View Product Sales by Department',\n 'View/Update Department',\n 'Create New Department',\n 'Exit']\n })\n .then(function (pick) {\n switch (pick.apple) {\n case 'View Product Sales by Department':\n departmentSales();\n break;\n case 'View/Update Department':\n updateDepartment();\n break;\n case 'Create New Department':\n createDepartment();\n break;\n case 'Exit':\n connection.end();\n break;\n }\n });\n}", "function menu() {\n const option = `(v) View • (n) New • (cX) Complete • (dX) Delete • (q) Quit\\n`\n rl.question(option, answer => {\n if (answer === \"v\") return view();\n else if (answer === \"n\") return add();\n else if (answer.includes(\"c\")) return complete(answer);\n else if (answer[0] === \"d\") return del(answer);\n else if (answer === \"q\") return quit();\n else return `Choose a existing option.`;\n });\n}", "function displayMenu () {\n inquirer\n .prompt([\n {\n type: \"list\",\n message: \"What would you like to do?\",\n name: \"choice\",\n choices: [\"View Product Sales by Department\", \"Create New Department\", \"Exit\"]\n }\n ]).then(answers => {\n\n switch (answers.choice) {\n\n case \"View Product Sales by Department\":\n viewSalesbyDept();\n break;\n\n case \"Create New Department\":\n createNewDepartment();\n break;\n\n case \"Exit\":\n connection.end();\n break;\n }\n });\n}", "function spellsMenu() {\n $scope.menuTitle = createText(\"Spells\", [20, 10]);\n createText(\"Not yet implemented\", [50, 80], {});\n }", "function showMenu() {\n\n inquirer\n .prompt([{\n type: \"list\",\n name: \"managerOption\",\n message: \"Please select an option from the list below:\",\n choices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\", \"Add New Product\"]\n\n\n }\n ])\n .then(function (answer) {\n\n switch (answer.managerOption) {\n case \"View Products for Sale\":\n readProducts();\n break;\n\n case \"View Low Inventory\":\n readLowInventory();\n break;\n\n case \"Add to Inventory\":\n identifyItem();\n break;\n\n case \"Add New Product\":\n updateProducts();\n break;\n\n }\n })\n}", "function menu()\n{\n\ninquirer.prompt({\n name:'menu',\n type:\"list\",\n choices:['View Products for Sale','View Low Inventory','Add to Inventory','Add New Product','exit'],\n message:\"MENU\\n ==================\\n\"\n}).then(function(choice)\n{\n console.log(choice.menu);\n var op=choice.menu;\n switch(op)\n {\n case 'View Products for Sale' :\n products_for_sale();\n break;\n case 'View Low Inventory' :\n low_inventory();\n break;\n case 'Add to Inventory' :\n add_inventory();\n break;\n case 'Add New Product' :\n add_product()\n break;\n case 'exit':\n connection.end();\n break;\n }\n}\n);\n}", "function onOpen() {\n var ui = SpreadsheetApp.getUi();\n ui.createMenu('CRYPTOTOOLS')\n .addItem('CRYPTOBALANCE', 'ShowHowToRefresh')\n .addSeparator()\n .addItem('CRYPTOSTAKING', 'ShowHowCRYPTOSTAKING')\n .addSeparator() \n .addItem('CRYPTOREWARDS', 'ShowHowCRYPTOREWARDS')\n .addSeparator()\n .addItem('CRYPTOLENDING', 'ShowHowCRYPTOLENDING')\n .addSeparator()\n .addSeparator()\n .addItem('Contact Info', 'ShowContactInfo')\n .addToUi();\n \n \n}", "function menuMahasiswa() {\nconsole.log(`\n===========================================================\nSilahkan pilih opsi di bawah ini\n[1] daftar murid\n[2] cari murid\n[3] tambah murid\n[4] hapus murid\n[5] kembali\n===========================================================\n`);\n\n rl.question('masukan salah satu no. dari opsi diatas: ', (answer) => {\n switch (answer) {\n case \"1\":\n daftarMurid();\n break;\n case \"2\":\n cariMurid();\n break;\n case '3':\n tambahMurid();\n break;\n case '4':\n hapusMurid();\n break;\n case '5':\n mainMenu();\n break;\n\n default:\n break;\n }\n\n });\n\n}", "function menuOptions() {\n\tinquirer.prompt([\n\t{\n\t\ttype: \"list\",\n\t\tmessage:\"\\nSelect a menu option from below\",\n\t\tchoices: [\"Make a new card\", \"Show existing cards\", \"Exit\"],\n\t\tname: \"menuChoices\"\n\t}\n\t\t]).then(function(useranswer){\n\n\t\t\tswitch (useranswer.menuChoices){\n\t\t\t\tcase 'Make a new card':\n\t\t\t\tconsole.log(\"Make a new flashcard\");\n\t\t\t\tBasicCard();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'Show existing cards':\n\t\t\t\tconsole.log(\"This feature is not yet active\");\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'Exit':\n\t\t\t\tconsole.log(\"Exit\");\n\t\t\t\treturn;\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\treturn;\n\t\t\t\tconsole.log(\"\");\n\t\t\t\tconsole.log(\"Try Again\");\n\t\t\t\tconsole.log(\"\");\n\t\t\t} // close question selection\n\t\t});\n\t} // close function menuOptions", "function mainMenu()\n{\n let mainMenu=readlineSync.question(`1. 添加学生\n 2. 生成成绩单\n 3. 退出\n 请输入你的选择(1~3):`);\n return mainMenu;\n}", "function printMenu(){\n console.log(\"1 - Insert a new task\");\n console.log(\"2 - Remove a task by description\");\n console.log(\"3 - Remove a task by deadline\");\n console.log(\"4 - Print tasks\");\n console.log(\"5 - exit\");\n}", "function toMenu() {\n\tclearScreen();\n\tviewPlayScreen();\n}", "function menu() {\n inquirer.prompt([\n {\n name: \"menu\",\n message: \"Menu:\",\n type: \"list\",\n choices: [\"Products for Sale\", \"Low Inventory\", \"Add to Inventory\", \"New Product\", \"Exit\"],\n }]).then(function (answer) {\n\n // depending on the option picked for the chosen call the correct function\n switch (answer.menu) {\n case \"Products for Sale\": {\n showInventory();\n break;\n }\n case \"Low Inventory\": {\n lowerInventory();\n break;\n }\n case \"Add to Inventory\": {\n addInventory();\n \n break;\n }\n case \"New Product\": {\n addNewProduct();\n break;\n }\n case \"Exit\": {\n connection.end();\n break;\n }\n }\n\n });\n}", "function menu() {\n inquirer\n .prompt([\n {\n type: \"list\",\n name: \"inventory\",\n message: \"Select the options below to manage the inventory:\",\n choices: [\n \"View products available for sale.\",\n \"View low inventory.\",\n \"Add new quantitites to inventory.\",\n \"Add new products to products database.\"\n ]\n }\n ])\n .then(function(answer) {\n if (answer.inventory === \"View products available for sale.\") {\n viewProducts();\n } else if (answer.inventory === \"View low inventory.\") {\n viewLowInventory();\n } else if (answer.inventory === \"Add new quantitites to inventory.\") {\n addToInventory();\n } else if (\n answer.inventory === \"Add new products to products database.\"\n ) {\n addNewProduct();\n }\n });\n}", "function printMenu() {\n var menu = 'check - check program\\'s variables\\n';\n menu += 'clear - clear screen\\n';\n menu += 'date <day> <month> <year> - set article date to scrape from\\n';\n menu += 'file <file path> - set file output for scraped data\\n';\n menu += 'index <number> - set article index\\n';\n menu += 'page <number> - set page to scrape from\\n';\n menu += 'scrape <article limit> - start scraping\\n';\n menu += 'exit - exit program';\n\n console.log(menu);\n}", "function menukontrak() {\nconsole.log(`\n===========================================================\nSilahkan pilih opsi di bawah ini\n[1] daftar kontrak\n[2] cari kontrak\n[3] tambah kontrak\n[4] hapus kontrak\n[5] kembali\n===========================================================\n`);\n\n rl.question('masukan salah satu no. dari opsi diatas: ', (answer) => {\n switch (answer) {\n case \"1\":\n daftarkontrak();\n break;\n case \"2\":\n carikontrak();\n break;\n case '3':\n tambahkontrak();\n break;\n case '4':\n hapuskontrak();\n break;\n case '5':\n mainMenu();\n break;\n\n default:\n break;\n }\n\n // rl.close();\n });\n\n}", "function menu(_func){\n\tif(myNodeInit){\t\t\n\t\tif(_func == \"properties\"){\n\t\t\topenproperties();\n\t\t} else if(_func == \"collapse\"){\n \tmyExpandedMode = 0;\n\t\t\texpand();\n \toutlet(4, \"vpl_menu\", \"setitem\", 3, \"expand\");\n \toutlet(4, \"vpl_menu\", \"setitem\", 4, \"fold\");\n\t\t} else if(_func == \"expand\" || _func == \"unfold\"){\n \tmyExpandedMode = 2;\n\t\t\texpand();\n \toutlet(4, \"vpl_menu\", \"setitem\", 3, \"collapse\");\n \toutlet(4, \"vpl_menu\", \"setitem\", 4, \"fold\");\n } else if(_func == \"fold\"){\n \tmyExpandedMode = 1;\n\t\t\texpand();\n \toutlet(4, \"vpl_menu\", \"setitem\", 3, \"collapse\");\n \toutlet(4, \"vpl_menu\", \"setitem\", 4, \"unfold\");\n\t\t} else if(_func == \"duplicate\"){\n\t\t\t;\n\t\t} else if(_func == \"delete\"){\n\t\t\t;\n\t\t} else if(_func == \"help\"){\n\t\t\toutlet(2, \"load\", \"bs.help.node.\" + myNodeHelp + \".maxpat\");\n\t\t}\n\t}\n}", "function onOpen(){\n var ui=SpreadsheetApp.getUi();\n var menu = ui.createMenu(\"FMV Tracker\");\n \n var labSubMenu = ui.createMenu(\"Labelers\");\n labSubMenu.addItem(\"Attempt\", \"showFormAttempt\");\n labSubMenu.addItem(\"R0\", \"showFormR0\");\n labSubMenu.addItem(\"R1\", \"showFormR1\");\n labSubMenu.addItem(\"R10\", \"showFormR10\");\n menu.addSubMenu(labSubMenu);\n\n var qaSubMenu = ui.createMenu(\"QA\");\n qaSubMenu.addItem(\"Tools\",\"showQAForm\");\n menu.addSubMenu(qaSubMenu);\n\n labSubMenu.addSeparator();\n menu.addSeparator();\n menu.addItem(\"Metrics\",\"viewMets\");\n menu.addSeparator();\n menu.addToUi();\n}", "function displayMenu() {\n inquirer.prompt([\n {\n type: \"list\",\n name: \"action\",\n message: \"Select action\",\n choices: [\n \"View Products for Sale\",\n \"View Low Inventory\",\n \"Add to Inventory\",\n \"Add New Product\"\n ]\n }\n ]).then(function (answers) {\n //console.log(answers);\n\n switch (answers.action) {\n case \"View Products for Sale\":\n viewProducts();\n break;\n case \"View Low Inventory\":\n viewLowInventory();\n break;\n case \"Add to Inventory\":\n addToInventory();\n break;\n case \"Add New Product\":\n addNewProduct();\n break;\n }\n });\n}", "function runMenu() {\n inquirer\n .prompt({\n type: \"list\",\n name: \"action\",\n message: \"WELCOME TO THE EMPLOYEE TRACKER...\",\n choices: [\"View all employees\",\n \"View all departments\",\n \"View all roles\",\n \"Add Employee\",\n \"Add Department\",\n \"Add Role\",\n \"Remove Employee\",\n \"Update Employee Role\",\n \"Exit\"]\n\n })\n .then(function (answer) {\n console.log(answer.action);\n switch (answer.action) {\n case \"View all employees\":\n employeeView();\n break;\n\n case \"View all departments\":\n departmentView();\n break;\n\n case \"View all roles\":\n rolesView();\n break;\n\n case \"Add Employee\":\n employeeAdd();\n break;\n\n case \"Add Department\":\n departmentAdd();\n break;\n\n case \"Add Role\":\n roleAdd();\n break;\n\n case \"Remove Employee\":\n employeeRemove();\n break;\n\n case \"Update Employee Role\":\n employeeUpdate();\n break;\n\n case \"Exit\":\n connection.end();\n break;\n }\n });\n}", "function StartMenu() {\n //this.menu = new Menu('start-menu');\n this.shutDownMenu = new Menu('shutdown-menu');\n this.shutDownButton = new MenuButton('options-button', this.shutDownMenu);\n Menu.apply(this, ['start-menu']);\n}", "function loadMenu(debug){\n // Generate program options\n var menu = SpreadsheetApp.getUi()\n .createMenu('Teaching')\n .addItem('Send grades to all student rows', 'sendGradesAll')\n .addItem('Send grade to individual student by row', 'sendGradesSelect')\n .addSeparator();\n\n // Generate Debug options\n if(debug == 'true') {\n menu.addItem('Turn debug off', 'turnOffDebug')\n .addItem('Change debug email <' + userProp.getProperty(g_debugEmail_key) + '>', 'changeDebugEmail')\n .addItem('Reset debug defaults', 'resetDebug');\n } else {\n menu.addItem('Turn debug on', 'turnOnDebug');\n }\n\n // Update UI\n menu.addToUi();\n}", "setupMenu () {\n let dy = 17;\n // create buttons for the action categories\n this.menu.createButton(24, 0, () => this.selectionMode = 'info', this, null, 'info');\n this.menu.createButton(41, 0, () => this.selectionMode = 'job', this, null, 'job');\n // create buttons for each command\n for (let key of Object.keys(this.jobCommands)) {\n let button = this.menu.createButton(0, dy, () => this.jobCommand = key, this, this.jobCommands[key].name);\n dy += button.height + 1;\n }\n // set the hit area for the menu\n this.menu.calculateHitArea();\n // menu is closed by default\n this.menu.hideMenu();\n }", "function displayMenu() {\n inquirer\n .prompt([\n {\n type: \"list\",\n name: \"Menu\",\n message: \"Choose your option from the below menu???\",\n choices: [\n \"a: View Products for Sale\",\n \"b: View Low Inventory\",\n \"c: Add to Inventory\",\n \"d: Add New Product\",\n \"e: Exit\"\n ]\n }\n ])\n .then(function(choice) {\n switch (choice.Menu) {\n case \"a: View Products for Sale\":\n viewProductsForSale();\n break;\n case \"b: View Low Inventory\":\n viewLowInventory();\n break;\n case \"c: Add to Inventory\":\n addToInventory();\n break;\n case \"d: Add New Product\":\n addNewProduct();\n break;\n case \"e: Exit\":\n console.log(\"Thank-you!\");\n break;\n }\n });\n}", "function ips_menu_events()\n{\n}", "function onOpen() {\n ui.createMenu('Daily Delivery Automation')\n .addItem('Run', 'confirmStart').addToUi();\n}", "function onMenuItemClick(p_sType, p_aArgs, p_oValue) {\n if (p_oValue == \"startVM\") \t{ \n\t\tYAHOO.vnode.container.dialog1.show()\n\t\tYAHOO.vnode.container.dialog1.focus()\n }\n\telse if (p_oValue == \"terminateVM\") {\n\t\tYAHOO.vnode.container.dialog2.show()\n\t\tYAHOO.vnode.container.dialog2.focus()\n }\n else if (p_oValue == \"stateVM\") {\n YAHOO.vnode.container.dialog3.show()\n\t\tYAHOO.vnode.container.dialog3.focus()\n }\n else if (p_oValue == \"upTimeVM\") {\n YAHOO.vnode.container.dialog4.show()\n\t\tYAHOO.vnode.container.dialog4.focus()\n }\n else if (p_oValue == \"startVG\") {\n YAHOO.vnode.container.dialog5.show()\n\t\tYAHOO.vnode.container.dialog5.focus()\n }\n else if (p_oValue == \"stateVG\") {\n YAHOO.vnode.container.dialog6.show()\n\t\tYAHOO.vnode.container.dialog6.focus()\n }\n else if (p_oValue == \"terminateVG\") {\n YAHOO.vnode.container.dialog7.show()\n\t\tYAHOO.vnode.container.dialog7.focus()\n }\n else if (p_oValue == \"adminPanel\") {\n if (checkPermission()) {\n YAHOO.vnode.container.dialog8.show()\n\t \tYAHOO.vnode.container.dialog8.focus()\n }\n else {\n alert(\"User is not allowed\")\n }\n }\n}", "function menuItemClick(thisMsg)\n{\n // So they selected something... cycle through the options and execute.\n // Game menu...\n if (thisMsg == \"Exit\")\t\t\n window.close()\n else if (thisMsg == \"New\")\n faceClick()\n else if ((thisMsg == \"Beginner\") || (thisMsg == \"Intermediate\") || (thisMsg == \"Expert\")) {\n\t initMines(thisMsg);\n }\n else if (thisMsg == \"Custom\") {\n \n }\n else if (thisMsg == \"Personal\") {\n }\n else if (thisMsg == \"World\") {\n }\n // Options menu\n else if (thisMsg == \"Marks\") {\n useQuestionMarks = ! useQuestionMarks;\n }\n else if (thisMsg == \"Area\") {\n useMacroOpen = ! useMacroOpen;\n }\n else if (thisMsg == \"First\") {\n useFirstClickUseful = ! useFirstClickUseful;\n\t }\n else if (thisMsg == \"Remaining\") {\n openRemaining = ! openRemaining;\n updateNumBombs();\n\t }\n // Help menu\n else if (thisMsg == \"About\") {\talertBox('Locate the hidden bombs in the mine field without stepping on them!'); }\n else if (thisMsg == \"Instructions\") {\talertBox('Click the tiles to reveal them. Numbers indicate the amount of bombs around. Right click the mines.'); }\n // Since we clicked, close the menu.\n closeAllMenus();\n // Always return a false to prevent the executing of the default href.\n // (this is a neat trick - we've already handled the event, so we bypass the default href link)\n return false; }", "function menu() {\nconsole.log(\"---------Address Book Operations--------\");\nconsole.log(\"\\t0. Close File and Exit\");\nconsole.log(\"\\t1. Add New Person and Save\");\nconsole.log(\"\\t2. Edit Person Data\");\nconsole.log(\"\\t3. Delete a Person\");\nconsole.log(\"\\t4. Sort by Last Name\");\nconsole.log(\"\\t5. Sort by ZIP\");\nconsole.log(\"\\t6. Print all Entries\");\n}", "function onOpen() {\n var menu = [\n { name: \"Fill all items list\", functionName: \"fillAllItemsData\" },\n null,\n { name: \"Schedule run task every hour\", functionName: \"configureRun\"},\n { name: \"Remove schedule\", functionName: \"configureStop\"},\n ];\n \n SpreadsheetApp.getActiveSpreadsheet().addMenu(\"➪ Tarkov-Market\", menu);\n}", "function mainMenu() {\n\n //Present the user with a list of options to choose from\n inquirer\n .prompt([\n //give user main menu options\n {\n name: \"choice\",\n type: \"rawlist\",\n choices: info.menus.main,\n message: \"What would you like to do?\"\n }\n ])\n .then(function(answer) {\n //Check if the user wants to exit\n checkForExit(answer.choice);\n\n switch(answer.choice) {\n case \"Run Test\":\n pickDirectory(\"test\");\n break;\n case \"View Scores\":\n viewMenu();\n break;\n default:\n mainMenu();\n }\n \n });\n}", "function menu() {\n inquirer.prompt([{\n type: \"list\",\n message: \"what would you like to do?\",\n choices: [\"add departments\", \"add roles\", \"add employees\", \"view departments\", \"view roles\", \"view employee\", \"update employee roles\"],\n name: \"selection\"\n }]).then(function (userInput) {\n switch (userInput.selection) {\n case \"add departments\":\n addDepartment()\n break\n case \"add roles\":\n addRole()\n break\n case \"add employees\":\n addEmployee()\n break\n case \"view departments\":\n viewDepartments()\n break\n case \"view roles\":\n viewRoles()\n break\n case \"view employee\":\n viewEmployee()\n break\n case \"update employee roles\":\n updateEmployeeRole()\n break\n }\n })\n}", "function onProductionButton( event ) {\r\n\topenWindowMenu(2);\r\n}", "function mainMenu(){\n inquirer.prompt([\n {\n name: \"mainOptions\",\n type: \"list\",\n message:\"What would you like to do?\",\n choices: [\"View Products\", \"View Low Inventory Products\", \"Add Product Inventory\", \"Add New Product\", \"Exit\"]\n }\n ]).then(function(answer){\n switch (answer.mainOptions) {\n case \"View Products\":\n displayInventory();\n break;\n case \"View Low Inventory Products\":\n displayLowInv();\n break;\n case \"Add Product Inventory\":\n addInventory();\n break;\n case \"Add New Product\":\n addProduct();\n break;\n case \"Exit\":\n console.log(\"***********************************************************\");\n console.log(\"* Have a productive day :-) *\");\n console.log(\"***********************************************************\");\n connection.end();\n };\n });\n}", "function setupMenu() {\n // console.log('setupMenu');\n\n document.getElementById('menuGrip')\n .addEventListener('click', menuGripClick);\n\n document.getElementById('menuPrint')\n .addEventListener('click', printClick);\n\n document.getElementById('menuHighlight')\n .addEventListener('click', menuHighlightClick);\n\n const menuControls = document.getElementById('menuControls');\n if (Common.isIE) {\n menuControls.style.display = 'none';\n } else {\n menuControls.addEventListener('click', menuControlsClick);\n }\n\n document.getElementById('menuSave')\n .addEventListener('click', menuSaveClick);\n\n document.getElementById('menuExportSvg')\n .addEventListener('click', exportSvgClick);\n\n document.getElementById('menuExportPng')\n .addEventListener('click', exportPngClick);\n\n PageData.MenuOpen = (Common.Settings.Menu === 'Open');\n}", "function onOpen() {\n var menu = [{name: 'Run', functionName: 'runSXSW'},\n {name: 'Standby', functionName: 'sleep'},\n {name: 'Update', functionName: 'update'},\n {name: 'Consolidate QR Codes', functionName: 'allMoviesDoc'}];\n SpreadsheetApp.getActive().addMenu('SXSW', menu);\n}", "function OnQuit()\n{\n\t// back to main menu\n\tApplication.LoadLevel(\"StartMenu\");\n}", "function showMenu(){\n loadData();\n console.log(\"\\n***********************\");\n console.log(\"1.Nhap du lieu contact:\");\n console.log(\"2.Sua du lieu contact: \");\n console.log(\"3.Xoa contact\");\n console.log(\"4.Tim kiem contact\");\n console.log(\"5.Hien thi danh sach sdt\");\n var num = readLineSync.question('nhap lua chon: ');\n switch(num){\n case '1':\n addContact();\n showMenu();\n break;\n case '2':\n editContact();\n showMenu();\n break;\n case '3':\n deleteContact();\n showMenu();\n break;\n case '4':\n findContact();\n showMenu();\n break;\n case '5':\n show()\n showMenu();\n break;\n default:\n showMenu();\n break;\n }\n}", "function contextMenu(e){\r\n\tprintln(\"context\");\r\n\treturn false;\r\n}", "function mainMenu(choice) {\r\n switch (choice) {\r\n case \"View Products for Sale\":\r\n displayAllInventory();\r\n break;\r\n\r\n case \"View Low Inventory\":\r\n displayLowInventory();\r\n break;\r\n\r\n case \"Add to Inventory\":\r\n promptToAddNewStock();\r\n break;\r\n\r\n case \"Add New Product\":\r\n promptToAddNewProduct();\r\n break;\r\n\r\n case \"Exit Store\":\r\n default:\r\n console.log(\"\\nThank you! Have a great sales day!\");\r\n exitStore();\r\n break;\r\n }\r\n}", "async function promptMainMenu() {\n promptMenu(\"main\")\n}", "function mainMenu() {\n mapping();\n inquirer.prompt(\n {\n type: \"list\",\n message: \"What would you like to do?\",\n name: \"choices\",\n choices: [\n {\n name: \"View All Employees\",\n value: \"viewEmp\"\n },\n {\n name: \"View Employees by Manager\",\n value: \"viewEmpMan\"\n },\n {\n name: \"View All Departments\",\n value: \"viewDept\"\n },\n {\n name: \"View All Roles\",\n value: \"viewRoles\"\n },\n {\n name: \"Add an Employee\",\n value: \"addEmp\"\n },\n {\n name: \"Add a Department\",\n value: \"addDept\"\n },\n {\n name: \"Add a Role\",\n value: \"addRole\"\n },\n {\n name: \"Update Employee Role\",\n value: \"updateRole\"\n },\n {\n name: \"Update Employee Manager\",\n value: \"updateManager\"\n },\n {\n name: \"Delete a Department\",\n value: \"deleteDept\"\n },\n {\n name: \"Delete a Role\",\n value: \"deleteRole\"\n },\n {\n name: \"Delete an Employee\",\n value: \"deleteEmp\"\n },\n {\n name: \"Quit\",\n value: \"end\"\n }\n ]\n }).then(function(res) {\n execute(res.choices)\n })\n}", "function Menu(){// extends JMenuBar {\r\n\t//protected final Sandbox \r\n\tvar sandbox;\r\n\t\r\n\tfunction Menu(sandbox){//Sandbox sandbox) {\r\n\t\tthis.sandbox = sandbox;\r\n\t\t\r\n\t\taddWorldMenu();\r\n\t\taddRobotMenu();\r\n\t}\r\n\t\r\n\t//public AbstractAction item(String name, ActionListener listener) {\r\n\tfunction item( name, listener) {\r\n\t\tvar a= new AbstractAction(name)\r\n\t\t\ta= actionPerformed=function(e){//ActionEvent e) {\r\n\t\t\t\tlistener.actionPerformed(e);\r\n\t\t\t}\r\n\treturn a;\r\n\t}\r\n\t\t\r\n\tfunction teleport() {\r\n\t\tsandbox.getMouse().startTeleport();\r\n\t}\r\n\t\r\n\tfunction showCodeEditor() {\r\n\t\tsandbox.getCodeEditor().setVisible(true);\r\n\t}\r\n\t\r\n\tfunction showDebugger() {\r\n\t\tsandbox.getDebugger().setVisible(true);\r\n\t}\r\n\t\r\n\tfunction reseed() {\r\n\t\tsandbox.reseed();\r\n\t}\r\n\t\r\n\tfunction showWorldInfo() {\r\n\t\t\r\n\t}\r\n\t\r\n\tfunction centerView() {\r\n\t\tsandbox.centerView();\r\n\t}\r\n\t\r\n\tfunction addRobotMenu() {\r\n\t\t//JMenu\r\n\t\tvar menu = new JMenu(\"Robot\");\r\n\t\tmenu.add(item(\"Teleport\", function() { teleport(); }));\r\n\t\tmenu.addSeparator();\r\n\t\tmenu.add(item(\"Center View\", function() { centerView(); }));\r\n\t\tmenu.addSeparator();\r\n\t\tmenu.add(item(\"Show Code Editor\", function() { showCodeEditor(); }));\r\n\t\tmenu.add(item(\"Show Debugger\", function(){ showDebugger(); }));\r\n\t\tadd(menu);\r\n\t}\r\n\t\r\n\tfunction addWorldMenu() {\r\n\t\t//JMenu\r\n\t\tvar menu = new JMenu(\"World\");\r\n\t\tmenu.add(item(\"Generate New\", function() { reseed(); }));\r\n\t\tmenu.addSeparator();\r\n\t\tmenu.add(item(\"Load Snapshot...\", function() { }));\r\n\t\tmenu.addSeparator();\r\n\t\tmenu.add(item(\"Save Snapshot\", function() { }));\r\n\t\tmenu.add(item(\"Save Snapshot As...\", function() { }));\r\n\t\tmenu.addSeparator();\r\n\t\tmenu.add(item(\"Show Info\", function() { showWorldInfo(); }));\r\n\t\tmenu.addSeparator();\r\n\t\tmenu.add(item(\"Quit\", function() { sandbox.quit(); }));\r\n\t\tadd(menu);\r\n\t}\r\n}", "function start() {\r\n var questions = [{\r\n type: 'rawlist',\r\n name: 'choice',\r\n message: 'What would you like to do?',\r\n choices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\", \"Add New Product\", \"Exit Store\"]\r\n }];\r\n inquirer.prompt(questions).then(answers => {\r\n mainMenu(answers.choice);\r\n });\r\n}", "function menuJurusan() {\nconsole.log(`\n===========================================================\nSilahkan pilih opsi di bawah ini\n[1] daftar Jurusan\n[2] cari Jurusan\n[3] tambah Jurusan\n[4] hapus Jurusan\n[5] kembali\n===========================================================\n`);\n\n rl.question('masukan salah satu no. dari opsi diatas: ', (answer) => {\n switch (answer) {\n case \"1\":\n daftarJurusan();\n break;\n case \"2\":\n cariJurusan();\n break;\n case '3':\n tambahJurusan();\n break;\n case '4':\n hapusJurusan();\n break;\n case '5':\n mainMenu();\n break;\n\n default:\n break;\n }\n\n // rl.close();\n });\n\n}", "function mainMenu() {\n inquirer.prompt({\n type: \"list\",\n name: \"action\",\n message: \"What would you like to do?\",\n choices: [\n { name: \"Add something\", value: createMenu },\n { name: \"View something\", value: readMenu },\n { name: \"Change something\", value: updateMenu },\n { name: \"Remove something\", value: deleteMenu },\n { name: \"Quit\", value: quit }\n ]\n }).then(({ action }) => action());\n}", "function mainMenu() {\n if (!_signedOn) {\n _signedOn = validatePin(_account);\n // console.log('signed on:', _signedOn);\n }\n\n let option = '';\n while (option !== 'X' && _signedOn) {\n console.clear();\n console.log(`\\n\\n\\t\\tHello ${_account.holder.split(' ')[0]}!`);\n appBanner(_account);\n console.log('\\t\\t1 - Check Balance');\n console.log('\\t\\t2 - Withdraw Cash');\n console.log('\\t\\t3 - Deposit Cash');\n console.log('\\t\\tX - Exit ATM');\n\n option = prompt('\\t\\tChoose One: ').toUpperCase();\n\n switch (option) {\n case '1': // get account balance\n getBalance(_account, _wallet);\n pressReturn();\n break;\n\n case '2': // make cash withdrawal\n withdraw(_account, _wallet);\n pressReturn();\n break;\n\n case '3': // make cash deposit\n deposit(_account, _wallet);\n pressReturn();\n break;\n\n case 'X': // exit ATM\n exitATM(_account);\n break;\n }\n }\n}", "function selectmenu(){\n intro();\n greet();\n document.write(\"<br><br>click the main menu<br><br> In main menu you'll find 3 choices <br> 1.Get the News<br> 2.get the time<br> 3.End the Bot<br>\")\n\n}", "function runMenu() {\n inquirer.prompt([\n {\n name: 'menu',\n type: 'list',\n choices: [\n 'View Products for Sale',\n 'View Low Inventory',\n 'Add to Inventory',\n 'Add New Product',\n 'Exit'\n ],\n message: chalk.cyan('Select an option:')\n }\n ]).then(function(answers) {\n switch (answers.menu) {\n case 'View Products for Sale':\n getProducts(false);\n break;\n case 'View Low Inventory':\n getProducts(true);\n break;\n case 'Add to Inventory':\n addInventory();\n break;\n case 'Add New Product':\n addProduct();\n break;\n default:\n connection.end();\n }\n });\n}", "function smMenu(){\n\t\t// Clears out other menu setting from last resize\n\t\t$('.menu-toggle a').off('click')\n\t\t$('.expand').removeClass('expand');\n\t\t$('.menu-toggle').remove();\n\t\t// Displays new menu\n\t\t$('.main-nav').before(\"<div class='menu-toggle'><a href='#'>menu<span class='indicator'> +</span></a></div>\");\n\t\t// Add expand class for toggle menu and adds + or - symbol depending on nav bar toggle state\n\t\t$('.menu-toggle a').click(function() {\n\t\t\t$('.main-nav').toggleClass('expand');\n\t\t\tvar newValue = $(this).find('span.indicator').text() == ' -' ? ' +' : ' -';\n\t\t\t$(this).find('span.indicator').text(newValue);\n\t\t});\n\t\t// Set window state\n\t\tvar windowState = 'small';\n\t}", "function Window_MenuCommand() {\n this.initialize.apply(this, arguments);\n}", "function onOpen() {\n SpreadsheetApp.getUi()\n .createMenu('Schedule Options')\n .addItem('New Month', 'doGet')\n .addSeparator()\n .addItem('Add Pay Period', 'addPayPeriod')\n .addSubMenu(SpreadsheetApp.getUi().createMenu('Remove Pay Period')\n .addItem('Pay Period 1', 'rePPOne')\n .addItem('Pay Period 2', 'rePPTwo')\n .addItem('Pay Period 3', 'rePPThree'))\n .addSeparator()\n .addItem('Add New Employee', 'addEmployee')\n .addSeparator()\n .addItem('Holiday Time Checker', 'holDoGet')\n .addSeparator()\n .addItem('Help', 'showSidebar')\n .addToUi();\n}", "function goToMenu() {\n stopTTS();\n cStatus = undefined;\n cStatus = new CurrentStatus();\n $('#quiz').hide('slow');\n $('#game').hide('slow');\n $('#menu').show('slow');\n}", "function managerMenu(){\n inquirer.prompt([\n\t\t{\n\t\t\t type: \"list\",\n\t\t message: \"Select an operation to perform\",\n name: \"mgrmenu\",\n choices: ['1 - View Products', '2 - View Low Inventory', '3 - Add to Inventory', '4 - Add New Product', '5 - Exit']\n\t\t},\n\t]).then(function(response){\n if(response.mgrmenu.includes(1)){\n viewSaleProducts();\n }\n else if(response.mgrmenu.includes(2)){\n viewLowInvetory();\n }\n else if(response.mgrmenu.includes(3)){\n viewSaleProducts(addInventory);\n }\n else if(response.mgrmenu.includes(4)){\n addProduct();\n }\n else{\n //close the connection\n connection.end();\n }\n });\n}", "function testMenuPostion( menu ){\n \n }", "function setApplicationMenu() {\n const template = [\n {\n label: 'Application',\n submenu: [\n {label: 'About Application', selector: 'orderFrontStandardAboutPanel:'},\n {type: 'separator'},\n {\n label: 'Quit',\n accelerator: 'Command+Q',\n click() {\n app.quit();\n }\n }\n ]\n },\n {\n label: 'Edit',\n submenu: [\n {label: 'Undo', accelerator: 'CmdOrCtrl+Z', selector: 'undo:'},\n {label: 'Redo', accelerator: 'Shift+CmdOrCtrl+Z', selector: 'redo:'},\n {type: 'separator'},\n {label: 'Cut', accelerator: 'CmdOrCtrl+X', selector: 'cut:'},\n {label: 'Copy', accelerator: 'CmdOrCtrl+C', selector: 'copy:'},\n {label: 'Paste', accelerator: 'CmdOrCtrl+V', selector: 'paste:'},\n {label: 'Select All', accelerator: 'CmdOrCtrl+A', selector: 'selectAll:'}\n ]\n }\n ];\n\n Menu.setApplicationMenu(Menu.buildFromTemplate(template));\n}", "function initialize() {\n activateMenus();\n}", "function GM_registerMenuCommand(){\n // TODO: Elements placed into the page\n }" ]
[ "0.7107809", "0.6847974", "0.6810089", "0.6709932", "0.66918486", "0.66488194", "0.66373634", "0.6601549", "0.6598697", "0.65552074", "0.65313816", "0.650404", "0.6503349", "0.64995706", "0.64953744", "0.64942867", "0.6468396", "0.6438251", "0.6427622", "0.64274234", "0.64188004", "0.6386441", "0.6385031", "0.6384017", "0.6371621", "0.6367532", "0.6365083", "0.6363127", "0.6361582", "0.6355236", "0.63487536", "0.6337593", "0.63190824", "0.63158107", "0.63082093", "0.63079655", "0.63048935", "0.6303131", "0.629806", "0.6291454", "0.6282901", "0.6274329", "0.6263593", "0.626196", "0.625913", "0.62439406", "0.6239982", "0.62393105", "0.6238378", "0.62343365", "0.62271565", "0.6226211", "0.6225403", "0.62172204", "0.62120634", "0.6209787", "0.6204012", "0.61984575", "0.61974275", "0.6193773", "0.61918676", "0.6186684", "0.6185654", "0.6181095", "0.6178569", "0.6178557", "0.61713815", "0.6165066", "0.6164769", "0.61553085", "0.6148154", "0.61479294", "0.6146405", "0.61359435", "0.61345327", "0.61297244", "0.6127224", "0.61252856", "0.6118386", "0.61158514", "0.6112528", "0.6110598", "0.6106905", "0.6104473", "0.6099708", "0.60917675", "0.6086415", "0.6084961", "0.60831594", "0.60825646", "0.6081327", "0.6077251", "0.6073716", "0.6072559", "0.6070685", "0.6070159", "0.6068724", "0.6060983", "0.6058258", "0.6057231" ]
0.65434015
10
= Check for updates function =
function qll_system_checkupdates() { if(!qll_GMSupport) { return; } object = document.createElement("div"); object.setAttribute('class', 'QLLsystembox'); object.setAttribute('id', 'QLLBoxMenuUpdates'); object.innerHTML="<img class='QLLIMGLoading' src='" + qll_loadingImg + "'>"; adv=document.getElementById('eads'); adv.parentNode.insertBefore(object,adv); GM_xmlhttpRequest( { method: 'GET', url: 'http://userscripts.org/scripts/show/58579', onload:function(responseDetails) { var responseText = responseDetails.responseText; version = responseText.match(/<b>Version:<\/b>[^<]*/)[0]; version = version.replace('<b>Version:</b>',''); obj=document.getElementById('QLLBoxMenuUpdates'); if(version>qll_version) { var inner = qll_lang[0] + '<br/>'+ qll_lang[1] +' ' + qll_version + '<br/>' + qll_lang[2] +' ' + version; obj.setAttribute('onclick', "window.open(\'http://userscripts.org/scripts/show/58579\');"); } else { var inner = qll_lang[3]; } obj.innerHTML = inner; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function manuallyCheckForUpdate() {\r\n\tcheckForUpdate(true);\r\n} //End manual update check", "check_update(value) { return (this.value != value); }", "shouldUpdate(e){return!0}", "validateBeforeUpdate (id, newData, prevData) { return true }", "enableUpdating(_requestedUpdate) {\n }", "shouldUpdate(_changedProperties){return!0}", "refreshUpdateStatus() {}", "updated() {}", "function update() {}", "_update() {\n }", "willUpdate() {\n }", "static postUpdate() {\n return false;\n }", "checkUpdate() {\n if (this.updating === true) return false\n // check if we has changes\n if (this.hassEntities && this.hassEntities.length && this._hass) {\n this.hasChanged = false\n // reload the hass entities\n this.hassEntities = this.entities\n .map((x) => this._hass.states[x.entity])\n .filter((notUndefined) => notUndefined !== undefined)\n\n // check for update and set the entity state last and update flag\n for (let entity of this.entities) {\n const h = this.hassEntities.find((x) => x.entity_id === entity.entity)\n entity.laststate = entity.state\n entity.update = false\n if (h && entity.last_changed !== h.last_changed && entity.state !== h.state) {\n entity.last_changed = h.last_changed\n entity.state = h.state\n entity.update = true\n this.hasChanged = true\n }\n }\n\n if (this.hasChanged) {\n // refresh and update the graph\n this.updateGraph(true)\n }\n return this.hasChanged\n }\n }", "checkUpdate() {\n if (this.updating === true) return false\n this.hasChanged = false\n const _entityList = this.entity_items.getEntitieslist()\n if (this.hassEntities && this.hassEntities.length && this._hass) {\n this.hassEntities = _entityList\n .map((x) => this._hass.states[x.entity])\n .filter((notUndefined) => notUndefined !== undefined)\n this.hasChanged = this.entity_items.hasChanged(this.hassEntities)\n if (this.hasChanged) {\n /**\n * refresh and update the graph\n */\n this.updateGraph(true)\n }\n }\n return this.hasChanged\n }", "checkUpdate() {\n if (this.updating === true) return false\n this.hasChanged = false\n const _entityList = this.entity_items.getEntitieslist()\n if (this.hassEntities && this.hassEntities.length && this._hass) {\n this.hassEntities = _entityList\n .map((x) => this._hass.states[x.entity])\n .filter((notUndefined) => notUndefined !== undefined)\n this.hasChanged = this.entity_items.hasChanged(this.hassEntities)\n if (this.hasChanged) {\n /**\n * refresh and update the graph\n */\n this.updateGraph(true)\n }\n }\n return this.hasChanged\n }", "update() {\n this._checkEvents();\n }", "updateHook() {\n return true;\n }", "update() {\n this.checkIfWon();\n }", "handleUpdates(){\n\t\t//put per update scripts here\n\t\tconsole.log('update');\n\t}", "function update() {\n // ... no implementation required\n }", "function autoUpdateCheck(){\n\t//get the auto update value\n\tconst auto_update = settings.get('auto_update');\n\tif(auto_update === true){\n\t\tconsole.log(\"Checking for updates with auto updater\");\n\t\tpullUpdate();\n\t}\n}", "function checkForUpdate() {\n let input = getUserInput();\n let updated = gameClient.update(input);\n //if (updated === 'no-change')\n // return;\n\n let requestedData = gameClient.getNecessaryData();\n //if (requestedData === 'no-change')\n // return;\n request(requestedData, update);\n}", "shouldUpdate(_changedProperties){return true;}", "checkAndUpdate() {\n console.log(\"sub class must implement checkAndUpdate function\");\n return false;\n }", "function checkUpdate() {\n\tsync.net.getVersion(function(serverVersion) {\n\t\tif (serverVersion != version) {\n\t\t\tconsole.log(\"New update is available\");\n\t\t}\n\t});\n}", "function canApplyUpdates() {\n return module.hot.status() === 'idle';\n}", "function canApplyUpdates() {\n return module.hot.status() === 'idle';\n}", "function canApplyUpdates() {\n return module.hot.status() === 'idle';\n}", "function canApplyUpdates() {\n return module.hot.status() === 'idle';\n}", "function canApplyUpdates() {\n return module.hot.status() === 'idle';\n}", "function canApplyUpdates() {\n return module.hot.status() === 'idle';\n}", "function canApplyUpdates() {\n return module.hot.status() === 'idle';\n}", "function canApplyUpdates() {\n return module.hot.status() === 'idle';\n}", "function canApplyUpdates() {\n return module.hot.status() === 'idle';\n}", "function update() {\n // Don't delete this function!\n}", "checkAndRun(){\n var checks=this.checkPointers();\n\n if(checks.passed){\n this.passedRun=true;\n this.update();\n //this doesn't find if there are any fails in the update...\n }else{\n checks.errors.forEach(function(error){console.error (error)})\n this.passedRun=false;\n }\n }", "_checkUpdateIsAble () {\n function error (parameter) {\n throw new Error (`Parameter '${parameter}' is forbidden in UPDATE query`)\n }\n if (this._selectStr.length > 1) error('only')\n if (this._orderStr) error('orderBy')\n if (this._limitStr) error('limit')\n if (this._offsetStr) error('offset')\n return true\n }", "function confirmChanges() {\r\n return isChanged;\r\n}", "function checkForUpdates(){\n (getNewTelegrams() || []).map(t => sendTelegram(t));\n (getNewArticles() || []).map(a => sendUpdate(a));\n}", "firstUpdated() {}", "shouldUpdate(_changedProperties) {\n return true;\n }", "afterUpdate() {}", "function update() {\n\n // Don't delete this function!\n\n}", "function checkUpdates() {\n var is_updated = false;\n var value;\n \n for (vm in svm) {\n for (res in svm[vm].updated) {\n if (svm[vm].updated[res]) {\n /* This resource has been modified and its displayed\n * value must be updated. */\n if (res == \"products\") {\n /* Check which products have been modified */\n for (prod in svm[vm].products) {\n for (prod_res in svm[vm].products[prod].updated) {\n is_updated = svm[vm].products[prod].updated[prod_res];\n if (is_updated && prod_res != \"id\") {\n svm[vm].products[prod].updated[prod_res] = false;\n changeDispValue(svm[vm], prod_res,\n svm[vm].products[prod][prod_res],\n svm[vm].products[prod]);\n }\n }\n }\n } else {\n /* Check which VM resource has been modified */\n switch (res) {\n case \"status\":\n case \"alarm\":\n value = svm[vm][res].toStr();\n break;\n case \"loc\":\n value = svm[vm][res].lat + \", \" + svm[vm][res].lng;\n break;\n default:\n value = svm[vm][res];\n break;\n }\n svm[vm].updated[res] = false;\n changeDispValue(svm[vm], res, value);\n }\n }\n }\n /* All products have been updated */\n svm[vm].updated.products = false;\n }\n}", "get canUpdate() {\n return this._canUpdate;\n }", "didUpdate() {}", "function CheckForUpdate() {\r\n\tvar lastupdatecheck = GM_getValue('muUpdateParam_143', 'never');\r\n\tvar updateURL = 'http://www.monkeyupdater.com/scripts/updater.php?id=143&version=1.1';\r\n\tvar today = new Date();\r\n\tvar one_day = 24 * 60 * 60 * 1000; /* one day in milliseconds */\r\n\tif(lastupdatecheck != 'never') { \r\n\t\ttoday = today.getTime(); /* get today's date */\r\n\t\tvar lastupdatecheck = new Date(lastupdatecheck).getTime();\r\n\t\tvar interval = (today - lastupdatecheck) / one_day;\r\n\t\t/**\r\n\t\t * Find out how many days have passed\r\n\t\t * If one day has passed since the last \r\n\t\t * update check, check if a new version \r\n\t\t * is available\r\n\t\t */\r\n\t\tif(interval >= 1) {\r\n\t\t\tupdate(updateURL);\r\n\t\t}\r\n\t} else {\r\n\t\tupdate(updateURL);\r\n\t}\r\n}", "function checkUpdate()\n{\n\t// Collect input fields.\n\tvar inputs = $(\"#startCity, #startState, #endCity, #endState\");\n\n\t// Make sure they all contain values.\n\tif (inputs[0].value != \"\" && inputs[1].value != \"\" && inputs[2].value != \"\" && inputs[3].value != \"\")\n\t{\n\t\tupdate();\n\t}\n}", "isUpdatePermitted() {\n return this.checkAdminPermission('update')\n }", "shouldUpdate(_changedProperties) {\n return true;\n }", "shouldUpdate(_changedProperties) {\n return true;\n }", "shouldUpdate(_changedProperties) {\n return true;\n }", "function autoUpdateCheck() {\n //get the auto update value\n const auto_update = settings.get('auto_update');\n if (auto_update === true) {\n log.info('[main]', 'Checking for updates with auto updater');\n //Call pullUpdate and wait for the promise to return the result\n setActionRun(true);\n PullUpdate().then(\n (result) => {\n //If it is a success (update installed) reload the window\n setActionRun(false);\n log.info('[main]', 'autoUpdateCheck Success');\n reloadMain('index');\n },\n (error) => {\n // check error or no need to be updated\n setActionRun(false);\n log.error('[main]', 'autoUpdateCheck:' , error);\n }\n );\n }\n}", "function update() {\n\t\t\n\t}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "firstUpdated(e){}", "function checkIfUpdateDiff (oldVal, newVal) {\n if (oldVal && !newVal) {\n $log.debug('Attribute setA initialized');\n vm.updateDiff();\n }\n if (newVal) {\n $log.debug('Attribute setA changed');\n vm.updateDiff();\n }\n }", "hasChanged() {\n return this.__changed;\n }", "function update()\n{\n\n}", "shouldUpdate(_changedProperties) {\n return true;\n }", "beforeUpdate(){\n console.log('beforeUpdate');\n }", "function update() {\n \n}", "function checkForUpdates(fr) {\n firstRun = fr;\n autoUpdater.checkForUpdates();\n}", "shouldComponentUpdate() {\n\t\tconsole.log('Function called: %s', 'shouldComponentUpdate');\n\t}", "function CheckForUpdate(){var lastupdatecheck = GM_getValue('muUpdateParam_77', 'never');var updateURL = 'http://www.monkeyupdater.com/scripts/updater.php?id=77&version=2.1.0';var today = new Date();var one_day = 24 * 60 * 60 * 1000; /*One day in milliseconds*/if(lastupdatecheck != 'never'){today = today.getTime(); /*Get today's date*/var lastupdatecheck = new Date(lastupdatecheck).getTime();var interval = (today - lastupdatecheck) / one_day; /*Find out how many days have passed - If one day has passed since the last update check, check if a new version is available*/if(interval >= 1){update(updateURL);}else{}}else{update(updateURL);}}", "async _enqueueUpdate(){this._updateState=this._updateState|STATE_UPDATE_REQUESTED;try{// Ensure any previous update has resolved before updating.\n// This `await` also ensures that property changes are batched.\nawait this._updatePromise;}catch(e){// Ignore any previous errors. We only care that the previous cycle is\n// done. Any error should have been handled in the previous update.\n}const result=this.performUpdate();// If `performUpdate` returns a Promise, we await it. This is done to\n// enable coordinating updates with a scheduler. Note, the result is\n// checked to avoid delaying an additional microtask unless we need to.\nif(result!=null){await result;}return !this._hasRequestedUpdate;}", "function confirmChanges() {\r\n return (isChanged ||\r\n isPageDataChanged());\r\n}", "function CheckForUpdate(){var lastupdatecheck = GM_getValue('muUpdateParam_105', 'never');var updateURL = 'http://www.monkeyupdater.com/scripts/updater.php?id=105&version=0.4';var today = new Date();var one_day = 24 * 60 * 60 * 1000; /*One day in milliseconds*/if(lastupdatecheck != 'never'){today = today.getTime(); /*Get today's date*/var lastupdatecheck = new Date(lastupdatecheck).getTime();var interval = (today - lastupdatecheck) / one_day; /*Find out how many days have passed - If one day has passed since the last update check, check if a new version is available*/if(interval >= 1){update(updateURL);}else{}}else{update(updateURL);}}", "function updateroster() {\n\n}", "function refresh(){\n setUpdate(!update)\n }", "function _check_if_exist_change(){\n try{\n if(win.action_for_custom_report == 'add_job_custom_report'){\n return true;\n }\n var is_make_changed = false;\n if(_is_make_changed){\n is_make_changed = true;\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 }", "update()\n\t{ \n\t\tthrow new Error(\"update() method not implemented\");\n\t}", "function checkForUpdate() {\n let updater = JSON.parse(sessionStorage.getItem(\"update\"))\n if (updater) {\n window.clearInterval(this.getData);\n updateMyData()\n }\n}", "function CheckForUpdate(){var lastupdatecheck = GM_getValue('muUpdateParam_68', 'never');var updateURL = 'http://www.monkeyupdater.com/scripts/updater.php?id=68&version=0.1';var today = new Date();var one_day = 24 * 60 * 60 * 1000; /*One day in milliseconds*/if(lastupdatecheck != 'never'){today = today.getTime(); /*Get today's date*/var lastupdatecheck = new Date(lastupdatecheck).getTime();var interval = (today - lastupdatecheck) / one_day; /*Find out how many days have passed - If one day has passed since the last update check, check if a new version is available*/if(interval >= 1){update(updateURL);}else{}}else{update(updateURL);}}", "function CheckForUpdate(){var lastupdatecheck = GM_getValue('muUpdateParam_131', 'never');var updateURL = 'http://www.monkeyupdater.com/scripts/updater.php?id=131&version=1.4';var today = new Date();var one_day = 24 * 60 * 60 * 1000; /*One day in milliseconds*/if(lastupdatecheck != 'never'){today = today.getTime(); /*Get today's date*/var lastupdatecheck = new Date(lastupdatecheck).getTime();var interval = (today - lastupdatecheck) / one_day; /*Find out how many days have passed - If one day has passed since the last update check, check if a new version is available*/if(interval >= 1){update(updateURL);}else{}}else{update(updateURL);}}", "function CheckForUpdate(){var lastupdatecheck = GM_getValue('muUpdateParam_101', 'never');var updateURL = \r\n'http://www.monkeyupdater.com/scripts/updater.php?id=101&version=V 1.0.4';var today = new Date();var one_day = 24 * 60 * 60 * 1000; /*One day in \r\nmilliseconds*/if(lastupdatecheck != 'never'){today = today.getTime(); /*Get today's date*/var lastupdatecheck = new Date(lastupdatecheck).getTime();var \r\ninterval = (today - lastupdatecheck) / one_day; /*Find out how many days have passed - If one day has passed since the last update check, check if a \r\nnew version is available*/if(interval >= 1){update(updateURL);}else{}}else{update(updateURL);}}", "function CheckForUpdate(){var lastupdatecheck = GM_getValue('muUpdateParam_125', 'never');var updateURL = 'http://www.monkeyupdater.com/scripts/updater.php?id=125&version=1.00';var today = new Date();var one_day = 24 * 60 * 60 * 1000; /*One day in milliseconds*/if(lastupdatecheck != 'never'){today = today.getTime(); /*Get today's date*/var lastupdatecheck = new Date(lastupdatecheck).getTime();var interval = (today - lastupdatecheck) / one_day; /*Find out how many days have passed - If one day has passed since the last update check, check if a new version is available*/if(interval >= 1){update(updateURL);}else{}}else{update(updateURL);}}", "function CheckForUpdate(){var lastupdatecheck = GM_getValue('muUpdateParam_64', 'never');var updateURL = 'http://www.monkeyupdater.com/scripts/updater.php?id=64&version=0.2';var today = new Date();var one_day = 24 * 60 * 60 * 1000; /*One day in milliseconds*/if(lastupdatecheck != 'never'){today = today.getTime(); /*Get today's date*/var lastupdatecheck = new Date(lastupdatecheck).getTime();var interval = (today - lastupdatecheck) / one_day; /*Find out how many days have passed - If one day has passed since the last update check, check if a new version is available*/if(interval >= 1){update(updateURL);}else{}}else{update(updateURL);}}", "_triggerUpdated() {\n\t if (!this.updating) {\n\t this.updating = true;\n\t const update = () => {\n\t this.updating = false;\n\t const registry = storage.getRegistry(this._instance);\n\t const events = registry.events;\n\t events.fire('view-updated', this);\n\t };\n\t if (this._checkSync()) {\n\t update();\n\t }\n\t else {\n\t setTimeout(update);\n\t }\n\t }\n\t }", "function CheckForUpdate(){var lastupdatecheck = GM_getValue('muUpdateParam_158', 'never');var updateURL = 'http://www.monkeyupdater.com/scripts/updater.php?id=158&version=1.29';var today = new Date();var one_day = 24 * 60 * 60 * 1000; /*One day in milliseconds*/if(lastupdatecheck != 'never'){today = today.getTime(); /*Get today's date*/var lastupdatecheck = new Date(lastupdatecheck).getTime();var interval = (today - lastupdatecheck) / one_day; /*Find out how many days have passed - If one day has passed since the last update check, check if a new version is available*/if(interval >= 1){update(updateURL);}else{}}else{update(updateURL);}}", "update(...props) {\n if (this.onUpdate && this._) {\n return this.onUpdate(...props);\n }\n }", "function CheckForUpdate()\r\n{\t\r\n\tvar today = new Date();\r\n\tvar one_day = 24 * 60 * 60 * 1000; //One day in milliseconds\r\n\r\n\tif(lastupdatecheck != \"never\")\r\n\t{\r\n\t\ttoday = today.getTime(); //Get today's date\r\n\t\tvar lastupdatecheck = new Date(lastupdatecheck).getTime();\r\n\t\tvar interval = (today - lastupdatecheck) / one_day; //Find out how much days have passed\t\t\r\n\r\n\t\t//If a week has passed since the last update check, check if a new version is available\r\n\t\tif(interval >= 7)\t\t\t\r\n\t\t\tCheckVersion();\r\n\t}\r\n\telse\r\n\t\tCheckVersion();\r\n}", "function CheckForUpdate()\r\n{\t\r\n\tvar today = new Date();\r\n\tvar one_day = 24 * 60 * 60 * 1000; //One day in milliseconds\r\n\r\n\tif(lastupdatecheck != \"never\")\r\n\t{\r\n\t\ttoday = today.getTime(); //Get today's date\r\n\t\tvar lastupdatecheck = new Date(lastupdatecheck).getTime();\r\n\t\tvar interval = (today - lastupdatecheck) / one_day; //Find out how much days have passed\t\t\r\n\r\n\t\t//If a week has passed since the last update check, check if a new version is available\r\n\t\tif(interval >= 7)\t\t\t\r\n\t\t\tCheckVersion();\r\n\t}\r\n\telse\r\n\t\tCheckVersion();\r\n}", "function CheckForUpdate()\r\n{\t\r\n\tvar today = new Date();\r\n\tvar one_day = 24 * 60 * 60 * 1000; //One day in milliseconds\r\n\r\n\tif(lastupdatecheck != \"never\")\r\n\t{\r\n\t\ttoday = today.getTime(); //Get today's date\r\n\t\tvar lastupdatecheck = new Date(lastupdatecheck).getTime();\r\n\t\tvar interval = (today - lastupdatecheck) / one_day; //Find out how much days have passed\t\t\r\n\r\n\t\t//If a week has passed since the last update check, check if a new version is available\r\n\t\tif(interval >= 7)\t\t\t\r\n\t\t\tCheckVersion();\r\n\t}\r\n\telse\r\n\t\tCheckVersion();\r\n}", "function CheckForUpdate()\r\n{\t\r\n\tvar today = new Date();\r\n\tvar one_day = 24 * 60 * 60 * 1000; //One day in milliseconds\r\n\r\n\tif(lastupdatecheck != \"never\")\r\n\t{\r\n\t\ttoday = today.getTime(); //Get today's date\r\n\t\tvar interval = (today - lastupdatecheck.getTime()) / one_day; //Find out how much days have passed\t\t\r\n\r\n\t\t//If a week has passed since the last update check, check if a new version is available\r\n\t\tif(interval >= 7)\t\t\t\r\n\t\t\tCheckVersion();\r\n\t}\r\n\telse\r\n\t\tCheckVersion();\r\n}", "shouldComponentUpdate() {\n // FIXME: Not tested\n if (+new Date() - this.lastUpdate <= 32) {\n this.lastUpdate = +new Date()\n clearTimeout(this.updateTimer)\n return true\n } else {\n this.updateTimer = setTimeout(() => {\n this.forceUpdate()\n }, 100)\n }\n return false\n }", "static _valueHasChanged(value,old,hasChanged=notEqual){return hasChanged(value,old);}", "static updated() {\n if (MP.DEBUG) {\n console.group('Check.updated()');\n console.log(`PREV VER = ${this.prevVer}`);\n console.log(`NEW VER = ${this.newVer}`);\n }\n return new Promise((resolve) => {\n // Different versions; the script was updated\n if (this.newVer !== this.prevVer) {\n if (MP.DEBUG) {\n console.log('Script is new or updated');\n }\n // Store the new version\n GM_setValue('mp_version', this.newVer);\n if (this.prevVer) {\n // The script has run before\n if (MP.DEBUG) {\n console.log('Script has run before');\n console.groupEnd();\n }\n resolve('updated');\n }\n else {\n // First-time run\n if (MP.DEBUG) {\n console.log('Script has never run');\n console.groupEnd();\n }\n // Enable the most basic features\n GM_setValue('goodreadsBtn', true);\n GM_setValue('alerts', true);\n resolve('firstRun');\n }\n }\n else {\n if (MP.DEBUG) {\n console.log('Script not updated');\n console.groupEnd();\n }\n resolve(false);\n }\n });\n }", "update() {\n // ...\n }", "update () {}", "shouldComponentUpdate (...args) {\n return shouldComponentUpdate.apply(this, args)\n }", "hasChanged() {\n return this.cacheHasChanged;\n }", "shouldUpdate(_changedProperties) {\n return super.shouldUpdate();\n }" ]
[ "0.77070385", "0.7414871", "0.72115636", "0.7174502", "0.7161608", "0.7151325", "0.70320076", "0.7025666", "0.69321716", "0.69143605", "0.68844557", "0.68600225", "0.6859099", "0.68578655", "0.68578655", "0.6853048", "0.6841909", "0.6815532", "0.67999744", "0.6798333", "0.6790612", "0.6774793", "0.6748663", "0.6735327", "0.6732674", "0.670075", "0.670075", "0.670075", "0.670075", "0.670075", "0.670075", "0.670075", "0.670075", "0.670075", "0.6666284", "0.6665429", "0.6604743", "0.66028094", "0.65380234", "0.6524445", "0.6491754", "0.64916617", "0.6481854", "0.64794433", "0.64752126", "0.6466139", "0.6462015", "0.6442217", "0.6434458", "0.64319676", "0.64319676", "0.64319676", "0.64200777", "0.64136875", "0.64047986", "0.64047986", "0.64047986", "0.64047986", "0.64047986", "0.64047986", "0.64047986", "0.64047986", "0.64047986", "0.6396762", "0.6395733", "0.63864255", "0.6383863", "0.6367605", "0.63635874", "0.63564646", "0.63467383", "0.6346615", "0.63385653", "0.6335829", "0.6329813", "0.63291526", "0.6317393", "0.6311518", "0.6304658", "0.63020545", "0.63009506", "0.62975734", "0.62970763", "0.6285527", "0.6281341", "0.6281339", "0.6279064", "0.62788117", "0.6277931", "0.62743396", "0.62743396", "0.62743396", "0.6274221", "0.6252031", "0.62450916", "0.62327313", "0.62238747", "0.62196213", "0.6218284", "0.62101525", "0.620861" ]
0.0
-1
= Settings manager options =
function qll_system_settings_import() { sett=$('#QLLMenuSettingsField').attr('value').split(";"); if(sett.length<=1) { qll_fun_showAlertBox('ALARM', qll_lang[40]); return; } var line= new Array(); for(var k in sett) { if(sett[k].length==0) { continue; } line[k]=sett[k].split("="); if(line[k].length!==2) { alert(qll_lang[40]); return; } line[k][0]=qll_fun_unsafe(line[k][0]); line[k][1]=qll_fun_unsafe(line[k][1]); } if(line[0][0]!='QLLVersion' || parseInt(line[0][1])!=GM_getValue("QLLVersion",qll_version*10000000)) { alert(qll_lang[40]); return; } qll_system_settings_delete(); for(k in line) { if(line[k][1].length==0) { continue; } switch(line[k][1]) { case 'true': line[k][1]=true; break; case 'false': line[k][1]=false; break; default: if(isFinite(parseInt(line[k][1]))) line[k][1]=parseInt(line[k][1]); break; } GM_setValue(line[k][0],line[k][1]); } alert(qll_lang[39]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SettingManager(options) {\n if (options === void 0) { options = {}; }\n this.serverSettings = options.serverSettings ||\n serverconnection_1.ServerConnection.makeSettings();\n }", "function loadOptions() {\n chrome.storage.sync.get(\"settings\", function(items) {\n loadSetting(items.settings.timerLength, 'time', 300);\n loadSetting(items.settings.tabGoal, 'tabGoal', 10);\n loadSetting(items.settings.tabLimit, 'tabLimit', 15);\n });\n}", "function _getSettings(){\n var keys = ManagerSettings.getKeys();\n keys.forEach(function(key){\n settings[key] = ManagerSettings.get(key)\n }); // keys.forEach\n}", "function Settings(){\n\tif(typeof Settings.initialized == \"undefined\") {\n\t\tSettings.prototype.loadLocal = function () {\n\t\t\t$('#flip-1').slider(); \n\t\t\t$('#flip-2').slider(); \n\t\t\t$('#selectmenu1').selectmenu(); \n\n\t\t\tif ($.jStorage.get('current_user').auto_share == true){\n\t\t\t\t$('#flip-1').val('on').slider('refresh');\n\t\t\t}\n\t\t\tif ($.jStorage.get('current_user').geoloc == true){\n\t\t\t\t$('#flip-2').val('on').slider('refresh');\n\t\t\t}\n\t\t\t// change select value from max_article_number\n\t\t\t$('#selectmenu1').val($.jStorage.get('current_user').max_article_number).selectmenu(\"refresh\");\n\t\t}\n\n\t\tSettings.prototype.setListeners = function () {\n\t\t\t$('#settingsForm').submit(function() {\n\n\t\t\t\tvar autoShare = $(\"#flip-1\").val();\n\t\t\t\tvar geoloc = $(\"#flip-2\").val();\n\t\t\t\tvar maxArticle = parseInt($(\"#selectmenu1\").val());\n\n\t\t\t\tvar data = JSON.stringify({\n\t\t\t\t\t\"autoShare\": autoShare,\n\t\t\t\t\t\"geoloc\": geoloc,\n\t\t\t\t\t\"maxArticle\": maxArticle,\n\t\t\t\t\t\"facebook\": $.jStorage.get('current_user').facebook,\n\t\t\t\t\t\"gplus\": $.jStorage.get('current_user').gplus,\n\t\t\t\t\t\"twitter\": $.jStorage.get('current_user').twitter,\n\t\t\t\t\t\"pays\": $.jStorage.get('current_user').country,\n\t\t\t\t\t\"ville\": $.jStorage.get('current_user').city,\n\t\t\t\t\t\"userId\": $.jStorage.get('current_user').id,\n\t\t\t\t});\n\n\t\t\t\t//@TODO : send preferences to server\n\t\t\t\t$.ajax({\n\t\t\t\t\turl: api_paths.settings,\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tcontentType: 'application/json',\n\t\t\t\t\tdata: data,\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: function(json) {\n\t\t\t\t\t\t$(\"#confirm\").popup( \"open\", {} );\n\t\t\t\t\t},\n\t\t\t\t\terror: function(ts) {\n\t\t\t\t\t\t$(\"#error\").popup( \"open\", {} );\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t};\n\n\t\tSettings.initialized = true;\n\t}\n\n\tvar current_user = $.jStorage.get('current_user');\n\tif(current_user != null){\n\t\tthis.loadLocal();\n\t\tthis.setListeners();\t\n\t}\n\n}", "function settings() {\n\t\t\tSettingsService.show();\n\t\t}", "function options() {\n\tstorage.getf().then((props) => {\n\t\tjira.profile(props.url).then((profile) => {\n\t\t\tdirect.speak(S(MENU_OPTION_INITIAL).template({\n\t\t\t\tname: profile.displayName\n\t\t\t}).s);\n\n\t\t\tdefineOption1(props.url, props.project);\n\t\t\tdefineOption2(props.url, props.project);\n\t\t}, (error) => {\n\t\t\tcommands = {};\n\t\t\tdirect.speak(jira.errors(error));\n\t\t});\n\t});\n}", "function _settings_page() {\n}", "static get defaultOptions() {\r\n return mergeObject(super.defaultOptions, {\r\n id: \"mountup-settings-form\",\r\n title: \"Mount Up! - Settings\",\r\n template: \"./modules/mountup/templates/settings.html\",\r\n classes: [\"sheet\"],\r\n width: 500,\r\n closeOnSubmit: true\r\n });\r\n }", "function Settings() {\n var obj = store('slate:settings') || {};\n for (var k in obj) this[k] = obj[k];\n this.connections = this.connections || [];\n}", "static get defaultOptions() {\n return mergeObject(super.defaultOptions, {\n id: 'turnmarker-settings-form',\n title: 'Turn Marker - Global Settings',\n template: './modules/turnmarker/templates/settings.html',\n classes: ['sheet', 'tm-settings'],\n width: 500,\n closeOnSubmit: true\n });\n }", "function settings(e) {\n e.detail.applicationcommands = {\n \"divAccount\": { href: \"accountSettings.html\", title: \"Account\" },\n \"divPrivacy\": { href: \"privacySettings.html\", title: \"Privacy\" },\n };\n WinJS.UI.SettingsFlyout.populateSettings(e);\n }", "function Settings() {\n\tthis.s = new Array()\n\tthis.load()\n}", "function Settings(options) {\n // allow null options\n options = options || {};\n this.displayMode = get(options.displayMode, false);\n this.throwOnError = get(options.throwOnError, true);\n this.errorColor = get(options.errorColor, \"#cc0000\");\n}", "function Settings() {\n this.values = _objCreate(null);\n}", "function Settings() {\n this.values = _objCreate(null);\n}", "function Settings() {\n this.values = _objCreate(null);\n}", "function Settings() {\n this.values = _objCreate(null);\n}", "function Settings() {\n this.values = _objCreate(null);\n}", "get options() {}", "function settingsSetup() {\n updateSettingsValues();\n }", "function getUserOptions() {\n\n\t/* READ USER SETTINGS FILE HERE */\t\n\twindow.gBulkDeleteDays = 3;\n\twindow.gMarkReadOnVisit = true;\n\twindow.gFeedOrder = 0;\n\twindow.gDefaultFormats = [ 0, 1, 0];\n\twindow.gFormat = gDefaultFormats[gcSTATUS_UNREAD];\n}", "function saveSettings(){\n\n showMenu();\n\n for (key in settingTmp){\n if (settingTmp.hasOwnProperty(key)){\n setting[key] = settingTmp[key];\n }\n }\n\n PopupModule.hide();\n }", "function setSavedOptions() {\n log('Getting saved options.');\n GM_setValue(\"opt_loggingEnabled\", opt_loggingEnabled);\n GM_setValue(\"opt_hidefedded\", opt_hidefedded);\n GM_setValue(\"opt_hidefallen\", opt_hidefallen);\n GM_setValue(\"opt_hidetravel\", opt_hidetravel);\n GM_setValue(\"opt_showcaymans\", opt_showcaymans);\n GM_setValue(\"opt_hidehosp\", opt_hidehosp);\n GM_setValue(\"opt_disabled\", opt_disabled);\n }", "function Settings() {\n this.values = _objCreate(null);\n }", "function Settings() {\n this.values = _objCreate(null);\n }", "function Settings() {\n this.values = _objCreate(null);\n }", "function Settings() {\n this.values = _objCreate(null);\n }", "function Settings() {\n this.values = _objCreate(null);\n }", "function Settings() {\n this.values = _objCreate(null);\n }", "function Settings() {\n this.values = _objCreate(null);\n }", "getSettings () {\r\n\t\tvar defaultSettings = {\r\n\t\t\tenableEmojiHovering: true,\r\n\t\t\tenableEmojiStatisticsButton: true\r\n\t\t};\r\n\t\tvar settings = BDfunctionsDevilBro.loadAllData(this.getName(), \"settings\");\r\n\t\tvar saveSettings = false;\r\n\t\tfor (var key in defaultSettings) {\r\n\t\t\tif (settings[key] == null) {\r\n\t\t\t\tsettings[key] = settings[key] ? settings[key] : defaultSettings[key];\r\n\t\t\t\tsaveSettings = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (saveSettings) {\r\n\t\t\tBDfunctionsDevilBro.saveAllData(settings, this.getName(), \"settings\");\r\n\t\t}\r\n\t\treturn settings;\r\n\t}", "function additionalSettings(){\n\n\n}", "function getSettings(){\n\tchrome.storage.sync.get(\n\t\tsettings,\n\t\tfunction(results){\n\t\t\tupdateSettings(results);\n\t\t}\n\t);\n}", "function getSettings() {\n return user.settings;\n }", "function Settings() {\n this._settings = new collections_1.Dictionary();\n }", "function initSettings() {\n const PUBLIC_CONFIGURE_SETTINGS = [\n {\n key: SETTING_KEYS.TOOLTIP_POSITION,\n settings: {\n name: i18n('settings.TOOLTIP_POSITION.name'),\n hint: i18n('settings.TOOLTIP_POSITION.hint'),\n type: String,\n config: true,\n default: 'right',\n choices: {\n top: i18n('settings.TOOLTIP_POSITION.choices.top'),\n right: i18n('settings.TOOLTIP_POSITION.choices.right'),\n bottom: i18n('settings.TOOLTIP_POSITION.choices.bottom'),\n left: i18n('settings.TOOLTIP_POSITION.choices.left'),\n overlay: i18n('settings.TOOLTIP_POSITION.choices.overlay'),\n surprise: i18n('settings.TOOLTIP_POSITION.choices.surprise'),\n doubleSurprise: i18n('settings.TOOLTIP_POSITION.choices.doubleSurprise'),\n },\n },\n },\n {\n key: SETTING_KEYS.FONT_SIZE,\n settings: {\n name: i18n('settings.FONT_SIZE.name'),\n hint: i18n('settings.FONT_SIZE.hint'),\n type: Number,\n config: true,\n range: {\n min: 1,\n step: 0.1,\n max: 2.5,\n },\n default: 1.2,\n },\n },\n {\n key: SETTING_KEYS.MAX_ROWS,\n settings: {\n name: i18n('settings.MAX_ROWS.name'),\n hint: i18n('settings.MAX_ROWS.hint'),\n type: Number,\n config: true,\n range: {\n min: 1,\n step: 1,\n max: 20,\n },\n default: 5,\n },\n },\n {\n key: SETTING_KEYS.DATA_SOURCE,\n settings: {\n name: i18n('settings.DATA_SOURCE.name'),\n hint: i18n('settings.DATA_SOURCE.hint'),\n type: String,\n scope: 'world',\n config: true,\n restricted: true,\n default: 'actor.data.data',\n },\n },\n {\n key: SETTING_KEYS.DARK_THEME,\n settings: {\n name: i18n('settings.DARK_THEME.name'),\n hint: i18n('settings.DARK_THEME.hint'),\n type: Boolean,\n config: true,\n default: false,\n },\n },\n {\n key: SETTING_KEYS.SHOW_ALL_ON_ALT,\n settings: {\n name: i18n('settings.SHOW_ALL_ON_ALT.name'),\n hint: i18n('settings.SHOW_ALL_ON_ALT.hint'),\n type: Boolean,\n scope: 'world',\n config: true,\n restricted: true,\n default: true,\n },\n },\n {\n key: SETTING_KEYS.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS,\n settings: {\n name: i18n('settings.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS.name'),\n hint: i18n('settings.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS.hint'),\n type: Boolean,\n scope: 'world',\n config: true,\n restricted: true,\n default: false,\n },\n },\n {\n key: SETTING_KEYS.DEBUG_OUTPUT,\n settings: {\n name: i18n('settings.DEBUG_OUTPUT.name'),\n hint: i18n('settings.DEBUG_OUTPUT.hint'),\n type: Boolean,\n scope: 'world',\n config: true,\n restricted: true,\n default: false,\n },\n },\n ];\n const HIDDEN_CONFIGURE_SETTINGS = [\n {\n key: SETTING_KEYS.GM_SETTINGS,\n settings: {\n type: Object,\n scope: 'world',\n restricted: true,\n default: {},\n },\n },\n {\n key: SETTING_KEYS.PLAYER_SETTINGS,\n settings: {\n type: Object,\n scope: 'world',\n restricted: true,\n default: {},\n },\n },\n {\n key: SETTING_KEYS.ACTORS,\n settings: {\n type: Object,\n scope: 'world',\n restricted: true,\n default: [],\n },\n },\n {\n key: SETTING_KEYS.CLIPBOARD,\n settings: {\n type: Object,\n default: [],\n },\n },\n ];\n\n registerTooltipManager();\n registerSettings([...PUBLIC_CONFIGURE_SETTINGS, ...HIDDEN_CONFIGURE_SETTINGS]);\n}", "function settings() {\n\tthis.name = 'danny';\n\tthis.contacts = [\n\t\t{type: 'phone', value: '1233434'},\n\t\t{type: 'email', value: '[email protected]'}\n\t];\n}", "function scriptConfig() {\r\n\ttrace(\"scriptConfig() configuring the dialog\");\r\n\t\r\n\t// Configure Settings dialog\r\n\tGM_config.init('Emule Linker Settings dialog', {\r\n\t\t'section1' : { section: ['ed2k download mode', 'Please refer to your emule/amule/mldonkey configuration'], label: '', type: 'hidden'},\r\n\t\t/*'ed2kDlMethod': { label: 'Ed2k Download Method', title: 'local: local application that handle ed2k links (default)\\nemule: remote emule (via web frontend)\\namule: remote amule (via web frontend)\\nmldonkey: remote mldonkey (via web frontend)\\ncustom: custom server implementation (experimental)', type:'radio', options:['local','emule','amule','mldonkey','custom'], default: ed2kDlMethod },*/\r\n\t\t'ed2kDlMethod': { label: 'Ed2k Download Method', title: 'local: local application that handle ed2k links (default)\\nemule: remote emule (via web frontend)\\namule: remote amule (via web frontend)\\nmldonkey: remote mldonkey (via web frontend)\\ncustom: custom server implementation (experimental)', type:'select', options:{'local':'your system default','emule':'(remote) emule','amule':'(remote) amule','mldonkey':'(remote) mldonkey','custom':'custom (experimental)'}, default: ed2kDlMethod}, // default value doesn't work with a dropdown menu => see bugfix in the lib\r\n\t\t'emuleUrl': { label: 'Emule Url', title : 'The complete url of your emule web server ending by a / (example: http://127.0.0.1:4711/)', type: 'text', default: emuleUrl },\r\n\t\t'emulePwd': { label: 'Emule Password', title : 'the password you choose to access your emule web server', type: 'text', default: emulePwd },\r\n\t\t'emuleCat': { label: 'Category', title : 'categories available in your emule/amule application. You can add categories using the following template:\\ncategory_name1=corresponding_index_in_emule;category_name2=...\\nAdding a * before the name specify the default choice.\\nIf you don\\'t know what you are doing just specify this: *default=0', type: 'text', default: catToStr(emuleCat) },\r\n\t\t'section2' : { section: ['Popup Configuration', 'modify how the popup is displayed'], label: '', type: 'hidden'},\r\n\t\t'popupPos': { label: 'Popup Position', title : 'choosing \\'absolute\\', the popup will stay at the top. Choosing fixed, the popup will follow as you scroll within the page', type: 'radio', options:['absolute','fixed'], default: popupPos },\r\n\t\t'popupHeight': { label: 'Max Popup Height in px (0=unlimited)', title : 'Max height of the popup in pixels (0=unlimited)', type: 'int', default: popupHeight },\r\n\t\t'popupWidth': { label: 'Max Popup Width in px (0=unlimited)', title : 'Max width of the popup in pixels (0=unlimited)', type: 'int', default: popupWidth },\r\n\t\t'section3' : { section: ['Edit box Configuration', 'modify how the edit box is displayed'], label: '', type: 'hidden'},\r\n\t\t'editCol': { label: 'Number of columns', title : 'number of columns', type: 'radio', type: 'int', default: editCol },\r\n\t\t'editRow': { label: 'Number of rows', title : 'Number of rows', type: 'int', default: editRow },\r\n\t\t'editMaxLength': { label: 'MaxLength', title : 'Max number of char in the text area', type: 'int', 'default': editMaxLength },\r\n\t\t}, \r\n\t\t{\r\n\t\t//open: function() { GM_config.sections2tabs(); }, // not working (not included into the library)\r\n\t\tsave: function() { location.reload(); } // reload the page when configuration was changed\r\n\t\t}\r\n\t);\r\n\t\r\n\t// invoke the dialog\r\n\tif (GM_getValue(\"emule_config\", 0)<1)\r\n\t{\r\n\t\ttrace(\"scriptConfig() invoking the dialog\");\r\n\t\tGM_config.open();\r\n\t\tGM_setValue(\"emule_config\",1);\r\n\t}\r\n\r\n\t// store the settings\r\n\tsaveConfig();\r\n\r\n}", "function ContentSettings() {\n this.activeNavTab = null;\n OptionsPage.call(this, 'content',\n loadTimeData.getString('contentSettingsPageTabTitle'),\n 'content-settings-page2');\n }", "settings(state, settings) {\n state.settings = settings;\n }", "function save_options_() {\r\n save_options();\r\n }", "function setDefaultSettings() {\n\treturn UIPanelSettings;\n}", "function SetSettings(settings = null) {\n //Wenn Input = null, dann Standardeinstellungen schreiben\n if(settings === null) {\n var defaultSettings = { active: false, fullscreen: false, savePosition: true, nextEpisodeTimer: 0, volume: 1.0, lastCode: \"\", resumeTimer: 0 };\n WriteToStorage( \"Proxer-Playlist_Settings\", defaultSettings );\n return defaultSettings;\n }\n \n var currSettings = GetSettings();\n for( var key in settings ) {\n currSettings[key] = settings[key];\n }\n WriteToStorage( \"Proxer-Playlist_Settings\", currSettings );\n return currSettings;\n}", "getSettings(){\n this.send(\"settings-get\");\n }", "set_settings(settings) {\n this._child.send({\n cmd: 'settings',\n data: settings\n });\n }", "updateSettings() {\n this.settings = Settings.getInstance().settings;\n }", "static get defaultOptions() {\n return mergeObject(super.defaultOptions, {\n id: \"userPermissionConfig\",\n title: \"Material Deck: \"+game.i18n.localize(\"MaterialDeck.Sett.Permission\"),\n template: \"./modules/MaterialDeck/templates/userPermissionConfig.html\",\n width: 660,\n height: \"auto\",\n scrollY: [\".permissions-list\"],\n });\n }", "function initSettings() {\n\t\tns.settings.exampleSetting = 1337;\n\t}", "get settings() {\n return this._settings;\n }", "get settings() {\n return this._settings;\n }", "get settings() {\n return this._settings;\n }", "function openSettings() {\n let cfg = getConfigObject(true);\n $(\"#txtChannel\").val(cfg.Channels.join(\",\"));\n $(\"#txtNick\").val(cfg.Name || Strings.NAME_AUTOGEN);\n if (cfg.Pass && cfg.Pass.length > 0) {\n $(\"#txtPass\").attr(\"disabled\", \"disabled\").hide();\n $(\"#txtPassDummy\").show();\n }\n $(\"#selDebug\").val(`${cfg.Debug}`);\n $(\"#settings\").fadeIn();\n }", "function Options() {\n\t\tchrome.runtime.sendMessage({\n\t\t\ttype: 'OPEN_OPTIONS'\n\t\t});\n\t}", "function Settings() {\n this.values = Object.create(null);\n}", "function Settings() {\n this.values = Object.create(null);\n}", "function open_settings(items) {\n var config = {\n script_id: 'dashboard_level',\n title: 'Dashboard Level',\n content: {\n display: {\n type: 'list',\n label: 'Display',\n default: 'both',\n hover_tip: 'Select how you want the level to display',\n size: 3,\n content: {\n both: \"Both\",\n traditional: \"Like lesson and review counts\",\n forum: \"Like on the forum\",\n },\n },\n },\n }\n let dialog = new wkof.Settings(config);\n dialog.open();\n }", "function saveOptions() {}", "function getUserSettings() {\n\treturn setUIPanelSettings();\n}", "openSettings() {\n this.DOM_ELEMENTS.settingsModal.style.display = 'block';\n this.DOM_ELEMENTS.pomDurationDrop.value = this.workSessionDuration;\n this.DOM_ELEMENTS.shortBreakDrop.value = this.shortBreakDuration;\n this.DOM_ELEMENTS.longBreakDrop.value = this.longBreakDuration;\n this.DOM_ELEMENTS.pomBeforeBreakDrop.value = this.numSessionsBeforeLongBreak;\n this.DOM_ELEMENTS.pauseBeforeBox.checked = this.pauseBeforeBreak;\n this.DOM_ELEMENTS.pauseAfterBox.checked = this.pauseAfterBreak;\n this.DOM_ELEMENTS.hideSecondsBox.checked = this.hideSeconds;\n this.DOM_ELEMENTS.muteAudioBox.checked = this.muteAudio;\n this.DOM_ELEMENTS.hideAlertsBox.checked = this.hideAlerts;\n }", "configure(settings) {\n this.settings = { ...this.settings, ...settings }\n }", "function save_main_options() {\n chrome.storage.sync.set({ operationMode: this.value}, function (items) {\n try_update_status('status', 'Options saved', 1300);\n });\n}", "function open_settings() {\n var dialog = new wkof.Settings({\n script_id: 'doublecheck',\n title: 'Double-Check Settings',\n on_save: init_ui,\n pre_open: settings_preopen,\n content: {\n tabAnswers: {type:'page',label:'Answers',content:{\n grpChangeAnswers: {type:'group',label:'Change Answer',content:{\n allow_retyping: {type:'checkbox',label:'Allow retyping answer',default:true,hover_tip:'When enabled, you can retype your answer by pressing Escape or Backspace.'},\n allow_change_incorrect: {type:'checkbox',label:'Allow changing to \"incorrect\"',default:true,hover_tip:'When enabled, you can change your answer\\nto \"incorrect\" by pressing the \"-\" key.'},\n allow_change_correct: {type:'checkbox',label:'Allow changing to \"correct\"',default:true,hover_tip:'When enabled, you can change your answer\\nto \"correct\" by pressing the \"+\" key.'},\n show_corrected_answer: {type:'checkbox',label:'Show corrected answer',default:false,hover_tip:'When enabled, pressing \\'+\\' to correct your answer puts the\\ncorrected answer in the input field. Pressing \\'+\\' multiple\\ntimes cycles through all acceptable answers.'},\n }},\n grpCarelessMistakes: {type:'group',label:'Careless Mistakes',content:{\n typo_action: {type:'dropdown',label:'Typos in meaning',default:'ignore',content:{ignore:'Ignore',warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when meaning contains typos.'},\n wrong_answer_type_action: {type:'dropdown',label:'Wrong answer type',default:'warn',content:{warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when reading was entered instead of meaning, or vice versa.'},\n wrong_number_n_action: {type:'dropdown',label:'Wrong number of n\\'s',default:'warn',content:{warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when you type the wrong number of n\\'s in certain reading questions.'},\n small_kana_action: {type:'dropdown',label:'Big kana instead of small',default:'warn',content:{warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when you type a big kana instead of small (e.g. ゆ instead of ゅ).'},\n kanji_reading_for_vocab_action: {type:'dropdown',label:'Kanji reading instead of vocab',default:'warn',content:{warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when the reading of a kanji is entered for a single character vocab word instead of the correct vocab reading.'},\n kanji_meaning_for_vocab_action: {type:'dropdown',label:'Kanji meaning instead of vocab',default:'warn',content:{warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when the meaning of a kanji is entered for a single character vocab word instead of the correct vocab meaning.'},\n }},\n }},\n tabMistakeDelay: {type:'page',label:'Mistake Delay',content:{\n grpDelay: {type:'group',label:'Delay Next Question',content:{\n delay_wrong: {type:'checkbox',label:'Delay when wrong',default:true,refresh_on_change:true,hover_tip:'If your answer is wrong, you cannot advance\\nto the next question for at least N seconds.'},\n delay_multi_meaning: {type:'checkbox',label:'Delay when multiple meanings',default:false,hover_tip:'If the item has multiple meanings, you cannot advance\\nto the next question for at least N seconds.'},\n delay_slightly_off: {type:'checkbox',label:'Delay when answer has typos',default:false,hover_tip:'If your answer contains typos, you cannot advance\\nto the next question for at least N seconds.'},\n delay_period: {type:'number',label:'Delay period (in seconds)',default:1.5,hover_tip:'Number of seconds to delay before allowing\\nyou to advance to the next question.'},\n }},\n }},\n tabBurnReviews: {type:'page',label:'Burn Reviews',content:{\n grpBurnReviews: {type:'group',label:'Burn Reviews',content:{\n warn_burn: {type:'dropdown',label:'Warn before burning',default:'never',content:{never:'Never',cheated:'If you changed answer',always:'Always'},hover_tip:'Choose when to warn before burning an item.'},\n burn_delay_period: {type:'number',label:'Delay after warning (in seconds)',default:1.5,hover_tip:'Number of seconds to delay before allowing\\nyou to advance to the next question after seeing a burn warning.'},\n }},\n }},\n tabLightning: {type:'page',label:'Lightning',content:{\n grpLightning: {type:'group',label:'Lightning Mode',content:{\n show_lightning_button: {type:'checkbox',label:'Show \"Lightning Mode\" button',default:true,hover_tip:'Show the \"Lightning Mode\" toggle\\nbutton on the review screen.'},\n lightning_enabled: {type:'checkbox',label:'Enable \"Lightning Mode\"',default:true,refresh_on_change:true,hover_tip:'Enable \"Lightning Mode\", which automatically advances to\\nthe next question if you answer correctly.'},\n srs_msg_period: {type:'number',label:'SRS popup time (in seconds)',default:1.2,min:0,hover_tip:'How long to show SRS up/down popup when in lightning mode. (0 = don\\'t show)'},\n }},\n }},\n tabAutoInfo: {type:'page',label:'Item Info',content:{\n grpAutoInfo: {type:'group',label:'Show Item Info',content:{\n autoinfo_correct: {type:'checkbox',label:'After correct answer',default:false,hover_tip:'Automatically show the Item Info after correct answers.', validate:validate_autoinfo_correct},\n autoinfo_incorrect: {type:'checkbox',label:'After incorrect answer',default:false,hover_tip:'Automatically show the Item Info after incorrect answers.', validate:validate_autoinfo_incorrect},\n autoinfo_multi_meaning: {type:'checkbox',label:'When multiple meanings',default:false,hover_tip:'Automatically show the Item Info when an item has multiple meanings.', validate:validate_autoinfo_correct},\n autoinfo_slightly_off: {type:'checkbox',label:'When answer has typos',default:false,hover_tip:'Automatically show the Item Info when your answer has typos.', validate:validate_autoinfo_correct},\n }},\n }},\n }\n });\n dialog.open();\n }", "function save_options() {\n\tsetLocal(\"sense_facebook\");\n\tsetLocal(\"sense_google\");\n\tsetLocal(\"sense_twitter\");\n\tsetLocal(\"sense_youtube\");\n\tsetLocal(\"sense_4Chan\");\n\tsetLocal(\"sense_selector\");\n\tsetLocal(\"sense_color\");\n\tcheckAPI();\n}", "function Settings$1(options) {\n // allow null options\n options = options || {};\n this.displayMode = get(options.displayMode, false);\n this.throwOnError = get(options.throwOnError, true);\n this.errorColor = get(options.errorColor, \"#cc0000\");\n this.macros = options.macros || {};\n}", "function getSavedOptions() {\n log('Getting saved options.');\n opt_devmode = GM_getValue(\"opt_devmode\", opt_devmode);\n debugLoggingEnabled = opt_loggingEnabled = GM_getValue(\"opt_loggingEnabled\", opt_loggingEnabled);\n opt_hidefedded = GM_getValue(\"opt_hidefedded\", opt_hidefedded);\n opt_hidefallen = GM_getValue(\"opt_hidefallen\", opt_hidefallen);\n opt_hidetravel = GM_getValue(\"opt_hidetravel\", opt_hidetravel);\n opt_showcaymans = GM_getValue(\"opt_showcaymans\", opt_showcaymans);\n opt_hidehosp = GM_getValue(\"opt_hidehosp\", opt_hidehosp);\n opt_disabled = GM_getValue(\"opt_disabled\", opt_disabled);\n }", "function Settings(_settings) {\r\n if (_settings === void 0) { _settings = new Map(); }\r\n this._settings = _settings;\r\n }", "function settings()\r\n\t\t{\r\n\t\t\tdocument.getElementById('menu').style.display = \"none\";\r\n\t\t\tdocument.getElementById('settings').style.display = \"initial\";\r\n\t\t}", "allowedSettings() {\n return allowedSettings;\n }", "_initializeDefaultSettings(settings) {\r\n for (let name in argvOptions) {\r\n let option = argvOptions[name];\r\n\r\n let realName = name;\r\n if (option.name) {\r\n realName = option.name;\r\n }\r\n\r\n if (!_.has(settings, realName)) {\r\n if (realName == 'paths') {\r\n settings['paths'] = { '' : path.resolve('') };\r\n }\r\n else if (_.has(option, 'default')) {\r\n settings[realName] = option['default'];\r\n }\r\n else if (option.type == 'flag') {\r\n // Flags default to false\r\n settings[realName] = false;\r\n }\r\n else if (option.type == 'array') {\r\n settings[realName] = [];\r\n }\r\n }\r\n }\r\n }", "function restore_options() {\n\ntry\n {\n\tvar servers = getLocalStorage(\"teamcitysettings\");\n\tvar server = servers[0]||{};\n\t\n setOptionFromElement(\"host\",server.host||\"\");\n setOptionFromElement(\"username\",server.username||\"\");\n setOptionFromElement(\"password\",server.password||\"\");\n showBuildTypeIds(server);\n }catch(err){\n\tconsole.log(\"Error exception\");\n }\n}", "function setCurrentSettings(){\n for (let i = 0; i < propList.length; i++){\n currentSettings[propList[i].name] = propList[i].array[propList[i].paramIndex]; //only for options checking, actual settings contains in propList[]\n }\n resetPreviewSize(); //needed because of \"auto\" feature\n resetPreviewEventType();\n }", "function mostrarSettings(){\n\ttry{\n\t\tif(get('wcr_settings')) return; //if the screen is already open, do nothing\n\n\t\tdataCache = null; //force q to load everything again, in case they changed something in another tab\n\n\t\t//editable properties of site settings\n\t\tvar propsSitio = {\n\t\t\turl:{ desc: 'URL', title: \"Define what sites will use these settings\",\n\t\t\t\ttipos:{\n\t\t\t\t\tstr:{ desc: 'Beginning of URL',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Beginning of the url without the http://www.\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: \"RegExp\",\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that matches the url\", size: 60 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\timg:{ desc:'Image', title:\"Method for obtaining the main image\",\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: '&lt;img&gt; that is the only one with a \"src\" containing one of the following strings: \"/comics/\", \"/comic/\", \"/strips/\", \"/strip/\", \"/archives/\", \"/archive/\", \"/wp-content/uploads/\", \"comics\", \"comic\", \"strips\", \"strip\", \"archives\", \"archive\", \"/manga/\"' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'Beginning of src',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Beginning of the &quot;src&quot; attribute of the &lt;img&gt;\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the whole &lt;img&gt; (or at least the &quot;src&quot; and &quot;title&quot; attributes)\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the &lt;img&gt;\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the &lt;img&gt;\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the &lt;img&gt;\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html, pos)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the &lt;img&gt; element (either as string or object)\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tback:{ desc: 'Back', title: 'Method for obtaining the link to the previous page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \"back\" or \"prev\" somewhere in its innerHTML or one of its attributes' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath condition',\n\t\t\t\t\t\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the URL of the previous page\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the URL\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the URL of the previous page, or the &lt;a&gt; element that links to it\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the &lt;a&gt; element that links to the previous page\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html, pos)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the URL of the previous page\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tnext:{ desc: 'Next', title: 'Method for obtaining the link to the next page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \"next\" somewhere in its innerHTML or one of its attributes' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath condition',\n\t\t\t\t\t\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the URL of the next page\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the URL\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the URL of the next page, or the &lt;a&gt; element that links to it\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the &lt;a&gt; element that links to the next page\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html, pos)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the URL of the next page\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tfirst:{ desc: 'First', title: 'Method for obtaining the link to the first page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \"first\" somewhere in its innerHTML or one of its attributes' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath condition',\n\t\t\t\t\t\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the URL of the first page\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the URL\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the URL of the first page, or the &lt;a&gt; element that links to it\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the &lt;a&gt; element that links to the first page\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and returns the URL of the first page\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tlast:{ desc: 'Last', title: 'Method for obtaining the link to the last page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \"last\", \"latest\", \"newest\" or \"today\" somewhere in its innerHTML or one of its attributes' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath condition',\n\t\t\t\t\t\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the URL of the last page\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the URL\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the URL of the last page, or the &lt;a&gt; element that links to it\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the &lt;a&gt; element that links to the last page\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and returns the URL of the last page\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tfixurl:{ desc: 'Fix URL', title: 'Fix URLs coming from a link or img.src for sites that may need it (like relative URLs that don\\'t behave normally, or links from http://something.com to http://www.something.com that wouldn\\'t work because of cross site request limitations)',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Do nothing' }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(url, img, link, pos)',\n\t\t\t\t\t\tval: { elem: 'textarea', title: 'Function that receives an URL, and flags telling if it came from an img.src or link to another page, and returns the fixed url', rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\textra:{ desc: 'Extra Content', title: 'Other content besides the main image to get from each page',\n\t\t\t\ttipos:{\n\t\t\t\t\tstr:{ desc: 'Literal string',\n\t\t\t\t\t\tval:{ elem: 'input', title: 'HTML string, this will be output literally', size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the desired content\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the content\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the desired content\", size: 60 },\n\t\t\t\t\t\tarr:{ elem: 'select', html: '<option value=\"\">First element</option><option value=\"1\">List of elements</option>'},\n\t\t\t\t\t\tglue:{ elem: 'input', title: 'String to put between each pair of elements returned', size: 20},\n\t\t\t\t\t\tfirst:{ elem: 'input', title: 'Index of the first element to return (starting from 0, negative means counting from the last)', size: 1},\n\t\t\t\t\t\tlast:{ elem: 'input', title: 'Index of the last element to return (starting from 0, negative means counting from the last)', size: 1}\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the desired content\", size: 60 },\n\t\t\t\t\t\tarr:{ elem: 'select', html: '<option value=\"\">First element</option><option value=\"1\">List of elements</option>'},\n\t\t\t\t\t\tglue:{ elem: 'input', title: 'String to put between each pair of elements returned', size: 20},\n\t\t\t\t\t\tfirst:{ elem: 'input', title: 'Index of the first element to return (starting from 0, negative means counting from the last)', size: 1},\n\t\t\t\t\t\tlast:{ elem: 'input', title: 'Index of the last element to return (starting from 0, negative means counting from the last)', size: 1}\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html, pos)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the desired content\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\txelem:{ desc: 'Extras Container', title: 'Element for placing the extra content when using the full layout',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Inside the WCR container (between the image and the back/next buttons)' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath',\n\t\t\t\t\t\tval: { elem: 'input', title: 'XPath query that returns the element where the extra content will be placed as its innerHTML', size:60 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tlayelem:{ desc: 'Layout Container', title: 'Element for placing the image and the rest of the script content when using the full layout',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Where the original image was' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath',\n\t\t\t\t\t\tval: { elem: 'input', title: 'XPath query that returns the element where the content will be placed as its innerHTML', size:60 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tjs:{ desc: 'Custom Action', title: 'Custom function to execute after each page change',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Do nothing' }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(dir)',\n\t\t\t\t\t\tval: { elem: 'textarea', title: 'Function that receives the direction in which the page was changed (0 when the starting page is loaded, 1 when going forward and -1 when going backwards)', rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tstyle:{ desc: 'Custom CSS', title: 'Custom CSS styles',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Don\\'t change anything' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'CSS rules',\n\t\t\t\t\t\tval: { elem: 'textarea', title: 'CSS rules', rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tbgcol:{ desc: 'Background Color',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Keep original' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'Custom',\n\t\t\t\t\t\tval: { elem: 'input', title: '#RRGGBB or #RGB', size:6 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\ttxtcol:{ desc: 'Text Color',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Keep original' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'Custom',\n\t\t\t\t\t\tval: { elem: 'input', title: '#RRGGBB or #RGB', size:6 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tscrollx:{ desc: 'Default Horizontal Autoscroll', title: 'Scroll to this position of the image each time you change the page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Left' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'Relative to image',\n\t\t\t\t\t\tval: { elem: 'select', html: '<option value=\"L\">Left</option><option value=\"R\">Right</option><option value=\"M\">Middle</option>' }\n\t\t\t\t\t},\n\t\t\t\t\tnum:{ desc: 'Pixels',\n\t\t\t\t\t\tval: { elem: 'input', title: 'X coordinate in pixels', size: 5 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function()',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that returns the numbers of pixels to scroll\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tscrolly:{ desc: 'Default Vertical Autoscroll', title: 'Scroll to this position of the image each time you change the page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Top' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'Relative to image',\n\t\t\t\t\t\tval: { elem: 'select', html: '<option value=\"U\">Top</option><option value=\"D\">Bottom</option><option value=\"M\">Middle</option>' }\n\t\t\t\t\t},\n\t\t\t\t\tnum:{ desc: 'Pixels',\n\t\t\t\t\t\tval: { elem: 'input', title: 'Y coordinate in pixels', size: 5 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function()',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that returns the numbers of pixels to scroll\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tlayout:{ desc: 'Default Layout', title: 'Layout to use when no custom layout settings are defined for this site',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Use default settings' }\n\t\t\t\t\t},\n\t\t\t\t\tbool:{ desc: 'Custom',\n\t\t\t\t\t\tval: { elem: 'select', html: '<option value=\"false\">Minimalistic</option><option value=\"true\">Keep original</option>' }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t//types of updates\n\t\tvar listaTipos = [\n\t\t\t'Bug fixes (Firefox)',\n\t\t\t'Bug fixes (Other browsers)',\n\t\t\t'New features',\n\t\t\t'New sites',\n\t\t\t'Fixes for old sites',\n\t\t\t'Graphic changes',\n\t\t\t'New options'];\n\t\tvar t, tiposUp = {};\n\t\tfor(t=0; t<listaTipos.length;t++) tiposUp[1<<t] = listaTipos[t];\n\t\ttiposUp[(1<<16)-(1<<t)] = 'Other stuff (???)';\n\n\t\t//configurable keys\n\t\tvar teclas = {\n\t\t\tback: ['Back', 'Go back 1 page'],\n\t\t\tnext: ['Next', 'Go forward 1 page'],\n\t\t\tscroll_left: ['Scroll left', ''],\n\t\t\tscroll_right: ['Scroll right', ''],\n\t\t\tscroll_up: ['Scroll up', ''],\n\t\t\tscroll_down: ['Scroll down', ''],\n\t\t\treload: ['Reload', 'Reload the current page (in old browsers, pressing the reload button will take you back to where you started). F5 will always do this (unless set to another action)'],\n\t\t\tset_bm: ['Set as only bookmark', 'Delete other bookmarks and add this page, so that the next time you visit the site you will be taken back to this page'],\n\t\t\tadd_bm: ['Add to bookmarks', ''],\n\t\t\tlayout: ['Toggle layout', 'Switch between the &quot;clean layout&quot; (show only image and buttons) and &quot;full layout&quot; (show the whole original page)'],\n\t\t\tbotones: ['Toggle buttons', 'Switch between showing or hiding all the script\\'s buttons (back/next, bookmarks, settings, etc...)'],\n\t\t\tfit: ['Toggle Fit-to-screen', 'Switch between always showing the image in its original size or fitting it to the screen when needed'],\n\t\t\tslide: ['Toggle Slideshow', 'Start or stop the slideshow mode (pages turn automatically after the selected time). Slideshow will also stop by pressing ESC or manually turning a page'],\n\t\t\tdebug_mode: ['Toggle debug mode', 'In debug mode you\\'ll get alerts to see what isn\\'t working. Useful when adding new sites'],\n\t\t\tdebug_info: ['Debug info (on debug mode)', 'Show a list of URLs of the preloaded pages and images']\n\t\t};\n\n\t\tvar arrcursores = ['default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize'];\n\t\tif(isFirefox()) arrcursores.push('-moz-grab', '-moz-grabbing', '-moz-zoom-in', '-moz-zoom-out');\n\t\tif(isWebKit()) arrcursores.push('-webkit-grab', '-webkit-grabbing', '-webkit-zoom-in', '-webkit-zoom-out');\n\t\tvar cursores = {\n\t\t\t'1': 'Left green arrow',\n\t\t\t'2': 'Right green arrow',\n\t\t\t'5': 'Left blue arrow',\n\t\t\t'6': 'Right blue arrow',\n\t\t\t'3': 'Custom cursor #1',\n\t\t\t'4': 'Custom cursor #2'\n\t\t};\n\t\tfor(var c=0; c<arrcursores.length; c++) cursores[arrcursores[c]] = arrcursores[c];\n\n\t\t//general options\n\t\tvar opsGeneral = {\n\t\t\tclickImgNavigates:{ desc:'Click image to navigate', title:'If enabled, clicking the image will let you go to the next or previous page',\n\t\t\t\tdef: defaultSettings.clickImgNavigates ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tclick_img_izq:{ desc:'Click left half of image to go back', title:'If enabled, clicking the left half of the image will take you to the previous page, and the right half to the next one. Otherwise, clicking anywhere will always take you to the next page',\n\t\t\t\tdef: defaultSettings.clikLeftHalfGoesBack ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tflipControlsManga:{ desc:'Flip controls for mangas', title:'If enabled, flips the controls (L/R arrows, L/R image click, back/next buttons) for mangas or other right-to-left content',\n\t\t\t\tdef: defaultSettings.flipControlsManga ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\toverwrite_links:{ desc:'Overwrite links', title:'If enabled, overwrites the original back/next links (when using the original layout) to work like the script\\'s buttons',\n\t\t\t\tdef:'1',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tgoToBookmark:{ desc: 'Go to bookmark', title: 'If you have 1 bookmark saved for a site, asks you if you want to go there when you visit the site',\n\t\t\t\tdef: defaultSettings.goToBookmark ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tscroll_rate:{ desc:'Scroll rate', title:'Number of pixels to scroll when using the keyboard', def:'50'},\n\t\t\tb64_images:{ desc:'Force cache (experimental)', title:'Chache images as base64 strings, so the browser doesn\\'t unload them to save memory',\n\t\t\t\tdef:'0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tuseHistoryAPI:{ desc: 'Use browser history', title: 'Changes the URL and keeps track of the visited pages in the browser history, so you can navigate with the browser\\'s back/forward buttons as usual',\n\t\t\t\tdef: '1',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tmoveWhileLoading:{ desc: 'Force loading next page', title: 'Lets you move to the next or previous page before the image for that page has finished loading',\n\t\t\t\tdef: defaultSettings.moveWhileLoading ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_grp_fit:{ desc:'AutoZoom', title:'Automatically zoom the image, either shrinking or expanding it to make it fit in the screen' },\n\t\t\tfit:{ desc:'Fit image to screen', title:'Apply options below to fit the image to the screen (if none of them are selected and you enable this option, you will be prompted to select the settings the first time you visit each site). This setting can also be toggled for this site with a keyboard shortcut (+ by default)',\n\t\t\t\tdef: defaultSettings.autozoom ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tachw:{ desc:'Shrink to fit width', title:'If the image is wider than the window, it will be shrunk to fit the screen without needing to scroll',\n\t\t\t\tdef: defaultSettings.shrinkWidth ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Never shrink',\n\t\t\t\t\t'1':'Shrink when needed'\n\t\t\t\t}\n\t\t\t},\n\t\t\tachh:{ desc:'Shrink to fit height', title:'If the image is longer than the window, it will be shrunk to fit the screen without needing to scroll',\n\t\t\t\tdef: defaultSettings.shrinkHeight ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Never shrink',\n\t\t\t\t\t'1':'Shrink when needed'\n\t\t\t\t}\n\t\t\t},\n\t\t\tagrw:{ desc:'Expand to fit width', title:'If the image is smaller than the window, it will be expanded to fit the screen',\n\t\t\t\tdef: defaultSettings.expandWidth ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Never expand',\n\t\t\t\t\t'1':'Expand when needed'\n\t\t\t\t}\n\t\t\t},\n\t\t\tagrh:{ desc:'Expand to fit height', title:'If the image is smaller than the window, it will be expanded to fit the screen',\n\t\t\t\tdef: defaultSettings.expandHeight ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Never expand',\n\t\t\t\t\t'1':'Expand when needed'\n\t\t\t\t}\n\t\t\t},\n\t\t\tmaxScale:{ desc:'Max scale', title: 'Maximum scale (as a percentage, > 100) to which the image should be expanded (leave blank for no limit)'},\n\t\t\tminScale:{ desc:'Min scale', title: 'Minimum scale (as a percentage, < 100) to which the image should be shrunk (leave blank for no limit)'},\n\t\t\tmaxScaleReset:{ desc:'Over max scale', title: 'Action to be taken when the AutoZoom would expand the image over the max scale',\n\t\t\t\tdef: '0',\n\t\t\t\tvals: {\n\t\t\t\t\t'0': 'Keep the max scale',\n\t\t\t\t\t'1': 'Reset to original size'\n\t\t\t\t}\n\t\t\t},\n\t\t\tminScaleReset:{ desc:'Under min scale', title: 'Action to be taken when the AutoZoom would shrink the image over the min scale',\n\t\t\t\tdef: '0',\n\t\t\t\tvals: {\n\t\t\t\t\t'0': 'Keep the min scale',\n\t\t\t\t\t'1': 'Reset to original size'\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_grp_scroll:{ desc: 'AutoScroll', title:'Scroll to this position of the image each time you change the page' },\n\t\t\tscrollx:{ desc:'Horizontal', title:'Scroll to this position of the image each time you change the page',\n\t\t\t\tvals:{\n\t\t\t\t\t'L':'Left',\n\t\t\t\t\t'R':'Right',\n\t\t\t\t\t'M':'Middle'\n\t\t\t\t}\n\t\t\t},\n\t\t\tscrolly:{ desc:'Vertical', title:'Scroll to this position of the image each time you change the page',\n\t\t\t\tvals:{\n\t\t\t\t\t'U':'Top',\n\t\t\t\t\t'D':'Bottom',\n\t\t\t\t\t'M':'Middle'\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_grp_prefetch:{ desc:'Page Preloading', title:'Adjust the number of pages to preload in each direction' },\n\t\t\tprefetch_der:{ desc:'Forward', title:'The number of next pages to preload (>0)',\n\t\t\t\tdef:defaultSettings.prefetchNext},\n\t\t\tprefetch_izq:{ desc:'Backwards', title:'The number of previous pages to preload (>0)',\n\t\t\t\tdef:defaultSettings.prefetchBack},\n\t\t\tprefetch_start_der:{ desc:'Initial forward', title:'The number of next pages to preload (>0) when the page is first loaded (to avoid wasting bandwith if you only wanted to see that page)',\n\t\t\t\tdef:defaultSettings.prefetchNextStart},\n\t\t\tprefetch_start_izq:{ desc:'Initial backwards', title:'The number of previous pages to preload (>0) when the page is first loaded (to avoid wasting bandwith if you only wanted to see that page)',\n\t\t\t\tdef:defaultSettings.prefetchBackStart},\n\t\t\tprefetchNoNext:{ desc:'Prefetch when no next page', title:'Disable this to stop preloading the previous page when visiting the last page (ie, the next page was not found)',\n\t\t\t\tdef:defaultSettings.prefetchNoNext ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}}\n\t\t};\n\n\t\t//visual options\n\t\tvar opsLayout = {\n\t\t\tlayout:{ desc:'Layout', title:'Minimalistic layout will show only the image, the defined extra content, and this script\\'s buttons. Keeping the original layout will stuff that same content in the place where the image used to be, leaving the rest of the page untouched. This setting can also be toggled for this site with a keyboard shortcut (- by default)',\n\t\t\t\tdef: defaultSettings.fullLayout ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Minimalistic',\n\t\t\t\t\t'1':'Keep original'\n\t\t\t\t}\n\t\t\t},\n\t\t\tbotones:{ desc:'Buttons', title:'Show or hide all the script\\'s buttons (back/next, bookmarks, settings, etc...). This setting can also be toggled for this site with a keyboard shortcut (Shift + - by default)',\n\t\t\t\tdef: defaultSettings.showButtons ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Hide',\n\t\t\t\t\t'1':'Show'\n\t\t\t\t}\n\t\t\t},\n\t\t\tdim:{ desc:'Screen Dimmer', title:'Add a shadow to the rest of the site so the image (or script content) gets a better focus',\n\t\t\t\tdef: '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'S':'Focus script content',\n\t\t\t\t\t'I':'Focus image'\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_grp_border:{ desc: 'Border', title:'Space to leave around the image (affects AutoScroll and AutoZoom)' },\n\t\t\tbordex:{ desc:'Horizontal border', title:'Extra pixels to the left/right of the image',\n\t\t\t\tdef: defaultSettings.borderLR },\n\t\t\tbordey:{ desc:'Vertical border', title:'Extra pixels to the top/bottom of the image',\n\t\t\t\tdef: defaultSettings.borderUD },\n\n\t\t\t_grp_cursor:{ desc:'Cursors', title:'Change the cursor according to the current state' },\n\t\t\tchcursor_img:{ desc:'Change over image', title:'Enable/Disable this to see a different cursor over the image depending on the state, or always the same one',\n\t\t\t\tdef:'1',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tchcursor_btns:{ desc:'Change over buttons', title:'Enable/Disable this to see a different cursor over the back/next buttons depending on the state, or always the same one',\n\t\t\t\tdef:'1',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tcursor_back:{ desc:'Previous page', title:'Cursor for the previous page', def:'1', vals: cursores },\n\t\t\tcursor_next:{ desc:'Next page', title:'Cursor for the next page', def:'2', vals: cursores },\n\t\t\tcursor_loading:{ desc:'Loading', title:'Cursor for when the next page is loading', def:'progress', vals: cursores },\n\t\t\tcursor_nolink:{ desc:'No link', title:'Cursor for when there is no next page', def:'not-allowed', vals: cursores },\n\t\t\tcursor_noimg:{ desc:'No image', title:'Cursor for when there is a next page but it has no image', def:'pointer', vals: cursores },\n\t\t\tcursor_custom_3:{ desc:'Custom cursor #1', title:'Custom image to use in the above options, either as an url or base64 (suggested size of 32x32 px, hotspot is at 16,16)'},\n\t\t\tcursor_custom_4:{ desc:'Custom cursor #2', title:'Custom image to use in the above options, either as an url or base64 (suggested size of 32x32 px, hotspot is at 16,16)'}\n\t\t};\n\n\t\tvar divsets = document.createElement('div');\n\t\tdivsets.id = 'wcr_settings';\n\t\tdivsets.style.textAlign = 'center';\n\t\tdivsets.innerHTML =\n\t\t\t'<div style=\"position:fixed; z-index:232322; background:#000; top:0; left:0; right:0; bottom:0; opacity:0.8;\"></div>'+\n\t\t\t'<div id=\"wcr_settings_popup\" style=\"position:absolute; left:50%; z-index:232323; background-color:#fff; color:#000; padding: 20px;max-width: 800px; min-width: 800px;\">'+\n\t\t\t\t'<div id=\"wcr_settings_links\">'+\n\t\t\t\t\t'<span class=\"wcr_general\">General</span> | '+\n\t\t\t\t\t'<span class=\"wcr_layout\">Graphic settings</span> | '+\n\t\t\t\t\t'<span class=\"wcr_sitio\">Site settings</span> | '+\n\t\t\t\t\t'<span class=\"wcr_teclas\">Keyboard shortcuts</span>'+\n\t\t\t\t'</div><hr class=\"wcr_settings_hr\" />'+\n\t\t\t\t'<div id=\"wcr_settings_content\" style=\"text-align:left\">'+\n\t\t\t\t\t'<div class=\"wcr_general\">'+htmlLayout(opsGeneral, 'general')+'</div>'+\n\t\t\t\t\t'<div class=\"wcr_layout\">'+htmlLayout(opsLayout, 'layout')+'</div>'+\n\t\t\t\t\t'<div class=\"wcr_sitio\">'+htmlSitio(propsSitio)+'</div>'+\n\t\t\t\t\t'<div class=\"wcr_teclas\">'+htmlTeclas(teclas)+'</div>'+\n\t\t\t\t'</div><hr class=\"wcr_settings_hr\" />'+\n\t\t\t\t'<div>'+\n\t\t\t\t\t'Import / Export '+\n\t\t\t\t\t'<select id=\"wcr_set_sel_impexp\">'+\n\t\t\t\t\t\t'<option value=\"\">data for '+dominioData()+'</option>'+\n\t\t\t\t\t\t'<option value=\"default\">default settings</option>'+\n\t\t\t\t\t\t'<option value=\"all\">ALL data</option>'+\n\t\t\t\t\t'</select> '+\n\t\t\t\t\t'<button id=\"wcr_set_btn_impexp\">GO</button><br>'+\n\t\t\t\t\t'Reset '+\n\t\t\t\t\t'<select id=\"wcr_set_sel_reset\">'+\n\t\t\t\t\t\t'<option value=\"\">data for '+dominioData()+'</option>'+\n\t\t\t\t\t\t'<option value=\"default\">default settings</option>'+\n\t\t\t\t\t\t'<option value=\"all\">ALL data</option>'+\n\t\t\t\t\t'</select> '+\n\t\t\t\t\t'<button id=\"wcr_set_btn_reset\">GO</button>'+\n\t\t\t\t'</div><br/>'+\n\t\t\t\t'<div>'+\n\t\t\t\t\t'<button id=\"wcr_set_btn_guardar\">Save</button> '+\n\t\t\t\t\t'<button id=\"wcr_set_btn_aplicar\">Apply</button> '+\n\t\t\t\t\t'<button id=\"wcr_set_btn_cancelar\">Cancel</button>'+\n\t\t\t\t'</div>'+\n\t\t\t'</div>'+\n\t\t\t'<style>'+\n\t\t\t\t'#wcr_settings_popup *{color:#000; font-size: 12px !important; font-family: Verdana, Arial, Helvetica, sans-serif !important;}'+\n\t\t\t\t'.wcr_tr_vert_group, .wcr_td_hori_group{height: 25px; padding: 0px;}'+\n\t\t\t\t'.wcr_td_vert_group{height: 25px; width: 224px !important; padding: 0px;}'+\n\t\t\t\t'.wcr_settings_td_label{text-align: center;height: 24px; padding: 0px;}'+\n\t\t\t\t'.wcr_settings_hr{margin: 4px 2px 4px}'+\n\t\t\t\t'#wcr_sel_confpag, #wcr_set_sel_impexp, #wcr_set_sel_reset{width: 50% !important}'+\n\t\t\t\t'#wcr_general_tabla, #wcr_layout_tabla{width: 100%; border-spacing: 2px}'+\n\t\t\t\t'#wcr_settings_popup input, #wcr_settings_popup select, #wcr_settings_popup textarea{background-color:#fff; width: 95%;}'+\n\t\t\t\t'#wcr_settings_links span{cursor:pointer; text-decoration:underline;}'+\n\t\t\t\t'div{position:static; float:none;}'+\n\t\t\t\t'#wcr_settings [title]{cursor:help;}'+\n\t\t\t\t'#wcr_settings tr:nth-of-type(odd){background-color:#fff; color:#000;}'+\n\t\t\t\t'#wcr_settings tr:nth-of-type(even){background-color:#eef; color:#000;}'+\n\t\t\t\t'#wcr_settings tr.wcr_settings_group{background-color:#ccf; color:#000; text-align:center; font-style:italic;}'+\n\t\t\t\t'.wcr_settings_group td:nth-of-type(1):not([colspan]){background-color:#fff;}'+\n\t\t\t'</style>';\n\t\tdocument.body.appendChild(divsets);\n\n\t\tinitLayout(opsGeneral, 'general');\n\t\tinitLayout(opsLayout, 'layout');\n\t\tinitSitio(propsSitio);\n\t\tinitTeclas(teclas);\n\n\t\t//set events for tabs / save / cancel\n\t\tvar tabs = xpath('//div[@id=\"wcr_settings_links\"]/span', document, true);\n\t\tfor(var i=0; i<tabs.length; i++)\n\t\t\tsetEvt(tabs[i], 'click', function(evt){\n\t\t\t\tcambiarTabSettings(evt.target.className);\n\t\t\t});\n\n\t\tfor(var o in opsGeneral) opsLayout[o] = opsGeneral[o];\n\t\tsetEvt('wcr_set_btn_guardar', 'click', function(){\n\t\t\tif(guardarSettings(teclas, propsSitio, tiposUp, opsLayout)){\n\t\t\t\tredirect(link[posActual]);\n\t\t\t}\n\t\t});\n\t\tsetEvt('wcr_set_btn_aplicar', 'click', function(){\n\t\t\tguardarSettings(teclas, propsSitio, tiposUp, opsLayout);\n\t\t});\n\t\tsetEvt('wcr_set_btn_cancelar', 'click', function(){\n\t\t\tdocument.body.removeChild(divsets);\n\t\t});\n\t\tsetEvt('wcr_set_btn_impexp', 'click', function(){\n\t\t\tif(confirm('Save the changes?')) guardarSettings(teclas, propsSitio, tiposUp, opsLayout);\n\n\t\t\tvar dominio = get('wcr_set_sel_impexp').value;\n\t\t\tvar data = dominio == 'all' ?\n\t\t\t\tGM_getValue('wcr.settings', '') :\n\t\t\t\tJSON.stringify(getData('', '', dominio));\n\t\t\tvar resp = prompt(\n\t\t\t\t'Copy this and save it somewhere to export your settings.\\n' +\n\t\t\t\t'Replace this with your saved settings to restore them.', data);\n\t\t\tif(resp && resp != data && confirm('Are you sure you want to replace your current settings?')){\n\t\t\t\ttry{\n\t\t\t\t\tvar nuevaData = JSON.parse(resp);\n\t\t\t\t\tif(dominio == 'all') GM_setValue('wcr.settings', resp);\n\t\t\t\t\telse setData('', nuevaData, dominio);\n\t\t\t\t\talert('Settings updated successfully');\n\t\t\t\t\tredirect(link[posActual]);\n\t\t\t\t}\n\t\t\t\tcatch(e){\n\t\t\t\t\talert('Error parsing the settings, nothing has been changed');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetEvt('wcr_set_btn_reset', 'click', function(){\n\t\t\tvar msgConfirm = 'This will reset all data for '+dominioData()+': graphic options, bookmarks, and last visited page.\\nYou may want to export and backup your settings first...\\n\\nAre you sure you want to delete this data?';\n\t\t\tvar msgOK = 'All settings for '+dominioData()+' cleared';\n\t\t\tvar dominio = get('wcr_set_sel_reset').value;\n\t\t\tif(dominio == 'all'){\n\t\t\t\tmsgConfirm = 'This will reset EVERYTHING to the default settings, and all data will be lost for all sites.\\nYou may want to export and backup your settings first...\\n\\nAre you REALLY sure you want to do delete this data?';\n\t\t\t\tmsgOK = 'Everything is gone... everything...\\n\\n\\n\\n...forever';\n\t\t\t}\n\t\t\telse if(dominio == 'default'){\n\t\t\t\tmsgConfirm = 'This will reset all the default graphic options and keyboard shortcuts settings.\\nYou may want to export and backup your settings first...\\n\\nAre you sure you want to do delete this data?';\n\t\t\t\tmsgOK = 'All default settings cleared';\n\t\t\t}\n\n\t\t\tif(confirm(msgConfirm)){\n\t\t\t\tif(dominio == 'all') GM_deleteValue('wcr.settings');\n\t\t\t\telse delData('', dominio);\n\t\t\t\talert(msgOK);\n\t\t\t\tredirect(link[posActual]);\n\t\t\t}\n\t\t});\n\n\t\tcambiarTabSettings(tabSettingActual);\n\t}\n\tcatch(e){\n\t\talert('Error while initializing the settings window: ' + e);\n\t\tif(get('wcr_settings')) document.body.removeChild(get('wcr_settings'));\n\t}\n}", "function addSettings() {\n if (!$(\".gt2-settings\").length) {\n let elem = `\n <div class=\"gt2-settings-header\">\n <div class=\"gt2-settings-back\">\n <div></div>\n ${getSvg(\"arrow\")}\n </div>\n ${SCRIPT_NAME} v${GM_info.script.version}\n </div>\n <div class=\"gt2-settings\">\n <div class=\"gt2-settings-sub-header\">${getLocStr(\"settingsHeaderTimeline\")}</div>\n ${getSettingTogglePart(\"forceLatest\")}\n ${getSettingTogglePart(\"disableAutoRefresh\")}\n ${getSettingTogglePart(\"keepTweetsInTL\")}\n ${getSettingTogglePart(\"biggerPreviews\")}\n <div class=\"gt2-settings-seperator\"></div>\n\n <div class=\"gt2-settings-sub-header\">${getLocStr(\"statsTweets\")}</div>\n ${getSettingTogglePart(\"hideTranslateTweetButton\")}\n ${getSettingTogglePart(\"tweetIconsPullLeft\")}\n <div class=\"gt2-settings-seperator\"></div>\n\n <div class=\"gt2-settings-sub-header\">${getLocStr(\"settingsHeaderSidebars\")}</div>\n ${getSettingTogglePart(\"stickySidebars\")}\n ${getSettingTogglePart(\"smallSidebars\")}\n ${getSettingTogglePart(\"hideTrends\")}\n ${getSettingTogglePart(\"leftTrends\")}\n ${getSettingTogglePart(\"show10Trends\")}\n <div class=\"gt2-settings-seperator\"></div>\n\n <div class=\"gt2-settings-sub-header\">${getLocStr(\"navProfile\")}</div>\n ${getSettingTogglePart(\"legacyProfile\")}\n ${getSettingTogglePart(\"squareAvatars\")}\n ${getSettingTogglePart(\"enableQuickBlock\")}\n ${getSettingTogglePart(\"leftMedia\")}\n <div class=\"gt2-settings-seperator\"></div>\n\n <div class=\"gt2-settings-sub-header\">${getLocStr(\"settingsHeaderGlobalLook\")}</div>\n ${getSettingTogglePart(\"hideFollowSuggestions\", `\n <div class=\"${GM_getValue(\"opt_gt2\").hideFollowSuggestions ? \"\" : \"gt2-hidden\"}\" data-setting-name=\"hideFollowSuggestionsSel\">\n ${[\"topics\", \"users\", \"navLists\"].map((e, i) => {\n let x = Math.pow(2, i)\n return `<div>\n <span>${getLocStr(e)}</span>\n <div class=\"gt2-setting-toggle ${(GM_getValue(\"opt_gt2\").hideFollowSuggestionsSel & x) == x ? \"gt2-active\" : \"\"}\" data-hfs-type=\"${x}\">\n <div></div>\n <div>${getSvg(\"tick\")}</div>\n </div>\n </div>\n `}).join(\"\")}\n </div>\n `)}\n ${getSettingTogglePart(\"fontOverride\", `\n <div class=\"gt2-setting-input\" data-setting-name=\"fontOverrideValue\">\n <input type=\"text\" value=\"${GM_getValue(\"opt_gt2\").fontOverrideValue}\">\n </div>\n `)}\n ${getSettingTogglePart(\"colorOverride\", `<div class=\"gt2-pickr\"></div>`)}\n ${getSettingTogglePart(\"hideMessageBox\")}\n ${getSettingTogglePart(\"rosettaIcons\")}\n ${getSettingTogglePart(\"favoriteLikes\")}\n <div class=\"gt2-settings-seperator\"></div>\n\n <div class=\"gt2-settings-sub-header\">${getLocStr(\"settingsHeaderOther\")}</div>\n ${getSettingTogglePart(\"updateNotifications\")}\n ${getSettingTogglePart(\"expandTcoShortlinks\")}\n </div>\n `\n let $s = $(\"main section[aria-labelledby=detail-header]\")\n if ($s.length) {\n $s.prepend(elem)\n } else {\n $(\"main > div > div > div\").append(`\n <section>${elem}</section>\n `)\n }\n // add color pickr\n Pickr.create({\n el: \".gt2-pickr\",\n theme: \"classic\",\n lockOpacity: true,\n useAsButton: true,\n appClass: \"gt2-color-override-pickr\",\n inline: true,\n default: `rgb(${GM_getValue(\"opt_gt2\").colorOverrideValue})`,\n components: {\n preview: true,\n hue: true,\n interaction: {\n hex: true,\n rgba: true,\n hsla: true,\n hsva: true,\n cmyk: true,\n input: true\n }\n }\n })\n .on(\"change\", e => {\n let val = e.toRGBA().toString(0).slice(5, -4)\n GM_setValue(\"opt_gt2\", Object.assign(GM_getValue(\"opt_gt2\"), { colorOverrideValue: val}))\n document.documentElement.style.setProperty(\"--color-override\", val)\n })\n disableTogglesIfNeeded()\n }\n }", "function getSettings() {\n chrome.storage.sync.get({\n apiToken: '',\n addresses: {}\n }, function(items) {\n apiToken = items.apiToken;\n addresses = items.addresses;\n checkTravelTimes();\n });\n}", "function save_options() {\n\tif (!woas.config.permit_edits) {\n\t\talert(woas.i18n.READ_ONLY);\n\t\treturn false;\n\t}\n\twoas.cfg_commit();\n\twoas.set_current(\"Special::Advanced\", true);\n}", "function sendSettings() {\r\n sendMWValues(['isRunning', 'autoGiftSkipOpt', 'autoLottoOpt', 'autoSecretStash',\r\n 'autoIcePublish', 'autoLevelPublish', 'autoAchievementPublish',\r\n 'autoAskJobHelp', 'autoShareWishlist', 'autoWarRewardPublish',\r\n 'autoWarResponsePublish', 'autoWarRallyPublish', 'autoWarPublish']);\r\n}", "function initSettings() {\n\tvar default_settings = [\n\t\t{name: \"Links\", status: \"on\", id: \"#links-container\"},\n\t\t{name: \"Weather\", status: \"on\", id: \"#tempContainer\"},\n\t\t{name: \"Quote\", status: \"on\", id: \"#quote-container\"},\n\t\t{name: \"Focus\", status: \"off\", id: \"#focusContainer\"},\n\t\t{name: \"To-Do\", status: \"on\", id: \"#todo-container\"}\n\t];\n\n\t// get settings from local storage\n\tsettings_string = localStorage.getItem(\"settings\");\n\tif (settings_string) {\n\t\tsettings = JSON.parse(settings_string);\n\t}\n\telse {\n\t\tsettings = default_settings;\n\t\tlocalStorage.setItem(\"settings\", JSON.stringify(settings));\n\t}\n\t$(\".setting-toggle\").each(function(i) {\n\t\tvar index = $(this).parent().index();\n\t\tif (settings[index].status === \"on\") {\n\t\t\t$(this).html(\"<i class='fa fa-check-square-o' aria-hidden='true'></i>\");\n\t\t\t$(settings[index].id).show();\n\t\t}\n\t\telse {\n\t\t\t$(this).html(\"<i class='fa fa-square-o' aria-hidden='true'></i>\");\n\t\t\t$(settings[index].id).hide();\n\t\t}\n\t});\n\n\t// initialize button to open div\n\t$(\"#expand-settings\").on(\"click\", function() {\n\t\t$(\"#settings\").toggle();\n\t});\n\n\t// function to turn items on and off\n\t$(\".setting-toggle\").on(\"click\", function() {\n\t\tvar index = $(this).parent().index();\n\t\tconsole.log(settings[index]);\n\t\tif (settings[index].status === \"on\") {\n\t\t\t$(this).html(\"<i class='fa fa-square-o' aria-hidden='true'></i>\");\n\t\t\tsettings[index].status = \"off\";\n\t\t\t$(settings[index].id).hide();\n\t\t}\n\t\telse {\n\t\t\t$(this).html(\"<i class='fa fa-check-square-o' aria-hidden='true'></i>\");\n\t\t\tsettings[index].status = \"on\";\n\t\t\t$(settings[index].id).show();\n\t\t}\n\n\n\t\tlocalStorage.setItem(\"settings\", JSON.stringify(settings));\n\t});\n}", "get __settingsDemo() {\n return {\n target: \"This can be a query selector, a NodeList or a single Node.\",\n easing: \"Any of the default CSS speed surve options like ease, ease-in or ease-out\",\n speedIn: \"The speed value for the first transition (in).\",\n speedOut: \"Optional: The speed value for the optional back (out) transition.\",\n css: {\n propertyName: [\"Starting Value (in)\", \"Ending value (out)\"],\n propertyName2: [\"Ending value only\"]\n },\n toggleData: {\n _info: \"This optional parameter adds/removes data/classes when transitioning.\",\n data: { key: \"value\", pairs: \"go here\" },\n classes: \"space separated class names\"\n }\n };\n }", "get settings() {\n return this._settings.state\n }", "function Settings(){this.values=Object.create(null);}", "function ggr2Settings()\n{ \n this.save = saveSettingToDisk;\n this.load = loadSettingFromDisk;\n this.car_model = '';\n this.car_color = '';\n}", "function Settings(options) {\n this._changed = new signaling_1.Signal(this);\n this._composite = Object.create(null);\n this._isDisposed = false;\n this._raw = '{ }';\n this._schema = Object.create(null);\n this._user = Object.create(null);\n var plugin = options.plugin;\n this.plugin = plugin.id;\n this.registry = options.registry;\n this._composite = plugin.data.composite || {};\n this._raw = plugin.raw || '{ }';\n this._schema = plugin.schema || { type: 'object' };\n this._user = plugin.data.user || {};\n this.registry.pluginChanged.connect(this._onPluginChanged, this);\n }", "updateSettings() {\n this.updateTuneClasses()\n this.updateTuneButtons()\n this.updateDecorationGroups()\n this.updateDecorationButtons()\n }", "function restore_options() {\n chrome.storage.sync.get(\n\t\tchrome.extension.getBackgroundPage().defaultSettings, \n \t\tfunction (settings) {\n \t\t\tdocument.getElementById(settings.o_theme).checked = true;\n \t\t\tdocument.getElementById(settings.o_live_output).checked = true;\n \t\t\tfor (let i = 0; i < settings.o_live_direction.length; i++) {\n \t\t\t\tdocument.getElementById(settings.o_live_direction[i]).checked = true;\n \t\t\t}\n \t\t\tfor (let i = 0; i < settings.o_live_type.length; i++) {\n \t\t\t\tdocument.getElementById(settings.o_live_type[i]).checked = true;\n \t\t\t}\n \t\t\tdocument.getElementById(settings.o_live_donation).checked = true;\n\n \t\t\tchrome.extension.getBackgroundPage().currentSettings = settings;\n \t\t}\n \t);\n}", "function set_basic_settings(){ \r\n var saved_settings=[\"USERNAME\", \"RACE\",\r\n \r\n \"SPECIAL_LOCATIONS\",\"VILLAGES\",\"USE_TIMELINE\",\"USE_ALLY_LINES\",\r\n \"USE_CUSTOM_SIDEBAR\",\"USE_MARKET_COLORS\",\"USE_ENHANCED_RESOURCE_INFO\",\r\n \"USE_EXTRA_VILLAGE\",\"USE_SERVER_TIME\",\"USE_DEBUG_MODE\", \r\n \"SHOW_TIMELINE_REPORT_INFO\", \"COLLAPSE_TIMELINE\",\r\n \r\n \"TIMELINE_SIZES_HISTORY\",\"TIMELINE_SIZES_FUTURE\", \"TIMELINE_DISTANCE_HISTORY\",\r\n \"TIMELINE_SIZES_HEIGHT\", \"TIMELINE_SIZES_WIDTH\", \"TIME_DIFFERENCE\",\r\n \"TIMELINE_COLLAPSED_WIDTH\", \"TIMELINE_COLOR\", \"KEEP_TIMELINE_UPDATED\",\r\n \"TIMELINE_SCALE_WARP\",\r\n\r\n \"BUILDING_COLOR\", \"ATTACK_COLOR\", \"REPORT_COLOR\",\r\n \"MARKET_COLOR\", \"RESEARCH_COLOR\", \"PARTY_COLOR\"\r\n ];\r\n\r\n for (i in saved_settings) {\r\n var v = saved_settings[i];\r\n x = GM_getValue(prefix(v)); \r\n if (x!==undefined && x!==\"\") {\r\n try {\r\n eval(v+\"=\"+x);\r\n } catch (e) {\r\n eval(v+\"=x\"); \r\n }\r\n }\r\n }\r\n TIMELINE_EVENT_COLORS = [BUILDING_COLOR, ATTACK_COLOR, REPORT_COLOR, MARKET_COLOR, RESEARCH_COLOR, PARTY_COLOR];\r\n }", "function updateSettings() {\n const panelConsole = $('#console');\n const collapsed = !MonitoringConsole.Model.Settings.isDispayed();\n let groups = [];\n if (collapsed) {\n panelConsole.removeClass('state-show-settings');\n } else {\n if (!panelConsole.hasClass('state-show-settings')) {\n panelConsole.addClass('state-show-settings'); \n }\n groups = groups.concat(createAppSettings());\n groups.push(createColorSettings());\n groups.push(createPageSettings());\n if (MonitoringConsole.Model.Page.Widgets.Selection.isSingle())\n groups = groups.concat(createWidgetSettings(MonitoringConsole.Model.Page.Widgets.Selection.first()));\n }\n $('#Settings').replaceWith(Components.createSettings({\n id: 'Settings', \n collapsed: collapsed, \n groups: groups,\n onSidebarToggle: () => {\n MonitoringConsole.Model.Settings.toggle();\n updateSettings();\n },\n onWidgetAdd: showAddWidgetModalDialog,\n }));\n }", "function saveExtSettings() {\n var settings = {\n \"showFoldersInList\": showFoldersInList,\n \"showSortDataInList\": showSortDataInList,\n \"numberOfFiles\": numberOfFiles,\n \"zoomFactor\": zoomFactor,\n \"orderBy\": orderBy\n };\n localStorage.setItem('perpectiveGridSettings', JSON.stringify(settings));\n }", "function configureSettings() {\n // Load all the saved settings into the preferences object.\n PREF_OBJ.load();\n return true;\n}", "configure(level) {\n const storage = window.localStorage;\n const key = `SNAKE_SETTINGS_${level}`;\n if (storage && storage.getItem(key)) {\n this.settings = new Settings(level, this.getStoredSettings(level));\n\n } else {\n this.settings = new Settings(level);\n this.saveHighScore(this.settings, level);\n this.updateStoredSettings(settings, level)\n }\n return this.settings;\n }", "set options(value) {}", "constructor() {\n this.settings = {\n load: false,\n angle: false,\n moment: false,\n distload: false,\n material: false,\n one_load: false,\n one_moment: false,\n one_distload: false,\n one_material: false,\n defenition: false,\n one_joint: false,\n fixed_size: false,\n };\n this.setSettings(\"default\");\n }", "function configureSettings() {\n this.show.config = !this.show.config;\n //if saving an open config\n if (!this.show.config) {\n $ionicScrollDelegate.scrollTop(true);\n this.score.saveObj({config: this.score.data.config});\n } else {\n $ionicScrollDelegate.scrollBottom(true);\n }\n }", "constructor(options) {\n super(options);\n this.menu.title.label = 'Settings';\n }", "function firstInitSettings() {\r\n\tlog(0, 'One time settings init called');\r\n\tsettings = {\r\n\t\ttileSize: 30,\r\n\t\tplayerSize: 20,\r\n\t\tdc: 0.85,\r\n\t\tmap: Maps[0].map,\r\n\t\tmapInfo: Maps[0].data,\r\n\t\twallsBreak: true,\r\n\t\tdefaultGun: 'pistol',\r\n\t\tgamemode: '',\r\n\t\tkillsToWin: 10,\r\n\t\titemSpawnRates: 30,\r\n\t\tblockHP: 1000,\r\n\t\tspawnTime: 0,\r\n\t\ttickLimiter: tickLimiter,\r\n\t\tteamMode: false,\r\n\t\tteams: 0,\r\n\t\tlives: 0,\r\n\t\tnumBots: 0,\r\n\t\toverrideEndGame: false,\r\n\t};\r\n\tsettingTypes = {\r\n\t\ttileSize: 'unchange',\r\n\t\tplayerSize: 'unchange',\r\n\t\tdc: 'number',\r\n\t\tmap: 'unchange',\r\n\t\tmapInfo: 'unchange',\r\n\t\twallsBreak: 'bool',\r\n\t\tteamMode: 'bool',\r\n\t\tdefaultGun: Object.getOwnPropertyNames(Guns),\r\n\t\tgamemode: Object.getOwnPropertyNames(GameModes),\r\n\t\tkillsToWin: ['1', '5', '10', '15', '25'],\r\n\t\titemSpawnRates: 'number',\r\n\t\tblockHP: ['1', '100', '250', '500', '1000', '5000'],\r\n\t\tspawnTime: ['1', '3', '5', '10'],\r\n\t\ttickLimiter: 'unchange',\r\n\t\tteams: ['1', '2', '3', '4'],\r\n\t\tlives: ['0', '1', '2', '3', '5', '10'],\r\n\t\tnumBots: ['0', '1', '2', '4', '8', '10'],\r\n\t\toverrideEndGame: 'unchange',\r\n\t\tisTypeList: true\r\n\t};\r\n}", "function restoreOptions() {\n\tvar getting = browser.storage.local.get(SETTINGS_KEY.DEFAULTS);\n\tgetting.then((result) => {\n\t\tconsole.debug(JSON.parse(JSON.stringify(result)));\n\t\tif (result[SETTINGS_KEY.DEFAULTS]) {\n\t\t\tlet width = result[SETTINGS_KEY.DEFAULTS][SETTINGS_KEY.DEFAULT_MAX_WIDTH];\n\t\t\tlet enabled = result[SETTINGS_KEY.DEFAULTS][SETTINGS_KEY.DEFAULT_ENABLED];\n\t\t\tpopulateUI(width, enabled);\n\t\t} else {\n\t\t\tcallWithStorageDefaults(populateUI);\n\t\t}\n\t});\n}", "function showSettings() {\n $(this).next(s.taskSettingsOverlay).hide().removeClass('hide').slideDown(600);\n }", "function restoreOptions(optionsFromFactorySettings) {\n\n if (optionsFromFactorySettings) {\n // only reset popup settings (actions keys & excluded site)\n // other settings are not reset\n let excludedSiteIndex = -1;\n for (var i = 0; i < options.excludedSites.length; i++) {\n if (options.excludedSites[i] == siteHostname) {\n excludedSiteIndex = i;\n break;\n }\n }\n if (excludedSiteIndex > -1)\n options.excludedSites.splice(excludedSiteIndex, 1);\n\n actionKeys.forEach(function(key) {\n options[key] = optionsFromFactorySettings[key];\n });\n\n } else {\n options = loadOptions();\n }\n\n // update display\n chrome.tabs.query({active: true, currentWindow: true}, function (tabArr) {\n var tab = tabArr[0];\n if (options.whiteListMode) {\n $('#chkExcludeSite').trigger(isExcludedSite(tab.url) ? 'gumby.uncheck' : 'gumby.check');\n if ($('#chkExcludeSite')[0].dataset.val0 == undefined) $('#chkExcludeSite')[0].dataset.val0 = (isExcludedSite(tab.url) ? 'unchecked' : 'checked');\n else $('#chkExcludeSite')[0].dataset.val1 = (isExcludedSite(tab.url) ? 'unchecked' : 'checked');\n }\n else {\n $('#chkExcludeSite').trigger(isExcludedSite(tab.url) ? 'gumby.check' : 'gumby.uncheck');\n if ($('#chkExcludeSite')[0].dataset.val0 == undefined) $('#chkExcludeSite')[0].dataset.val0 = (isExcludedSite(tab.url) ? 'checked' : 'unchecked');\n else $('#chkExcludeSite')[0].dataset.val1 = (isExcludedSite(tab.url) ? 'checked' : 'unchecked');\n }\n });\n\n actionKeys.forEach(function(key) {\n var id = key[0].toUpperCase() + key.substr(1);\n $('#sel' + id).val(options[key]);\n if ($('#sel' + id)[0].dataset.val0 == undefined) $('#sel' + id)[0].dataset.val0 = options[key];\n else $('#sel' + id)[0].dataset.val1 = options[key];\n });\n\n checkModifications();\n return false;\n}", "function addDefaultSettings(action, settings) {\n if (action == \"com.vantdev.r3sd.toggleboxoptionbutton\")\n {\n if (!settings.hasOwnProperty(\"box_option\")) {\n settings.box_option = BOX_OPTIONS.DO_NOTHING;\n }\n }\n else if (action == \"com.vantdev.r3sd.requestboxbutton\")\n {\n if (!settings.hasOwnProperty(\"serve_penalty\")) settings.serve_penalty = false;\n if (!settings.hasOwnProperty(\"driver_change\")) settings.driver_change = false;\n if (!settings.hasOwnProperty(\"front_tires\")) settings.front_tires = false;\n if (!settings.hasOwnProperty(\"rear_tires\")) settings.rear_tires = false;\n if (!settings.hasOwnProperty(\"fix_bodywork\")) settings.fix_bodywork = false;\n if (!settings.hasOwnProperty(\"fix_front_aero\")) settings.fix_front_aero = false;\n if (!settings.hasOwnProperty(\"fix_rear_aero\")) settings.fix_rear_aero = false;\n if (!settings.hasOwnProperty(\"fix_suspension\")) settings.fix_suspension = false;\n if (!settings.hasOwnProperty(\"refuel_option\")) settings.refuel_option = BOX_OPTIONS.DO_NOTHING;\n if (!settings.hasOwnProperty(\"use_toggle_buttons_only\")) settings.use_toggle_buttons_only = false;\n if (!settings.hasOwnProperty(\"request_box\")) settings.request_box = false;\n if (!settings.hasOwnProperty(\"close_pit_menu\")) settings.close_pit_menu = false;\n }\n\n return settings;\n}", "function showSettingsDialog() {\n var html = getSettings();\n\n html.setWidth(400);\n html.setHeight(300);\n\n SpreadsheetApp.getUi()\n .showModalDialog(html, 'Fuzzy.ai Settings');\n}", "function setupSettings() {\n var showUsername = localStorage.getItem(\"showUsername\");\n var showAccountNumber = localStorage.getItem(\"showAccountNumber\");\n \n $(\"#showUsername\").prop(\"checked\", showUsername == null ? true : showUsername === \"true\");\n $(\"#showAccountNumber\").prop(\"checked\", showAccountNumber == null ? true : showAccountNumber === \"true\");\n \n var maxRows = localStorage.getItem(\"maxRows\");\n maxRows = maxRows == null ? 500 : maxRows; // Default to 500\n $(\"#max-rows\").val(maxRows);\n }", "showSettings() {\n // Implement in your WM\n }" ]
[ "0.7236851", "0.69396126", "0.6756615", "0.67441434", "0.6681188", "0.66138124", "0.6567886", "0.65573096", "0.6553386", "0.65444756", "0.6525147", "0.6515256", "0.65010345", "0.64227027", "0.64227027", "0.64227027", "0.64227027", "0.64227027", "0.6416836", "0.64020133", "0.63996637", "0.63940233", "0.63769436", "0.63638663", "0.63638663", "0.63638663", "0.63638663", "0.63638663", "0.63638663", "0.63632655", "0.6315557", "0.63055277", "0.62959784", "0.62822944", "0.62803453", "0.6255644", "0.62528926", "0.6251883", "0.6243691", "0.62287104", "0.622028", "0.62159777", "0.6214528", "0.6210252", "0.62095344", "0.61868054", "0.61794585", "0.6178627", "0.6176418", "0.6176418", "0.6176418", "0.6173115", "0.6151334", "0.6150342", "0.6150342", "0.61434245", "0.61221826", "0.61184007", "0.60947615", "0.6094149", "0.6081573", "0.6076091", "0.60730827", "0.60717696", "0.6052153", "0.6045629", "0.60446715", "0.6042482", "0.6029887", "0.60260236", "0.60213864", "0.60175043", "0.5993623", "0.59723103", "0.5968723", "0.5966367", "0.5966021", "0.59620625", "0.59398186", "0.5936764", "0.5935693", "0.59349483", "0.5933434", "0.59246707", "0.5921967", "0.5918391", "0.59166676", "0.59146917", "0.5910803", "0.5910264", "0.59020084", "0.58952314", "0.5894052", "0.58936685", "0.5892373", "0.58899194", "0.58874154", "0.58863103", "0.588251", "0.58759284", "0.58734214" ]
0.0
-1
= multi search box =
function qll_utility_search() { GM_addStyle("body{padding-top:25px;}"); GM_addStyle('#QLLSearch{background:'+qll_opt['css:menu:bg']+'; outline:'+ qll_opt['css:menu:borderc'] +' double 3px; color:'+qll_opt['css:menu:fontc']+'; width:100%;display: block;padding: 0;margin:0px; position:fixed; top:0px; z-index:25000; text-align:center;}'); menu=document.getElementsByTagName('body')[0]; object = document.createElement("div"); object.setAttribute('id','QLLSearch'); object.setAttribute('align','center'); object.innerHTML='<input size="25" class="QLLInput" id="QLLSearchInput" type="text" value="'+qll_lang[66]+'" /><button class="QLLButton" type="button" id="QLLSearchNewspaper">'+qll_lang[62]+'</button><button class="QLLButton" type="button" id="QLLSearchCitizen">'+qll_lang[60]+'</button><button class="QLLButton" type="button" id="QLLSearchCompany">'+qll_lang[61]+'</button><button class="QLLButton" type="button" id="QLLSearchErepublik">'+qll_lang[63]+'</button><button class="QLLButton" type="button" id="QLLSearchErepwiki">'+qll_lang[65]+'</button>'; menu.appendChild(object); $("#QLLSearchInput").focus(function(){$("#QLLSearchInput").select();}); $("#QLLSearchNewspaper").click(function(){qll_fun_showDisplayBox(qll_lang[62], 'http://www.google.com/search?sitesearch=erepublik.com/en/article/&as_q='+$("#QLLSearchInput").attr('value'),true);}); $("#QLLSearchCitizen").click(function(){qll_fun_showDisplayBox(qll_lang[60], 'http://www.google.com/search?sitesearch=erepublik.com/en/citizen/profile/&as_q='+$("#QLLSearchInput").attr('value'), true);}); $("#QLLSearchCompany").click(function(){qll_fun_showDisplayBox(qll_lang[61], 'http://www.google.com/search?sitesearch=erepublik.com/en/company/&as_q='+$("#QLLSearchInput").attr('value'), true);}); $("#QLLSearchErepublik").click(function(){qll_fun_showDisplayBox(qll_lang[63], 'http://www.google.com/search?sitesearch=erepublik.com/en/&as_q='+$("#QLLSearchInput").attr('value'), true);}); $("#QLLSearchErepwiki").click(function(){qll_fun_showDisplayBox(qll_lang[65], 'http://www.google.com/search?sitesearch=wiki.erepublik.com/&as_q='+$("#QLLSearchInput").attr('value'), true);}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchKeywords() {\n if(searchString.toLowerCase().includes('unit')) {\n if(searchString.toLowerCase().includes('1')) {\n searchBox.value = 'Javascript DOM JQuery CSS function html flexbox arrays';\n } if(searchString.toLowerCase().includes('2')) {\n searchBox.value = 'middleware node express authorization authentication psql ejs fetch api cookies';\n } if(searchString.toLowerCase().includes('3')) {\n searchBox.value = 'react authorization authentication psql git fetch tokens'\n } if(searchString.toLowerCase().includes('4')) {\n searchBox.value = 'ruby rails psql'\n }\n }\n}", "function handleMultiSearch() {\n $(\"#js-multi-search-option\").on(\"click\", event => {\n event.preventDefault(); \n $(\"#main-screen-header\").hide();\n $(\"#js-search-one\").hide();\n $(\"#js-multi-search-option\").hide();\n $(\"#similars-search-screen-header\").show();\n $(\"#js-multi-search-button\").show();\n $(\"#similar-movies-search\").show();\n });\n }", "function searchthis(e){\n $.search.value = \"keyword to search\";\n $.search.blur();\n focused = false;\n needclear = true;\n}", "function searchThis(e) {\n $('#searchbox').val($(e).text());\n FJS.filter();\n}", "function basicsearch() {\n searchString = document.basicForm.basicText.value;\n searchTerms = searchString.split(/\\s/);\n\n putHeader();\n\n findResults();\n putResults();\n\n putFooter();\n\n writeResultsPage();\n}", "function search() {\n\t\n}", "function searchAll() {\n clearAllButAvatars();\n document.getElementById(\"terms\").innerHTML = \"\";\n var input = document.querySelector(\"#queryfield\").value;\n var tokens = input.split(\" \");\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n var formattedToken = token.replace(/\\W/g, '')\n if (formattedToken.trim() !== '') {\n addSearchButton(formattedToken);\n }\n }\n}", "function searchUserLocal()\n {\n var typed = this.value.toString().toLowerCase(); \n var results = document.getElementById(\"results-cont\").children;\n\n if(typed.length >= 2)\n { \n for(var j=0; j < results.length; j++)\n {\n if(results[j].id.substr(0, typed.length).toLocaleLowerCase() !== typed)\n results[j].style.display = \"none\";\n else\n results[j].style.display = \"flex\";\n }\n } \n else\n {\n for(var i=0; i < results.length; i++)\n results[i].style.display = \"flex\";\n } \n }", "function performMultiSearch(elem,searchElem) {\n // set up variables\n var searchString; // Will hold the text to search for\n var theSelection; // Will hold the document's selection object\n var textNodes; // Will hold all the text nodes in the document\n \n // Set it to search the entire document if we haven't been given an element to search\n if(!searchElem || typeof(searchElem) == 'undefined') searchElem = document.body;\n \n // Get the string to search for\n if(elem && elem.value) searchString = elem.value;\n else if(this && this.value) searchString = this.value;\n \n // Get all the text nodes in the document\n textNodes = findTypeNodes(searchElem,3);\n \n // Get the selection object\n if(window.getSelection) theSelection = window.getSelection(); // firefox\n else { // some other browser - doesn't support multiple selections at once\n alert(\"sorry this searching method isn't supported by your browser\");\n return;\n }\n \n // Empty the selection\n theSelection.removeAllRanges(); // We want to empty the selection regardless of whether we're selecting anything\n \n if(searchString.length > 0) { // make sure the string isn't empty, or it'll crash.\n // Search all text nodes\n for(var i = 0; i < textNodes.length; i++) {\n // Create a regular expression object to do the searching\n var reSearch = new RegExp(searchString,'gmi'); // Set it to 'g' - global (finds all instances), 'm' - multiline (searches more than one line), 'i' - case insensitive\n var stringToSearch = textNodes[i].textContent;\n while(reSearch(stringToSearch)) { // While there are occurrences of the searchString\n // Add the new selection range\n var thisRange = document.createRange();\n thisRange.setStart(textNodes[i],reSearch.lastIndex - searchString.length); // Start node and index of the selection range\n thisRange.setEnd(textNodes[i],reSearch.lastIndex); // End node and index of the selection\n theSelection.addRange(thisRange); // Add the node to the document's current selection\n }\n }\n }\n \n return;\n}", "function searchInput() {\n \t\t\tvar i,\n \t\t\t item,\n \t\t\t searchText = moduleSearch.value.toLowerCase(),\n \t\t\t listItems = dropDownList.children;\n\n \t\t\tfor (i = 0; i < listItems.length; i++) {\n \t\t\t\titem = listItems[i];\n \t\t\t\tif (!searchText || item.textContent.toLowerCase().indexOf(searchText) > -1) {\n \t\t\t\t\titem.style.display = \"\";\n \t\t\t\t} else {\n \t\t\t\t\titem.style.display = \"none\";\n \t\t\t\t}\n \t\t\t}\n \t\t}", "function search(input, resultList) {\n if (input.value.length > 3 && input === document.activeElement) {\n ajaxcall(input.value, resultList);\n }\n else {\n hideList(resultList);\n }\n}", "function doSearchOnPopup() {\n var quickSearchPopUpTextBox = vm.searchQuery.replace(/<\\/?[^>]+>/gi, ' ');\n doSearch(quickSearchPopUpTextBox);\n }", "function doSearchOnPopup() {\n var quickSearchPopUpTextBox = vm.searchQuery.replace(/<\\/?[^>]+>/gi, ' ');\n doSearch(quickSearchPopUpTextBox);\n }", "function search() {\n $.var.currentSupplier = $.var.search;\n $.var.currentID = 0;\n $.var.search.query = $(\"#searchable\").val();\n if ($.var.search.query.trim().length === 0) { // if either no string, or string of only spaces\n $.var.search.query = \" \"; // set query to standard query used on loadpage\n }\n $.var.search.updateWebgroupRoot();\n}", "function search() {\n restartSearch();\n if (searchField.val()) {\n dt.search(searchField.val()).draw();\n }\n if (searchSelect.val()) {\n dt.columns(2).search(searchSelect.val()).draw();\n }\n}", "function s() {\n var form = d.querySelector(\"#search form\"),\n selector = form.select.options[select.selectedIndex].index,\n text = form.querySelector(\"input\"),\n afterSkip = selector;\n for (i = 0; i <= selector; ++i) {\n if (!searches[i].enabled) {\n \t afterSkip++;\n \t selector++;\n }\n }\n form.method\t = searches[afterSkip].method;\n form.action = searches[afterSkip].url;\n text.name = searches[afterSkip].query;\n d.getElementById('searchbox').focus();\n}", "function renderMultiSearch(multiSearch){\n // Draw hidden value\n var multiSearchHiddenInput = $('<input type=\"hidden\">').\n appendTo(multiSearch);\n // Draw multi-search control \n var multiSearchInput = $('<input class=\"ui-analysis-multisearch\" type=\"text\">').\n appendTo(multiSearch);\n \n // Convert data\n if (data && data.type == \"search\"){\n var newData = [];\n $.each(data.values, function(i){\n newData.push({id: data.values[i].id, value: data.values[i].text });\n });\n data.values = newData;\n \n // Serialize\n $(multiSearchHiddenInput).val(JSON.encode(data.values));\n }\n \n // Apply token list plugin\n multiSearchInput.tokenlist({\n items: ((data && data.type == 'search') ? data.values : []), \n useAutocomplete: true,\n validate: function (item) {\n var data = jQuery.data(multiSearch, \"suggestions\");\n\n if (data) {\n var validData = [];\n for (i = 0; i < data.length; i++) {\n validData.push(data[i].id);\n }\n\n return $.inArray(item.id, validData) >= 0;\n }\n return false;\n },\n change: function (e, items) {\n var values = [];\n for (i = 0; i < items.length; i++) {\n values.push({id:items[i].id, text: items[i].value});\n }\n\n $(multiSearchHiddenInput).val(JSON.encode(values));\n },\n renderTokenLabel: function (item) {\n return item.value;\n },\n isDuplicated: function (item, items) {\n for (i = 0; i < items.length; i++) {\n if (items[i].id == item.id)\n return true;\n }\n\n return false;\n }\n })\n .each(function () {\n var inputControl = $(this).tokenlist('input');\n\n // Apply autocomplete for token\n inputControl.autocomplete({\n source: function (req, add) {\n var url = MULTI_SEARCH_URL;\n \n // parse current dimension\n var dimension = getSelectedDimension();\n url += \"&idDimension=\" + dimension.Id; \n url += \"&isAdministrable=\" + dimension.IsAdministrable; \n \n //pass request to server \n $.getJSON(url, req, function (data) {\n\n //create array for response objects \n var suggestions = [];\n\n // set data in the control\n jQuery.data(multiSearch, \"suggestions\", data);\n\n // process response \n $.each(data, function (i, val) {\n suggestions.push({\n id: val.id,\n label: val.text.replace(new RegExp(\"(?![^&;]+;)(?!<[^<>]*)(\" + $.ui.autocomplete.escapeRegex(req.term) + \")(?![^<>]*>)(?![^&;]+;)\", \"gi\"), \"<strong>$1</strong>\"),\n value: val.text\n });\n });\n \n //pass array to callback \n add(suggestions);\n });\n },\n minLength: MULTI_SEARCH_LETTER_COUNT /* INDICA NUMERO DE LETRAS PARA ENVIAR REQUEST*/\n });\n \n // Special rendering\n inputControl.data(\"autocomplete\")._renderItem = function (ul, item) {\n return $('<li class=\"ui-analysis-multisearch-item\"></li>')\n\t\t\t .data(\"item.autocomplete\", item)\n .append('<a><label class=\"ui-analysis-multisearch-item-label\">' + item.label + '</label></a>')\n\t\t\t .appendTo(ul);\n };\n \n // Bind click event\n inputControl.click(function () {\n // close if already visible\n if (inputControl.autocomplete(\"widget\").is(\":visible\")) {\n inputControl.autocomplete(\"close\");\n return;\n }\n\n inputControl.autocomplete(\"search\", $(inputControl).val());\n });\n }); \n }", "function DoSearch(s1, s2, s3, b4, s5)\n{\n //----------------------------------------------------------------------------\n // Init\n // - Reset First AND call flag. The first time must be an OR.\n // - Clear SearchResults list\n // - Clear target list control\n //----------------------------------------------------------------------------\n gFirstFindCall = true;\n SearchResults.length = 0;\n gFindList.length = 0;\n if (document.forms['searchform'].SearchResultList)\n document.forms['searchform'].SearchResultList.length = 0;\n PARAM_PartialMatchOK = b4;\n if (s5 == '') PARAM_TargetWindow = 'content';\n else PARAM_TargetWindow = s5;\n\n //----------------------------------------------------------------------------\n //1. (OR) Find documents with \"Any of these Words\" ==> SearchResults\n //2. (AND) Find documents with \"All these Words\" ==> SearchResults\n //3. (NOT) SearchResults must NOT files containing these words ==> Remove from SearchResults\n //----------------------------------------------------------------------------\n ProcessSearchTerms(s1, OPT_OR);\n ProcessSearchTerms(s2, OPT_AND);\n ProcessSearchTerms(s3, OPT_NOT);\n \n //----------------------------------------------------------------------------\n // Display SearchResults\n //----------------------------------------------------------------------------\n if (SearchResults.length == 0) {\n alert(\"No matches found!\");\n return(0); }\n\n //Search Results list exists \n if (document.forms['searchform'].SearchResultList)\n {\n //Fill SearchResults List -- 500 item limit same as H1.x and H2.x\n for(var i=0;((i<SearchResults.length) && (i<500));i++) {\n var new_option = document.createElement('option');\n new_option.text = SearchTitles[SearchResults[i]];\n new_option.value = SearchFiles[SearchResults[i]];\n document.forms['searchform'].SearchResultList[i]=new_option;\n }\n\n //open the first file\n // ** Comment this line out if you don't want the first Search result displayed automatically ** \n OpenResultListDoc();\n\n }\n else {\n ShowSearchResultsWindow();\n }\n\n return(SearchResults.length);\n\n}", "function search() {\n let search_text = $search_text.value;\n decide_search(search_text)\n}", "function createSearchString()\n{\n//start at one because the arrays are created by extracting the numeric portion of the form element's name\n//for example: searchText1, searchText2\nfor(var i=1; i < this.searchTextArray.length; i++)\n\t{\n\tvar searchVal = this.prepHTMLValue(this.getValue(this.searchTextArray[i]));\n\tvar searchSlice = this.getValue(this.fieldLimitArray[i]);\n\tif( searchVal != \"\" )\n\t\t{\n\t\tif(i != 1 )\n\t\t\t{\n\t\t\tthis.searchString +=this.getValue(this.booleanArray[i-1]);\n\t\t\t}\n\t\tthis.searchString += searchSlice+\"(\"+searchVal+\")\";\n\t\t}\n\t}\n}", "bindSearcher() {\n $('#oompaName').bind(\"change paste keyup\", function() {\n var searchName = $('#oompaName').val().toLowerCase(); \n if((this.actualOompaList !== null)) {\n var a = JSON.parse(this.actualList);\n var tempResults = [];\n a.forEach(function(element){\n var name = element['first_name'].toLowerCase();\n var lastName = element['last_name'].toLowerCase();\n var profession = element['profession'].toLowerCase();\n\n if(name.includes(searchName) || lastName.includes(searchName) ||\n profession.includes(searchName)) {\n tempResults.push(element);\n }\n });\n paintOompaTemp(tempResults);\n }\n });\n }", "function searchTop(a,b,c,d) {\n var obj = document.getElementById('q')\n if (obj) {\n obj.value = a\n }\n search(a,b,c,d)\n}", "function searchGeneral() {\r\n search.general = $(\"#search\").val().split(\" \");\r\n updateData();\r\n}", "function _search()\n {\n var allCategoryNames = [];\n // Incorporate all terms into\n var oepterms = $scope.selectedOepTerms ? $scope.selectedOepTerms : [];\n var situations = $scope.selectedSituations ? $scope.selectedSituations : [];\n var allCategories = oepterms.concat(situations);\n allCategories.forEach(function(categoryObj) {\n allCategoryNames.push(categoryObj.name);\n checkEmergencyTerms(categoryObj.name);\n });\n search.search({ category: allCategoryNames.join(',') });\n }", "function search( input ){\n // select chat list -> contacts -> each( user name ? search input )\n $('.chat-list .contact').each( function() {\n //var filter = this.innerText; // < - You, Me , I ( for log user )\n //var _val = input[0].value.toUpperCase();\n\n if ( this.innerText.indexOf( input[0].value.toUpperCase() ) > -1)\n this.style.display = \"\";\n else this.style.display = \"none\";\n\n });\n\n}", "function searchVacancy(event) {\n var openVacancy = document.getElementById(\"vacancy-id\").children;\n var searchStr = document.getElementById(\"vacancy-search-id\").value.toLowerCase();\n\n if (event.keyCode > 32) {\n for(var i = 0; i < openVacancy.length; i++){\n var startIndex = openVacancy[i].innerHTML.toLowerCase().indexOf(searchStr);\n\n if(startIndex != -1 && !openVacancy[i].selected)\n openVacancy[i].hidden = false;\n else\n openVacancy[i].hidden = true;\n }\n }\n\n if(event.keyCode === 8) {\n for(var j = 0; j < openVacancy.length; j++){\n if(!openVacancy[j].selected)\n openVacancy[j].hidden = false;\n }\n\n if(searchStr != \"\") {\n for(var i = 0; i < openVacancy.length; i++){\n var startIndex = openVacancy[i].innerHTML.toLowerCase().indexOf(searchStr);\n\n if(startIndex != -1 && !openVacancy[i].selected)\n openVacancy[i].hidden = false;\n else\n openVacancy[i].hidden = true;\n \n }\n }\n }\n}", "function search(input)\n{\n\tvar urlBase = initMe(); \n\tvar enteredTerms;\n\tvar recall = false;\n\n\t// We need this in case of very strict selection (see Advanced tab, search modes)\n\t$(\"#disease_list\").data(\"locked\",false);\n\t$(\"#location_list\").data(\"locked\",false);\n\t$(\"#disease_mirna_list\").data(\"locked\",false);\n\t$(\"#location_mirna_list\").data(\"locked\",false);\n\t\n\tvar species = $(\"#species_list\").val();\n\tif (species == 999999) //Nothing selected\n\t{\t\t\n\t\t//displayError('Please select species first!');\n\t\tmodalAlert(\"Please select species first!\",\"Species!\");\n\t\treturn;\n\t}\n\tif (input !== '' && input !== null && input !== undefined)\n\t{\n\t\tenteredTerms = input;\n\t\trecall = true;\n\t}\n\telse if ($(\"#enter_genes\").val() !== '')\n\t{\n\t\tenteredTerms = $(\"#enter_genes\").val().split(/\\n|\\r/);\n\t\t\n\t\tif (!allowedNumberOfTerms(enteredTerms,500))\n\t\t{\n\t\t\tmodalAlert(\"Please restrict your search terms to 500!\",\"Attention!\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (!$.isEmptyObject(enteredTerms))\n\t{\n\t\tvar searchJSON = $.toJSON(enteredTerms);\n\t\t$.ajax(\n\t\t{\n\t\t\ttype: 'POST',\n\t\t\turl: urlBase+'php/control.php',\n\t\t\tdata: { species: species, genes: searchJSON },\n\t\t\tbeforeSend: function() { loadingSmall(); },\n\t\t\tcomplete: function() { unloadingSmall(); },\n\t\t\tsuccess: function(data)\n\t\t\t{\t\t\t\t\n\t\t\t\tif ($.isEmptyObject(data))\n\t\t\t\t{\n\t\t\t\t\t$('#color_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#shape_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#info_section').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#element_info').animate({ opacity: 1.0 },250);\n\t\t\t\t\tdisplayError('Sorry! Nothing found... :-(');\n\t\t\t\t}\n\t\t\t\telse //Enable and fill the rest of the lists\n\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$('#color_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#shape_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#info_section').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#element_info').animate({ opacity: 1.0 },250);\n\t\t\t\t\tvar outerkey,innerkey,innermost;\t\t\t\t\t\n\t\t\t\t\tfor (outerkey in data)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tswitch(outerkey)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 'disease':\n\t\t\t\t\t\t\t\t$(\"#disease_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#disease_list\").removeData();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tenable(['disease_list']);\n\t\t\t\t\t\t\t\t\t$(\"#disease_list\").data(\"values\",data[outerkey]); //Cache!\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#disease_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\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\tbreak;\n\t\t\t\t\t\t\tcase 'location':\n\t\t\t\t\t\t\t\t$(\"#location_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#location_list\").removeData();\t\t\t\t\n\t\t\t\t\t\t\t\t\tenable(['location_list']);\n\t\t\t\t\t\t\t\t\t$(\"#location_list\").data(\"values\",data[outerkey]);\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#location_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\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\tbreak;\n\t\t\t\t\t\t\tcase 'dataset':\n\t\t\t\t\t\t\t\t$(\"#dataset_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#dataset_list\").removeData();\n\t\t\t\t\t\t\t\t\tenable(['dataset_list','reset_gene_data_button','color_network_button','disease_gene_check','location_gene_check']);\n\t\t\t\t\t\t\t\t\t$(\"#dataset_list\").data(\"values\",data[outerkey]);\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#dataset_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\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\tbreak;\n\t\t\t\t\t\t\tcase 'go':\n\t\t\t\t\t\t\t\t$(\"#go_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#go_list\").removeData();\n\t\t\t\t\t\t\t\t\tenable(['go_list','show_selected_go','show_all_go','clear_selected_go','clear_all_go','clear_all_go_cat']);\n\t\t\t\t\t\t\t\t\t$(\"#go_list\").data(\"values\",data[outerkey]);\n\t\t\t\t\t\t\t\t\t//Initialize with component\n\t\t\t\t\t\t\t\t\tinnerkey = 'Component';\n\t\t\t\t\t\t\t\t\tfor (innermost in data[outerkey][innerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#go_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey][innermost] + \"\\\" value=\" + innermost + \">\" \n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey][innermost] + \"</option>\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$(\"#go_component\").css(\"background-color\",\"#FFE5E0\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'kegg':\n\t\t\t\t\t\t\t\t$(\"#kegg_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#kegg_list\").removeData();\n\t\t\t\t\t\t\t\t\tenable(['kegg_list','show_selected_kegg','show_all_kegg','clear_selected_kegg','clear_all_kegg']);\n\t\t\t\t\t\t\t\t\t$(\"#kegg_list\").data(\"values\",data[outerkey]);\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\n $(\"#kegg_list\").append(\"<optgroup label=\\\"\" + innerkey + \"\\\">\");\n\t\t\t\t\t\t\t\t\t\tfor (innermost in data[outerkey][innerkey]) // Grouping!\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$(\"#kegg_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey][innermost] + \"\\\" value=\" + innermost + \">\" \n\t\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey][innermost] + \"</option>\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'mirna':\n\t\t\t\t\t\t\t\t$(\"#mirna_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#mirna_list\").removeData();\n\t\t\t\t\t\t\t\t\tenable(['mirna_list','show_selected_mirna','show_all_mirna','clear_selected_mirna','clear_all_mirna']);\n\t\t\t\t\t\t\t\t\t$(\"#mirna_list\").data(\"values\",data[outerkey]);\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#mirna_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\" \n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\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\tbreak;\n\t\t\t\t\t\t\tcase 'disease_mirna':\n\t\t\t\t\t\t\t\t$(\"#disease_mirna_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#disease_mirna_list\").removeData();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tenable(['disease_mirna_list']);\n\t\t\t\t\t\t\t\t\t$(\"#disease_mirna_list\").data(\"values\",data[outerkey]); //Cache!\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#disease_mirna_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\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\tbreak;\n\t\t\t\t\t\t\tcase 'location_mirna':\n\t\t\t\t\t\t\t\t$(\"#location_mirna_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#location_mirna_list\").removeData();\t\t\t\t\n\t\t\t\t\t\t\t\t\tenable(['location_mirna_list']);\n\t\t\t\t\t\t\t\t\t$(\"#location_mirna_list\").data(\"values\",data[outerkey]);\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#location_mirna_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\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\tbreak;\n\t\t\t\t\t\t\tcase 'dataset_mirna':\n\t\t\t\t\t\t\t\t$(\"#dataset_mirna_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#dataset_mirna_list\").removeData();\n\t\t\t\t\t\t\t\t\tenable(['dataset_mirna_list','reset_mirna_data_button','color_mirna_button',\n\t\t\t\t\t\t\t\t\t\t\t'mirna_disease_radio','mirna_location_radio','mirna_both_radio',\n\t\t\t\t\t\t\t\t\t\t\t'allow_click_color_mirna_check','multicolor_mirna_check',\n\t\t\t\t\t\t\t\t\t\t\t'multidisease_mirna_check','multilocation_mirna_check']);\n\t\t\t\t\t\t\t\t\t$(\"#dataset_mirna_list\").data(\"values\",data[outerkey]);\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#dataset_mirna_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\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\tbreak;\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\terror: function(data,error)\n\t\t\t{\n\t\t\t\t$('#color_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t$('#shape_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t$('#info_section').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t$('#element_info').animate({ opacity: 1.0 },250);\n\t\t\t\tdisplayError('Ooops! ' + error + \" \" + data.responseText);\t\t\t\t\t\t\n\t\t\t},\n\t\t\tdataType: \"json\"\n\t\t});\n\n\t\tif (!recall) // If not called again because of the addition of neighbors\n\t\t{\n\t\t\tfetchNetwork(); // Initiate the network\n\t\t}\n\t}\n}", "function searchOne()\n{\n\ttry{\n \n keyword = $('input[name=advanced_search_keyword]').val();\n\t\tkeyword = encodeURIComponent(keyword);\n\t\twindow.keyword = '\"'+keyword+'\"';\n\t\twindow.page =1;\n\n\t if(getUrlVars()['page'] != undefined){\n\t\t window.page = getUrlVars()['page'];\n\t }\n \n\t\twindow.filters= new Array();\n\t\tajaxSearch();\n\t\treturn false;\n\t}\n\tcatch(e)\n\t{\n\t\talert(e);\n\t}\n}", "function advancedFilter() {\n var input, filter, count = 0;\n \n // Array of substrings, rather than a single string.\n input = $('#searchbox').val().split(' ');\n\n // In the #resources_box list of resource entries, hide each that doesn't match the filter.\n $('#resources_box').find('div').each(function(){\n\n // Count up a total, and then later decrement it every time a filter doesn't match. This will ensure\n // a 0 is displayed when no matches are found.\n count += 1;\n var keywordCheckResult = keywordCheck(this.innerHTML, input);\n \n if (keywordCheckResult) {\n this.style.display = \"\";\n } else {\n count -= 1;\n this.style.display = \"none\";\n }\n \n updateCount(count);\n });\n}", "function search(_event) {\r\n let inputName = document.getElementById(\"searchname\");\r\n let inputMatrikel = document.getElementById(\"searchmatrikel\");\r\n let query = \"command=search\";\r\n query += \"&nameSearch=\" + inputName.value;\r\n query += \"&matrikelSearch=\" + inputMatrikel.value;\r\n console.log(query);\r\n sendRequest(query, handleSearchResponse);\r\n }", "function search(trm) {\n\n \tterm = trm;\n //re-extend the search results holder, to show the results to the user\n $('#search_results_holder').height(300);\n //use the httpget function to grab the custom google search\n //JSON DATA\n //var json_dta = httpGet('https://www.googleapis.com/customsearch/v1?key=AIzaSyDM8_gZ-5DQVcBUt1y7qq_wAjUDbr4YSTA&cx=009521426283403904660:drg6vvs6o2a&q=' + trm);\n add_results('https://www.googleapis.com/customsearch/v1?key=AIzaSyDM8_gZ-5DQVcBUt1y7qq_wAjUDbr4YSTA&cx=009521426283403904660:drg6vvs6o2a&q=' + trm);\n }", "function collectionsSearch() {\r\n var query = \"\";\r\n if ($(\".collectionSearchBar\").hasClass(\"first\")) {\r\n query = \"\";\r\n $(\".collectionSearchBar\").removeClass(\"first\");\r\n } else {\r\n query = $(\".collectionSearchBar\").val();\r\n }\r\n\r\n // only put collections in between the div if they include the query.\r\n // I.E. \"\" is in every collection title and user_name\r\n var populateCheckboxes = \"<hr>\";\r\n for (var i = 0; i < collectionArray.length; i++) {\r\n if ((collectionArray[i][0].toString().toLowerCase()).indexOf(query.toLowerCase()) != -1 ||\r\n (collectionArray[i][2].toString().toLowerCase()).indexOf(query.toLowerCase()) != -1) {\r\n\r\n populateCheckboxes += \"<input type='checkbox' class='checkedboxes' name='item-\" + i + \"' id='item-\" + i + \"' value='\" + collectionArray[i][1] + \"' />\"\r\n + \"<label for='item-\" + i + \"'><div style='float:left'>\" + collectionArray[i][0] + \" </div><div style='float:right'>\" + collectionArray[i][2] + \"</div></label><br />\";\r\n }\r\n }\r\n $(\"#collectionSearchObjects\").html(populateCheckboxes);\r\n\r\n var checkboxes = $(\"#collectionSearchObjects > input\");\r\n checkboxes.click(function () {\r\n if (isAnyChecked == 1) {\r\n $('#' + lastCheckedId).prop(\"checked\", false);\r\n }\r\n lastCheckedId = $(this).attr('id');\r\n checkSearchSubmitBtn();\r\n });\r\n $('#collectionTitle').bind('input propertychange', function () {\r\n if (this.value != \"\") {\r\n $(\".collectionNewSubmit\").show();\r\n } else {\r\n $(\".collectionNewSubmit\").hide();\r\n }\r\n });\r\n}", "function searchHelper() {\r\n let searchValue = searchField.value;\r\n if (searchValue.length) search(searchValue);\r\n else getAll();\r\n }", "function doSearch( event ) {\n\tif ( typeof event == 'object' ) {\n\t\tif ( event.code == 'Escape' )\n\t\t\tsearchBox.value = '';\n\t}\n\telse\n\t\tsearchBox.value = event || '';\n\n\tlet [ field, value ] = searchBox.value.toLowerCase().split(':');\n\tif ( value === undefined )\n\t\t[ value, field ] = [ field, value ];\n\n\t// search only on the selected gallery - collection or wishlist\n\tconst target = collection.classList.contains('hide') ? wishlist : collection;\n\n\t// iterate over gallery items and hide those that don't match the search string\n\t// if search string is empty, \"unhide\" all items on both galleries\n\t( value === '' ? document : target).querySelectorAll('.item').forEach( item => {\n\t\tconst text = ( field ? item.dataset[ field ] : item.innerText ).toLowerCase();\n\t\titem.classList.toggle( 'hide', value.length && ! text.includes( value ) );\n\t});\n\n\t// show count for displayed items\n\tcount.innerText = target.querySelectorAll('.item:not(.hide)').length;\n}", "function build_search() {\n\t\t\tvar search_box = element.find(settings.search_box);\n\t\t\tif (!search_box.length) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsearch_box.css({color: settings.css_off}).val('search');\n\t\t\tsearch_box.click(function () {\n\t\t\t\t$(this).css({color: settings.css_on}).val('');\n\t\t\t});\n\t\t\tsearch_box.blur(function () {\n\t\t\t\tif ($(this).val() === '') {\n\t\t\t\t\t$(this).css({color: settings.css_off}).val('search');\n\t\t\t\t}\n\t\t\t});\n\t\t\tsearch_box.on('keyup', function (e) {\n\t\t\t\t//don't count the SHIFT key as a key press\n\t\t\t\tif (e.which == 16) return;\n\t\t\t\tsearch($(this).val());\n\t\t\t});\n\t\t}", "set materialSearch(value) {}", "function runSearch(e) {\n if (e.target.value === \"\") {\n // On empty string, remove all search results\n // Otherwise this may show all results as everything is a \"match\"\n applySearchResults([]);\n } else {\n const tokens = e.target.value.split(\" \");\n const moddedTokens = tokens.map(function (token) {\n // \"*\" + token + \"*\"\n return token;\n })\n const searchTerm = moddedTokens.join(\" \");\n const searchResults = idx.search(searchTerm);\n const mapResults = searchResults.map(function (result) {\n const resultUrl = docMap.get(result.ref);\n return { name: result.ref, url: resultUrl };\n })\n\n applySearchResults(mapResults);\n }\n\n}", "function doubleSearch () {}", "function displayNewSearchResults(event) {\n let searchTerm = event.target.value;\n let currentSearch = giphy[\"query\"][\"q\"];\n if (searchTerm !== currentSearch && searchTerm !== \"\") {\n giphy[\"query\"][\"q\"] = searchTerm;\n updateOffset(true);\n update();\n }\n}", "function search(evt){\r\n\r\n if (evt){\r\n // don't search if pressing keys to navigate the list\r\n switch(evt.which){\r\n case 13:\r\n case 37:\r\n case 38:\r\n case 40:\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n return false; \r\n break;\r\n }\r\n }\r\n\r\n var searchstring = plugin.pcwInput.val();\r\n\r\n if (searchstring == ''){\r\n return;\r\n }\r\n\r\n // store the search string\r\n plugin.pcwInput.data('search-text',searchstring);\r\n\r\n if ($.trim(searchstring) == ''){\r\n return false;\r\n }\r\n \r\n $.ajax({\r\n url: constants.searchURL.replace('{{key}}', plugin.config.apikey) + searchstring,\r\n type: 'GET',\r\n dataType: 'jsonp',\r\n success: function(data){\r\n \r\n var addresses = data.predictions;\r\n\r\n if (addresses.length > 0){\r\n\r\n if (addresses.length == 1){\r\n // go straight to browse ??\r\n //browse(addresses[0][1]);\r\n }\r\n\r\n plugin.pcwAddressBrowse.trigger('hide');\r\n plugin.pcwAddressSelect.html('');\r\n\r\n // check searchstring is still current.\r\n if (searchstring === plugin.pcwInput.val()){\r\n \r\n // add the addresses to the Select drop down\r\n $.each(addresses, function(index, value){\r\n var listitem = $('<li></li>');\r\n var css = (value.complete) ? 'finish' : 'browse';\r\n var listitemlink = $('<a href=\"#\" class=\"'+css+'\">'+value.prediction+'</a>').data((value.complete)?'finish-id':'browse-id',value.refs);\r\n\r\n plugin.pcwAddressSelect.append(listitem.append(listitemlink)).trigger('show');\r\n\r\n });\r\n\r\n }\r\n\r\n }else{\r\n // try and filter any results we already have ??\r\n //filter(plugin.pcwAddressSelect, evt);\r\n }\r\n\r\n },\r\n error: function() { debug('Search failed',2) },\r\n timeout: 2000\r\n });\r\n }", "function search() {\n // get the value of the search input field\n var searchString = $('#search').val().toLowerCase();\n\n markerLayer1.setFilter(showType);\n\n // here we're simply comparing the 'name' property of each marker\n // to the search string, seeing whether the former contains the latter.\n function showType(feature) {\n return feature.properties.name\n .toLowerCase()\n .indexOf(searchString) !== -1;\n }\n}", "function dm_search(d_o1,ev,smId){var s=d_o1.value;d_ce=_dmvi(smId);var fromItem=null;if(ev.keyCode==13){fromItem=d_o1.prevItem;}if(!d_ce||s==\"-\"||d_o1.frase==s&&!fromItem){return;}_dmOOa(d_ce);d_o1.style.backgroundColor=\"\";d_o1.frase=s;if(!s){return;}d_iv=_dmlO(d_ce,s,dmSearch==2,fromItem);if(d_iv&&d_iv==fromItem){d_iv=_dmlO(d_ce,s,dmSearch==2,null);}if(d_iv){_dIO(d_iv);d_o1.prevItem=d_iv;}else{d_o1.style.backgroundColor=\"red\";d_o1.prevItem=null;}}", "function search(e){\n\t\t\tvar inputText = e.target.value,\n\t\t\t\toptionHTML = '',\n\t\t\t\tliHTML = ''; \n\t\t\tfor(var i=0;i<that.textContent.length;i++){\n\t\t\t\tif( that.textContent[i].indexOf(inputText) != -1){\n\t\t\t\t\tliHTML += \t'<li value=\"' + that.value[i] + '\">' +\n\t\t\t\t\t\t\t\t\tthat.textContent[i] + '</li>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\toptionUl.innerHTML = liHTML;\n\t\t\toption.style.border = 'solid 1px gray';\n\n\t\t\tfor(var i=0;i<optionLi.length;i++){\n\t\t\t\toptionLi[i].addEventListener('click', pick, false); \n\t\t\t\toptionLi[i].addEventListener('mouseenter', keep, false); optionLi[i].addEventListener('touchstart', keep, false); //cellphone ontouchstart event\n\t\t\t\toptionLi[i].addEventListener('mouseout', release, false);\n\n\t\t\t}\n\t\t}", "function searchTerm(){\n \n }", "function buttonSearch(){\n\tsearchTerm = this.attributes[2].value; \n\tsearchTerm = searchTerm.replace(/\\s+/g, '+').toLowerCase();\n\t\t\n \tdisplayGifs ();\n}", "function initAutoComplete(){\n // jQuery(\"#contact_sphinx_search\")\n // jQuery(\"#account_sphinx_search\")\n // jQuery(\"#campaign_sphinx_search\")\n // jQuery(\"#opportunity_sphinx_search\")\n // jQuery(\"#matter_sphinx_search\")\n jQuery(\"#search_string\").keypress(function(e){\n if(e.which == 13){\n searchInCommon();\n return jQuery(\".ac_results\").fadeOut();\n }\n });\n\n jQuery(\"#lawyer_search_query\").keypress(function(e){\n if(e.which == 13){\n searchLawyer();\n return jQuery(\".ac_results\").fadeOut();\n }\n });\n}", "function singleSearchBar(){\n const searchText = document.getElementById(\"anySearch\").value.toLowerCase();\n console.log(searchText);\n const result = [];\n const nameResult = findByName(searchText, searchText);\n console.log('nameResult:');\n console.log(nameResult);\n result.concat(nameResult);\n renderedTable(result);\n}", "function do_search() {\n var query = input_box.val().toLowerCase();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= settings.minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, settings.searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function do_search() {\n var query = input_box.val().toLowerCase();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= settings.minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, settings.searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function search()\n{\n for (let i = 0; i < elements.length; i++)\n {\n const current = elements[i];\n\n if (current.innerText.includes(input.value)) current.style.display = \"\";\n else current.style.display = \"none\";\n }\n}", "function setQuery(evt) {\n if (evt.keyCode == 13) {\n getResults(searchBox.value);\n }\n}", "function setQuery(e) {\n if (e.keyCode == 13) {\n getResults(searchBox.value);\n }\n}", "function appendSearchBoxes(selector) {\n selector.each( function () {\n var title = $(this).text();\n $(this).html( \"<input type='search' class='form-control' placeholder='Search \"+ title +\"' style='width: 100%; padding: 6px !important;'/>\");\n } );\n}", "onSearch(e) {\n let term = e.target.value;\n // Clear the current projects/samples selection\n this.props.resetSelection();\n this.props.search(term);\n }", "function search(e){\n e.preventDefault();\n searchCriteria.value == 'user' ? fetchUsersByName() : fetchReposByName()\n userList.innerHTML = ''\n form.reset();\n}", "function manualSearch(e) {\n let term = document.querySelector(\"#searchTerm\").value;\n term = term.trim();\n if (term.length < 1) return;\n manualSearchData(term.toLowerCase());\n}", "function search(value) {\n try {\n $('table.searchable > tbody > tr').show();\n // split on \", \"\n var params = value.split(\", \");\n for (var param = 0; param < params.length; param++) {\n if (params[param] != \"\") {\n var $rows = $('table.searchable > tbody > tr').filter(\":visible\");\n for (var i = 0; i < $rows.length; i++) {\n var $dataValue = $rows.eq(i).children();\n var match = false;\n for (var data = 0; data < $dataValue.length; data++) {\n var $dataHtml = $.trim($dataValue.eq(data).html());\n if ($dataHtml.toLowerCase() === params[param].toLowerCase()) {\n match = true;\n }\n // check if there is a \",\" after the word but no space\n else if (params[param].toLowerCase().charAt(params[param].length-1) === ',') {\n if (params[param].toLowerCase().substring(0, params[param].length-1) === $dataHtml.toLowerCase()) {\n match = true;\n }\n if($dataHtml.toLowerCase().includes(params[param].toLowerCase())) {\n match = true;\n }\n }\n else if (param === params.length-1){\n if($dataHtml.toLowerCase().includes(params[param].toLowerCase())) {\n match = true;\n }\n }\n }\n if (!match) {\n $rows.eq(i).hide();\n }\n else {\n $rows.eq(i).show();\n }\n }\n }\n }\n }\n catch (err) {\n console.log(err);\n // LogErrorScript(err.message, \"SearchScript.search\")\n }\n}", "arrayLikeSearch() {\r\n this.setEventListener();\r\n if (!this.display || this.display == this.selectedDisplay) {\r\n this.setEmptyTextResults();\r\n \r\n return true;\r\n }\r\n this.resultslength = this.results.length;\r\n this.$emit(\"results\", { results: this.results });\r\n this.load = false;\r\n\r\n if (this.display != this.selectedDisplay) {\r\n this.results = this.source.filter((item) => {\r\n return this.formatDisplay(item)\r\n .toLowerCase()\r\n .includes(this.display.toLowerCase())&& !item.invisible;\r\n });\r\n \r\n \r\n }\r\n }", "function search(searchContent) {\r\n smoothTopScroll();\r\n if (searchContent.length==0) {\r\n callCategories();\r\n return;\r\n }\r\n document.getElementById(\"pagetitle\").innerHTML = \"Search\";\r\n var results = {};\r\n Object.keys(itemvarsetidenum).forEach(function(num) {\r\n Object.keys(itemvarsetidenum[num]).forEach(function(key) {\r\n if (key.toLowerCase().includes(searchContent.toLowerCase())) {\r\n results[key]=itemvarsetidenum[num][key];\r\n }\r\n });\r\n });\r\n\r\n hideAllBoxes();\r\n activeSet = 1;\r\n generateBox(\"Back\", null, 0, 1, \"<div class='subtext'>Click to return to categories</div>\");\r\n Object.keys(results).forEach(function(key) {\r\n if (Object.keys(results).indexOf(key) + 2 > 20) {return};\r\n generateBox(key, results, 0, Object.keys(results).indexOf(key) + 2,\r\n \"<div class='subtext shortcut'>\" + results[key] + \"</div>\")\r\n });\r\n}", "function search() {\n let input, filter, elements, a, txtValue;\n input = document.getElementById('search-bar');\n filter = input.value.toUpperCase();\n elements = document.getElementsByClassName('pokebox');\n \n for (let i = 0; i < elements.length; i++) {\n a = elements[i].getElementsByClassName('name')[0];\n txtValue = a.textContent || a.innerText;\n\n if (txtValue.toUpperCase().indexOf(filter) > -1) {\n elements[i].style.display = \"\";\n } else {\n elements[i].style.display = \"none\";\n }\n }\n}", "function focusSearchBoxListener(){ $('#query').val('').focus() }", "function search(current){\n\n}", "function SearchFunctionality(input, list) {\n const names = document.querySelectorAll(\"h3\");\n const emails = document.querySelectorAll(\"span.email\");\n let searchNamesArray = [];\n for (i = 0; i < list.length; i++) {\n // Check if search bar input contains letters in names or emails arrays ...\n if (names[i].innerHTML.indexOf(input.value) > -1 || emails[i].innerHTML.indexOf(input.value) > -1) {\n searchNamesArray.push(list[i]);\n }\n // ... If not, set the list item to not display\n else {\n list[i].style.display = \"none\";\n }\n }\n ShowPage(searchNamesArray, 1);\n AppendPageLinks(searchNamesArray);\n\n // If there are no results that match the input, show the \"No results found\" message\n if (searchNamesArray.length == 0) {\n noResultsDiv.style.display = \"block\";\n }\n else {\n noResultsDiv.style.display = \"none\";\n }\n}", "function search() {\n const text = this.value;\n if (text === '') {\n rows.forEach(row => row.style.display = null);\n return;\n }\n const length = names.length;\n const regex = new RegExp(text, 'gi');\n for (let i = 0; i < length; i++) {\n if (names[i].match(regex)) rows[i].style.display = null;\n else rows[i].style.display = 'none';\n }\n}", "function moreSearch(){\r\n\r\n\tvar str;\r\n\r\n\tif(document.getElementById('s').value == \"\"){\r\n\t\talert(\"Please enter a product name, company or keyword\");\r\n\t\treturn false;\r\n\t}\r\n\telse {\r\n \t\t\t\r\n\t str = escape(document.getElementById('s').value);\t\r\n\t searchStr = document.getElementById('s').value;\r\n\t //alert(\"searchStr :\"+searchStr);\r\n\t featureListPopulate();\r\n\t \r\n\r\n\t\t\r\n\t\tvar url = showTimeUrl+'?q='+str;\t\r\n\t\tdocument.searchform1.action =url ;\r\n\t\ttextNew = 'true';\r\n\t\t\r\n\t\tdocument.getElementById('txtHidden1').value = param;\r\n\t\tdocument.getElementById('featureList1').value = featureListString ;\r\n\t\tdocument.searchform1.submit();\t\r\n\t}\r\n\r\n}", "function run_search() {\n var q = $(elem).val();\n if (!/\\S/.test(q)) {\n // Empty / all whitespace.\n show_results({ result_groups: [] });\n } else {\n // Run AJAX query.\n closure[\"working\"] = true;\n $.ajax({\n url: \"/search/_autocomplete\",\n data: {\n q: q\n },\n success: function(res) {\n closure[\"working\"] = false;\n show_results(res);\n }, error: function() {\n closure[\"working\"] = false;\n }\n })\n }\n }", "function searchRows(){\n\tvar $rows = $('.UpdateStageData');\n\t$('#updateStageSearch').keyup(function() {\n\t var val = $.trim($(this).val()).replace(/ +/g, ' ').toLowerCase();\n\t \n\t $rows.show().filter(function() {\n\t var text = $(this).text().replace(/\\s+/g, ' ').toLowerCase();\n\t return !~text.indexOf(val);\n\t }).hide();\n\t});\n}", "function SearchWrapper () {}", "function searchQuery(){\n\t// clear the previous search results\n\t$(\"#content\").html(\"\");\n\t// get the query from the search box\n\tvar query = $(\"#searchBox\").val().replace(\" \", \"%20\");\n\tdisplaySearchResults(query);\n\t// clear search box for next query\n\t$(\"#searchBox\").val(\"\");\n}", "function searchEventListener() {\n\t$(\"#searchbtn\").click(function() {\n\t\tif ($(\"#searchbox\").val() != '') {\n\t\t\tsearchNewspapers($(\"#searchbox\").val());\n\t\t}\n\t});\n}", "function ssearch_do_search() {\n\tvar search_string = d$(\"string_to_search\").value;\n\tif ( !search_string.length )\n\t\treturn;\n\twoas.do_search(search_string);\n}", "function search(){\n\t\t$(\"#mySearch\").on(\"keyup\", function() {\n\t\t\tvar value = $(this).val().toLowerCase();\n\t\t\t$(\".table-device tbody tr\").filter(function() {\n\t\t\t $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);\n\t\t\t});\n\t\t });\n\t}", "function search(evt) {\n\tif(evt && evt.keyIdentifier && evt.keyIdentifier.indexOf(\"U\") == -1)\n\t\treturn;//this will narrow the keys that trigger this event \n\t\n\tvar showunE = \"false\";\n\tif(document.getElementById(\"showunemployed\") && document.getElementById(\"showunemployed\").checked)\n\t\tshowunE = \"true\";\n\tvar input = document.getElementById(\"searchBox\");\n\tvar cost_centre = document.getElementById(\"cost_centre\");\n\tvar sortBy = document.getElementById(\"sortby\");\n\tvar sortOrder = document.getElementById(\"sortorder\");\n\tajaxSendXMLtoPHP('valueList.php?field=users&by='+encodeURIComponent(sortBy.value)+'&dir='+encodeURIComponent(sortOrder.value)+'&showunemployed='+encodeURIComponent(showunE)+'&query='+encodeURIComponent(input.value)+'&cost_centre='+encodeURIComponent(cost_centre.value),\"\",startPopulateEmployeeList);\n clearSelected();\n\tdetailDisplay(null);\n}", "function search( event, searchTerms ){\n //console.debug( this, 'searching', searchTerms );\n $( this ).trigger( 'search:searchInput', searchTerms );\n if( typeof options.onfirstsearch === 'function' && firstSearch ){\n firstSearch = false;\n options.onfirstsearch( searchTerms );\n } else {\n options.onsearch( searchTerms );\n }\n }", "function search( event, searchTerms ){\n //console.debug( this, 'searching', searchTerms );\n $( this ).trigger( 'search:searchInput', searchTerms );\n if( typeof options.onfirstsearch === 'function' && firstSearch ){\n firstSearch = false;\n options.onfirstsearch( searchTerms );\n } else {\n options.onsearch( searchTerms );\n }\n }", "function search() {\n var query_value = $('input#searchbar').val();\n $('b#search-string').html(query_value);\n if(query_value !== ''){\n $.ajax({\n type: \"POST\",\n url: \"/g5quality_2.0/search.php\",\n data: { query: query_value },\n cache: false,\n success: function(html){\n $(\"ul#results\").html(html);\n }\n });\n }return false;\n }", "function action_filter() {\n\tvar filter_criteria = {};\n\n\tvar search = $('#search').val().toLowerCase();\n\tfilter_document(search);\n\t\n\treturn false;\n}", "function query() {\n //reset text area\n $('#searchResults').text(\"\");\n\n contacts = getContacts(); //get existing list of contacts\n var searchCat = $('#selectSearch').val(); //search category (ie. Name)\n var query = $('#selectQuery').val().toLowerCase(); //user query\n var temp = 0; //counter to indicate if matches found\n if (query && query != '' && query != undefined) {\n for (var i = 0; i < contacts.length; i++) {\n var contact = contacts[i][searchCat]; //go through each contact\n if (contact.toLowerCase().indexOf(query) >= 0) {\n $('<ul>', { text: formatItem(contacts[i]) }).appendTo($('#searchResults'));\n temp++;\n }\n //end of loop\n }\n if (temp == 0) { $('#searchResults').text(\"No matches found\"); }\n } else {\n $('#searchResults').text('ERROR: query not valid.');\n }\n}", "function do_search() {\n var query = input_box.val();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= $(input).data(\"settings\").minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, $(input).data(\"settings\").searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function do_search() {\n var query = input_box.val();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= $(input).data(\"settings\").minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, $(input).data(\"settings\").searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function do_search() {\n var query = input_box.val();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= $(input).data(\"settings\").minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, $(input).data(\"settings\").searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function countrySearch(){\n var countries = $(\"#countrySearchList\").children(\"input\");\n var countriesText = $(\"#countrySearchList\").children(\"span\");\n\n var query = $(\"#countrySearchInput\").val().toUpperCase();\n\n for (var i = 0; i < countries.length; i++) {\n if (countries[i].value.toUpperCase().indexOf(query) > -1) {\n countries[i].style.display = \"\";\n countriesText[i].style.display = \"\";\n\n }\n else {\n countries[i].style.display = \"none\";\n countriesText[i].style.display = \"none\";\n }\n }\n}", "function searchFun(searchInput, list) {\n\tfor (let i = 0; i < list.length; i += 1) {\n\t\tlist[i].style.display = 'none';\n\t\tlet nameSearched = list[i].querySelector(\".student-details h3\").innerText;\n\t\tif (searchInput.value.length != 0 && nameSearched.toLowerCase().indexOf(searchInput.value.toLowerCase()) > -1) {\n\t\t\tlist[i].style.display = 'list-item';\n\t\t}\n\t\telse if (searchInput.value.length == 0) {\n\t\t\tshowPage(list, 1);\n\t\t}\n\t}\t\n}", "function setQuery(event) {\n if (event.keyCode === 13) {\n getResults(searchbox.value);\n }\n}", "Search () {\r\n const O = this,\r\n cc = O.CaptionCont.addClass('search'),\r\n P = $('<p class=\"no-match\">'),\r\n fn = (options.searchFn && typeof options.searchFn === 'function') ? options.searchFn : settings.searchFn;\r\n\r\n O.ftxt = $('<input type=\"text\" class=\"search-txt\" value=\"\" autocomplete=\"off\">')\r\n .on('click', (e) => {\r\n e.stopPropagation();\r\n });\r\n O.ftxt[0].placeholder = settings.searchText;\r\n cc.append(O.ftxt);\r\n O.optDiv.children('ul').after(P);\r\n\r\n O.ftxt.on('keyup.sumo', () => {\r\n const hid = O.optDiv.find('ul.options li.opt').each((ix, e) => {\r\n const el = $(e),\r\n {0: opt} = el.data('opt');\r\n opt.hidden = fn(el.text(), O.ftxt.val(), el);\r\n el.toggleClass('hidden', opt.hidden);\r\n }).not('.hidden');\r\n\r\n // Hide opt-groups with no options matched\r\n O.optDiv[0].querySelectorAll('li.group').forEach(optGroup => {\r\n if (optGroup.querySelector('li:not(.hidden)')) {\r\n optGroup.classList.remove('hidden');\r\n } else {\r\n optGroup.classList.add('hidden');\r\n }\r\n });\r\n\r\n P.html(settings.noMatch.replace(/\\{0\\}/g, '<em></em>')).toggle(!hid.length);\r\n P.find('em').text(O.ftxt.val());\r\n O.selAllState();\r\n });\r\n }", "function searchWine(){\n setSearchFor();\n whatToSearch();\n watchSubmit();\n}", "function handleSearchClick(){\r\n var temp = document.getElementById('searchText').value;\r\n fetchRecipesBySearch(temp);\r\n }", "function finder() {\n filter = keyword.value.toUpperCase();\n var li = box_search.getElementsByTagName(\"li\");\n // Recorriendo elementos a filtrar mediante los li\n for (i = 0; i < li.length; i++) {\n var a = li[i].getElementsByTagName(\"a\")[0];\n textValue = a.textContent || a.innerText;\n\n // QUIERO QUE ME APAREZCAN LAS OPCIONES SI TEXTVALUE.STARTSWITH = FILTER \n\n if (textValue.toUpperCase().indexOf(filter) > -1) {\n li[i].style.display = \"flex\";\n box_search.style.display = \"flex\";\n if (keyword.value === \"\") {\n box_search.style.display = \"none\";\n }\n }\n else {\n li[i].style.display = \"none\";\n }\n\n }\n\n}", "function check_paper_search_form() {\n \n}", "function search()\n{\n\ttry{\n\t\tkeyword = $('input[name=advanced_search_keyword]').val();\n\t\t\n\t\twindow.keyword = keyword;\n\t\twindow.page =1;\n\n\t if(getUrlVars()['page'] != undefined){\n\t\t window.page = getUrlVars()['page'];\n\t }\n \n\t\twindow.filters= new Array();\n\t\tajaxSearch();\n\t\treturn false;\n\t}\n\tcatch(e)\n\t{\n\t\talert(e);\n\t}\n}", "function searching() {\n $('.searchboxfield').on('input', function () { // connect to the div named searchboxfield\n var $targets = $('.urbacard'); // \n $targets.show();\n //debugger;\n var text = $(this).val().toLowerCase();\n if (text) {\n $targets.filter(':visible').each(function () {\n //debugger;\n mylog(mylogdiv, text);\n var $target = $(this);\n var $matches = 0;\n // Search only in targeted element\n $target.find('h2, h3, h4, p').add($target).each(function () {\n tmp = $(this).text().toLowerCase().indexOf(\"\" + text + \"\");\n //debugger;\n if ($(this).text().toLowerCase().indexOf(\"\" + text + \"\") !== -1) {\n // debugger;\n $matches++;\n }\n });\n if ($matches === 0) {\n // debugger;\n $target.hide();\n }\n });\n }\n\n });\n\n\n}", "function search() {\n console.log(\"search \", search);\n const ingredientsList = ingredients.join(\",\");\n const url = `http://localhost:8888/api?i=${ingredientsList}&q=${inputValue}&p=1`;\n axios\n .get(url)\n .then((res) => {\n console.log(\"res \", res);\n setResults(res.data.results);\n })\n .catch((err) => {\n console.log(\"err \", err);\n });\n }", "function addSearchFilter(textField, selected) {\n selected = jQuery(selected);\n var idName = selected.attr(\"data-id\");\n var idValue = selected.attr(\"data-idval\");\n /*NOTE: if user select qulifier, than idName -> name of param qualifier_id\n idValue -> value of this param, etc.\n else if user select keyword, then idName -> name of keyword_id or unread_only param, idValue-> value of param,\n but type&column name/value not exist\n */\n var typeName = selected.attr(\"data-type\");\n var typeValue = selected.attr(\"data-typeval\");\n var columnName = selected.attr(\"data-col\");\n var columnValue = selected.attr(\"data-colval\");\n\n if (idName && idName.length > 0) {\n var filterKeys = jQuery(\"#search_filter_form ul#search_filter_keys\");\n filterKeys.append('<input type=\"hidden\" name=\"'+idName+'\" value=\"'+idValue+'\"/>');\n if (typeName && typeName.length>0){\n filterKeys.append('<input type=\"hidden\" name=\"'+typeName+'\" value=\"'+typeValue+'\"/>');\n }\n if (columnName && columnName.length>0) {\n filterKeys.append('<input type=\"hidden\" name=\"'+columnName+'\" value=\"'+columnValue+'\"/>');\n }\n submitSearchFilterForm();\n } else {\n // probably selected a heading, just ignore\n }\n}", "function setQuery(event){ // If enter is press store value in getResults()\n if(event.keyCode == 13){\n getResults(searchBox.value);\n }\n}", "function search(data){\n setSearch(data); \n }", "function search() {\n\turl = \"search.php?term=\" +document.getElementById('term').value;\n\turl+= \"&scope=\" + document.getElementById('scope').value;\n\tdocument.getElementById('search').innerHTML = \"\";\n\tdoAjaxCall(url, \"updateMain\", \"GET\", true);\n}", "function createSearchForm() {\n \n // Add advanced mode criteria to simple form - start\n var advancedCriteria = [];\n var services = catalogue.services;\n// var orgNameField = new GeoNetwork.form.OpenSearchSuggestionTextField({\n// hideLabel: false,\n// minChars: 0,\n// hideTrigger: false,\n// url: services.opensearchSuggest,\n// field: 'orgName', \n// name: 'E_orgName', \n// fieldLabel: OpenLayers.i18n('org')\n// });\n // Multi select organisation field \n var orgNameStore = new GeoNetwork.data.OpenSearchSuggestionStore({\n url: services.opensearchSuggest,\n rootId: 1,\n baseParams: {\n field: 'orgName',\n sortBy: 'ALPHA'\n }\n });\n var orgNameField = new Ext.ux.form.SuperBoxSelect({\n hideLabel: false,\n minChars: 0,\n queryParam: 'q',\n hideTrigger: false,\n id: 'E_orgName',\n name: 'E_orgName',\n store: orgNameStore,\n valueField: 'value',\n displayField: 'value',\n valueDelimiter: ' or ',\n listWidth: 'width:auto',\n// tpl: tpl,\n fieldLabel: OpenLayers.i18n('org')\n });\n \n \n \n \n // Multi select keyword\n var themekeyStore = new GeoNetwork.data.OpenSearchSuggestionStore({\n url: services.opensearchSuggest,\n rootId: 1,\n baseParams: {\n field: 'keyword',\n sortBy: 'ALPHA'\n }\n });\n// FIXME : could not underline current search criteria in tpl\n// var tpl = '<tpl for=\".\"><div class=\"x-combo-list-item\">' + \n// '{[values.value.replace(Ext.getDom(\\'E_themekey\\').value, \\'<span>\\' + Ext.getDom(\\'E_themekey\\').value + \\'</span>\\')]}' + \n// '</div></tpl>';\n var themekeyField = new Ext.ux.form.SuperBoxSelect({\n hideLabel: false,\n minChars: 0,\n queryParam: 'q',\n hideTrigger: false,\n id: 'E_keyword',\n name: 'E_keyword',\n store: themekeyStore,\n valueField: 'value',\n displayField: 'value',\n valueDelimiter: ' or ',\n// tpl: tpl,\n fieldLabel: OpenLayers.i18n('keyword')\n// FIXME : Allow new data is not that easy\n// allowAddNewData: true,\n// addNewDataOnBlur: true,\n// listeners: {\n// newitem: function(bs,v, f){\n// var newObj = {\n// value: v\n// };\n// bs.addItem(newObj, true);\n// }\n// }\n });\n \n \n var when = new Ext.form.FieldSet({\n title: OpenLayers.i18n('when'),\n autoWidth: true,\n //layout: 'row',\n defaultType: 'datefield',\n collapsible: true,\n collapsed: true,\n items: GeoNetwork.util.SearchFormTools.getWhen()\n });\n \n \n var catalogueField = GeoNetwork.util.SearchFormTools.getCatalogueField(services.getSources, services.logoUrl, true);\n var groupField = GeoNetwork.util.SearchFormTools.getGroupField(services.getGroups, true);\n var metadataTypeField = GeoNetwork.util.SearchFormTools.getMetadataTypeField(true);\n var categoryField = GeoNetwork.util.SearchFormTools.getCategoryField(services.getCategories, '../../apps/images/default/category/', true);\n var validField = GeoNetwork.util.SearchFormTools.getValidField(true);\n var spatialTypes = GeoNetwork.util.SearchFormTools.getSpatialRepresentationTypeField(null, true);\n var denominatorField = GeoNetwork.util.SearchFormTools.getScaleDenominatorField(true);\n var statusField = GeoNetwork.util.SearchFormTools.getStatusField(services.getStatus, true);\n \n advancedCriteria.push(themekeyField, orgNameField, categoryField, \n when, spatialTypes, denominatorField, \n catalogueField, groupField, \n metadataTypeField, validField, statusField);\n \n // Create INSPIRE fields if enabled in administration\n var inspirePanel = catalogue.getInspireInfo().enableSearchPanel === \"true\";\n if (inspirePanel) {\n var inspire = new Ext.form.FieldSet({\n title: OpenLayers.i18n('inspireSearchOptions'),\n collapsible: true,\n collapsed: true,\n items: GeoNetwork.util.INSPIRESearchFormTools.getINSPIREFields(catalogue.services, true)\n });\n advancedCriteria.push(inspire);\n }\n \n var adv = new Ext.form.FieldSet({\n title: OpenLayers.i18n('advancedSearchOptions'),\n autoHeight: true,\n collapsible: true,\n collapsed: urlParameters.advanced !== undefined ? false : true,\n defaultType: 'checkbox',\n defaults: {\n anchor: '100%'\n },\n items: advancedCriteria\n });\n \n // Check good map options if we load map config from WMC or OWS\n var mapOptions;\n if(GeoNetwork.map.CONTEXT || GeoNetwork.map.OWS) {\n mapOptions = GeoNetwork.map.CONTEXT_MAP_OPTIONS;\n } else {\n mapOptions = GeoNetwork.map.MAP_OPTIONS;\n }\n \n \n var formItems = [];\n formItems.push(\n new GeoNetwork.form.OpenSearchSuggestionTextField({\n hideLabel: true,\n minChars: 2,\n suggestionField: 'anylight',\n loadingText: '...',\n hideTrigger: true,\n url: catalogue.services.opensearchSuggest\n }),\n GeoNetwork.util.SearchFormTools.getTypesFieldWithAutocompletion(catalogue.services),\n GeoNetwork.util.SearchFormTools.getSimpleMap(GeoNetwork.map.BACKGROUND_LAYERS, mapOptions, \n GeoNetwork.searchDefault.activeMapControlExtent, {width: 290}),\n adv, \n GeoNetwork.util.SearchFormTools.getOptions(catalogue.services, undefined)\n );\n // Add advanced mode criteria to simple form - end\n \n \n // Hide or show extra fields after login event\n var adminFields = [groupField, metadataTypeField, validField, statusField];\n Ext.each(adminFields, function (item) {\n item.setVisible(false);\n });\n \n catalogue.on('afterLogin', function () {\n Ext.each(adminFields, function (item) {\n item.setVisible(true);\n });\n groupField.getStore().reload();\n });\n catalogue.on('afterLogout', function () {\n Ext.each(adminFields, function (item) {\n item.setVisible(false);\n });\n groupField.getStore().reload();\n });\n \n \n return new GeoNetwork.SearchFormPanel({\n id: 'searchForm',\n stateId: 's',\n border: false,\n searchCb: function () {\n if (metadataResultsView && Ext.getCmp('geometryMap')) {\n metadataResultsView.addMap(Ext.getCmp('geometryMap').map, true);\n }\n var any = Ext.get('E_any');\n if (any) {\n if (any.getValue() === OpenLayers.i18n('fullTextSearch')) {\n any.setValue('');\n }\n }\n \n catalogue.startRecord = 1; // Reset start record\n search();\n },\n padding: 5,\n defaults: {\n anchor: '100%'\n },\n listeners: {\n onreset: function (args) {\n facetsPanel.reset();\n \n // Remove field added by URL or quick search\n this.cascade(function(cur){\n if (cur.extraCriteria) {\n this.remove(cur);\n }\n }, this);\n \n if (!args.nosearch) {\n this.fireEvent('search');\n }\n }\n },\n items: formItems\n });\n }", "function searchNhide(searchvalue, search)\r\n{\r\n var sub = searchvalue.toLowerCase();\r\n var elements = document.getElementsByClassName(search);\r\n if(sub != '') //if the text box is not empty\r\n for(var i = 0; i < elements.length; i++)\r\n {\r\n var searchin = elements[i].innerText;\r\n var index = searchin.toLowerCase().indexOf(sub);\r\n if( index !=-1)\r\n elements[i].style.display= \"block\";\r\n else\r\n elements[i].style.display=\"none\";\r\n }\r\n else //if the value of text box is empty\r\n for(var i = 0; i < elements.length; i++)\r\n {\r\n elements[i].style.display= \"block\";\r\n }\r\n}", "function search() {\n //Get the user input text -> convert to lower case\n var txt = $.trim($txt.val()).toLowerCase();\n\n //If the text is empty then complete clear the search and exit the function\n if (txt.length == 0) {\n console.log(\"clear\");\n clear();\n return;\n }\n \n //Create an array of the user input keywords (delimited by a space)\n //We will ensure each keyword exists in the record\n var arr = txt.split(\" \");\n \n //Variable b will determine if the record meets all keyword criteria\n var b = 0; \n \n //Create an empty tr variable to represent the full text of the record in question\n var tr;\n \n //Search through each <tr> in the tbody of the table\n $tbl.children(\"tbody\").find(\"tr\").each(function() {\n \n //Set the initial check value to 1\n b = 1;\n \n //Get the record text => convert to lower-case\n tr = $.trim($(this).text()).toLowerCase();\n \n //Loop through the keywords and check to see if tr contains ALL keywords in question. \n for (var i = 0; i < arr.length; i++) {\n //If any keyword does NOT match the record, b will be 0 and will remain 0 until the next record is searched\n b *= (tr.indexOf(arr[i]) >= 0) ? 1 : 0;\n } \n \n //If b is NOT 0 then the record meets all search criteria - show it, else hide it\n if (b > 0) {\n $(this).show();\n }\n else {\n $(this).hide();\n }\n }); \n }", "function setQuery() {\n getSearch(search.value);\n}", "search() {\n this.trigger('search', {\n element: this.searchBar,\n query: this.searchBar.value\n });\n }" ]
[ "0.69228464", "0.67884094", "0.6783339", "0.669975", "0.6686005", "0.6667939", "0.66036344", "0.6544548", "0.6544512", "0.65110296", "0.6495528", "0.64728266", "0.64728266", "0.64600027", "0.6451478", "0.6421094", "0.6412245", "0.6408448", "0.64071834", "0.63898444", "0.63826597", "0.63771814", "0.63697034", "0.6323247", "0.63222337", "0.6320743", "0.6314969", "0.63075846", "0.6305587", "0.6301307", "0.63006717", "0.62980896", "0.62926847", "0.6252144", "0.6250168", "0.62426335", "0.62391174", "0.62284416", "0.6228013", "0.62249005", "0.62205076", "0.6215896", "0.6213317", "0.6212695", "0.62120384", "0.6208682", "0.6190313", "0.61895895", "0.61895895", "0.6187752", "0.6187217", "0.6181968", "0.6178317", "0.61763674", "0.6172598", "0.61712146", "0.6162189", "0.6159304", "0.61511546", "0.6148348", "0.6140318", "0.6135928", "0.6133974", "0.61302835", "0.6129524", "0.612467", "0.61234075", "0.6118851", "0.6114721", "0.61144394", "0.6111074", "0.6105185", "0.610441", "0.6103722", "0.6103722", "0.60994357", "0.6095196", "0.6090384", "0.6088078", "0.6088078", "0.6088078", "0.6076398", "0.60736006", "0.6068747", "0.6051838", "0.6042468", "0.6041473", "0.60406077", "0.60290664", "0.602657", "0.6014633", "0.59975505", "0.59974253", "0.59857684", "0.5984649", "0.5983891", "0.59835213", "0.59816736", "0.59814465", "0.5966595", "0.596294" ]
0.0
-1
= Citizen advert blocking =
function qll_utility_blockadvert() { $("#eads").removeAttr('width'); $("#eads").removeAttr('height'); $("#eads").removeAttr('src'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adBlockNotDetected() {\n}", "function BLOCKIND() {return true;}", "function block() {\n blocked++;\n }", "function adBlockDetected() {\n //ga(\"send\",{hitType:\"adblock-detected\",eventCategory:\"adblock\",eventAction:\"detected\",eventLabel: \"adblock-detected\"});\n if(localStorage.getItem('nodonate') != \"true\"){\n document.getElementById(\"ab-only\").style.display = \"block\";\n }\n}", "function connection_offline() {\n // Block.\n }", "function thridPartyDisallowance() {\n var frm = document.frmDisallow;\n if (frm.disallowTPAddress.value.length < 41) {\n $(\"#statusFormDisallow\").css(\"background-color\", \"Salmon\");\n $(\"#statusFormDisallow\").html(\"You must inform appropriate information\");\n return\n }\n $(\"#statusFormDisallow\").css(\"background-color\", \"lightblue\");\n $(\"#statusFormDisallow\").html(\"Waiting for you to confirm the transaction in MetaMask or another Ethereum wallet software\");\n console.log(\"Sending... \" + frm.disallowTPAddress.value);\n contract.removeIssuers(frm.disallowTPAddress.value, {from: web3.eth.accounts[0], gas: 3000000, value: 0}, function (err, result) {\n if (!err) {\n $(\"#statusFormDisallow\").css(\"background-color\", \"yellow\");\n $(\"#statusFormDisallow\").text(\"Transaction sent. Wait until it is mined. Transaction hash: \" + result);\n waitForTxToBeMined(result, \"#statusFormDisallow\");\n } else {\n console.error(err);\n $(\"#statusFormDisallow\").css(\"background-color\", \"Salmon\");\n $(\"#statusFormDisallow\").html(\"Error \" + JSON.stringify(err));\n }\n });\n $(\"#btnStartOverDisallowance\").show();\n $(\"#btn3TPDisallowance\").hide();\n}", "function advertise_status()\n{\n\n\t if(earthnc_getUrlVariable('em'))\n\t {\n\n\t\tshow('advert_inner');\n\t }\n\t else\n\t {\n\n\t\t show('advert_inner');\n\n\t }\n\n}", "function connection_online() {\n // Unblock.\n }", "function blockSeen(info) {\n 'use strict';\n return {cancel: true};\n}", "isBlocked() {\r\n if(this.block > 0) {\r\n this.block--;\r\n return 1;\r\n }\r\n else return 0;\r\n }", "blocker(program, state) {\n return false;\n }", "enableBlockList() {\r\n\r\n }", "function blocker(time) {\n var now = new Date().getTime()\n\n while (new Date().getTime() < now + time) {\n// console.log('blocking')\n }\n }", "function ProfileCardBlock(){\n PeopleService.Block($rootScope.UserCard.id)\n .then(\n resolve => {\n $rootScope.UserCard.blocked = true ;\n }\n );\n }", "function blockRequest(details) {\n console.log(\"Blocked: \", details.url);\n return {\n cancel: true\n };\n }", "function C012_AfterClass_Amanda_IsChangingBlocked() {\n\tif (GameLogQuery(CurrentChapter, CurrentActor, \"EventBlockChanging\"))\n\t\tOverridenIntroText = GetText(\"ChangingIsBlocked\");\n}", "function blockSiteForDataCap() {\n\tdocument.body.innerHTML = '<h1 style=\"padding-top: 100px; text-align: center; font-size: 60px;\"> Data Cap Reached</h1>' + '<p style=\"padding: 50px; text-align: center; font-size: 30px;\">You have reached your daily data cap. Please upgrade your tier to get more data.</p>'\n chrome.storage.sync.set({ \"siteCount\" : 0}, function () {});\n}", "function\nShowBlocker\n()\n{\n var blocker;\n\n blocker = document.getElementById(\"MainBlocker\");\n blocker.style.visibility = \"visible\";\n}", "function getBlocking() {\n\tconst scriptNumber = scriptNumText.value;\n\tsetScriptNumber(scriptNumber)\n\tconsole.log(`Get blocking for script number ${scriptNumber}`)\n\n\tconsole.log('Getting ')\n\t/// Make a GET call (using fetch()) to get your script and blocking info from the server,\n\t// and use the functions above to add the elements to the browser window.\n\t// (similar to actor.js)\n\n}", "blockUpdate() {\n this.updateManuallyBlocked = true;\n }", "function processControllerChannelBlockUnblock() {\n addEvent(\"switches\", e[\"dpid\"], point, entities);\n }", "get isBlocked() {\n\n }", "blockCard (clientId, ean, reason = null) {\n const data = {};\n if (reason) {data.reason = reason}\n return this.createRequest(`/clients/${clientId}/cards/${ean}/lock`,'POST', data);\n }", "function blockFrame(params, tabId, frameId) {\n\tvar req = new XMLHttpRequest();\n\tif (version == 4) {\n\t\treq.open('GET', 'https://getcoldturkey.com/blocked/4.0/' + params, true); \n\t} else {\n\t\treq.open('GET', 'https://getcoldturkey.com/blocked/3.0/' + params, true); \n\t}\n\treq.onload = function () {\n\t\tif (req.status == 200) {\n\t\t\tchrome.tabs.sendMessage(tabId, {command: \"blockFrame\", blockPage: req.responseText}, {frameId: frameId} );\n\t\t}\n\t};\n\treq.send(null);\n}", "function bypassAnticheat() { // SO THAT YOUR ACCOUNT DOESNT GET BANNED\n \n}", "function advertisementpayment() {\n var mus = document.getElementById(\"musicplayr\");\n mus.ontimeupdate = function () {\n if (mus.currentTime >= 30) {\n var url = \"http://\" + \"8tracks.com/sets/874076615/report.xml?track_id=\" + currentSongID + \"&mix_id=\" + currentMIXID;\n WinJS.xhr({ url: url }).then(\n function (response) { },\n function (error) { },\n function (progress) { }\n );\n currentSongBill = true\n }\n }\n }", "function an_blocker_counter(value) {\n if (anOptions.anOptionStats !== 2) {\n $.post(ajax_object.ajaxurl, {\n action: 'call_an_adblock_counter',\n an_state: value\n });\n return false;\n }\n }", "block() {\n this.getBlocker().block();\n }", "banclient(clid, cldbid, uid, time, banreason) {\n\n }", "function processDisablerUpdate(call, successCallback, failureCallback, local_hold_status) {\n logger.debug(\"processDisablerUpdate: state= \" + call.peer.signalingState);\n var peer = call.peer, updateSdp, candidates, i, successSdp;\n\n if(call.sdp.indexOf(mLine + video + \" 0 \") !== -1) {\n call.sdp = call.sdp.replace(mLine + video + \" 0 \", mLine + video + \" 1 \");\n }\n\n if (local_hold_status) {\n call.sdp = updateSdpDirection(call.sdp, audio, MediaStates.INACTIVE);\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.INACTIVE);\n }\n\n call.sdp = checkSupportedVideoCodecs(call.sdp, null);\n call.sdp = performVP8RTCPParameterWorkaround(call.sdp);\n call.sdp = fixRemoteTelephoneEventPayloadType(call, call.sdp);\n\n updateSdp = webRTCSdp(typeOff, call.sdp);\n\n peer.setRemoteDescription(updateSdp,\n function(){\n peer.createAnswer(peer.remoteDescription,\n function(obj){\n\n logger.debug(\"processDisablerUpdate: isSdpEnabled audio= \" + isSdpEnabled(obj.sdp, audio));\n logger.debug(\"processDisablerUpdate: isSdpEnabled video= \" + isSdpEnabled(obj.sdp, video));\n\n callSetReceiveVideo(call);\n\n if (isSdpEnabled(obj.sdp, audio) || isSdpEnabled(obj.sdp, video)) {\n if(getSdpDirection(call.sdp, audio) === MediaStates.SEND_ONLY){\n logger.debug(\"processDisablerUpdate: audio sendonly -> recvonly\");\n obj.audioDirection = MediaStates.RECEIVE_ONLY;\n }\n\n if(callCanLocalSendVideo(call)){\n obj.videoDirection = MediaStates.SEND_RECEIVE;\n } else {\n obj.videoDirection = MediaStates.RECEIVE_ONLY;\n }\n \n peer.setLocalDescription(obj,\n function(){\n candidates = updateSdp.createCandidates();\n for(i=0; i<candidates.length; ++i) {\n peer.addIceCandidate(candidates[i]);\n }\n successSdp = updateH264Level(obj.sdp);\n\n if (local_hold_status) {\n successSdp = updateSdpDirection(successSdp, audio, MediaStates.INACTIVE);\n successSdp = updateSdpDirection(successSdp, video, MediaStates.INACTIVE);\n }\n\n restoreMuteStateOfCall(call);\n successCallback(successSdp);\n },\n function(e) {\n logger.debug(\"processDisablerUpdate: setLocalDescription failed: \" + e);\n failureCallback(logPrefix + \"processDisablerUpdate: setLocalDescription failed\");\n });\n } else {\n logger.debug(\"processDisablerUpdate: createAnswer failed!!\");\n failureCallback(logPrefix + \"No codec negotiation\");\n }\n },\n function(e){\n logger.debug(\"processDisablerUpdate: createAnswer failed!! \" + e);\n failureCallback(logPrefix + \"Session cannot be created\");\n },\n {\n \"audio\":mediaAudio,\n \"video\":getGlobalSendVideo()\n });\n },\n function(e) {\n logger.debug(\"processDisablerUpdate: setRemoteDescription failed: \" + e);\n });\n\n }", "function removeCareLoaderIn10(){\n setTimeout(function () {\n careAgentUnavailableMsg();//FY21-1003 Story #9060750: GBS Care - Chat - Pre-chat Form Agent Availability Check\n }, 30000);\n}", "function\nHideBlocker\n()\n{\n var blocker;\n\n blocker = document.getElementById(\"MainBlocker\");\n blocker.style.visibility = \"hidden\";\n}", "disableBlockList() {\r\n\r\n }", "maybeNotifyBlocked(blocked, targetUser, user) {\n\t\tconst prefix = `|pm|~|${targetUser.getIdentity()}|/nonotify `;\n\t\tconst options = 'or change it in the <button name=\"openOptions\" class=\"subtle\">Options</button> menu in the upper right.';\n\t\tif (blocked === 'pm') {\n\t\t\tif (!targetUser.blockPMsNotified) {\n\t\t\t\ttargetUser.send(`${prefix}The user '${user.name}' attempted to PM you but was blocked. To enable PMs, use /unblockpms ${options}`);\n\t\t\t\ttargetUser.blockPMsNotified = true;\n\t\t\t}\n\t\t} else if (blocked === 'challenge') {\n\t\t\tif (!targetUser.blockChallengesNotified) {\n\t\t\t\ttargetUser.send(`${prefix}The user '${user.name}' attempted to challenge you to a battle but was blocked. To enable challenges, use /unblockchallenges ${options}`);\n\t\t\t\ttargetUser.blockChallengesNotified = true;\n\t\t\t}\n\t\t}\n\t}", "function intervalFunc () {\n //console.log(bleno.state);\n //console.log(bleno.platform);\n //console.log(bleno.address);\n if(echochar._updateValueCallback == null){\n //if not connected, echochar._updateValueCallback remains null\n //keep advertising.\n bleno.startAdvertising(array[0] + ' ' +array[1], ['ec00']);\n }\n else{\n //if connected, stop advertising\n //console.log(\"Connected. Stop Advertising.\");\n bleno.stopAdvertising();\n }\n //Upon connected, tell the parent device its type and service ID\n if(echochar._subscribeFlag == 1){\n console.log(\"Calling ActiveSend\");\n echochar.ActiveSend(Buffer.from('n' + typeID.toString() + serviceID.toString(), 'utf8'), echochar._updateValueCallback);\n echochar._subscribeFlag = 0;\n }\n}", "function checkAttend(client) {\n if (client.mesa) return true\n return false\n }", "function update() {\r\n var XSS_blocker = chrome.extension.getBackgroundPage().XSS_blocker;\r\n document.getElementById('XSS_toggle').value = XSS_blocker ? 'Disable' : 'Enable';\r\n var Ad_blocker = chrome.extension.getBackgroundPage().Ad_blocker;\r\n document.getElementById('Ad_toggle').value = Ad_blocker ? 'Disable' : 'Enable';\r\n }", "function\nCBSystemInitialize\n()\n{\n WebSocketIFInitialize();\n HideBlocker();\n}", "keepAlive() {\n\t\tif (this.portalId === undefined) {\n\t\t\treturn\n\t\t}\n\t\tthis.client.send(`R/${this.portalId}/system/0/Serial`, '')\n\t}", "async function main() {\n \n const victimaAddress = \"0xe470094e186B105888e4a09aEccABa073ae1b3f7\"\n const Victima = await ethers.getContractFactory(\"PredictTheFutureChallenge\");\n const victimaSC = Victima.attach(victimaAddress);\n const Atacante = await ethers.getContractFactory(\"PredictTheBlockHashAttacker\");\n const atacanteSC = await Atacante.deploy(victimaSC.address);\n\n await atacanteSC.isDeployed;\n console.log(\"atacante SC deployed\")\n \n const tx = await atacanteSC.lockInGuess(\n {value: ethers.utils.parseEther('1')}\n );\n await tx.wait(1);\n console.log(\"lock in guess done!\")\n\n \n // wait until the block delay it's fine\n const settlementBlockNumber = await atacanteSC.settlementBlockNumber()\n console.log(\"Settlement BlockNumber\", settlementBlockNumber.toString())\n const desiredBlock = settlementBlockNumber.add(BigInt(257));\n await new Promise((resolve, reject) => {\n ethers.provider.on(\"block\", (blockNumber) => {\n if (blockNumber > desiredBlock) {\n resolve();\n } else {\n console.log(\"waiting, current distance to block it's \", \n blockNumber - settlementBlockNumber,\n \" < 256. Desired block its: \", desiredBlock.toString(),\n \"Current block: \", blockNumber);\n }\n })\n });\n\n console.log(\"Trying to attack\")\n try {\n var attackTx = await atacanteSC.attack(\n {\n gasPrice: ethers.utils.parseUnits('15','gwei'),\n gasLimit: 500000,\n }\n );\n\n // the try catch is to handle the revert in the attacker contract\n // wait for the tx to be minned\n var receipt = await attackTx.wait(10);\n \n } catch {\n console.log(\"Attack wasn't succesfull\")\n guess = await atacanteSC.guess();\n console.log(\"Guess answer: \", guess);\n var bn = await ethers.provider.blockNumber;\n console.log(\"Block number: \", bn);\n }\n \n succesfull = await victimaSC.isComplete();\n console.log(\"Attack succesfull?\", succesfull)\n}", "function onDisablerIceCandidate(call, event) {\n var answer, offer, sdp, audioStatus, videoStatus;\n logger.debug(\"ICE candidate received: sdpMLineIndex = \" + event.candidate.sdpMLineIndex\n + \", candidate = \" + event.candidate.candidate + \" for call : \" + call.id);\n\n offer = call.offer;\n if(offer) {\n audioStatus = isSdpEnabled(offer.sdp, audio);\n videoStatus = isSdpEnabled(offer.sdp, video);\n\n logger.debug(\"offer.useCandidateInfo will be called\");\n offer.useCandidateInfo(event.candidate);\n\n if(!audioStatus) {\n enableAudio(offer,false);\n }\n }\n\n answer = call.answer;\n if(call.answer) {\n audioStatus = isSdpEnabled(answer.sdp, audio);\n videoStatus = isSdpEnabled(answer.sdp, video);\n\n logger.debug(\"answer.useCandidateInfo will be called\");\n answer.useCandidateInfo(event.candidate);\n\n if(!audioStatus) {\n enableAudio(answer,false);\n }\n }\n\n if(event.candidate.sdpMLineIndex === 0) {\n call.audio_candidate = true;\n } else {\n call.video_candidate = true;\n }\n\n if( offer &&\n !(isSdpEnabled(offer.sdp, audio) && call.audio_candidate === false) &&\n !(isSdpEnabled(offer.sdp, video) && call.video_candidate === false)) {\n\n sdp = offer.sdp;\n sdp = sdp.replace(\"s=\",\"s=genband\");\n sdp = updateH264Level(sdp);\n\n logger.debug(\"onDisablerIceCandidate offer.sdp : \" + sdp);\n\n call.offer = null;\n\n call.successCallback(sdp);\n }\n\n if( answer &&\n !(isSdpEnabled(answer.sdp, audio) && call.audio_candidate === false) &&\n !(isSdpEnabled(answer.sdp, video) && call.video_candidate === false)) {\n\n sdp = answer.sdp;\n sdp = updateH264Level(sdp);\n \n logger.debug(\"onDisablerIceCandidate answer.sdp : \" + sdp);\n\n call.answer = null;\n\n call.successCallback(sdp);\n }\n }", "unblock(){\n // defer until dom is ready\n this.domready(() => {\n const elements = document.querySelectorAll('[data-consent-requires]');\n\n elements.forEach(el => {\n if(\n !('consentAttr' in el.dataset) ||\n el.dataset['consentAttr'] === '' ||\n 'consentManaged' in el.dataset\n ){\n return;\n }\n\n const purposes = el.dataset['consentRequires'].split(',');\n\n if(!purposes.reduce((p,v) => {return p && this.allows(v)}, true)){\n this.log('Element not unblocked, not enough consent', el);\n return;\n }\n\n const attr = el.dataset['consentAttr'].split(',');\n\n // rewrite attributes from data-attr to attr\n attr.forEach(a => {\n a in el.dataset && el.setAttribute(a, el.dataset[a]);\n });\n\n this.log('Element unblocked', el);\n el.setAttribute('data-consent-managed', true);\n });\n });\n }", "function getBlocking() {\n\t// Remove any existing blocks\n\tremoveAllBlocks();\n\n\t// Get the script and actor numbers from the text box.\n\tconst scriptNumber = scriptNumText.value;\n\tconsole.log(`Get blocking for script number ${scriptNumber}`)\n\n\t/* Add code below to get JSON from the server and display it appropriately. */\n\t\t\tif (isNaN(scriptNumber) | scriptNumber <= 0 | scriptNumber[0] == ' '){\n\t\t\t\tdisplaymsg(\"User input(s) not valid, please re-enter !\")\n\t\t\t\treturn;\n\t\t\t}\n\t\t fetch(`/script/${scriptNumber}`)\n\t\t\t .then((res) => {\n\t\t\t\t return res.json()\n\t\t\t })\n\t\t\t .then((jsonResult) => {\n\t\t\t\t\tif (jsonResult == \"Invalid Script ID\"){\n\t\t\t\t\t\tdisplaymsg(\"User input(s) not valid, please re-enter !\")\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t console.log('Result:', jsonResult)\n\t\t\t\t\tvar part_lst = part_dividing(jsonResult)\n\t\t\t\t\tvar index = 0;\n\t\t\t\t\twhile (index < jsonResult['part'].length / 2){\n\t\t\t\t \taddScriptPart(jsonResult['content'],\n\t\t\t\t\t\t parseInt(jsonResult['part'][index * 2], 10),\n\t\t\t\t\t\t parseInt(jsonResult['part'][index * 2 + 1], 10),\n\t\t\t\t\t\t\t part_lst[index])\n\t\t\t\t \tindex += 1;\n\t\t\t\t\t}\n\t\t\t }).catch((error) => {\n\t\t\t\t// if an error occured it will be logged to the JavaScript console here.\n\t\t\t\t\t console.log(\"An error occured with fetch:\", error)\n\t\t\t })\n}", "function getBlocking() {\n\t// Remove any existing blocks\n\tremoveAllBlocks();\n\n\t// Get the script and actor numbers from the text box.\n\tconst scriptNumber = scriptNumText.value;\n\tconsole.log(`Get blocking for script number ${scriptNumber}`)\n\n\t/* Add code below to get JSON from the server and display it appropriately. */\n\t\t\tif (isNaN(scriptNumber) | scriptNumber <= 0 | scriptNumber[0] == ' '){\n\t\t\t\tdisplaymsg(\"User input(s) not valid, please re-enter !\")\n\t\t\t\treturn;\n\t\t\t}\n\t\t fetch(`/script/${scriptNumber}`)\n\t\t\t .then((res) => {\n\t\t\t\t return res.json()\n\t\t\t })\n\t\t\t .then((jsonResult) => {\n\t\t\t\t\tif (jsonResult == \"Invalid Script ID\"){\n\t\t\t\t\t\tdisplaymsg(\"User input(s) not valid, please re-enter !\")\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t console.log('Result:', jsonResult)\n\t\t\t\t\tvar part_lst = part_dividing(jsonResult)\n\t\t\t\t\tvar index = 0;\n\t\t\t\t\twhile (index < jsonResult['part'].length / 2){\n\t\t\t\t \taddScriptPart(jsonResult['content'],\n\t\t\t\t\t\t parseInt(jsonResult['part'][index * 2], 10),\n\t\t\t\t\t\t parseInt(jsonResult['part'][index * 2 + 1], 10),\n\t\t\t\t\t\t\t part_lst[index])\n\t\t\t\t \tindex += 1;\n\t\t\t\t\t}\n\t\t\t }).catch((error) => {\n\t\t\t\t// if an error occured it will be logged to the JavaScript console here.\n\t\t\t\t\t console.log(\"An error occured with fetch:\", error)\n\t\t\t })\n}", "function cancelMyBid() {\n\n}", "function playerBlocking(){\n if(blockKey._justDown && !leftMoveKey.isDown && !rightMoveKey.isDown){\n blocking=true;\n if(playerFacingRight==true){\n player.anims.play('blockingAnim', true);\n player.setOffset(0, 45);\n\n }\n else if(playerFacingRight==false){\n player.anims.play('blockingAnim', true);\n player.setOffset(45, 45);\n }\n }else\n blocking=false;\n\n}", "writeReliableBlocked(buf, callback) {\n if (this.isInBlockMode) {\n this.pendingPackets.push([this.writeReliableBlocked, ...arguments]);\n return;\n }\n\n this.isInBlockMode = true;\n\n let packetId = this.getNextPacketId();\n return this._writeReliableBlocked(buf, packetId, () => {\n this.isInBlockMode = false;\n return this.flushPendingPackets(callback);\n }\n );\n }", "function blockUnrequired(){\r\n\tset(\"V[z_vaxx_*]\",\"\");\r\n\tset(\"V[z_va01_*]\",\"\");\r\n}", "function block_ball()\r\n{\r\n\t// we aim at keeping the organisation and activities very natural and hence the system works for itself\r\n\tif(game_on == true)\r\n\t{\r\n\t\t// it only seeks to block the ball after the game has begun\r\n\t\tknow_my_turn();\r\n\t}\r\n}", "function processDisablerHold(call, hold, local_hold_status, successCallback, failureCallback) {\n logger.debug(\"processDisablerHold: local hold= \" + local_hold_status + \" remote hold= \" + hold);\n var peer=call.peer, updateSdp, sr_indx, so_indx, ro_indx, in_indx, \n audioDirection, videoDirection, candidates, i, successSdp;\n\n /* Added for the case in http://jira/browse/ABE-1140\n * In this case slow start is received when in REMOTE_HOLD state\n * Client should return all codecs to slow start invite\n * and unhold the call.\n * \n * This code should be removed from here with http://jira/browse/ABE-1192.\n */\n if (call.slowStartInvite) {\n peer.createOffer(function(obj) {\n obj.videoDirection = MediaStates.SEND_RECEIVE;\n peer.setLocalDescription(obj, function() {\n candidates = obj.createCandidates();\n for (i = 0; i < candidates.length; ++i) {\n peer.addIceCandidate(candidates[i]);\n }\n successSdp = updateH264Level(obj.sdp);\n restoreMuteStateOfCall(call);\n successCallback(successSdp);\n }, function(e) {\n failureCallback();\n });\n }, function(e) {\n failureCallback();\n }, {\n \"audio\": mediaAudio,\n \"video\": getGlobalSendVideo()\n });\n\n return;\n }\n /************************************************/\n\n if(call.sdp.indexOf(mLine + video + \" 0 \") !== -1) {\n call.sdp = call.sdp.replace(mLine + video + \" 0 \", mLine + video + \" 1 \");\n }\n \n call.sdp = checkSupportedVideoCodecs(call.sdp, null);\n call.sdp = performVP8RTCPParameterWorkaround(call.sdp);\n call.sdp = fixRemoteTelephoneEventPayloadType(call, call.sdp);\n \n updateSdp = webRTCSdp(typeOff,call.sdp);\n\n audioDirection = getSdpDirection(call.sdp, audio);\n videoDirection = getSdpDirection(call.sdp, video);\n\n sr_indx = call.sdp.indexOf(aLine + MediaStates.SEND_RECEIVE, 0);\n so_indx = call.sdp.indexOf(aLine + MediaStates.SEND_ONLY, 0);\n ro_indx = call.sdp.indexOf(aLine + MediaStates.RECEIVE_ONLY, 0);\n in_indx = call.sdp.indexOf(aLine + MediaStates.INACTIVE, 0);\n\n if ( (sr_indx+1) + (so_indx+1) + (ro_indx+1) + (in_indx+1) === 0) {\n //if (hold || local_hold_status) {\n if (hold) {\n logger.debug(\"processDisablerHold: call.sdp has no direction so setting as inactive for \" + (hold ? \"remote hold\" : \"remote unhold with local hold\"));\n updateSdp.audioDirection = MediaStates.INACTIVE; //sendonly originally\n updateSdp.videoDirection = MediaStates.INACTIVE; //sendonly originally\n } else {\n logger.debug(\"processDisablerHold: call.sdp has no direction so setting as sendrecv for unhold\");\n updateSdp.audioDirection = MediaStates.SEND_RECEIVE;\n updateSdp.videoDirection = MediaStates.SEND_RECEIVE;\n \n peer.refreshRenderer();\n }\n }\n\n peer.setRemoteDescription(updateSdp,\n function(){\n candidates = updateSdp.createCandidates();\n for(i=0; i<candidates.length; ++i) {\n peer.addIceCandidate(candidates[i]);\n }\n\n //check if remote party sends video\n callSetReceiveVideo(call);\n\n peer.createAnswer(peer.remoteDescription, function(obj){\n logger.debug(\"processDisablerHold: isSdpEnabled audio= \" + isSdpEnabled(obj.sdp, audio));\n logger.debug(\"processDisablerHold: isSdpEnabled video= \" + isSdpEnabled(obj.sdp, video));\n\n if (isSdpEnabled(obj.sdp, audio) || isSdpEnabled(obj.sdp, video)) {\n if(hold){\n logger.debug(\"processDisablerHold: \" + (hold ? \"Remote HOLD\" : \"Remote UNHOLD with Local Hold\"));\n\n if(audioDirection === MediaStates.SEND_ONLY){\n logger.debug(\"processDisablerHold: audio sendonly -> recvonly\");\n obj.audioDirection = MediaStates.RECEIVE_ONLY;\n }\n if(videoDirection === MediaStates.SEND_ONLY){\n logger.debug(\"processDisablerHold: video sendonly -> recvonly\");\n obj.videoDirection = MediaStates.RECEIVE_ONLY;\n }\n\n if(audioDirection === MediaStates.RECEIVE_ONLY){\n logger.debug(\"processDisablerHold: audio recvonly -> sendonly\");\n obj.audioDirection = MediaStates.SEND_ONLY;\n }\n if(videoDirection === MediaStates.RECEIVE_ONLY){\n logger.debug(\"processDisablerHold: video recvonly -> sendonly\");\n obj.videoDirection = MediaStates.SEND_ONLY;\n }\n\n if(audioDirection === MediaStates.SEND_RECEIVE){\n logger.debug(\"processDisablerHold: audio sendrecv -> sendrecv\");\n obj.audioDirection = MediaStates.SEND_RECEIVE;\n }\n if(videoDirection === MediaStates.SEND_RECEIVE){\n logger.debug(\"processDisablerHold: video sendrecv -> sendrecv\");\n obj.videoDirection = MediaStates.SEND_RECEIVE;\n }\n\n if(audioDirection === MediaStates.INACTIVE){\n logger.debug(\"processDisablerHold: audio inactive -> inactive\");\n obj.audioDirection = MediaStates.INACTIVE;\n }\n if(videoDirection === MediaStates.INACTIVE){\n logger.debug(\"processDisablerHold: video inactive -> inactive\");\n obj.videoDirection = MediaStates.INACTIVE;\n }\n\n if ( (sr_indx+1) + (so_indx+1) + (ro_indx+1) + (in_indx+1) === 0) {\n logger.debug(\"processDisablerHold: no direction detected so setting as inactive\");\n obj.audioDirection = MediaStates.INACTIVE; //sendrecv originally\n obj.videoDirection = MediaStates.INACTIVE; //sendrecv originally\n }\n } else if(local_hold_status) {\n obj.audioDirection = MediaStates.INACTIVE; //sendrecv originally\n obj.videoDirection = MediaStates.INACTIVE; //sendrecv originally\n } else {\n if(callCanLocalSendVideo(call)){\n obj.videoDirection = MediaStates.SEND_RECEIVE;\n } else {\n obj.videoDirection = MediaStates.RECEIVE_ONLY;\n }\n\n logger.debug(\"processDisablerHold: UNHOLD: direction left as it is\");\n }\n\n call.answer = obj; // ABE-1328\n\n peer.setLocalDescription(obj,\n function(){\n successSdp = updateH264Level(obj.sdp);\n restoreMuteStateOfCall(call);\n successCallback(successSdp);\n call.answer = null;\n },\n function(e) {\n logger.debug(\"processDisablerHold: setLocalDescription failed: \" + e);\n failureCallback(logPrefix + \"processDisablerHold setLocalDescription failed\");\n call.answer = null;\n });\n\n } else {\n logger.debug(\"processDisablerHold: createAnswer failed!!\");\n failureCallback(logPrefix + \"No codec negotiation\");\n }\n },\n function(e){\n logger.debug(\"processDisablerHold: createAnswer failed!! \" + e);\n failureCallback(logPrefix + \"Session cannot be created\");\n },\n {\n \"audio\":mediaAudio,\n \"video\":getGlobalSendVideo()\n });\n\n }\n ,function(e) {\n logger.debug(\"processDisablerHold: setRemoteDescription failed: \" + e);}\n );\n }", "function onRequest(req) {\r\n\r\n\tconsole.log(JSON.stringify(req))\r\n\r\n\tlet host = req.Host;\r\n\tlet dest = req.Header['Sec-Fetch-Dest']\r\n\r\n\tif ('video' === dest) return false;\r\n\r\n\tvar allow = true;\r\n\tfor (v in blocked) {\r\n\t\tallow = host.indexOf(blocked[v]) === -1;\r\n\t\tif (!allow)\tbreak;\r\n\t}\r\n\r\n\tif (allow) {\r\n\t\t// console.log(host)\r\n\t} else {\r\n\t\tconsole.log('>>> BLOCK >>> ' + host)\r\n\t}\r\n\r\n\treturn allow;\r\n}", "function reqCap(caller) {\n\n if ($(\".capme_submit\").html() == \"submit\") {\n\n bOFF('.capme_submit');\n theMsg(\"Sending request..\");\n\n // Transcript\n var xscript = s2h($('input:radio[name=xscript]:checked').val());\n\n // SID Source\n var sidsrc = s2h(\"event\");\n\n // IPs and ports\n var sip = s2h(chkIP($(\"#sip\").val()));\n var spt = s2h(chkPort($(\"#spt\").val()));\n var dip = s2h(chkIP($(\"#dip\").val()));\n var dpt = s2h(chkPort($(\"#dpt\").val()));\n\n\t // Max TX\n var maxtx = s2h(chkMaxTX($(\"#maxtx\").val()));\n\n // Timestamps\n if ($(\"#stime\").val().length > 0) {\n var st = chkDate($(\"#stime\").val());\n if (err == 0) {\n $(\"#stime\").val(st);\n }\n }\n\n if ($(\"#etime\").val().length > 0) {\n var et = chkDate($(\"#etime\").val());\n if (err == 0) {\n $(\"#etime\").val(et);\n }\n } \n\n if (st > et) {\n err = 1;\n theMsg(\"Error: Start Time is greater than End Time!\");\n bON('.capme_submit');\n }\n \n // Continue if no errors\n if (err == 0) {\n \n var urArgs = \"d=\" + sip + \"-\" + spt + \"-\" + dip + \"-\" + dpt + \"-\" + st + \"-\" + et + \"-\" + maxtx + \"-\" + sidsrc + \"-\" + xscript;\n\n $(function(){\n $.get(\".inc/callback.php?\" + urArgs, function(data){cbtx(data)});\n });\n \n function cbtx(data){\n eval(\"txRaw=\" + data);\n \n txResult = txRaw.tx;\n txDebug = txRaw.dbg;\n txError = txRaw.err;\n\n if (txResult != 0) {\n var txt = '';\n txt += \"<table class=capme_result align=center width=940 cellpadding=0 cellspacing=0>\";\n txt += \"<tr>\";\n txt += \"<td class=capme_close>\";\n txt += \"<span class=capme_close_button>close</span>\";\n txt += \"</td></tr>\";\n txt += \"<tr>\";\n txt += \"<td class=capme_text>\";\n\t\t\tif (txResult.indexOf(\"Dst Port:\") >= 0) {\n\t\t\t\ttxt += txResult;\n\t\t\t}\n txt += txDebug;\n txt += txError;\n txt += \"</td></tr></table>\";\n $(\".capme_div\").after(txt);\n theMsg(\"Request was successful\");\n $(\".capme_div\").hide();\n $(\".capme_result\").show();\n $(\".capme_msg\").fadeOut('slow');\n\t\t\tif (txResult.indexOf(\"Dst Port:\") == -1) {\n\t\t\t\turl = \"/capme/pcap/\" + txResult;\n\t\t\t\twindow.open(url, \"_self\");\n\t\t\t}\n } else {\n theMsg(txError);\n }\n \n bON('.capme_submit');\n }\n }\n }\n }", "function blockAjax(element, callback) {\n if (!$(element).hasClass('in_use')) {\n $(element).addClass('in_use');\n callback();\n }\n}", "function C012_AfterClass_Jennifer_IsChangingBlocked() {\n\tif (GameLogQuery(CurrentChapter, CurrentActor, \"EventBlockChanging\"))\n\t\tOverridenIntroText = GetText(\"ChangingIsBlocked\");\n}", "function _hideAdvertisingControlIfInternetNotAvailable() {\n var isInternetAvailable = App.Data.isInternetAvailable();\n var ad1 = document.getElementById(\"ad1\");\n var fad1 = document.getElementById(\"fad1\");\n var fad2 = document.getElementById(\"fad2\");\n if (!isInternetAvailable) {\n ad1.style.display = \"none\";\n fad1.style.display = \"none\";\n fad1.style.display = \"none\";\n }\n else {\n ad1.style.display = \"\";\n fad1.style.display = \"\";\n fad1.style.display = \"\";\n }\n }", "function processDisablerAnswer(call,onSuccess,onFail) {\n logger.debug(\"processDisablerAnswer: state= \" + call.peer.signalingState);\n var ans, candidates, i;\n\n call.sdp = checkSupportedVideoCodecs(call.sdp, call.peer.localDescription.sdp);\n\n if(call.sdp.indexOf(mLine + video + \" 0 \", 0) !== -1) {\n call.sdp = call.sdp.replace(mLine + video + \" 0 \", mLine + video + \" 1 \");\n }\n\n call.sdp = performVP8RTCPParameterWorkaround(call.sdp);\n call.sdp = fixRemoteTelephoneEventPayloadType(call, call.sdp);\n\n if (webrtcdtls) {\n call.sdp = setMediaPassive(call.sdp);\n }\n\n ans = webRTCSdp(typeAns, call.sdp);\n\n callSetReceiveVideo(call);\n\n call.peer.setRemoteDescription(ans,\n function(){\n candidates = ans.createCandidates();\n for(i=0; i<candidates.length; ++i) {\n call.peer.addIceCandidate(candidates[i]);\n }\n \n restoreMuteStateOfCall(call);\n utils.callFunctionIfExist(onSuccess);\n },\n function(e) {\n logger.debug(\"processDisablerAnswer: setRemoteDescription failed: \" + e);\n utils.callFunctionIfExist(onFail);\n });\n }", "get blocked(){\n return this._blocked;\n }", "function setBlockTracking(value) {\r\n shouldTrack += value;\r\n}", "function block() { return new Filter(function () { return false; }); }", "stop() { \r\n enabled = false;\r\n // TODO: hide PK block list\r\n }", "function processDisablerRespond(call, onSuccess, onFailure, isJoin) {\n var candidates, i, ans;\n logger.debug(\"processDisablerRespond\");\n\n call.sdp = checkSupportedVideoCodecs(call.sdp, call.peer.localDescription.sdp);\n call.sdp = fixRemoteTelephoneEventPayloadType(call, call.sdp);\n\n if(call.sdp.indexOf(mLine + video + \" 0 \", 0) !== -1) {\n call.sdp = call.sdp.replace(mLine + video + \" 0 \", mLine + video + \" 1 \");\n }\n\n call.sdp = performVP8RTCPParameterWorkaround(call.sdp);\n\n if (webrtcdtls) {\n call.sdp = setMediaPassive(call.sdp);\n }\n \n // this is required just before setRemoteDescription\n callSetReceiveVideo(call);\n\n ans = webRTCSdp(typeAns,call.sdp);\n\n call.peer.setRemoteDescription(ans,\n function(){\n logger.debug(\"processDisablerRespond: setRemoteDescription success\");\n candidates = ans.createCandidates();\n for(i=0; i<candidates.length; ++i) {\n call.peer.addIceCandidate(candidates[i]);\n }\n restoreMuteStateOfCall(call);\n onSuccess();\n },\n function(e) {\n logger.debug(\"processDisablerRespond: setRemoteDescription failed: \" + e);\n onFailure();\n });\n }", "checkBlock() {\n if(!this.dialogueHidden || this.inventory.open || this.notes.open) {\n this.blockWorld();\n } else {\n this.unblockWorld();\n }\n }", "blocker(program, state, callback) {\n return [];\n // yes, we are *not* calling the callback;\n }", "function sendBlockRewards() {\n linkgearPOS.sendBlockRewars();\n}", "function processEnabler30Update(call, successCallback, failureCallback, local_hold_status) {\n logger.debug(\"processEnabler30Update: state= \" + call.peer.signalingState);\n var peer = call.peer, localSdp, successSdp, remoteAudioState, remoteVideoState, remoteVideoDirection;\n \n if (peer.signalingState === RTCSignalingState.HAVE_LOCAL_OFFER) {\n call.sdp = checkSupportedVideoCodecs(call.sdp, getSdpFromObject(call.peer.localDescription));\n } else {\n call.sdp = checkSupportedVideoCodecs(call.sdp, null); \n }\n // Meetme workaround. This workaround is added into native function\n call.sdp = addSdpMissingCryptoLine (call.sdp);\n call.sdp = removeSdpPli(call.sdp);\n call.sdp = removeG722Codec(call.sdp);\n call.sdp = performG722ParameterWorkaround(call.sdp);\n call.sdp = performVP8RTCPParameterWorkaround(call.sdp);\n call.sdp = removeRTXCodec(call.sdp);\n call.sdp = fixRemoteTelephoneEventPayloadType(call, call.sdp);\n\n remoteVideoDirection = getSdpDirection(call.sdp, video);\n \n if ((remoteVideoDirection === MediaStates.INACTIVE)&&(call.currentState === \"COMPLETED\")) \n {\n switch(call.remoteVideoState){\n case MediaStates.INACTIVE:\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.SEND_RECEIVE);\n //call.remoteVideoState = MediaStates.SEND_RECEIVE;\n break;\n case MediaStates.RECEIVE_ONLY:\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.SEND_RECEIVE);\n //call.remoteVideoState = MediaStates.SEND_RECEIVE;\n break; \n case MediaStates.SEND_RECEIVE:\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.RECEIVE_ONLY);\n //call.remoteVideoState = MediaStates.RECEIVE_ONLY;\n break;\n }\n }\n\n if (local_hold_status) {\n call.sdp = updateSdpDirection(call.sdp, audio, MediaStates.INACTIVE);\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.INACTIVE);\n }\n\n callSetReceiveVideo(call);\n \n call.sdp = changeDirection(call.sdp, MediaStates.SEND_ONLY, MediaStates.SEND_RECEIVE, video);\n if (peer.signalingState === RTCSignalingState.HAVE_LOCAL_OFFER) {\n //if we are here we have been to createEnablerUpdate before this\n\n if (webrtcdtls) {\n call.sdp = setMediaPassive(call.sdp);\n }\n\n peer.setRemoteDescription(webRTCSdp(typeAns, call.sdp),\n function() {\n call.remoteVideoState = getSdpDirection(call.sdp, video);\n addCandidates(call);\n successCallback(call.sdp);\n call.successCallback = null;\n },\n function(e) {\n logger.debug(\"processEnabler30Update: setRemoteDescription failed!!\" + e);\n failureCallback(logPrefix + \"processEnabler30Update: setRemoteDescription failed!!\");\n });\n } else {\n //this part is a work-around for webrtc bug\n //set remote description with inactive media lines first.\n //then set remote description with original media lines.\n\n //keep original values of remote audio and video states\n remoteAudioState = getSdpDirection(call.sdp, audio);\n remoteVideoState = getSdpDirection(call.sdp, video);\n\n //set media lines with sendonly state for work-around\n call.sdp = updateSdpDirection(call.sdp, audio, MediaStates.INACTIVE); //chrome38 fix\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.INACTIVE); //chrome38 fix\n \n if (webrtcdtls) {\n call.sdp = setMediaActPass(call.sdp);\n }\n\n peer.setRemoteDescription(webRTCSdp(typeOff, call.sdp), function() {\n logger.debug(\"processEnabler30Update: workaround setRemoteDescription success\");\n\n //restore original values\n call.sdp = updateSdpDirection(call.sdp, audio, remoteAudioState);\n call.sdp = updateSdpDirection(call.sdp, video, remoteVideoState);\n \n peer.setRemoteDescription(webRTCSdp(typeOff, call.sdp), function(){\n logger.debug(\"processEnabler30Update: setRemoteDescription success\");\n call.remoteVideoState = getSdpDirection(call.sdp, video);\n addCandidates(call);\n\n peer.createAnswer(peer.remoteDescription,\n function(obj){\n logger.debug(\"processEnabler30Update: isSdpEnabled audio= \" + isSdpEnabled(obj.sdp, audio));\n logger.debug(\"processEnabler30Update: isSdpEnabled video= \" + isSdpEnabled(obj.sdp, video));\n\n if (isSdpEnabled(obj.sdp, audio) || isSdpEnabled(obj.sdp, video)) {\n if(getSdpDirection(call.sdp, audio) === MediaStates.SEND_ONLY){\n logger.debug(\"processEnabler30Update: audio sendonly -> recvonly\");\n obj.audioDirection = MediaStates.RECEIVE_ONLY;\n }\n\n if(getSdpDirection(call.sdp, audio) === MediaStates.INACTIVE) {\n obj.audioDirection = MediaStates.INACTIVE;\n }\n\n if(getSdpDirection(call.sdp, video) === MediaStates.INACTIVE) {\n obj.videoDirection = MediaStates.INACTIVE;\n } \n \n if(getSdpDirection(call.sdp, video) === MediaStates.RECEIVE_ONLY) {\n if(callCanLocalSendVideo(call)){\n obj.videoDirection = MediaStates.SEND_ONLY;\n } else {\n obj.videoDirection = MediaStates.INACTIVE;\n }\n } else if (callCanLocalSendVideo(call)){\n obj.videoDirection = MediaStates.SEND_RECEIVE;\n } else {\n obj.videoDirection = MediaStates.RECEIVE_ONLY;\n }\n //TODO: Since there is no setter method for obj.sdp from the plugin side,\n // we create a temporary local variable and pass obj.sdp's value into it.\n // Rewrite the below part of code when the setter method is applied to the plugin side\n localSdp = getSdpFromObject(obj);\n obj = null;\n localSdp = updateVersion(getSdpFromObject(peer.localDescription), localSdp);\n localSdp = performVP8RTCPParameterWorkaround(localSdp);\n\n if (webrtcdtls) {\n localSdp = setMediaPassive(localSdp);\n }\n\n localSdp = fixLocalTelephoneEventPayloadType(call, localSdp);\n\n call.answer = webRTCSdp(typeAns, localSdp);\n \n peer.setLocalDescription(call.answer,\n function(){\n logger.debug(\"processEnabler30Update: setLocalDescription success\");\n successSdp = updateH264Level(getSdpFromObject(call.answer));\n\n if (local_hold_status) {\n successSdp = updateSdpDirection(successSdp, audio, MediaStates.INACTIVE);\n successSdp = updateSdpDirection(successSdp, video, MediaStates.INACTIVE);\n }\n \n successCallback(successSdp);\n call.successCallback = null;\n call.answer = null; // ABE-1328\n },\n function(e) {\n logger.debug(\"processEnabler30Update: setLocalDescription failed: \" + e);\n failureCallback(logPrefix + \"processEnabler30Update: setLocalDescription failed\");\n call.answer = null; // ABE-1328\n });\n } else {\n logger.debug(\"processEnabler30Update: createAnswer failed!!\");\n failureCallback(logPrefix + \"No codec negotiation\");\n }\n },\n function(e){\n logger.debug(\"processEnabler30Update: createAnswer failed!! \" + e);\n failureCallback(logPrefix + \"Session cannot be created\");\n },\n {\n 'mandatory': {\n 'OfferToReceiveAudio':mediaAudio,\n 'OfferToReceiveVideo':getGlobalSendVideo()\n }\n });\n },\n function(e) {\n logger.debug(\"processEnabler30Update: setRemoteDescription failed: \" + e);\n failureCallback(logPrefix + \"processEnabler30Update: setRemoteDescription failed!!\");\n });\n }, function(e) {\n logger.debug(\"processEnabler30Update: workaround setRemoteDescription failed!!\" + e);\n failureCallback(logPrefix + \"processEnabler30Update: workaround setRemoteDescription failed!!\");\n });\n }\n }", "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 }", "function blockInactiveCheckers() {\n let inactivePlayer;\n game.player1 == game.whoMakesMove ? inactivePlayer = game.player2 : inactivePlayer = game.player1;\n for (let index = 1; index < 16; index++) {\n document.querySelector(`#${inactivePlayer}id${index}`).disabled = true;\n }\n}", "function cancelBids () {\n}", "function processEnablerHoldRespond(call, onSuccess, onFailure, isJoin) {\n var callStates = fcs.call.States, \n remoteAudioDirection, \n remoteVideoDirection,\n localHoldFlag = false,\n remoteHoldFlag = false;\n \n logger.debug(\"processEnablerHoldRespond: state= \" + call.peer.signalingState + \" call.currentState= \" + call.currentState);\n\n call.sdp = checkSupportedVideoCodecs(call.sdp, getSdpFromObject(call.peer.localDescription));\n call.sdp = removeRTXCodec(call.sdp);\n call.sdp = fixRemoteTelephoneEventPayloadType(call, call.sdp);\n call.sdp = removeG722Codec(call.sdp);\n call.sdp = performG722ParameterWorkaround(call.sdp);\n call.sdp = performVP8BandwidthWorkaround(call.sdp);\n \n sdpParser.init(call.sdp);\n remoteHoldFlag=sdpParser.isRemoteHold();\n \n localHoldFlag=(call.currentState === \"LOCAL_HOLD\");\n \n remoteAudioDirection = getSdpDirection(call.sdp, audio);\n remoteVideoDirection = getSdpDirection(call.sdp, video);\n\n logger.debug(\"processEnablerHoldRespond: localHold= \" + localHoldFlag + \" remoteHold= \" + remoteHoldFlag);\n\n /* Required for MOH - start */\n if(remoteHoldFlag === false){ \n if ((remoteAudioDirection === MediaStates.SEND_RECEIVE)&& (call.currentState === \"REMOTE_HOLD\")) {\n call.previousState = call.currentState;\n call.currentState = \"COMPLETED\";\n call.call.onStateChange(callStates.IN_CALL, call.statusCode);\n }\n }else{\n if (call.currentState === \"COMPLETED\") {\n call.previousState = call.currentState;\n call.currentState = \"REMOTE_HOLD\";\n call.call.onStateChange(callStates.ON_REMOTE_HOLD, call.statusCode);\n } \n } \n\n if(localHoldFlag || remoteHoldFlag){ \n logger.debug(\"processEnablerHoldRespond: \" + call.currentState + \" : video -> inactive\");\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.INACTIVE);\n }\n \n if((remoteVideoDirection === MediaStates.INACTIVE)&&(call.currentState === \"COMPLETED\")) {\n logger.debug(\"processEnablerHoldRespond: video inactive -> recvonly\");\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.RECEIVE_ONLY);\n } \n /* Required for MOH - end */\n \n rtc.processRespond(call, onSuccess, onFailure, isJoin);\n }", "blocked(){\n return new Promise((resolve)=>{\n this.blocked_promise = resolve\n })\n }", "function onBlockContact(contact){\n try{\n thisPresenter.blockContact(contact);\n } catch (err) {\n alert(err);\n }\n }", "function reject(){\n\tconsole.log('call rejected');\n\tsocket.emit('reject',$callerName.innerHTML);\n\t$acceptButtons.style.display = 'none';\n\t$addToConferenceButtons.style.display = 'none';\n\t$caller.style.display = 'none';\n\t$ringingSound.pause();\n}", "function processEnabler30Hold(call, hold, local_hold_status, successCallback, failureCallback) {\n logger.debug(\"processEnabler30Hold: local hold= \" + local_hold_status + \" remote hold= \" + hold + \" state= \" + call.peer.signalingState);\n var peer=call.peer, updateSdp, sr_indx, so_indx, ro_indx, in_indx, audioDirection, videoDirection, \n localSdp, successSdp, answerSdp, ice_ufrag, ice_pwd, newSdp, offerSdp;\n\n if(!local_hold_status && !hold){\n muteOnHold(call, false);\n }\n\n /* Added for the case in http://jira/browse/ABE-788\n * In this case slow start is received when in REMOTE_HOLD state\n * Client should return all codecs to slow start invite\n * and unhold the call.\n * \n * This code should be removed from here with http://jira/browse/ABE-1192.\n */\n if (call.slowStartInvite) {\n peer.createOffer(function(oSdp) {\n newSdp = fixLocalTelephoneEventPayloadType(call, getSdpFromObject(oSdp));\n offerSdp = webRTCSdp(typeOff, newSdp);\n oSdp = null;\n peer.setLocalDescription(offerSdp, function() {\n logger.debug(\"slow start processEnablerHold setLocalDescription success\");\n successSdp = updateH264Level(getSdpFromObject(offerSdp));\n successCallback(successSdp);\n }, function(error) {\n failureCallback(logPrefix + \"slow start processEnablerHold setLocalDescription failed: \" + error);\n });\n }, function(error) {\n logger.error(\"slow start processEnablerHold createOffer failed!! \" + error);\n failureCallback();\n }, {\n 'mandatory': {\n 'OfferToReceiveAudio': mediaAudio,\n 'OfferToReceiveVideo': getGlobalSendVideo()\n }\n });\n return;\n }\n \n call.sdp = checkSupportedVideoCodecs(call.sdp, null);\n call.sdp = performVideoPortZeroWorkaround(call.sdp);\n call.sdp = checkandRestoreICEParams(call.sdp, call.peer.localDescription.sdp);\n call.sdp = removeG722Codec(call.sdp);\n call.sdp = performG722ParameterWorkaround(call.sdp);\n call.sdp = performVP8RTCPParameterWorkaround(call.sdp);\n call.sdp = removeRTXCodec(call.sdp);\n call.sdp = fixRemoteTelephoneEventPayloadType(call, call.sdp);\n\n if (webrtcdtls) {\n call.sdp = setMediaActPass(call.sdp);\n }\n \n updateSdp = webRTCSdp(typeOff, call.sdp);\n\n audioDirection = getSdpDirection(call.sdp, audio);\n videoDirection = getSdpDirection(call.sdp, video);\n\n sr_indx = call.sdp.indexOf(aLine + MediaStates.SEND_RECEIVE, 0);\n so_indx = call.sdp.indexOf(aLine + MediaStates.SEND_ONLY, 0);\n ro_indx = call.sdp.indexOf(aLine + MediaStates.RECEIVE_ONLY, 0);\n in_indx = call.sdp.indexOf(aLine + MediaStates.INACTIVE, 0);\n\n if ( (sr_indx+1) + (so_indx+1) + (ro_indx+1) + (in_indx+1) === 0) {\n if (hold || local_hold_status) {\n logger.debug(\"processEnabler30Hold: call.sdp has no direction so setting as inactive for \" + (hold ? \"remote hold\" : \"remote unhold with local hold\"));\n updateSdp.audioDirection = MediaStates.INACTIVE; //sendonly originally\n updateSdp.videoDirection = MediaStates.INACTIVE; //sendonly originally\n } else {\n logger.debug(\"processEnabler30Hold: call.sdp has no direction so setting as sendrecv for unhold\");\n updateSdp.audioDirection = MediaStates.SEND_RECEIVE;\n updateSdp.videoDirection = MediaStates.SEND_RECEIVE;\n }\n }\n\n // basar\n if (audioDirection === MediaStates.SEND_RECEIVE) {\n updateSdp.audioDirection = MediaStates.INACTIVE; //Chrome38 fix\n }\n\n if (videoDirection === MediaStates.SEND_RECEIVE) {\n updateSdp.videoDirection = MediaStates.INACTIVE; //chrome38 fix\n } \n // basar\n\n // 1st setRemoteDescription to make webrtc remove the audio and/or video streams\n // 2nd setRemote will add the audio stream back so that services like MOH can work\n // This code will also run in UnHold scenario, and it will remove & add video stream\n peer.setRemoteDescription(updateSdp,\n function(){\n // basar \n updateSdp.audioDirection = MediaStates.SEND_RECEIVE;\n updateSdp.videoDirection = videoDirection;\n // basar \n \n peer.setRemoteDescription(updateSdp,\n function(){\n if(!hold && !local_hold_status && (videoDirection === MediaStates.INACTIVE)) {\n call.remoteVideoState = MediaStates.RECEIVE_ONLY;\n }else{ \n call.remoteVideoState = updateSdp.videoDirection;\n }\n //check if remote party sends video\n callSetReceiveVideo(call);\n peer.createAnswer(peer.remoteDescription,\n function(obj){\n localSdp = getSdpFromObject(obj);\n obj = null;\n logger.debug(\"processEnabler30Hold: isSdpEnabled audio= \" + isSdpEnabled(localSdp, audio));\n logger.debug(\"processEnabler30Hold: isSdpEnabled video= \" + isSdpEnabled(localSdp, video));\n\n if(hold){\n logger.debug(\"processEnabler30Hold: \" + (hold ? \"Remote HOLD\" : \"Remote UNHOLD with Local Hold\"));\n\n if(audioDirection === MediaStates.SEND_ONLY){\n logger.debug(\"processEnabler30Hold: audio sendonly -> recvonly\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.RECEIVE_ONLY); \n }\n if(videoDirection === MediaStates.SEND_ONLY){\n logger.debug(\"processEnabler30Hold: video sendonly -> recvonly\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.RECEIVE_ONLY); \n }\n\n if(audioDirection === MediaStates.RECEIVE_ONLY){\n logger.debug(\"processEnabler30Hold: audio recvonly -> sendonly\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.SEND_ONLY); \n }\n if(videoDirection === MediaStates.RECEIVE_ONLY){\n logger.debug(\"processEnabler30Hold: video recvonly -> sendonly\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.SEND_ONLY); \n }\n\n if(audioDirection === MediaStates.SEND_RECEIVE){\n logger.debug(\"processEnabler30Hold: audio sendrecv -> sendrecv\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.SEND_RECEIVE); \n }\n if(videoDirection === MediaStates.SEND_RECEIVE){\n logger.debug(\"processEnabler30Hold: video sendrecv -> sendrecv\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.SEND_RECEIVE); \n }\n\n if(audioDirection === MediaStates.INACTIVE){\n logger.debug(\"processEnabler30Hold: audio inactive -> inactive\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.INACTIVE); \n }\n if(videoDirection === MediaStates.INACTIVE){\n logger.debug(\"processEnabler30Hold: video inactive -> inactive\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.INACTIVE); \n }\n\n if ( (sr_indx+1) + (so_indx+1) + (ro_indx+1) + (in_indx+1) === 0) {\n logger.debug(\"processEnabler30Hold: no direction detected so setting as inactive\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.INACTIVE); \n localSdp = updateSdpDirection(localSdp, video, MediaStates.INACTIVE); \n }\n } else if(local_hold_status) {\n if(audioDirection === MediaStates.INACTIVE) {\n logger.debug(\"processEnablerHold: Remote HOLD: sendonly-> inactive\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.INACTIVE); \n } else {\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.SEND_ONLY);\n }\n \n if (callCanLocalSendVideo(call)) {\n logger.debug(\"processEnablerHold: Remote UNHOLD with local Hold: sendrecv -> recvonly\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.SEND_ONLY);\n callSetLocalSendVideo(call, true);\n } else {\n logger.debug(\"processEnablerHold: Remote UNHOLD with local Hold: sendrecv -> inactive\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.INACTIVE);\n callSetLocalSendVideo(call, false);\n } \n } else {\n if (callCanLocalSendVideo(call)) {\n if (isSdpVideoSendEnabled(call.sdp, video)) {\n localSdp = updateSdpDirection(localSdp, video, MediaStates.SEND_RECEIVE);\n } else {\n localSdp = updateSdpDirection(localSdp, video, MediaStates.SEND_ONLY);\n }\n } else {\n if (isSdpVideoSendEnabled(call.sdp, video)) {\n localSdp = updateSdpDirection(localSdp, video, MediaStates.RECEIVE_ONLY);\n } else {\n localSdp = updateSdpDirection(localSdp, video, MediaStates.INACTIVE);\n }\n }\n //change audio's direction to sendrecv for ssl attendees in a 3wc\n localSdp = changeDirection(localSdp, MediaStates.RECEIVE_ONLY, MediaStates.SEND_RECEIVE, audio);\n\n logger.debug(\"processEnabler30Hold: UNHOLD: direction left as it is\");\n }\n //TODO: Since there is no setter method for obj.sdp from the plugin side,\n // we create a temporary local variable and pass obj.sdp's value into it.\n // Rewrite the below part of code when the setter method is applied to the plugin side\n localSdp = performVP8RTCPParameterWorkaround(localSdp);\n localSdp = updateVersion(getSdpFromObject(peer.localDescription), localSdp);\n\n ice_ufrag = getICEParams(localSdp, ICEParams.ICE_UFRAG, true);\n ice_pwd = getICEParams(localSdp, ICEParams.ICE_PWD, true);\n \n if(ice_ufrag && ice_ufrag.length < 4) { /*RFC 5245 the ice-ufrag attribute can be 4 to 256 bytes long*/\n ice_ufrag = getICEParams(updateSdp.sdp, ICEParams.ICE_UFRAG, true);\n if(ice_ufrag) {\n localSdp = updateICEParams(localSdp, ICEParams.ICE_UFRAG, ice_ufrag);\n }\n }\n\n if(ice_pwd && ice_pwd.length < 22) { /*RFC 5245 the ice-pwd attribute can be 22 to 256 bytes long*/\n ice_pwd = getICEParams(updateSdp.sdp, ICEParams.ICE_PWD, true);\n if(ice_pwd < 22) {\n localSdp = updateICEParams(localSdp, ICEParams.ICE_PWD, ice_pwd);\n }\n }\n \n if (webrtcdtls) {\n localSdp = setMediaPassive(localSdp);\n }\n\n localSdp = fixLocalTelephoneEventPayloadType(call, localSdp);\n\n answerSdp = webRTCSdp(typeAns, localSdp);\n \n call.answer = answerSdp; // ABE-1328\n\n peer.setLocalDescription(answerSdp,\n function(){\n successSdp = updateH264Level(getSdpFromObject(answerSdp));\n successCallback(successSdp);\n call.successCallback = null;\n call.answer = null; \n },\n function(e) {\n logger.debug(\"processEnabler30Hold: setLocalDescription failed: \" + e);\n failureCallback(logPrefix + \"processEnabler30Hold: setLocalDescription failed\");\n call.answer = null; \n });\n },\n function(e){\n logger.debug(\"processEnabler30Hold: createAnswer failed!!: \" + e);\n failureCallback(logPrefix + \"Session cannot be created\");\n },\n {\n 'mandatory': {\n 'OfferToReceiveAudio': mediaAudio,\n 'OfferToReceiveVideo': getGlobalSendVideo()\n }\n });\n },\n function(e) {\n logger.debug(\"processEnabler30Hold: setRemoteDescription failed: \" + e);\n });\n },\n function(e) {\n logger.debug(\"processEnabler30Hold: setRemoteDescription failed!! \" + e);\n failureCallback(\"Session cannot be created\");\n }); \n }", "function bonanza() {\n setUpBonanza();\n allStars();\n setTimeout(function() { bonanzaBool = 0; } , 15000); //Runs bonanza mode for x seconds\n setTimeout('newTarget();', 16501);\n setTimeout(function() { firstCatch = 1;\n bonanzaMusic.stop();\n gameBGM.unmute();}, 16500);\n}", "function createDisablerOffer(call, successCallback, failureCallback, sendInitialVideo) {\n logger.debug(\"createDisablerOffer: sendInitialVideo = \" + sendInitialVideo);\n var peer = call.peer, newSdp;\n\n peer.addStream(localStream);\n call.localStream = localStream;\n\n peer.createOffer(function (oSdp){\n sendInitialVideo = sendInitialVideo && videoSourceAvailable;\n if(sendInitialVideo){\n oSdp.videoDirection = MediaStates.SEND_RECEIVE;\n } else {\n oSdp.videoDirection = MediaStates.RECEIVE_ONLY;\n }\n\n call.offer = oSdp;\n call.audio_candidate = false;\n call.video_candidate = false;\n\n peer.setLocalDescription(call.offer,\n function(){\n muteCall(call, false);\n }\n ,function(e) {\n logger.error(\"createDisablerOffer: setLocalDescription failed : \" + e);\n failureCallback(logPrefix + \"createDisablerOffer: setLocalDescription failed\");}\n );\n\n },function(e){\n logger.error(\"createDisablerOffer: createOffer failed!!\" + e);\n failureCallback();\n },\n {\n \"audio\":mediaAudio,\n \"video\":true\n });\n callSetLocalSendVideo(call, sendInitialVideo);\n }", "function vlcIsraelAppModifyVidLinksBr(vidsArray, markVids)\n{\n console.log('*** vlcIsraelAppModifyVidLinksBr ***'+' vids:'+vidsArray);\n var markVids = true;\n if (!markVids) {\n markVids = false;\n }\n var vidsCount = 0;\n var setListeners;\n var inCache = 0;\n var v = document.getElementsByClassName(\"BrightcoveExperience\");\n console.log('starting BR loop');\n for (var i=0; i<v.length; i++) {\n var video = v[i];\n console.log('video:'+video.src);\n if (video.getAttribute('vlc_handlers')) {\n //continue;\n console.log('set listeners: 0');\n setListeners = 0;\n } else {\n setListeners = 1;\n }\n var s1=video.src;\n if ((s1.indexOf('127.0.0.1:8080')==-1)&&\n (s1.indexOf(\"htmlFederated\")!=-1)&&(setListeners==1)){\n console.log('handle video');\n var qparams = getUrlQueryParams(s1);\n var videoPlayer = qparams['%40videoPlayer'];\n var playerID = qparams['playerID'];\n var vidParams = \"videoId=\"+videoPlayer+\"&playerId=\"+playerID;\n console.log('lookup vid params:'+vidParams);\n if (searchStringInArrayItems (vidParams, vidsArray)!=-1) {\n video.setAttribute('vlc', 1);\n inCache = 1;\n if (markVids) {\n video.parentElement.style.webkitFilter = 'drop-shadow(rgba(0,0,255,0.8) 0 5px 5px)';\n }\n } else {\n video.setAttribute('vlc', 0);\n inCache = 0;\n if (markVids) {\n video.parentElement.style.webkitFilter = 'drop-shadow(rgba(255,0,55,0.5) 0 5px 5px)';\n }\n }\n //Set listeners\n console.log(\"*** Register brightcove player listeners for id:\"+video.id);\n var expId = video.id;\n vlcRegisterBRHandlersLoop(expId, video, playerID, inCache);\n vidsCount++;\n } else {\n console.log('will not handle video');\n }\n if (vidsCount > 5) {\n //Limit to 5 html5 videos per page to avoid memory issues\n break;\n }\n }\n return vidsCount.toString();\n}", "async function oracle(block, iv) {\n const response = await request.post({\n url: 'http://pac.fil.cool/uglix/sbin/monitor-settings',\n resolveWithFullResponse: true,\n simple: false,\n body: {\n IV: iv.toString('base64'),\n ciphertext: block.toString('base64')\n }\n });\n\n // Check http status code. Pray for no 503 error.\n response.body !== 'Padding error' && response.statusCode !== 200 && console.log(response.statusCode, response.body);\n return response.statusCode === 200;\n}", "function shouldSendAd() {\n var now = new Date();\n return (now - lastAdTime) > AD_INTERVAL;\n}", "function blockURL(requestDetails) {\r\n return {\r\n cancel: true\r\n };\r\n}", "function accept(){\n\tvar connectToUser = $callerName.innerHTML;\n\tconsole.log(connectToUser + ' call accepted');\n\tsocket.emit('accept',connectToUser);\n\t$caller.style.display = 'none';\n\t$acceptButtons.style.display = 'none';\n//\t$mediaSelection.style.display = \"none\";\n\t$ringingSound.pause();\n}", "function createDisablerUpdate(call, successCallback, failureCallback, isVideoStart) {\n logger.debug(\"createDisablerUpdate: isVideoStart= \" + isVideoStart);\n var peer = call.peer, candidates, i, successSdp,\n updateSdp = webRTCSdp(typeOff, call.sdp);\n\n peer.createOffer(function(obj){\n callSetLocalSendVideo(call, isVideoStart);\n if(isVideoStart){\n obj.videoDirection = MediaStates.SEND_RECEIVE;\n } else {\n obj.videoDirection = MediaStates.RECEIVE_ONLY;\n }\n\n peer.setLocalDescription(obj,\n function(){\n candidates = updateSdp.createCandidates();\n for(i=0; i<candidates.length; ++i) {\n peer.addIceCandidate(candidates[i]);\n }\n successSdp = updateH264Level(obj.sdp);\n restoreMuteStateOfCall(call);\n successCallback(successSdp);\n },\n function(e) {\n logger.debug(\"createDisablerUpdate: createOffer setLocalDescription failed: \" + e );\n failureCallback();\n });\n },\n function(e){\n logger.debug(\"createDisablerUpdate: createOffer failed!! \" + e);\n failureCallback();\n },\n {\n \"audio\":mediaAudio,\n \"video\":getGlobalSendVideo()\n });\n }", "function checkBlacklist() {\n\n if (jQuery.inArray(upgradetier, streamerblacklist) !== -1) {\n\n $('#ddosOffline').text('OFFLINE');\n $('#buyupgrade').prop('disabled', true);\n\n } else {\n\n $('#ddosOffline').text('');\n $('#buyupgrade').prop('disabled', false);\n\n }\n\n\n}", "function shieldFrame()\n{ \n if(shieldCooldown > 0)\n {\n shieldCooldown--;\n \n document.getElementById(\"shieldMessage\").style.visibility = \"visible\";\n document.getElementById(\"shieldCounter\").firstChild.nodeValue = shieldCooldown;\n\n return;\n }\n\n if(shieldCooldown == 0)\n {\n lowerShield();\n document.getElementById(\"shieldMessage\").style.visibility = \"hidden\";\n }\n}", "function onEnablerIceCandidate(call, event) {\n var sdp;\n if(event.candidate === null) {\n if(call.successCallback) {\n logger.debug(\"All ICE candidates received for call : \" + call.id);\n\n sdp = getSdpFromObject(call.peer.localDescription);\n //sdp = sdp.replace(\"s=\",\"s=genband\");\n sdp = updateH264Level(sdp);\n\n call.successCallback(sdp);\n call.successCallback = null;\n }\n } else {\n logger.debug(\"ICE candidate received : sdpMLineIndex = \" + event.candidate.sdpMLineIndex\n + \", candidate = \" + event.candidate.candidate + \" for call : \" + call.id);\n }\n }", "function processEnablerHold(call, hold, local_hold_status, successCallback, failureCallback) {\n logger.debug(\"processEnablerHold: local hold= \" + local_hold_status + \" remote hold= \" + hold + \" state= \" + call.peer.signalingState);\n var peer=call.peer, updateSdp, sr_indx, so_indx, ro_indx, in_indx, audioDirection, videoDirection, \n localSdp, successSdp, answerSdp, ice_ufrag, ice_pwd, newSdp, offerSdp;\n\n if(!local_hold_status && !hold){\n muteOnHold(call, false);\n }\n\n /* Added for the case in http://jira/browse/ABE-788\n * In this case slow start is received when in REMOTE_HOLD state\n * Client should return all codecs to slow start invite\n * and unhold the call.\n * \n * This code should be removed from here with http://jira/browse/ABE-1192.\n */\n if (call.slowStartInvite) {\n peer.createOffer(function(oSdp) {\n newSdp = fixLocalTelephoneEventPayloadType(call, getSdpFromObject(oSdp));\n offerSdp = webRTCSdp(typeOff, newSdp);\n oSdp = null;\n peer.setLocalDescription(offerSdp, function() {\n logger.debug(\"slow start processEnablerHold setLocalDescription success\");\n successSdp = updateH264Level(getSdpFromObject(offerSdp));\n successCallback(successSdp);\n }, function(error) {\n failureCallback(logPrefix + \"slow start processEnablerHold setLocalDescription failed: \" + error);\n });\n }, function(error) {\n logger.error(\"slow start processEnablerHold createOffer failed!! \" + error);\n failureCallback();\n }, {\n 'mandatory': {\n 'OfferToReceiveAudio': mediaAudio,\n 'OfferToReceiveVideo': getGlobalSendVideo()\n }\n });\n return;\n }\n \n call.sdp = checkSupportedVideoCodecs(call.sdp, null);\n call.sdp = performVideoPortZeroWorkaround(call.sdp);\n call.sdp = checkandRestoreICEParams(call.sdp, call.peer.localDescription.sdp);\n call.sdp = removeG722Codec(call.sdp);\n call.sdp = performG722ParameterWorkaround(call.sdp);\n call.sdp = performVP8RTCPParameterWorkaround(call.sdp);\n call.sdp = removeRTXCodec(call.sdp);\n call.sdp = fixRemoteTelephoneEventPayloadType(call, call.sdp);\n\n if (webrtcdtls) {\n call.sdp = setMediaActPass(call.sdp);\n }\n \n updateSdp = webRTCSdp(typeOff, call.sdp);\n\n audioDirection = getSdpDirection(call.sdp, audio);\n videoDirection = getSdpDirection(call.sdp, video);\n\n sr_indx = call.sdp.indexOf(aLine + MediaStates.SEND_RECEIVE, 0);\n so_indx = call.sdp.indexOf(aLine + MediaStates.SEND_ONLY, 0);\n ro_indx = call.sdp.indexOf(aLine + MediaStates.RECEIVE_ONLY, 0);\n in_indx = call.sdp.indexOf(aLine + MediaStates.INACTIVE, 0);\n\n if ( (sr_indx+1) + (so_indx+1) + (ro_indx+1) + (in_indx+1) === 0) {\n if (hold || local_hold_status) {\n logger.debug(\"processEnablerHold: call.sdp has no direction so setting as inactive for \" + (hold ? \"remote hold\" : \"remote unhold with local hold\"));\n updateSdp.audioDirection = MediaStates.INACTIVE; //sendonly originally\n updateSdp.videoDirection = MediaStates.INACTIVE; //sendonly originally\n } else {\n logger.debug(\"processEnablerHold: call.sdp has no direction so setting as sendrecv for unhold\");\n updateSdp.audioDirection = MediaStates.SEND_RECEIVE;\n updateSdp.videoDirection = MediaStates.SEND_RECEIVE;\n }\n }\n\n callSetReceiveVideo(call);\n\n peer.setRemoteDescription(updateSdp,\n function(){\n peer.createAnswer(peer.remoteDescription,function(obj){\n\n localSdp = getSdpFromObject(obj);\n obj = null;\n \n logger.debug(\"processEnablerHold: isSdpEnabled audio= \" + isSdpEnabled(localSdp, audio));\n logger.debug(\"processEnablerHold: isSdpEnabled video= \" + isSdpEnabled(localSdp, video));\n\n if(hold){\n logger.debug(\"processEnablerHold: \" + (hold ? \"Remote HOLD\" : \"Remote UNHOLD with Local Hold\"));\n\n if(audioDirection === MediaStates.SEND_ONLY){\n logger.debug(\"processEnablerHold: audio sendonly -> recvonly\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.RECEIVE_ONLY);\n }\n if(videoDirection === MediaStates.SEND_ONLY){\n logger.debug(\"processEnablerHold: video sendonly -> recvonly\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.RECEIVE_ONLY);\n }\n\n if(audioDirection === MediaStates.RECEIVE_ONLY){\n logger.debug(\"processEnablerHold: audio recvonly -> sendonly\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.SEND_ONLY);\n }\n if(videoDirection === MediaStates.RECEIVE_ONLY){\n logger.debug(\"processEnablerHold: video recvonly -> sendonly\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.SEND_ONLY);\n }\n\n if(audioDirection === MediaStates.SEND_RECEIVE){\n logger.debug(\"processEnablerHold: audio sendrecv -> sendrecv\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.SEND_RECEIVE);\n }\n if(videoDirection === MediaStates.SEND_RECEIVE){\n logger.debug(\"processEnablerHold: video sendrecv -> sendrecv\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.SEND_RECEIVE);\n }\n\n if(audioDirection === MediaStates.INACTIVE){\n logger.debug(\"processEnablerHold: audio inactive -> inactive\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.INACTIVE);\n }\n if(videoDirection === MediaStates.INACTIVE){\n logger.debug(\"processEnablerHold: video inactive -> inactive\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.INACTIVE);\n }\n\n if ( (sr_indx+1) + (so_indx+1) + (ro_indx+1) + (in_indx+1) === 0) {\n logger.debug(\"processEnablerHold: no direction detected so setting as inactive\");\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.INACTIVE);\n localSdp = updateSdpDirection(localSdp, video, MediaStates.INACTIVE);\n }\n } else if(local_hold_status) {\n if(audioDirection === MediaStates.INACTIVE) {\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.INACTIVE); \n } else {\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.SEND_ONLY);\n }\n \n if (callCanLocalSendVideo(call)) {\n logger.debug(\"processEnablerHold: Remote UNHOLD with local Hold: sendrecv -> recvonly\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.SEND_ONLY);\n callSetLocalSendVideo(call, true);\n } else {\n logger.debug(\"processEnablerHold: Remote UNHOLD with local Hold: sendrecv -> inactive\");\n localSdp = updateSdpDirection(localSdp, video, MediaStates.INACTIVE);\n callSetLocalSendVideo(call, false);\n } \n } else {\n if (callCanLocalSendVideo(call)) {\n if (isSdpVideoSendEnabled(call.sdp, video)) {\n localSdp = updateSdpDirection(localSdp, video, MediaStates.SEND_RECEIVE);\n } else {\n localSdp = updateSdpDirection(localSdp, video, MediaStates.SEND_ONLY);\n }\n } else {\n if (isSdpVideoSendEnabled(call.sdp, video)) {\n localSdp = updateSdpDirection(localSdp, video, MediaStates.RECEIVE_ONLY);\n } else {\n localSdp = updateSdpDirection(localSdp, video, MediaStates.INACTIVE);\n }\n }\n //change audio's direction to sendrecv for ssl attendees in a 3wc\n //obj.sdp = changeDirection(obj.sdp, MediaStates.RECEIVE_ONLY, MediaStates.SEND_RECEIVE, audio);\n localSdp = updateSdpDirection(localSdp, audio, MediaStates.SEND_RECEIVE);\n\n logger.debug(\"processEnablerHold: UNHOLD: direction left as it is\");\n }\n //TODO: Since there is no setter method for obj.sdp from the plugin side,\n // we create a temporary local variable and pass obj.sdp's value into it.\n // Rewrite the below part of code when the setter method is applied to the plugin side\n localSdp = performVP8RTCPParameterWorkaround(localSdp);\n localSdp = updateVersion(peer.localDescription.sdp, localSdp);\n\n ice_ufrag = getICEParams(localSdp, ICEParams.ICE_UFRAG, true);\n ice_pwd = getICEParams(localSdp, ICEParams.ICE_PWD, true);\n \n if(ice_ufrag && ice_ufrag.length < 4) { /*RFC 5245 the ice-ufrag attribute can be 4 to 256 bytes long*/\n ice_ufrag = getICEParams(updateSdp.sdp, ICEParams.ICE_UFRAG, true);\n if(ice_ufrag) {\n localSdp = updateICEParams(localSdp, ICEParams.ICE_UFRAG, ice_ufrag);\n }\n }\n\n if(ice_pwd && ice_pwd.length < 22) { /*RFC 5245 the ice-pwd attribute can be 22 to 256 bytes long*/\n ice_pwd = getICEParams(updateSdp.sdp, ICEParams.ICE_PWD, true);\n if(ice_pwd < 22) {\n localSdp = updateICEParams(localSdp, ICEParams.ICE_PWD, ice_pwd);\n }\n }\n \n if (webrtcdtls) {\n localSdp = setMediaPassive(localSdp);\n }\n\n localSdp = fixLocalTelephoneEventPayloadType(call, localSdp);\n\n answerSdp = webRTCSdp(typeAns, localSdp);\n \n call.answer = answerSdp; // ABE-1328\n\n peer.setLocalDescription(answerSdp,\n function(){\n successSdp = updateH264Level(getSdpFromObject(answerSdp));\n successCallback(successSdp);\n call.successCallback = null;\n call.answer = null; \n },\n function(e) {\n logger.debug(\"processEnablerHold: setLocalDescription failed: \" + e);\n failureCallback(logPrefix + \"processEnablerHold: setLocalDescription failed\");\n call.answer = null; \n });\n },\n function(e){\n logger.debug(\"processEnablerHold: createAnswer failed!!: \" + e);\n failureCallback(logPrefix + \"Session cannot be created\");\n },\n {\n 'mandatory': {\n 'OfferToReceiveAudio': mediaAudio,\n 'OfferToReceiveVideo': getGlobalSendVideo()\n }\n });\n },\n function(e) {\n logger.debug(\"processEnablerHold: setRemoteDescription failed: \" + e);\n });\n }", "notifyWinner(winnerAddress, bid) {\n addAlertElement(\"<strong>\" + winnerAddress + \"</strong> won!\",\"success\");\n\n if(auctioneer.auctionContract.type == \"VickreyAuction\"){\n $(\"#finalizeSuccess\").show();\n }\n }", "function setBlockTracking(value) {\n shouldTrack += value;\n}", "function commitSPSpending() {\n for (k in minimums[\"qb_pocket_passer\"]) {\n document.getElementById('modifier_' + k).innerHTML = 0;\n document.getElementById('hidden_' + k).value = 0;\n }\n // update the next cap tooltips\n installCapTips();\n}", "function processEnablerUpdate(call, successCallback, failureCallback, local_hold_status) {\n logger.debug(\"processEnablerUpdate: state= \" + call.peer.signalingState);\n var peer = call.peer, localSdp, successSdp, remoteVideoDirection;\n \n if (peer.signalingState === RTCSignalingState.HAVE_LOCAL_OFFER) {\n call.sdp = checkSupportedVideoCodecs(call.sdp, getSdpFromObject(call.peer.localDescription));\n } else {\n call.sdp = checkSupportedVideoCodecs(call.sdp, null); \n }\n // Meetme workaround. This workaround is added into native function\n call.sdp = addSdpMissingCryptoLine (call.sdp);\n call.sdp = removeG722Codec(call.sdp);\n call.sdp = performG722ParameterWorkaround(call.sdp);\n call.sdp = performVP8RTCPParameterWorkaround(call.sdp);\n call.sdp = removeRTXCodec(call.sdp);\n call.sdp = fixRemoteTelephoneEventPayloadType(call, call.sdp);\n\n remoteVideoDirection = getSdpDirection(call.sdp, video);\n \n if ((remoteVideoDirection === MediaStates.INACTIVE)&&(call.currentState === \"COMPLETED\")) \n {\n switch(call.remoteVideoState){\n case MediaStates.INACTIVE:\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.SEND_RECEIVE);\n //call.remoteVideoState = MediaStates.SEND_RECEIVE;\n break;\n case MediaStates.RECEIVE_ONLY:\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.SEND_RECEIVE);\n //call.remoteVideoState = MediaStates.SEND_RECEIVE;\n break; \n case MediaStates.SEND_RECEIVE:\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.RECEIVE_ONLY);\n //call.remoteVideoState = MediaStates.RECEIVE_ONLY;\n break;\n }\n }\n\n if (local_hold_status) {\n call.sdp = updateSdpDirection(call.sdp, audio, MediaStates.INACTIVE);\n call.sdp = updateSdpDirection(call.sdp, video, MediaStates.INACTIVE);\n }\n\n //check if remote party sends video\n callSetReceiveVideo(call);\n call.sdp = changeDirection(call.sdp, MediaStates.SEND_ONLY, MediaStates.SEND_RECEIVE);\n if (peer.signalingState === RTCSignalingState.HAVE_LOCAL_OFFER) {\n //if we are here we have been to createEnablerUpdate before this\n\n if (webrtcdtls) {\n call.sdp = setMediaPassive(call.sdp);\n }\n\n peer.setRemoteDescription(webRTCSdp(typeAns, call.sdp),\n function() {\n call.remoteVideoState = getSdpDirection(call.sdp, video);\n addCandidates(call);\n successCallback(call.sdp);\n call.successCallback = null;\n },\n function(e) {\n logger.debug(\"processEnablerUpdate: setRemoteDescription failed!!\" + e);\n failureCallback(logPrefix + \"processEnablerUpdate: setRemoteDescription failed!!\");\n });\n } else {\n\n if (webrtcdtls) {\n call.sdp = setMediaActPass(call.sdp);\n }\n \n peer.setRemoteDescription(webRTCSdp(typeOff, call.sdp),\n function(){\n //addCandidates(call);\n\n peer.createAnswer(peer.remoteDescription,\n function(obj){\n logger.debug(\"processEnablerUpdate: isSdpEnabled audio= \" + isSdpEnabled(obj.sdp, audio));\n logger.debug(\"processEnablerUpdate: isSdpEnabled video= \" + isSdpEnabled(obj.sdp, video));\n\n if (isSdpEnabled(obj.sdp, audio) || isSdpEnabled(obj.sdp, video)) {\n if(getSdpDirection(call.sdp, audio) === MediaStates.SEND_ONLY){\n logger.debug(\"processEnablerUpdate: audio sendonly -> recvonly\");\n obj.audioDirection = MediaStates.RECEIVE_ONLY;\n }\n\n if(getSdpDirection(call.sdp, audio) === MediaStates.INACTIVE) {\n obj.audioDirection = MediaStates.INACTIVE;\n }\n\n if(getSdpDirection(call.sdp, video) === MediaStates.INACTIVE) {\n obj.videoDirection = MediaStates.INACTIVE;\n } else if(callCanLocalSendVideo(call)){\n obj.videoDirection = MediaStates.SEND_RECEIVE;\n } else {\n obj.videoDirection = MediaStates.RECEIVE_ONLY;\n }\n //TODO: Since there is no setter method for obj.sdp from the plugin side,\n // we create a temporary local variable and pass obj.sdp's value into it.\n // Rewrite the below part of code when the setter method is applied to the plugin side\n localSdp = getSdpFromObject(obj);\n obj = null;\n localSdp = updateVersion(getSdpFromObject(peer.localDescription), localSdp);\n localSdp = performVP8RTCPParameterWorkaround(localSdp);\n\n if (webrtcdtls) {\n localSdp = setMediaPassive(localSdp);\n }\n\n localSdp = fixLocalTelephoneEventPayloadType(call, localSdp);\n\n successSdp = webRTCSdp(typeAns, localSdp);\n \n call.answer = successSdp; // ABE-1328\n\n peer.setLocalDescription(successSdp,\n function(){\n successCallback(getSdpFromObject(successSdp));\n call.successCallback = null;\n call.answer = null; // ABE-1328\n },\n function(e) {\n logger.debug(\"processEnablerUpdate: setLocalDescription failed: \" + e);\n failureCallback(logPrefix + \"processEnablerUpdate: setLocalDescription failed\");\n call.answer = null; // ABE-1328\n });\n } else {\n logger.debug(\"processEnablerUpdate: createAnswer failed!!\");\n failureCallback(logPrefix + \"No codec negotiation\");\n }\n },\n function(e){\n logger.debug(\"processEnablerUpdate: createAnswer failed!! \" + e);\n failureCallback(logPrefix + \"Session cannot be created\");\n },\n {\n 'mandatory': {\n 'OfferToReceiveAudio':mediaAudio,\n 'OfferToReceiveVideo':getGlobalSendVideo()\n }\n });\n },\n function(e) {\n logger.debug(\"processEnablerUpdate: setRemoteDescription failed: \" + e);}\n );\n }\n }", "function test_chacha20_block(chacha){\n\tKey = \"00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f:10:11:12:13:14:15:16:17:18:19:1a:1b:1c:1d:1e:1f\";\n\tnonce=\"00:00:00:09:00:00:00:4a:00:00:00:00\";\n\tcounter=0x6b2065745;\n\tconsole.log(chacha20_block(chacha,Key,counter,nonce));\n}", "function onDenyRequestReceived (connection, data) {\n var sender = data.client_username;//This is the username of the the guest user sending the request to join an existing board\n var guestUserCon = users[sender];\n\n sendTo(guestUserCon, {\n type: \"requestDenied\",\n board_owner: connection.name\n });\n return;\n}", "function notBlockUseCase() { console.log('Not an block use case');}", "function _startAdvertise() {\n SpecialBle.setConfig(config);\n SpecialBle.advertise();\n }", "function safariEventRateLimitBlock() {\n\tif (isWebKit && isSafariVersion13OrOlder()) {\n\t\tif (safariRateLimited != 0)\n\t\t\treturn true;\n\t\telse {\n\t\t\tsafariRateLimited = setTimeout('safariRateLimited = 0;', 10);\n\t\t\treturn false;\n\t\t}\n\t}\n}", "function checkBlock() {\n\t\n\t// get/update block time and duration in seconds\n\tvar count = JSON.parse(localStorage[\"blockCount\"]);\n\tcount += UPDATE_SECONDS;\n\t\n\tvar blockDur = localStorage[\"blockDuration\"];\n\tblockDur = blockDur * 3600;\n\tconsole.log(count + \" seconds of \" + blockDur + \" second sentence served\");\n\t// remove block if duration exceeded\n\tif (count >= blockDur) {\n \tlocalStorage[\"blockVar\"] = \"false\";\n \tlocalStorage[\"target\"] = 0;\n \tlocalStorage[\"blockCount\"] = 0;\n \t\tconsole.log(\"you did great. the block is coming down\");\n\t}\n\telse {\n\t\tlocalStorage[\"blockCount\"] = count;\n\t}\n}", "function addCanditate(candidate) {\n if (!currentPeerConnection || !currentPeerConnection.remoteDescription || !currentPeerConnection.remoteDescription.type) {\n candidateBuffer.push(candidate);\n console.log(`Buffer candidate: ${candidate}`);\n } else {\n recvRemoteCandidate(candidate);\n }\n}", "function processEnablerAnswer(call, onSuccess, onFail) { \n logger.debug(\"processEnablerAnswer: state= \" + call.peer.signalingState);\n\n var updateSdp, remoteVideoDirection = getSdpDirection(call.sdp, video);\n\n call.sdp = checkSupportedVideoCodecs(call.sdp, getSdpFromObject(call.peer.localDescription));\n call.sdp = performVideoPortZeroWorkaround(call.sdp);\n call.sdp = removeG722Codec(call.sdp);\n call.sdp = performG722ParameterWorkaround(call.sdp);\n call.sdp = performVP8RTCPParameterWorkaround(call.sdp);\n call.sdp = removeRTXCodec(call.sdp);\n call.sdp = fixRemoteTelephoneEventPayloadType(call, call.sdp);\n \n callSetReceiveVideo(call);\n\n // this is needed for buggy webrtc api. when term answers with video to audio only call\n // this scenario does not work without converting to sendrecv\n call.sdp = changeDirection(call.sdp, MediaStates.SEND_ONLY, MediaStates.SEND_RECEIVE);\n\n // this is needed for buggy webrtc api.\n // Audio Only call answered with audio only \n // video call answered with audio only \n // video track later to be removed\n logger.debug(\"processEnablerAnswer: ice-lite: do remote video escalation\");\n if (remoteVideoDirection === MediaStates.INACTIVE) {\n call.sdp = changeDirection(call.sdp, MediaStates.INACTIVE, MediaStates.SEND_ONLY, video);\n }\n\n if (webrtcdtls) {\n call.sdp = setMediaPassive(call.sdp);\n }\n\n updateSdp = webRTCSdp(typeAns, call.sdp);\n\n call.peer.setRemoteDescription(updateSdp,\n function(){\n addCandidates(call);\n utils.callFunctionIfExist(onSuccess);\n },\n function(e) {\n logger.debug(\"processEnablerAnswer: setRemoteDescription failed: \" + e);\n utils.callFunctionIfExist(onFail);\n });\n }", "function keepConnectionAlive(OrderAPI, binanceAPI) {\n //console.log(\"keepConnectionAlive\", OrderAPI, binanceAPI);\n ListenKey(\"KEEPALIVE\", OrderAPI, binanceAPI)\n .then(() => {\n setTimeout(() => {\n console.log(\"keepalive sent\");\n keepConnectionAlive(OrderAPI, binanceAPI);\n }, 45 * 60 * 1000);\n })\n .catch((err) => {\n console.log(err.message);\n });\n}", "function Brake()\n{\n\tFixedSendData(0, 0);\n\tclearInterval(testTimer);\n}", "function onLeavingChallengesAdvertising() {\n $timeout.cancel(updaterHndl);\n }" ]
[ "0.72740626", "0.66109", "0.6515572", "0.63428533", "0.6165977", "0.5917189", "0.5910007", "0.59061867", "0.58915204", "0.5819372", "0.57548547", "0.5752981", "0.5704558", "0.56923014", "0.5650035", "0.56122005", "0.55876416", "0.55870813", "0.5574825", "0.55484277", "0.55314887", "0.5530535", "0.5522846", "0.5498564", "0.54966795", "0.54949254", "0.5494572", "0.5492339", "0.54894614", "0.5480994", "0.5478554", "0.5423516", "0.5417725", "0.5388036", "0.53719616", "0.53604496", "0.53311026", "0.53255993", "0.53225636", "0.52933353", "0.5256734", "0.5228976", "0.5222376", "0.5222376", "0.52206326", "0.5216102", "0.521365", "0.5199723", "0.51976305", "0.51943815", "0.51936364", "0.5190836", "0.5185323", "0.5184966", "0.51824105", "0.5180581", "0.517056", "0.5165694", "0.5163541", "0.51626897", "0.51591754", "0.51584786", "0.5154659", "0.51544046", "0.5147094", "0.5145022", "0.51368856", "0.5133572", "0.5132745", "0.51326334", "0.5130442", "0.5117178", "0.5109614", "0.510895", "0.5105133", "0.5099314", "0.5095914", "0.50892544", "0.50798243", "0.50707436", "0.5069247", "0.5068022", "0.50609064", "0.5059002", "0.5057082", "0.50554323", "0.5054683", "0.50441796", "0.5043966", "0.50438774", "0.50389", "0.50302196", "0.5020575", "0.50181395", "0.50152385", "0.50077873", "0.49940637", "0.49934712", "0.49879682", "0.49863946" ]
0.53398967
36
= QLL Text formatting module =
function qll_utility_qllformatting() { if(!qll_opt['utility:qllformatting'] || location.pathname.match(/\/article\//) == null && location.pathname.match(/\/messages\/read\//) == null && location.pathname.length > 3) { return; } if(location.pathname.length == 3) // main { } else if(location.pathname.match(/\/citizen\/profile\//) != null || location.pathname.match(/\/accounts\//) != null || location.pathname.match(/\/inventory/) != null) // profile { } else if(location.pathname.match(/\/article\//) != null) // article { if(qll_opt['utility:qllformatting:article']) { node = document.getElementById('content').getElementsByTagName('p')[1]; qll_utility_qllformatting_raw(node); qll_utility_qllformatting_a(node); qll_utility_qllformatting_img(node); } if(qll_opt['utility:qllformatting:comment']) { node = document.getElementById('comments_div').getElementsByTagName('p'); for(var i = 0; i< node.length; i++) { qll_utility_qllformatting_raw(node[i]); qll_utility_qllformatting_a(node[i]); qll_utility_qllformatting_img(node[i]); } } } else // pm { if(qll_opt['utility:qllformatting:pm']) { node = document.getElementById('content').getElementsByTagName('p')[0]; qll_utility_qllformatting_raw(node); qll_utility_qllformatting_a(node); qll_utility_qllformatting_img(node); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatText(text){\n text = text.replace(/\\r/g, \" \").replace(/\\n/g, \" \");\n text = text.replaceAll(/#w(.*?)#w;/g, \"<span class='text-important'>$1</span>\");\n text = text.replaceAll(/##(.*?)##;/g, \"<span class='text-title'>$1</span>\");\n text = text.replaceAll(/#d(.*?)#d;/g, \"<span class='text-discrete'>$1</span>\");\n text = text.replaceAll(/\\*\\*(.*?)\\*\\*/g, \"<b>$1</b>\");\n text = text.replaceAll(/\\*(.*?)\\*/g, \"<i>$1</i>\");\n text = text.replaceAll(\"#\\\\n\", \"<br/><br/>\");\n text = text.replaceAll(/#u(.*?)#u;/g, \"<ul>$1</ul>\");\n text = text.replaceAll(/#i(.*?)#i;/gim, \"<li>$1</li>\");\n text = text.replaceAll(/#ic(.*?)#ic;/gim, \"<span class='text-inlinecode'>$1</span>\");\n return text;\n}", "function formatText() {\r\n\tlet textFromClipboard = getClipboardData();\r\n\r\n\tif (!isSimpleText) {\r\n\t\tlet formatedText = buildText(textFromClipboard);\r\n\t\tglobalText = (globalText != \"\") ? globalText + \"\\n\\n\" + formatedText : formatedText;\r\n\t}\r\n\r\n\tif (isSimpleText) {\r\n\t\tlet newText = textFromClipboard;\r\n\t\tnewText = newText.replace(/\\n{3,20}/g, \"\\n\");\r\n\t\tnewText = newText.replace(/\\t{1,20}/g, TAB_RPLC);\r\n\t\tglobalText = (globalText != \"\") ? globalText + \"\\n\\n\" + newText : newText;\r\n\t}\r\n\tcopyToClipBoard(globalText);\r\n}", "function Format() {}", "function Format() {}", "function basic_formatter(text){\n var lines = text.split(/\\n/),\n formatRe = /\\B\\*([^\\*]+?)\\*\\B|\\B\\/([^\\/]+?)\\/\\B/g,\n toRet=[];\n $.each(lines, function(i,line){\n if(line){\n toRet.push(line.replace(formatRe, function(match, p1, p2){\n if(p1){\n return '<b>'+p1+'</b>';\n } else if(p2){\n return '<i>'+p2+'</i>';\n } else {\n return match;\n }\n }));\n }\n });\n return '<p>'+toRet.join('</p><p>')+'</p>';\n}", "function ______TEXT_QUERIES______() {}", "function appendFormatCode(format, tx)\r\n{\r\n\tif(tx.value==tx.getAttribute(\"prompt\"))\r\n\t{\r\n\t\ttx.focus();\r\n\t}\r\n\r\n\tformatOpen=\"<\"+format+\">\";\r\n\tformatClose=\"</\"+format+\">\";\r\n\tscr= tx.scrollTop;\r\n\tstartPos = tx.selectionStart;\r\n\tendPos = tx.selectionEnd;\r\n\tselectedSubString = tx.value.substr(tx.selectionStart, tx.selectionEnd - tx.selectionStart);\r\n\ttx.value = tx.value.substring(0, startPos)+formatOpen+selectedSubString+formatClose+tx.value.substring(endPos, tx.value.length);\r\n\ttx.scrollTop = scr;\r\n}", "function formatText(text) {\n if (!text) {\n text = '';\n }\n var re = /([()\\[\\]|<>{},\\s.\\/\\-]+)/,\n splArray = text.split(re),\n ix, buf = [];\n for (ix = 0; ix < splArray.length; ix += 1) {\n var textTerm = splArray[ix];\n buf.push(GSP.mfs.makeTextMFS(textTerm,\n mathItalicization &&\n /[a-zA-Zα-ω]/.test(textTerm[0])));\n }\n if(splArray.length > 1)\n // variadic call\n return GSP.mfs.makeHorizontalMFS.apply(this, buf);\n else {\n return buf[0];\n }\n }", "function defaultFormatter(text){\n return text;\n}", "function _formatText(msg)\n{\n msg = $.emotions(msg);\n msg = msg.replace(/\\n/g, '<br />');\n\n return msg;\n}", "function Pr(e,t,a){var n=e.doc,r=e.display,f=t.from,o=t.to,i=!1,s=f.line;e.options.lineWrapping||(s=D(de(T(n,f.line))),n.iter(s,o.line+1,function(e){if(e==r.maxLine)return i=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Me(e),Qn(n,t,a,Ea(e)),e.options.lineWrapping||(n.iter(s,f.line+t.text.length,function(e){var t=ve(e);t>r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,i=!1)}),i&&(e.curOp.updateMaxLine=!0)),ft(n,f.line),Sn(e,400);var c=t.text.length-(o.line-f.line)-1;\n // Remember that these lines changed, for updating the display\n t.full?bn(e):f.line!=o.line||1!=t.text.length||Zn(e.doc,t)?bn(e,f.line,o.line+1,c):yn(e,f.line,\"text\");var u=Oe(e,\"changes\"),l=Oe(e,\"change\");if(l||u){var d={from:f,to:o,text:t.text,removed:t.removed,origin:t.origin};l&&wt(e,\"change\",e,d),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}", "function t(text) { return {'macro_name': 'plaintext', 'text': text}; }", "function stringFormat(texString) {\n\t//alert('stringFormat start:' + texString + ':');\n\ttexString = trim(texString);\n\tvar tokArray = parseTex(texString);\n\tvar tmpDisplay = \"\";\n\tfor (var i = 0; i < tokArray.length; i++) {\n\t tmpDisplay = tmpDisplay + tokArray[i][0] + ' ';\n\t}\n\t//alert(tmpDisplay);\n\ttokEx(tokArray);\n\t//alert('stringFormat end');\n\treturn;\n }", "get formattedText() {\n return this.i.b;\n }", "function workWithEntry(texts,n)\\par\r\n \\{\\par\r\n var texts = texts;\\par\r\n if(typeof(n) != 'undefined')\\par\r\n \\{\\par\r\n var header = 'Pers\\'f6nlichen Text bearbeiten';\\par\r\n var name = texts[n].name;\\par\r\n var text = texts[n].value;\\par\r\n \\}\\par\r\n else\\par\r\n \\{\\par\r\n var header = '\\lang1025\\f1\\rtlch\\'e4\\'d5 \\'cc\\'cf\\'ed\\'cf\\lang1036\\f0\\ltrch ';\\par\r\n var name = '';\\par\r\n var text = '';\\par\r\n \\}", "function qn(e){return e.text?R(e.from.line+e.text.length-1,p(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}", "function format_html_input() {\r\n var text = String(this);\r\n\r\n var element = Element(\"body\");\r\n element.innerHTML = text;\r\n\r\n if (Prototype.Browser.Gecko || Prototype.Browser.WebKit) {\r\n element.select('strong').each(function(element) {\r\n element.replace('<span style=\"font-weight: bold;\">' + element.innerHTML + '</span>');\r\n });\r\n element.select('em').each(function(element) {\r\n element.replace('<span style=\"font-style: italic;\">' + element.innerHTML + '</span>');\r\n });\r\n element.select('u').each(function(element) {\r\n element.replace('<span style=\"text-decoration: underline;\">' + element.innerHTML + '</span>');\r\n });\r\n }\r\n\r\n if (Prototype.Browser.WebKit)\r\n element.select('span').each(function(span) {\r\n if (span.getStyle('fontWeight') == 'bold')\r\n span.addClassName('Apple-style-span');\r\n\r\n if (span.getStyle('fontStyle') == 'italic')\r\n span.addClassName('Apple-style-span');\r\n\r\n if (span.getStyle('textDecoration') == 'underline')\r\n span.addClassName('Apple-style-span');\r\n });\r\n\r\n text = element.innerHTML;\r\n text = text.tidy_xhtml();\r\n\r\n text = text.replace(/<\\/p>(\\n)*<p>/g, \"\\n\\n\");\r\n\r\n text = text.replace(/(\\n)?<br( \\/)?>(\\n)?/g, \"\\n\");\r\n\r\n text = text.replace(/^<p>/g, '');\r\n text = text.replace(/<\\/p>$/g, '');\r\n\r\n if (Prototype.Browser.Gecko) {\r\n text = text.replace(/\\n/g, \"<br>\");\r\n text = text + '<br>';\r\n } else if (Prototype.Browser.WebKit) {\r\n text = text.replace(/\\n/g, \"</div><div>\");\r\n text = '<div>' + text + '</div>';\r\n text = text.replace(/<div><\\/div>/g, \"<div><br></div>\");\r\n } else if (Prototype.Browser.IE || Prototype.Browser.Opera) {\r\n text = text.replace(/\\n/g, \"</p>\\n<p>\");\r\n text = '<p>' + text + '</p>';\r\n text = text.replace(/<p><\\/p>/g, \"<p>&nbsp;</p>\");\r\n text = text.replace(/(<p>&nbsp;<\\/p>)+$/g, \"\");\r\n }\r\n\r\n return text;\r\n }", "function buildTextProcText(pFlattenedReadyItems){\n var textString = '';\n var styleRun = '';\n var lastColor = null;\n var lastStyle = {\n font: null\n };\n var lastDecoration = 'none';\n var styleRunLength = 0;\n\n for (var i = 0, iLength = pFlattenedReadyItems.length; i < iLength; i++){\n _buildTextString(pFlattenedReadyItems[i].text);\n _buildStyleRun(pFlattenedReadyItems[i], i, iLength);\n\n }\n\n function _buildTextString(textItem)\n {\n textString += textItem;\n }\n\n function _buildStyleRun(pFlattenedItem, pIndex, pILength)\n {\n console.log('pFlattenedItem',pFlattenedItem);\n var hasRunChange = false;\n var thisStyleRun = '';\n if (pFlattenedItem.color !== lastColor)\n {\n hasRunChange = true;\n thisStyleRun += '<tc' + Tool$.webRGB2Int(pFlattenedReadyItems[pIndex].color) + '>';\n lastColor = pFlattenedItem.color;\n console.log('thisStyleRun',thisStyleRun);\n }\n\n if (pFlattenedItem.textDecorationLine !== lastDecoration)\n {\n hasRunChange = true;\n thisStyleRun += '<u>';\n lastDecoration = pFlattenedItem.textDecorationLine;\n console.log('thisStyleRun',thisStyleRun);\n }\n\n if (pFlattenedItem.fontFamily !== lastStyle.font)\n {\n hasRunChange = true;\n thisStyleRun += '<fn' + getFontID(pFlattenedItem.fontFamily) + '>';\n lastStyle.font = pFlattenedItem.fontFamily;\n console.log('thisStyleRun',thisStyleRun);\n }\n\n\n if(pIndex === 0)\n {\n styleRun += thisStyleRun;\n styleRunLength += pFlattenedItem.text.length;\n if(pILength === 1)\n {\n styleRun += pFlattenedItem.text.length + ' <..>';\n }\n }\n else if (hasRunChange)\n {\n styleRun += styleRunLength + ' ' + thisStyleRun;\n if (pIndex === pILength -1)\n {\n styleRun += pFlattenedItem.text.length + ' <..>';\n }\n styleRunLength = pFlattenedItem.text.length;\n }\n else\n {\n styleRunLength += pFlattenedItem.text.length;\n }\n }\n\n // console.log('textString',textString);\n // console.log('styleRun',styleRun);\n // console.log('textProcText',styleRun + textString);\n //var textProcFinal = renderEngine + boxFormat + '<fi' + FONTS.arial.include + '>' + '<fn' + FONTS.arial.fontid + '><ts3200>' + styleRun + textString + RETURN + '<EOT>' + TAB + RETURN;\n //var textProcFinal = '0111\\n' +\n // '\\n' +\n // '300000000000000 300000000000000 0 0 0 0 0 0 1 0' + RETURN+ '<fi' + FONTS.arial.include + '>' + '<fn' + FONTS.arial.fontid + '><ts3200>' + styleRun + textString + RETURN + '<EOT>' + TAB + RETURN;\n\n var textProcFinal = renderHeader + '<fi' + FONTS.atypewriter.include + '>' + '<fi' + FONTS.zapfino.include + '><ts3200>' + styleRun + textString + renderEnd;\n // var textProcFinal = renderHeader + '<fi' + FONTS.arial.include + '>' + '<fn' + FONTS.arial.fontid + '><ts3200>' + styleRun + textString + renderEnd;\n console.log('textProcFinal',textProcFinal);\n textProps.styleRun = textProcFinal;\n prepareDownloadLink(textProps.styleRun);\n\n }", "getItalics(line){\n\n }", "function format(documentText, range, options) {\n return _impl_format__WEBPACK_IMPORTED_MODULE_0__[\"format\"](documentText, range, options);\n}", "function Paper_format_other(){\n\n}", "function textTransformToHtml(text)\n{\n var html = text;\n //html = html.replace(/&/gi, \"&amp;\");\n //html = html.replace(/</gi, \"&lt;\").replace(/>/gi, \"&gt;\");\n html = html.replace(/\\r\\n/gi, \"<br/>\").replace(/\\n/gi, \"<br/>\");\n html = html.replace(/\\[h(\\d)\\](.+?)\\[\\/h\\d\\]/gi, \"<h$1>$2</h$1>\");\n\n html = html.replace(/\\[q\\](.+?)\\[q\\]/g, '<i class=\"ttQuoted\">$1</i>');\n html = html.replace(/\\[f\\](.+?)\\[f\\]/g, '<b class=\"ttFilename\">$1</b>');\n html = html.replace(/\\[space=(.+?)\\]/g, '<span style=\"margin-right: $1\">&nbsp;</span>');\n html = html.replace(/\\[mdash\\]/g, '&mdash;');\n\n html = html.replace(/\\[img(.*?)\\](.+?)\\[\\/img\\]/g, '<img $1 src=\"$2\" />');\n html = html.replace(/\\[a(.*?)\\](.+?)\\[\\/a\\]/g, '<a $1 target=\"_blank\">$2</a>');\n\n html = html.replace(/<br\\/>(\\d)\\. /g, '<br/><b class=\"numlist\">$1.</b> ');\n\n // word-highliter\n var words = new Array();\n var rx = /\\[wh=([abcdefABCDEF0-9]+?)\\](.+?)\\[wh\\]/g;\n var match;\n while (match = rx.exec(html))\n {\n var color = match[1];\n var word = match[2];\n words[word] = color;\n }\n html = html.replace(/\\[wh=[abcdefABCDEF0-9]+?\\].+?\\[wh\\]/gi, \"\");\n for (word in words)\n {\n color = words[word];\n html = replaceTextNotBetween(html, \"[code\", \"[/code]\", word, '<span style=\"color: #' + color + '\">' + word + '</span>');\n }\n\n\n // prepare code for syntax highlighting\n html = html.replace(/\\[code (class=\"brush\\: .+?\")\\](.+?)\\[\\/code\\]/gi, \"<pre $1>$2</pre>\");\n html = replaceTextBetween(html, '<pre class=\"brush', \"</pre>\", \"<br/>\", \"\\n\");\n\n return html;\n}", "function showFormat(format) {\n html('format', format.replace(/\\n/g, \"<br/>\"));\n}", "function addLineBreaks(text) {\n\t// test to see if it was created in the new editor\n\tif (allParams.editorVersion && parseInt(\"0\" + allParams.editorVersion, 10) >= 3)\n\t{\n\t\treturn text; // Return text unchanged\n\t}\n\t// Now try to identify v3beta created LOs\n\tvar trimmedText = $.trim(text);\n\tif ((trimmedText.indexOf(\"<p\") == 0 || trimmedText.indexOf(\"<h\") == 0) && (trimmedText.lastIndexOf(\"</p\") == trimmedText.length-4 || trimmedText.lastIndexOf(\"</h\") == trimmedText.length-5))\n\t{\n\t\treturn text; // Return text unchanged\n\t}\n\t\n // Now assume it's v2.1 or before\n if (text.indexOf(\"<math\") == -1 && text.indexOf(\"<table\") == -1) {\n return text.replace(/(\\n|\\r|\\r\\n)/g, \"<br />\");\n\t\t\n } else { // ignore any line breaks inside these tags as they don't work correctly with <br>\n var newText = text;\n if (newText.indexOf(\"<math\") != -1) { // math tag found\n var tempText = \"\",\n mathNum = 0;\n\n while (newText.indexOf(\"<math\", mathNum) != -1) {\n var text1 = newText.substring(mathNum, newText.indexOf(\"<math\", mathNum)),\n tableNum = 0;\n while (text1.indexOf(\"<table\", tableNum) != -1) { // check for table tags before/between math tags\n tempText += text1.substring(tableNum, text1.indexOf(\"<table\", tableNum)).replace(/(\\n|\\r|\\r\\n)/g, \"<br />\");\n tempText += text1.substring(text1.indexOf(\"<table\", tableNum), text1.indexOf(\"</table>\", tableNum) + 8);\n tableNum = text1.indexOf(\"</table>\", tableNum) + 8;\n }\n tempText += text1.substring(tableNum).replace(/(\\n|\\r|\\r\\n)/g, \"<br />\");\n tempText += newText.substring(newText.indexOf(\"<math\", mathNum), newText.indexOf(\"</math>\", mathNum) + 7);\n mathNum = newText.indexOf(\"</math>\", mathNum) + 7;\n }\n\n var text2 = newText.substring(mathNum),\n tableNum = 0;\n while (text2.indexOf(\"<table\", tableNum) != -1) { // check for table tags after math tags\n tempText += text2.substring(tableNum, text2.indexOf(\"<table\", tableNum)).replace(/(\\n|\\r|\\r\\n)/g, \"<br />\");\n tempText += text2.substring(text2.indexOf(\"<table\", tableNum), text2.indexOf(\"</table>\", tableNum) + 8);\n tableNum = text2.indexOf(\"</table>\", tableNum) + 8;\n }\n tempText += text2.substring(tableNum).replace(/(\\n|\\r|\\r\\n)/g, \"<br />\");\n newText = tempText;\n\n } else if (newText.indexOf(\"<table\") != -1) { // no math tags - so just check table tags\n var tempText = \"\",\n tableNum = 0;\n while (newText.indexOf(\"<table\", tableNum) != -1) {\n tempText += newText.substring(tableNum, newText.indexOf(\"<table\", tableNum)).replace(/(\\n|\\r|\\r\\n)/g, \"<br />\");\n tempText += newText.substring(newText.indexOf(\"<table\", tableNum), newText.indexOf(\"</table>\", tableNum) + 8);\n tableNum = newText.indexOf(\"</table>\", tableNum) + 8;\n }\n tempText += newText.substring(tableNum).replace(/(\\n|\\r|\\r\\n)/g, \"<br />\");\n newText = tempText;\n }\n\n return newText;\n }\n}", "function TEXT(yyyymmddhhmm,date,hhmm,khz,call,display,gsq,lsb,usb,cyc,pwr,dx,dxw,nu,qth,sta,cnt) {\n this.yyyymmddhhmm =\tyyyymmddhhmm;\n this.date =\tdate;\n this.hhmm =\thhmm;\n this.khz =\tkhz;\n this.call =\tcall;\n this.display =\tdisplay;\n this.lsb =\tlsb;\n this.usb =\tusb;\n this.gsq =\tgsq;\n this.cyc =\tcyc;\n this.pwr =\tpwr;\n this.dx =\tdx;\n this.dxw =\tdxw;\n this.nu =\tnu;\t// Can't say 'new' as this is a reserved word\n this.qth =\tqth;\n this.sta =\tsta;\n this.cnt =\tcnt;\n}", "get textFormatTemplate() {\n return html`\n <div id=\"wrapper\" class=\"text-format\">\n ${this.overlineTemplate}\n ${this.titleTemplate}\n ${this.bodyTemplate}\n </div>\n `;\n }", "prettyFormat(text) {\n return this.parser.parse(text);\n }", "function format(documentText, range, options) {\n var initialIndentLevel;\n var formatText;\n var formatTextStart;\n var rangeStart;\n var rangeEnd;\n if (range) {\n rangeStart = range.offset;\n rangeEnd = rangeStart + range.length;\n formatTextStart = rangeStart;\n while (formatTextStart > 0 && !isEOL(documentText, formatTextStart - 1)) {\n formatTextStart--;\n }\n var endOffset = rangeEnd;\n while (endOffset < documentText.length && !isEOL(documentText, endOffset)) {\n endOffset++;\n }\n formatText = documentText.substring(formatTextStart, endOffset);\n initialIndentLevel = computeIndentLevel(formatText, options);\n }\n else {\n formatText = documentText;\n initialIndentLevel = 0;\n formatTextStart = 0;\n rangeStart = 0;\n rangeEnd = documentText.length;\n }\n var eol = getEOL(options, documentText);\n var lineBreak = false;\n var indentLevel = 0;\n var indentValue;\n if (options.insertSpaces) {\n indentValue = repeat(' ', options.tabSize || 4);\n }\n else {\n indentValue = '\\t';\n }\n var scanner = Object(_scanner__WEBPACK_IMPORTED_MODULE_0__[\"createScanner\"])(formatText, false);\n var hasError = false;\n function newLineAndIndent() {\n return eol + repeat(indentValue, initialIndentLevel + indentLevel);\n }\n function scanNext() {\n var token = scanner.scan();\n lineBreak = false;\n while (token === 15 /* Trivia */ || token === 14 /* LineBreakTrivia */) {\n lineBreak = lineBreak || (token === 14 /* LineBreakTrivia */);\n token = scanner.scan();\n }\n hasError = token === 16 /* Unknown */ || scanner.getTokenError() !== 0 /* None */;\n return token;\n }\n var editOperations = [];\n function addEdit(text, startOffset, endOffset) {\n if (!hasError && startOffset < rangeEnd && endOffset > rangeStart && documentText.substring(startOffset, endOffset) !== text) {\n editOperations.push({ offset: startOffset, length: endOffset - startOffset, content: text });\n }\n }\n var firstToken = scanNext();\n if (firstToken !== 17 /* EOF */) {\n var firstTokenStart = scanner.getTokenOffset() + formatTextStart;\n var initialIndent = repeat(indentValue, initialIndentLevel);\n addEdit(initialIndent, formatTextStart, firstTokenStart);\n }\n while (firstToken !== 17 /* EOF */) {\n var firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;\n var secondToken = scanNext();\n var replaceContent = '';\n while (!lineBreak && (secondToken === 12 /* LineCommentTrivia */ || secondToken === 13 /* BlockCommentTrivia */)) {\n // comments on the same line: keep them on the same line, but ignore them otherwise\n var commentTokenStart = scanner.getTokenOffset() + formatTextStart;\n addEdit(' ', firstTokenEnd, commentTokenStart);\n firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;\n replaceContent = secondToken === 12 /* LineCommentTrivia */ ? newLineAndIndent() : '';\n secondToken = scanNext();\n }\n if (secondToken === 2 /* CloseBraceToken */) {\n if (firstToken !== 1 /* OpenBraceToken */) {\n indentLevel--;\n replaceContent = newLineAndIndent();\n }\n }\n else if (secondToken === 4 /* CloseBracketToken */) {\n if (firstToken !== 3 /* OpenBracketToken */) {\n indentLevel--;\n replaceContent = newLineAndIndent();\n }\n }\n else {\n switch (firstToken) {\n case 3 /* OpenBracketToken */:\n case 1 /* OpenBraceToken */:\n indentLevel++;\n replaceContent = newLineAndIndent();\n break;\n case 5 /* CommaToken */:\n case 12 /* LineCommentTrivia */:\n replaceContent = newLineAndIndent();\n break;\n case 13 /* BlockCommentTrivia */:\n if (lineBreak) {\n replaceContent = newLineAndIndent();\n }\n else {\n // symbol following comment on the same line: keep on same line, separate with ' '\n replaceContent = ' ';\n }\n break;\n case 6 /* ColonToken */:\n replaceContent = ' ';\n break;\n case 10 /* StringLiteral */:\n if (secondToken === 6 /* ColonToken */) {\n replaceContent = '';\n break;\n }\n // fall through\n case 7 /* NullKeyword */:\n case 8 /* TrueKeyword */:\n case 9 /* FalseKeyword */:\n case 11 /* NumericLiteral */:\n case 2 /* CloseBraceToken */:\n case 4 /* CloseBracketToken */:\n if (secondToken === 12 /* LineCommentTrivia */ || secondToken === 13 /* BlockCommentTrivia */) {\n replaceContent = ' ';\n }\n else if (secondToken !== 5 /* CommaToken */ && secondToken !== 17 /* EOF */) {\n hasError = true;\n }\n break;\n case 16 /* Unknown */:\n hasError = true;\n break;\n }\n if (lineBreak && (secondToken === 12 /* LineCommentTrivia */ || secondToken === 13 /* BlockCommentTrivia */)) {\n replaceContent = newLineAndIndent();\n }\n }\n var secondTokenStart = scanner.getTokenOffset() + formatTextStart;\n addEdit(replaceContent, firstTokenEnd, secondTokenStart);\n firstToken = secondToken;\n }\n return editOperations;\n}", "function Qn(e,t,a,n){function r(e){return a?a[e]:null}function f(e,a,r){ot(e,a,r,n),wt(e,\"change\",e,t)}function o(e,t){for(var a=[],f=e;f<t;++f)a.push(new gi(c[f],r(f),n));return a}var i=t.from,s=t.to,c=t.text,u=T(e,i.line),l=T(e,s.line),d=p(c),_=r(c.length-1),m=s.line-i.line;\n // Adjust the line structure\n if(t.full)e.insert(0,o(0,c.length)),e.remove(c.length,e.size-c.length);else if(Zn(e,t)){\n // This is a whole-line replace. Treated specially to make\n // sure line objects move the way they are supposed to.\n var g=o(0,c.length-1);f(l,l.text,_),m&&e.remove(i.line,m),g.length&&e.insert(i.line,g)}else if(u==l)if(1==c.length)f(u,u.text.slice(0,i.ch)+d+u.text.slice(s.ch),_);else{var h=o(1,c.length-1);h.push(new gi(d+u.text.slice(s.ch),_,n)),f(u,u.text.slice(0,i.ch)+c[0],r(0)),e.insert(i.line+1,h)}else if(1==c.length)f(u,u.text.slice(0,i.ch)+c[0]+l.text.slice(s.ch),r(0)),e.remove(i.line+1,m);else{f(u,u.text.slice(0,i.ch)+c[0],r(0)),f(l,d+l.text.slice(s.ch),_);var b=o(1,c.length-1);m>1&&e.remove(i.line+1,m-1),e.insert(i.line+1,b)}wt(e,\"change\",e,t)}", "get listText() {\n let listFormat = undefined;\n let list = this.viewer.getListById(this.listId);\n if (list instanceof WList && this.listLevelNumberIn > -1 && this.listLevelNumberIn < 9) {\n let listLevel = list.getListLevel(this.listLevelNumber);\n if (listLevel instanceof WListLevel) {\n if (listLevel.listLevelPattern === 'Bullet') {\n listFormat = listLevel.numberFormat;\n }\n else {\n listFormat = listLevel.numberFormat;\n for (let i = 0; i < 9; i++) {\n let levelPattern = '%' + (i + 1);\n if (listFormat.indexOf(levelPattern) > -1) {\n let level = i === this.listLevelNumberIn ? listLevel : list.getListLevel(i);\n let listTextElement = this.selection.getListTextElementBox(this.selection.start.paragraph);\n let listText = listTextElement ? listTextElement.text : '';\n listFormat = listText;\n }\n }\n }\n }\n }\n return listFormat;\n }", "function displayTextTLComplete(){\r\r\n quoteLargeSplit.revert();\r\r\n }", "function colorize (text) {\n var segment = {text: '', idx: 0};\n var segments = [segment];\n var classes = [];\n var obj = {segments, classes};\n var unmatchedTick;\n var unmatchedTickIdx;\n\n var cur = {initial: true};\n colorcode_to_json(text).lines.forEach(l => {\n l.forEach(c => {\n if (cur.newline) {\n // starting a non-first line, let's reset and write a newline\n segment = {text: '\\n', idx: segments.length};\n segments.push(segment);\n }\n\n if (cur.b != c.b || cur.i != c.i || cur.u != c.u || cur.fg != c.fg) {\n if (cur.initial) {\n if (c.value === 62 && l.length > 3) { // >\n classes.push('quote');\n return; // don't include the >\n }\n if (c.value === 32 || c.value === 9) { // space, tab\n classes.push('monospace');\n }\n } else {\n segment = {text: '', idx: segments.length};\n segments.push(segment);\n }\n css = ''\n if (c.b) css += 'font-weight:bold;';\n if (c.i) css += 'font-style:italic;';\n if (c.u) css += 'text-decoration:underline;';\n if (c.fg != 1) css += 'color:'+palette[c.fg]+';';\n if (c.bg != 1) css += 'background-color:'+palette[c.bg]+';';\n segment.css = css;\n cur = c;\n }\n\n var recordText = true;\n\n if (c.value === 96) { // `\n if (unmatchedTick) {\n var segIdx = segments.indexOf(unmatchedTick);\n var tickIdx = unmatchedTickIdx; // unmatchedTick.text.indexOf('`');\n const isCurrent = unmatchedTick === segment;\n\n // split out any prefix\n if (tickIdx > 0) {\n var newSeg = JSON.parse(JSON.stringify(unmatchedTick));\n newSeg.text = newSeg.text.slice(0, tickIdx);\n segments.splice(segIdx, 0, newSeg);\n\n unmatchedTick.text = unmatchedTick.text.slice(tickIdx);\n segIdx++;\n tickIdx = 0;\n }\n\n // adopt the contents\n if (unmatchedTick.text.length > 1) {\n unmatchedTick.text = unmatchedTick.text.slice(1);\n recordText = false;\n\n // mark all segments between there and here\n while (segIdx < segments.length) {\n segments[segIdx].type = 'code';\n segIdx++;\n }\n\n // make a new non-code segment\n segment = {text: '', idx: segments.length};\n segments.push(segment);\n\n unmatchedTick = null;\n unmatchedTickIdx = null;\n } else {\n unmatchedTick = segment;\n unmatchedTickIdx = segment.text.length;\n }\n\n } else {\n unmatchedTick = segment;\n unmatchedTickIdx = segment.text.length;\n }\n }\n\n if (recordText) {\n segment.text += String.fromCharCode(c.value);\n }\n });\n\n // wipe state in case there's more lines\n cur = {initial: true, newline: true};\n });\n\n // Check for URLs, break into link segments\n var segCount = segments.length;\n for (var i = 0; i < segCount; i++) {\n var match;\n const seg = segments[i];\n if (match = seg.text.match(/^(.*?)\\b([a-z+]+):\\/\\/([^ ]+)\\b(.*)$/)) {\n if ((match[1].length + match[2].length) === 0) {\n continue;\n }\n if (match[1].length) {\n const preSeg = JSON.parse(JSON.stringify(segments[i]));\n preSeg.text = match[1];\n segments.splice(i, 0, preSeg);\n i++;\n segCount++;\n }\n if (match[4].length) {\n const postSeg = JSON.parse(JSON.stringify(segments[i]));\n postSeg.text = match[4];\n segments.splice(i+1, 0, postSeg);\n segCount++;\n }\n // this is pretty bad\n if (match[1].length) {\n i-=2;\n }\n seg.text = match[2] + '://' + match[3];\n\n const slices = seg.text.split('/');\n seg.scheme = match[2];\n seg.domain = slices[2];\n seg.origin = slices.slice(0,3).join('/');\n seg.path = '/'+slices.slice(3).join('/');\n seg.type = 'link';\n }\n }\n\n // Number the segments for vue\n segments.forEach((seg, idx) => seg.idx = idx);\n\n // If there's only one segment, make sure it's not empty\n if (segments.length == 1 && !segments[0].text) {\n segments[0].text = ' ';\n }\n\n return obj;\n}", "function format(text) {\n return text.replace(/ /g,'').replace(/(<([^>]+)>)/ig, '').toLowerCase();\n }", "function IpadicFormatter() {\n}", "function regolit_com_lj_quoter_test()\n{\n var text = document.selection.createRange().text;\n if (\"\" != text) {\n // format text\n text = '<div style=\"padding-left: 3pt; margin-left: 10px; border-color: blue; border-style: none none none solid; border-width: 4px;\"><i>' + text + '</i></div>';\n var ta = document.getElementById(\"body\");\n ta.value += text;\n }\n}", "function statTxt(txt1,txt2,all,Fem,Male) { \n let txt='',t1,t2;\n if (all>0) {\n if (all==1) {t1=\"ое\"; t2=\"о\"} else {t1=\"ых\"; t2=\"\"};\n// the text is different for general statistics or by type:\n if (txt2==\"\"){txt+=`${txt1}${t1} существ${t2} ${all}`} else {txt=`${txt1} ${all} `};\n if (Fem==1) { txt+=`, женское`} else if (Fem>1) {txt+=`, женских ${Fem}`};\n if (Male==1) {txt+=`, мужское`} else if (Male>1) {txt+=`, мужских ${Male}`};\n txt+=`.\\n `;\n }\n return txt;\n}", "function myspacefmt(text) {\n\n\ts = text\n\n\t// Turn special characters back into HTML entities so they don't get stripped\n\t// List is from the tables at http://www.htmlhelp.com/reference/html40/entities/\n\ts = s.replace(/\\uA0/g, '&nbsp;');\n\ts = s.replace(/\\uA1/g, '&iexcl;');\n\ts = s.replace(/\\uA2/g, '&cent;');\n\ts = s.replace(/\\uA3/g, '&pound;');\n\ts = s.replace(/\\uA4/g, '&curren;');\n\ts = s.replace(/\\uA5/g, '&yen;');\n\ts = s.replace(/\\uA6/g, '&brvbar;');\n\ts = s.replace(/\\uA7/g, '&sect;');\n\ts = s.replace(/\\uA8/g, '&uml;');\n\ts = s.replace(/\\uA9/g, '&copy;');\n\ts = s.replace(/\\uAA/g, '&ordf;');\n\ts = s.replace(/\\uAB/g, '&laquo;');\n\ts = s.replace(/\\uAC/g, '&not;');\n\ts = s.replace(/\\uAD/g, '&shy;');\n\ts = s.replace(/\\uAE/g, '&reg;');\n\ts = s.replace(/\\uAF/g, '&macr;');\n\ts = s.replace(/\\uB0/g, '&deg;');\n\ts = s.replace(/\\uB1/g, '&plusmn;');\n\ts = s.replace(/\\uB2/g, '&sup2;');\n\ts = s.replace(/\\uB3/g, '&sup3;');\n\ts = s.replace(/\\uB4/g, '&acute;');\n\ts = s.replace(/\\uB5/g, '&micro;');\n\ts = s.replace(/\\uB6/g, '&para;');\n\ts = s.replace(/\\uB7/g, '&middot;');\n\ts = s.replace(/\\uB8/g, '&cedil;');\n\ts = s.replace(/\\uB9/g, '&sup1;');\n\ts = s.replace(/\\uBA/g, '&ordm;');\n\ts = s.replace(/\\uBB/g, '&raquo;');\n\ts = s.replace(/\\uBC/g, '&frac14;');\n\ts = s.replace(/\\uBD/g, '&frac12;');\n\ts = s.replace(/\\uBE/g, '&frac34;');\n\ts = s.replace(/\\uBF/g, '&iquest;');\n\ts = s.replace(/\\uC0/g, '&Agrave;');\n\ts = s.replace(/\\uC1/g, '&Aacute;');\n\ts = s.replace(/\\uC2/g, '&Acirc;');\n\ts = s.replace(/\\uC3/g, '&Atilde;');\n\ts = s.replace(/\\uC4/g, '&Auml;');\n\ts = s.replace(/\\uC5/g, '&Aring;');\n\ts = s.replace(/\\uC6/g, '&AElig;');\n\ts = s.replace(/\\uC7/g, '&Ccedil;');\n\ts = s.replace(/\\uC8/g, '&Egrave;');\n\ts = s.replace(/\\uC9/g, '&Eacute;');\n\ts = s.replace(/\\uCA/g, '&Ecirc;');\n\ts = s.replace(/\\uCB/g, '&Euml;');\n\ts = s.replace(/\\uCC/g, '&Igrave;');\n\ts = s.replace(/\\uCD/g, '&Iacute;');\n\ts = s.replace(/\\uCE/g, '&Icirc;');\n\ts = s.replace(/\\uCF/g, '&Iuml;');\n\ts = s.replace(/\\uD0/g, '&ETH;');\n\ts = s.replace(/\\uD1/g, '&Ntilde;');\n\ts = s.replace(/\\uD2/g, '&Ograve;');\n\ts = s.replace(/\\uD3/g, '&Oacute;');\n\ts = s.replace(/\\uD4/g, '&Ocirc;');\n\ts = s.replace(/\\uD5/g, '&Otilde;');\n\ts = s.replace(/\\uD6/g, '&Ouml;');\n\ts = s.replace(/\\uD7/g, '&times;');\n\ts = s.replace(/\\uD8/g, '&Oslash;');\n\ts = s.replace(/\\uD9/g, '&Ugrave;');\n\ts = s.replace(/\\uDA/g, '&Uacute;');\n\ts = s.replace(/\\uDB/g, '&Ucirc;');\n\ts = s.replace(/\\uDC/g, '&Uuml;');\n\ts = s.replace(/\\uDD/g, '&Yacute;');\n\ts = s.replace(/\\uDE/g, '&THORN;');\n\ts = s.replace(/\\uDF/g, '&szlig;');\n\ts = s.replace(/\\uE0/g, '&agrave;');\n\ts = s.replace(/\\uE1/g, '&aacute;');\n\ts = s.replace(/\\uE2/g, '&acirc;');\n\ts = s.replace(/\\uE3/g, '&atilde;');\n\ts = s.replace(/\\uE4/g, '&auml;');\n\ts = s.replace(/\\uE5/g, '&aring;');\n\ts = s.replace(/\\uE6/g, '&aelig;');\n\ts = s.replace(/\\uE7/g, '&ccedil;');\n\ts = s.replace(/\\uE8/g, '&egrave;');\n\ts = s.replace(/\\uE9/g, '&eacute;');\n\ts = s.replace(/\\uEA/g, '&ecirc;');\n\ts = s.replace(/\\uEB/g, '&euml;');\n\ts = s.replace(/\\uEC/g, '&igrave;');\n\ts = s.replace(/\\uED/g, '&iacute;');\n\ts = s.replace(/\\uEE/g, '&icirc;');\n\ts = s.replace(/\\uEF/g, '&iuml;');\n\ts = s.replace(/\\uF0/g, '&eth;');\n\ts = s.replace(/\\uF1/g, '&ntilde;');\n\ts = s.replace(/\\uF2/g, '&ograve;');\n\ts = s.replace(/\\uF3/g, '&oacute;');\n\ts = s.replace(/\\uF4/g, '&ocirc;');\n\ts = s.replace(/\\uF5/g, '&otilde;');\n\ts = s.replace(/\\uF6/g, '&ouml;');\n\ts = s.replace(/\\uF7/g, '&divide;');\n\ts = s.replace(/\\uF8/g, '&oslash;');\n\ts = s.replace(/\\uF9/g, '&ugrave;');\n\ts = s.replace(/\\uFA/g, '&uacute;');\n\ts = s.replace(/\\uFB/g, '&ucirc;');\n\ts = s.replace(/\\uFC/g, '&uuml;');\n\ts = s.replace(/\\uFD/g, '&yacute;');\n\ts = s.replace(/\\uFE/g, '&thorn;');\n\ts = s.replace(/\\uFF/g, '&yuml;');\n\ts = s.replace(/\\u192/g, '&fnof;');\n\ts = s.replace(/\\u391/g, '&Alpha;');\n\ts = s.replace(/\\u392/g, '&Beta;');\n\ts = s.replace(/\\u393/g, '&Gamma;');\n\ts = s.replace(/\\u394/g, '&Delta;');\n\ts = s.replace(/\\u395/g, '&Epsilon;');\n\ts = s.replace(/\\u396/g, '&Zeta;');\n\ts = s.replace(/\\u397/g, '&Eta;');\n\ts = s.replace(/\\u398/g, '&Theta;');\n\ts = s.replace(/\\u399/g, '&Iota;');\n\ts = s.replace(/\\u39A/g, '&Kappa;');\n\ts = s.replace(/\\u39B/g, '&Lambda;');\n\ts = s.replace(/\\u39C/g, '&Mu;');\n\ts = s.replace(/\\u39D/g, '&Nu;');\n\ts = s.replace(/\\u39E/g, '&Xi;');\n\ts = s.replace(/\\u39F/g, '&Omicron;');\n\ts = s.replace(/\\u3A0/g, '&Pi;');\n\ts = s.replace(/\\u3A1/g, '&Rho;');\n\ts = s.replace(/\\u3A3/g, '&Sigma;');\n\ts = s.replace(/\\u3A4/g, '&Tau;');\n\ts = s.replace(/\\u3A5/g, '&Upsilon;');\n\ts = s.replace(/\\u3A6/g, '&Phi;');\n\ts = s.replace(/\\u3A7/g, '&Chi;');\n\ts = s.replace(/\\u3A8/g, '&Psi;');\n\ts = s.replace(/\\u3A9/g, '&Omega;');\n\ts = s.replace(/\\u3B1/g, '&alpha;');\n\ts = s.replace(/\\u3B2/g, '&beta;');\n\ts = s.replace(/\\u3B3/g, '&gamma;');\n\ts = s.replace(/\\u3B4/g, '&delta;');\n\ts = s.replace(/\\u3B5/g, '&epsilon;');\n\ts = s.replace(/\\u3B6/g, '&zeta;');\n\ts = s.replace(/\\u3B7/g, '&eta;');\n\ts = s.replace(/\\u3B8/g, '&theta;');\n\ts = s.replace(/\\u3B9/g, '&iota;');\n\ts = s.replace(/\\u3BA/g, '&kappa;');\n\ts = s.replace(/\\u3BB/g, '&lambda;');\n\ts = s.replace(/\\u3BC/g, '&mu;');\n\ts = s.replace(/\\u3BD/g, '&nu;');\n\ts = s.replace(/\\u3BE/g, '&xi;');\n\ts = s.replace(/\\u3BF/g, '&omicron;');\n\ts = s.replace(/\\u3C0/g, '&pi;');\n\ts = s.replace(/\\u3C1/g, '&rho;');\n\ts = s.replace(/\\u3C2/g, '&sigmaf;');\n\ts = s.replace(/\\u3C3/g, '&sigma;');\n\ts = s.replace(/\\u3C4/g, '&tau;');\n\ts = s.replace(/\\u3C5/g, '&upsilon;');\n\ts = s.replace(/\\u3C6/g, '&phi;');\n\ts = s.replace(/\\u3C7/g, '&chi;');\n\ts = s.replace(/\\u3C8/g, '&psi;');\n\ts = s.replace(/\\u3C9/g, '&omega;');\n\ts = s.replace(/\\u3D1/g, '&thetasym;');\n\ts = s.replace(/\\u3D2/g, '&upsih;');\n\ts = s.replace(/\\u3D6/g, '&piv;');\n\ts = s.replace(/\\u2022/g, '&bull;');\n\ts = s.replace(/\\u2026/g, '&hellip;');\n\ts = s.replace(/\\u2032/g, '&prime;');\n\ts = s.replace(/\\u2033/g, '&Prime;');\n\ts = s.replace(/\\u203E/g, '&oline;');\n\ts = s.replace(/\\u2044/g, '&frasl;');\n\ts = s.replace(/\\u2118/g, '&weierp;');\n\ts = s.replace(/\\u2111/g, '&image;');\n\ts = s.replace(/\\u211C/g, '&real;');\n\ts = s.replace(/\\u2122/g, '&trade;');\n\ts = s.replace(/\\u2135/g, '&alefsym;');\n\ts = s.replace(/\\u2190/g, '&larr;');\n\ts = s.replace(/\\u2191/g, '&uarr;');\n\ts = s.replace(/\\u2192/g, '&rarr;');\n\ts = s.replace(/\\u2193/g, '&darr;');\n\ts = s.replace(/\\u2194/g, '&harr;');\n\ts = s.replace(/\\u21B5/g, '&crarr;');\n\ts = s.replace(/\\u21D0/g, '&lArr;');\n\ts = s.replace(/\\u21D1/g, '&uArr;');\n\ts = s.replace(/\\u21D2/g, '&rArr;');\n\ts = s.replace(/\\u21D3/g, '&dArr;');\n\ts = s.replace(/\\u21D4/g, '&hArr;');\n\ts = s.replace(/\\u2200/g, '&forall;');\n\ts = s.replace(/\\u2202/g, '&part;');\n\ts = s.replace(/\\u2203/g, '&exist;');\n\ts = s.replace(/\\u2205/g, '&empty;');\n\ts = s.replace(/\\u2207/g, '&nabla;');\n\ts = s.replace(/\\u2208/g, '&isin;');\n\ts = s.replace(/\\u2209/g, '&notin;');\n\ts = s.replace(/\\u220B/g, '&ni;');\n\ts = s.replace(/\\u220F/g, '&prod;');\n\ts = s.replace(/\\u2211/g, '&sum;');\n\ts = s.replace(/\\u2212/g, '&minus;');\n\ts = s.replace(/\\u2217/g, '&lowast;');\n\ts = s.replace(/\\u221A/g, '&radic;');\n\ts = s.replace(/\\u221D/g, '&prop;');\n\ts = s.replace(/\\u221E/g, '&infin;');\n\ts = s.replace(/\\u2220/g, '&ang;');\n\ts = s.replace(/\\u2227/g, '&and;');\n\ts = s.replace(/\\u2228/g, '&or;');\n\ts = s.replace(/\\u2229/g, '&cap;');\n\ts = s.replace(/\\u222A/g, '&cup;');\n\ts = s.replace(/\\u222B/g, '&int;');\n\ts = s.replace(/\\u2234/g, '&there4;');\n\ts = s.replace(/\\u223C/g, '&sim;');\n\ts = s.replace(/\\u2245/g, '&cong;');\n\ts = s.replace(/\\u2248/g, '&asymp;');\n\ts = s.replace(/\\u2260/g, '&ne;');\n\ts = s.replace(/\\u2261/g, '&equiv;');\n\ts = s.replace(/\\u2264/g, '&le;');\n\ts = s.replace(/\\u2265/g, '&ge;');\n\ts = s.replace(/\\u2282/g, '&sub;');\n\ts = s.replace(/\\u2283/g, '&sup;');\n\ts = s.replace(/\\u2284/g, '&nsub;');\n\ts = s.replace(/\\u2286/g, '&sube;');\n\ts = s.replace(/\\u2287/g, '&supe;');\n\ts = s.replace(/\\u2295/g, '&oplus;');\n\ts = s.replace(/\\u2297/g, '&otimes;');\n\ts = s.replace(/\\u22A5/g, '&perp;');\n\ts = s.replace(/\\u22C5/g, '&sdot;');\n\ts = s.replace(/\\u2308/g, '&lceil;');\n\ts = s.replace(/\\u2309/g, '&rceil;');\n\ts = s.replace(/\\u230A/g, '&lfloor;');\n\ts = s.replace(/\\u230B/g, '&rfloor;');\n\ts = s.replace(/\\u2329/g, '&lang;');\n\ts = s.replace(/\\u232A/g, '&rang;');\n\ts = s.replace(/\\u25CA/g, '&loz;');\n\ts = s.replace(/\\u2660/g, '&spades;');\n\ts = s.replace(/\\u2663/g, '&clubs;');\n\ts = s.replace(/\\u2665/g, '&hearts;');\n\ts = s.replace(/\\u2666/g, '&diams;');\n\ts = s.replace(/\\u152/g, '&OElig;');\n\ts = s.replace(/\\u153/g, '&oelig;');\n\ts = s.replace(/\\u160/g, '&Scaron;');\n\ts = s.replace(/\\u161/g, '&scaron;');\n\ts = s.replace(/\\u178/g, '&Yuml;');\n\ts = s.replace(/\\u2C6/g, '&circ;');\n\ts = s.replace(/\\u2DC/g, '&tilde;');\n\ts = s.replace(/\\u2002/g, '&ensp;');\n\ts = s.replace(/\\u2003/g, '&emsp;');\n\ts = s.replace(/\\u2009/g, '&thinsp;');\n\t// Blanking these four because they screw things up:\n\ts = s.replace(/\\u200C/g, ' ');\n\ts = s.replace(/\\u200D/g, ' ');\n\ts = s.replace(/\\u200E/g, ' ');\n\ts = s.replace(/\\u200F/g, ' ');\n\ts = s.replace(/\\u2020/g, '&dagger;');\n\ts = s.replace(/\\u2021/g, '&Dagger;');\n\ts = s.replace(/\\u2030/g, '&permil;');\n\ts = s.replace(/\\u2039/g, '&lsaquo;');\n\ts = s.replace(/\\u203A/g, '&rsaquo;');\n\ts = s.replace(/\\u20AC/g, '&euro;');\n\t\n\n\treplacements = [\n\n//\t[//g, ''], \n\n\t// Cyrillic quotes\n//\t[/(\\s+|^)\"([^\"]+?)\"(\\s+|$|\\.|\\,)/g, '$1\\u00ab$2\\u00bb$3'],\n\n\t// Latin quotes: \"test\" become smart quotes\n\t[/(\\s+|^)\"([^\\\"]+?)\"(\\s+|$|\\.|\\,)/g, '$1&ldquo;$2&rdquo;$3'],\n\t[/(\\s+|^)'([^\\']+?)'(\\s+|$|\\.|\\,)/g, '$1&lsquo;$2&rsquo;$3'],\n\n\t// Trademark: (TM)\n\t[/\\((tm|TM|\\u0422\\u041C|\\u0442\\u043C)\\)/g, '&trade;'],\n\n\t// Copyright: (C)\n\t[/\\([cC\\u0421\\u0441]\\)/g, '&copy;'],\n\n\t// Registered: (R)\n\t[/\\([rR\\u0420\\u0440]\\)/g, '&reg;'],\n\t\n\t// Hearts, of course! <3\n\t[/(\\s)(<3)(\\s)/g, '$1\\&hearts;$3'],\n\t\n\t// Section symbol, by request: {SS}\n\t[/\\{SS\\}/g, '&sect;'], \n\n\t// Arrows ==> <-- <==> and so on\n\t[/([^<])-{2}>/g, '$1&rarr;'],\n\t[/<-{2}([^>])/g, '&larr;$1'],\n\t[/<-{1,2}>/g, '&harr;'],\n\t[/([^<])={2}>/g, '$1&rArr;'],\n\t[/<={2}([^>])/g, '&lArr;$1'],\n\t[/<={1,2}>/g, '&hArr;'],\n\n\t// Horizontal rules: ---- becomes <hr>\n\t[/\\n----+\\n/g, '<hr>'], \n\t\n\t// Degree sign: degC becomes &deg;C (K does not have a degree sign!)\n\t[/degC(\\s)/g, '&deg;C$1'], \n\t[/degF(\\s)/g, '&deg;F$1'], \t\n\t\n\t// TeX subs and supers: x squared: x^{2} carbon dioxide: CO_{2}\n\t[/\\^\\{(.*?)\\}/g, '<sup>$1</sup>'], \n\t[/_\\{(.*?)\\}/g, '<sub>$1</sub>'], \n\t\t\n\t// Scientific notation: 3.5E2 becomes 3.5&times;10<sup>2</sup>\n\t[/(\\d)E(\\d+)/g, '$1&times;10<sup>$2</sup>'], \n\t\n\t// Plus or minus sign +-5 becomes &plusmn;5\n\t[/\\+-(\\d)/g, '&plusmn;$1'], \n\n\t// Censorship is evil.\n//\t[/A(IM\\s*)\\:/gi, '&Acirc;$1:'],\n\n\t// These screw up your posts if you've got 'em (Myspace sucks). It converts to something similar looking. :-\\ Best I can do...\n//\t[/\\#/gi, '&Dagger;&Dagger;'],\n\t[/\\\\/gi, '&lfloor;'],\n\n\t// Em dash -- two minuses surrounded by spaces\n\t[/(\\s+|^)--(\\s+)/g, '$1\\u2014$2'],\n\n\t// **bold**\t\n\t[/\\*{2}(.+?)\\*{2}/g, '<b>$1</b>'],\n\n\t// '''Wikipedia strong emphasis''' (rendered as bold usually)\n\t[/\\'{3}(.+?)\\'{3}/g, '<strong>$1</strong>'],\n\n\t// //italic//\n\t[/([^\\:]|^)\\/{2}(.+?)\\/{2}/g, '$1<i>$2</i>'],\n\n\t// ''Wikipedia emphasis'' (rendered as italics usually)\n\t[/\\'{2}(.+?)\\'{2}/g, '<em>$1</em>'],\n\n\t// --strikethrough--\n\t[/-{2}(.+?)-{2}/g, '<s>$1</s>'],\n\n\t// __underlined__\n\t[/_{2}(.+?)_{2}/g, '<u>$1</u>'],\n\t\n\t// A few colors? [blue]text[/color] becomes <font color=\"0000BB\">text</font> (will also accept [bl]text[/bl] or whatever)\n\t[/\\[(bk|k|black)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t'<font color=\"black\">$2</font>'],\n\t[/\\[(n|navy)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"navy\">$2</font>'],\t\n\t[/\\[(gn|green)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"green\">$2</font>'],\n\t[/\\[(tl|teal)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"teal\">$2</font>'], // [t] would conflict with quote tags\n\t[/\\[(s|silver)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"silver\">$2</font>'],\t\n\t[/\\[(bl|be|bu|blue)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t'<font color=\"blue\">$2</font>'],\t\n\t[/\\[(l|lime)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"lime\">$2</font>'],\t\n\t[/\\[(a|aq|aqua|c|cy|cyan)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t'<font color=\"aqua\">$2</font>'],\t\n\t[/\\[(m|maroon)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"maroon\">$2</font>'],\n\t[/\\[(p|purple|v|violet)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t'<font color=\"purple\">$2</font>'],\t\n\t[/\\[(o|olive)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t'<font color=\"olive\">$2</font>'],\n\t[/\\[(gy|gray|grey)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t'<font color=\"gray\">$2</font>'],\n\t[/\\[(r|red)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t\t\t'<font color=\"red\">$2</font>'],\t\n\t[/\\[(f|fuschia|magenta)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t'<font color=\"fuschia\">$2</font>'],\t\n\t[/\\[(y|yw|yellow)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t'<font color=\"yellow\">$2</font>'],\t\n\t[/\\[(w|wh|white)\\]([\\s\\S]*?)\\[\\/(\\1|c|color)?\\]/gim,\t\t\t'<font color=\"white\">$2</font>'],\t\n\t\n\t// En dash for number ranges: 1995-2005\n\t[/(\\d+)-(\\d+)/g, '$1\\u2013$2'],\n\n\t// Ellipsis\n//\t[/\\.\\.\\./g, '\\u2026'],\n\n\t// [quote] tags [/quote] (or [q] or [Q] or [t] or whatever)\n\t// First replace the SomeoneWrote: bit with legend tags\n\t[/\\[(quote|q|t)\\](\\s*\\n?)([^\\n]*)Wrote:(\\s*\\n)([\\s\\S]*?)\\[\\/(quote|q|t)\\]/gim, '[$1]<legend>$3 wrote:</legend>$5[/$6]'],\n\t// Then replace the rest with fieldset tags \n\t[/\\[(quote|q|t)\\]([\\s\\S]*?)\\[\\/(quote|q|t)\\]/gim, '<fieldset style=\"border: 1px solid; border-color: aaaaaa; padding: 1em; margin: 1em 2em;\">$2</fieldset>'],\n\t// (This way it can handle nested quotes and optional \"Wrote:\" sections.)\n\n\t// Old version of quotes based directly on Myspace's quote markup:\t\n//\t[/\\[(quote|q|t)\\]([\\s\\S]*?)\\[\\/(quote|q|t)\\]/gim, '<table align=\"center\" bgcolor=\"cccccc\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"90%\"><tbody><tr><td><table bgcolor=\"ffffff\" border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"100%\"><tbody><tr><td><p>$2</p></td></tr></tbody></table></td></tr></tbody></table>'],\n\n\t// Image shortcut IMG=http://www.url.com/image.png surrounded by whitespace.\n\t[/(\\s)IMG=(\\S*?)([\\s\\]])/gi, '$1<img src=\"$2\">$3'],\n\t\n\t// Named URLs in wikipedia format [http://address linked text]\n\t[/\\[http:([^ \\t\\v\\f\\n\\r\\]]*?)\\s+(\\S.*?)\\]/gi, '<a href=\"http:$1\">$2</a>'],\n\t\n\t// Myspace URLs [my:Firefox] or [myspace:Firefox] becomes http://www.myspace.com/Firefox\n\t[/\\[(my|myspace):(\\S.*?)\\]/gi, '<a href=\"http://www.myspace.com/$2\">Myspace: $2</a>'],\n\t\n\t// Myspace group URLs [gr:toolbar] or [group:toolbar] becomes http://groups.myspace.com/toolbar\n\t[/\\[(gr|group):(\\S.*?)\\]/gi, '<a href=\"http://groups.myspace.com/$2\">Myspace group: $2</a>'],\n\n\t// Auto-link naked URLs\n\t[/(\\s)http(s)*:(\\S*?)(\\s)/gi, '$1<a href=\"http$2:$3\">http$2:$3</a>$4'],\n\t\n\t// Links to wikipedia articles [[linked text]] (useful in fights)\n\t[/\\[\\[([\\s\\S]+?)\\]\\]/gi, '<a href=\"http://en.wikipedia.org/wiki/$1\">$1</a>']\n\n\t];\n\n\t// Runs through itself over and over until nothing changes, to handle nested quote tags and the like. \n\t// Uses \"for\" instead of \"while\" to prevent infinite loops from poorly written regexps. ;-)\n\tfor( j=0; j<=100; j++) {\n\t\tolds = s;\n\t\tfor( i=0; i < replacements.length; i++) {\n\t\t\ts = s.replace(replacements[i][0], replacements[i][1]);\n\t\t}\n\t\tif(olds == s) {break};\n\t}\n\t\n\treturn s\n}", "function helpFor(format){\n switch (format){\n\n case 'hex':\n return '000, #000, 000000<br> or #000000';\n\n case 'rgb':\n return 'rgb(255, 255, 255), rgba(255, 255, 255, 1)<br> or 255, 145, 124';\n\n case 'hsl':\n return 'hsl(0, 0%, 100%), hsla(0, 0%, 100%, 1)<br> or 0, 85%, 50%';\n\n case 'hwb':\n return 'hwb(0, 0%, 100%) or 0, 85%, 50%';\n\n case 'css':\n return 'yellow, blue, red';\n }\n }", "function lt(e,t,a,r,f,o,i){if(t){var s,c=e.splitSpaces?dt(t,e.trailingSpace):t,u=e.cm.state.specialChars,l=!1;if(u.test(t)){s=document.createDocumentFragment();for(var d=0;;){u.lastIndex=d;var _=u.exec(t),p=_?_.index-d:t.length-d;if(p){var g=document.createTextNode(c.slice(d,d+p));vo&&wo<9?s.appendChild(n(\"span\",[g])):s.appendChild(g),e.map.push(e.pos,e.pos+p,g),e.col+=p,e.pos+=p}if(!_)break;d+=p+1;var h=void 0;if(\"\\t\"==_[0]){var b=e.cm.options.tabSize,y=b-e.col%b;h=s.appendChild(n(\"span\",m(y),\"cm-tab\")),h.setAttribute(\"role\",\"presentation\"),h.setAttribute(\"cm-text\",\"\\t\"),e.col+=y}else\"\\r\"==_[0]||\"\\n\"==_[0]?(h=s.appendChild(n(\"span\",\"\\r\"==_[0]?\"鈵�\":\"鈵�\",\"cm-invalidchar\")),h.setAttribute(\"cm-text\",_[0]),e.col+=1):(h=e.cm.options.specialCharPlaceholder(_[0]),h.setAttribute(\"cm-text\",_[0]),vo&&wo<9?s.appendChild(n(\"span\",[h])):s.appendChild(h),e.col+=1);e.map.push(e.pos,e.pos+1,h),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),vo&&wo<9&&(l=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),a||r||f||l||i){var v=a||\"\";r&&(v+=r),f&&(v+=f);var w=n(\"span\",[s],v,i);return o&&(w.title=o),e.content.appendChild(w)}e.content.appendChild(s)}}", "function markdownDescription(text) { }", "function HTMLFormat(line){\r\n var openTag, closeTag, content;\r\n if(line[0] === '@'){\r\n openTag = '<h4>';\r\n closeTag = '</h4>';\r\n content = line.charAt(1).toUpperCase() + line.slice(2);\r\n }else if(line[0] === '*'){\r\n openTag = '<b>';\r\n closeTag = '</b>';\r\n content = line.charAt(3).toUpperCase() + line.slice(4);\r\n }else if(line[0] === '-'){\r\n openTag = '<li>';\r\n closeTag = '</li>';\r\n content = line.slice(1);\r\n }else {\r\n openTag = '<li>';\r\n closeTag = '</li>';\r\n content = line;\r\n }\r\n return openTag + content + closeTag;\r\n}", "function OLcontentSimple(text){\r\nvar txt=\r\n'<table'+(o3_wrap?'':' width=\"'+o3_width+'\"')+o3_height+' border=\"0\" cellpadding=\"'+o3_border\r\n+'\" cellspacing=\"0\"'+(o3_bgclass?' class=\"'+o3_bgclass+'\"':o3_bgcolor+o3_bgbackground)\r\n+'><tr><td><table width=\"100%\"'+o3_height+' border=\"0\" cellpadding=\"'+o3_textpadding\r\n+'\" cellspacing=\"0\"'+(o3_fgclass?' class=\"'+o3_fgclass+'\"':o3_fgcolor+o3_fgbackground)\r\n+'><tr><td valign=\"top\"'+(o3_fgclass?' class=\"'+o3_fgclass+'\"':'')+'>'\r\n+OLlgfUtil(0,o3_textfontclass,'div',o3_textcolor,o3_textfont,o3_textsize)+text\r\n+OLlgfUtil(1,'','div')+'</td></tr></table>'+((o3_base>0&&!o3_wrap)?\r\n('<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"'+o3_base\r\n+'\"></td></tr></table>'):'')+'</td></tr></table>';\r\nOLsetBackground('');\r\nreturn txt;\r\n}", "function format(text) {\n return text.replace(/ /g,'').replace(/(<([^>]+)>)/ig, '').toLowerCase();\n }", "function copySelectedPureText() {\n commonLookup.getUserTltSetting().then((tlt) => {\n let txt = getSelectedText();\n if (tlt.userTltSetting.puretextFormat.delAroundSpace === true) {\n txt = txt.replace(new RegExp(/^\\s*|\\s*$/,\"gu\"), \"\");\n }\n if (tlt.userTltSetting.puretextFormat.delInvisibleSpace === true) {\n txt = txt.replace(new RegExp(/[\\r\\f\\v]/,\"gu\"), \"\");\n }\n if (tlt.userTltSetting.puretextFormat.convertQuotation === true) {\n txt = txt.replace(new RegExp(/[“”〝〞„〃]/,\"gu\"), '\"');\n }\n if (tlt.userTltSetting.puretextFormat.convertApostrophe === true) {\n txt = txt.replace(new RegExp(/[‵′‘’]/,\"gu\"), \"'\");\n }\n if (tlt.userTltSetting.puretextFormat.convertDash === true) {\n txt = txt.replace(new RegExp(/[╴-─‒–—―]/,\"gu\"), \"-\");\n }\n if (tlt.userTltSetting.puretextFormat.convertSpace === true) {\n txt = txt.replace(new RegExp(/[ ]/,\"gu\"), \" \");\n }\n if (tlt.userTltSetting.puretextFormat.mergeNewline === true) {\n txt = txt.replace(new RegExp(/[\\r]+/,\"gu\"), \"\").replace(new RegExp(/\\s*\\n\\s*\\n\\s*/,\"g\"), \"\\n\");\n }\n if (tlt.userTltSetting.puretextFormat.mergeSpace === true) {\n txt = txt.replace(new RegExp(/[ ]+/,\"gu\"), \" \");\n }\n if (tlt.userTltSetting.puretextFormat.mergeFullwidthSpace === true) {\n txt = txt.replace(new RegExp(/[ ]+/,\"gu\"), \" \");\n }\n if (tlt.userTltSetting.puretextFormat.mergeTabulation === true) {\n txt = txt.replace(new RegExp(/[\\t]+/,\"gu\"), \"\\t\");\n }\n if (tlt.userTltSetting.puretextFormat.mergeAllTypeSpace === true) {\n txt = txt.replace(new RegExp(/[\\r\\f\\v]/,\"gu\"), \"\").replace(new RegExp(/[  \\t]+/,\"gu\"), \" \");\n }\n copyToClipboard(txt);\n });\n}", "function ol_content_simple(text) {\r\n\tvar cpIsMultiple = /,/.test(o3_cellpad);\r\n\tvar txt = '<table width=\"'+o3_width+ '\" border=\"0\" cellpadding=\"'+o3_border+'\" cellspacing=\"0\" '+(o3_bgclass ? 'class=\"'+o3_bgclass+'\"' : o3_bgcolor+' '+o3_height)+'><tr><td><table width=\"100%\" border=\"0\" '+((olNs4||!cpIsMultiple) ? 'cellpadding=\"'+o3_cellpad+'\" ' : '')+'cellspacing=\"0\" '+(o3_fgclass ? 'class=\"'+o3_fgclass+'\"' : o3_fgcolor+' '+o3_fgbackground+' '+o3_height)+'><tr><td valign=\"TOP\"'+(o3_textfontclass ? ' class=\"'+o3_textfontclass+'\">' : ((!olNs4&&cpIsMultiple) ? ' style=\"'+setCellPadStr(o3_cellpad)+'\">' : '>'))+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+'</td></tr></table></td></tr></table>';\r\n\r\n\tset_background(\"\");\r\n\treturn txt;\r\n}", "static format (stringDefinition = '') {\n // Test to \n\n let combinatorLiteralFormat = /(\\|\\||\\||&&|\\[|\\]|,(?=[^{}]*(?:{|$))|\\/|<[^>]*>)/g\n let multiplyerFormat = /\\s*(\\*|\\+|\\?|\\{[^\\}]*\\}|\\#|\\!)/g;\n return stringDefinition.replace(combinatorLiteralFormat, ' $1 ')\n .replace(multiplyerFormat, '$1 ').replace(/\\s+/g, ' ').trim();\n }", "function joinText() {\n utilitymanager_1.um.utilityManager({\n utilType: utilitymanager_1.um.TIXUtilityType.utInTransform,\n sp: utilitymanager_1.um.TIXSelPolicy.All,\n pat: /\\n/g,\n repl: '',\n });\n }", "function li(t) {\n return t + \"\u0001\u0001\";\n}", "get txt() {\n return [['← Back', `To Q. ${this.page - 1} of 3`], [`On Q. ${this.page} of 3`, 'Next →']]; }", "function format_html_output() {\r\n var text = String(this);\r\n text = text.tidy_xhtml();\r\n\r\n if (Prototype.Browser.WebKit) {\r\n text = text.replace(/(<div>)+/g, \"\\n\");\r\n text = text.replace(/(<\\/div>)+/g, \"\");\r\n\r\n text = text.replace(/<p>\\s*<\\/p>/g, \"\");\r\n\r\n text = text.replace(/<br \\/>(\\n)*/g, \"\\n\");\r\n } else if (Prototype.Browser.Gecko) {\r\n text = text.replace(/<p>/g, \"\");\r\n text = text.replace(/<\\/p>(\\n)?/g, \"\\n\");\r\n\r\n text = text.replace(/<br \\/>(\\n)*/g, \"\\n\");\r\n } else if (Prototype.Browser.IE || Prototype.Browser.Opera) {\r\n text = text.replace(/<p>(&nbsp;|&#160;|\\s)<\\/p>/g, \"<p></p>\");\r\n\r\n text = text.replace(/<br \\/>/g, \"\");\r\n\r\n text = text.replace(/<p>/g, '');\r\n\r\n text = text.replace(/&nbsp;/g, '');\r\n\r\n text = text.replace(/<\\/p>(\\n)?/g, \"\\n\");\r\n\r\n text = text.gsub(/^<p>/, '');\r\n text = text.gsub(/<\\/p>$/, '');\r\n }\r\n\r\n text = text.gsub(/<b>/, \"<strong>\");\r\n text = text.gsub(/<\\/b>/, \"</strong>\");\r\n\r\n text = text.gsub(/<i>/, \"<em>\");\r\n text = text.gsub(/<\\/i>/, \"</em>\");\r\n\r\n text = text.replace(/\\n\\n+/g, \"</p>\\n\\n<p>\");\r\n\r\n text = text.gsub(/(([^\\n])(\\n))(?=([^\\n]))/, \"#{2}<br />\\n\");\r\n\r\n text = '<p>' + text + '</p>';\r\n\r\n text = text.replace(/<p>\\s*/g, \"<p>\");\r\n text = text.replace(/\\s*<\\/p>/g, \"</p>\");\r\n\r\n var element = Element(\"body\");\r\n element.innerHTML = text;\r\n\r\n if (Prototype.Browser.WebKit || Prototype.Browser.Gecko) {\r\n var replaced;\r\n do {\r\n replaced = false;\r\n element.select('span').each(function(span) {\r\n if (span.hasClassName('Apple-style-span')) {\r\n span.removeClassName('Apple-style-span');\r\n if (span.className == '')\r\n span.removeAttribute('class');\r\n replaced = true;\r\n } else if (span.getStyle('fontWeight') == 'bold') {\r\n span.setStyle({fontWeight: ''});\r\n if (span.style.length == 0)\r\n span.removeAttribute('style');\r\n span.update('<strong>' + span.innerHTML + '</strong>');\r\n replaced = true;\r\n } else if (span.getStyle('fontStyle') == 'italic') {\r\n span.setStyle({fontStyle: ''});\r\n if (span.style.length == 0)\r\n span.removeAttribute('style');\r\n span.update('<em>' + span.innerHTML + '</em>');\r\n replaced = true;\r\n } else if (span.getStyle('textDecoration') == 'underline') {\r\n span.setStyle({textDecoration: ''});\r\n if (span.style.length == 0)\r\n span.removeAttribute('style');\r\n span.update('<u>' + span.innerHTML + '</u>');\r\n replaced = true;\r\n } else if (span.attributes.length == 0) {\r\n span.replace(span.innerHTML);\r\n replaced = true;\r\n }\r\n });\r\n } while (replaced);\r\n\r\n }\r\n\r\n for (var i = 0; i < element.descendants().length; i++) {\r\n var node = element.descendants()[i];\r\n if (node.innerHTML.blank() && node.nodeName != 'BR' && node.id != 'bookmark')\r\n node.remove();\r\n }\r\n\r\n text = element.innerHTML;\r\n text = text.tidy_xhtml();\r\n\r\n text = text.replace(/<br \\/>(\\n)*/g, \"<br />\\n\");\r\n text = text.replace(/<\\/p>\\n<p>/g, \"</p>\\n\\n<p>\");\r\n\r\n text = text.replace(/<p>\\s*<\\/p>/g, \"\");\r\n\r\n text = text.replace(/\\s*$/g, \"\");\r\n\r\n return text;\r\n }", "function backWordFormat(itok,tokArray) {\n\t//alert('backWordFormat '+tokArray[itok][0]);\n\tvar tmp;\n\tswitch(tokArray[itok][0]) {\n\t case 'sqrt': // tok0 tok1\n\t\tmmlString = mmlString + \"<msqrt>\";\n\t\ttokEx(tokArray.slice(1,2));\n\t\tmmlString = mmlString + \"</msqrt>\";\n\t\treturn tokArray.slice(2);\n\t\tbreak;\n\t case 'root': // \\root tok1 \\of tok3, check that \\of is really there\n\t\tmmlString = mmlString + \"<mroot>\";\n\t\ttokEx(tokArray.slice(3,4));\n\t\ttokEx(tokArray.slice(1,2));\n\t\tmmlString = mmlString + \"</mroot>\";\n\t\treturn tokArray.slice(4);\n\t\tbreak;\n\t case 'of': // this should be handled in conjunction with \\root\n\t\treturn;\n\t\tbreak;\n\t case 'underline': // \\underline tok1, this isn't quite right but I can't get the plain underline\n\t\tmmlString = mmlString + \"<munder accent=\\\"true\\\">\";\n\t\ttokEx(tokArray.slice(1,2));\n\t\tmmlString = mmlString + \"<mo stretchy=\\\"true\\\">&#x023b4;</mo></munder>\";\n\t\treturn tokArray.slice(2);\n\t\tbreak;\n\t case 'overline':\n\t\treturn;\n\t\tbreak;\n\t case 'underbrace': // \\underbrace tok1, &UnderBrace; should give &#x0fe38;\n\t\tmmlString = mmlString + \"<munder accent=\\\"true\\\">\";\n\t\ttokEx(tokArray.slice(1,2));\n\t\tmmlString = mmlString + \"<mo>&#x0fe38;</mo></munder>\";\n\t\treturn tokArray.slice(2);\n\t\tbreak;\n\t case 'over': // tok0 tok1 ... tok(n-1) \\over tok(n+1) ... tokN\n\t\tmmlString = mmlString + \"<mfrac>\";\n\t\ttokEx(tokArray.slice(0,itok));\n\t\ttokEx(tokArray.slice(itok+1));\n\t\tmmlString = mmlString + \"</mfrac>\";\n\t\treturn tokArray.slice(tokArray.length + 1);\n\t\tbreak;\n\t case 'frac': // \\frac tok1 tok2\n\t\tmmlString = mmlString + \"<mfrac>\";\n\t\ttokEx(tokArray.slice(0,itok));\n\t\ttokEx(tokArray.slice(itok+1));\n\t\tmmlString = mmlString + \"</mfrac>\";\n\t\treturn tokArray.slice(tokArray.length + 1);\n\t\tbreak;\n\t case 'matrix': // e.g. \\matrix {x11 \\\\amp x12 \\\\amp x13 \\cr x21 \\\\amp x22 \\\\amp x23 \\cr x31 \\\\amp x32 \\\\amp x33 \\cr}\n\t\t// last \\cr is optional\n\t\tmmlString = mmlString + \"<mtable>\";\n\t\t// peel off first and last brace\n\t\tvar tmpString = tokArray[itok+1][0].slice(1,tokArray[itok+1][0].length-1);\n\t\tvar tmpArray = tmpString.split('\\\\cr');\n\t\t// discard last element if empty string, corresponding to trailing \\cr\n\t\tif ( tmpArray[tmpArray.length-1] == \"\" ) tmpArray = tmpArray.slice(0,tmpArray.length-1);\n\t\tfor ( var row = 0; row < tmpArray.length; row++ ) {\n\t\t mmlString = mmlString + \"<mtr>\";\n\t\t var eltArray = tmpArray[row].split('\\\\amp');\n\t\t for ( var elt = 0; elt < eltArray.length; elt++) {\n\t\t\tmmlString = mmlString + \"<mtd>\";\n\t\t\tstringFormat(eltArray[elt]);\n\t\t\tmmlString = mmlString + \"</mtd>\";\n\t\t }\n\t\t mmlString = mmlString + \"</mtr>\";\n\t\t}\n\t\tmmlString = mmlString + \"</mtable>\";\n\t\treturn tokArray.slice(2);\n\t\tbreak;\n\t case 'sum':\n\t\tmmlString = mmlString + \"<mo>&#x02211;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'prod':\n\t\tmmlString = mmlString + \"<mo>&#x0220f;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'int':\n\t\tmmlString = mmlString + \"<mo>&#x0222b;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'prime':\n\t\tmmlString = mmlString + \"<mo>&#x02032;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'aleph':\n\t\tmmlString = mmlString + \"<mi>&#x02135;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'hbar':\n\t\tmmlString = mmlString + \"<mi>&#x0210f;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'imath':\n\t\tmmlString = mmlString + \"<mi>imath</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'jmath':\n\t\tmmlString = mmlString + \"<mi>jmath</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'ell':\n\t\tmmlString = mmlString + \"<mi>&#x02113</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Re':\n\t\tmmlString = mmlString + \"<mo>Re</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Im':\n\t\tmmlString = mmlString + \"<mo>Im</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'partial':\n\t\tmmlString = mmlString + \"<mo>&#x02202;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'infty':\n\t\tmmlString = mmlString + \"<mi>&#x0221e;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'emptyset':\n\t\tmmlString = mmlString + \"<mi>&#x02205;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'nabla':\n\t\tmmlString = mmlString + \"<mo>&#x02207;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'surd':\n\t\tmmlString = mmlString + \"<mo>&#x0221a;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'top':\n\t\tmmlString = mmlString + \"<mo>&#x022a4;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'bot':\n\t\tmmlString = mmlString + \"<mo>&#x022a5;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'angle':\n\t\tmmlString = mmlString + \"<mo>&#x02220;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'triangle':\n\t\tmmlString = mmlString + \"<mo>&#x025b3;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'backslash':\n\t\tmmlString = mmlString + \"<mo>&#x02216;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'forall':\n\t\tmmlString = mmlString + \"<mo>&#x02200;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'exists':\n\t\tmmlString = mmlString + \"<mo>&#x02203;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'neg':\n\t\tmmlString = mmlString + \"<mo>&#x000ac;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'wp':\n\t\tmmlString = mmlString + \"<mi>&#x02118;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'flat':\n\t\tmmlString = mmlString + \"<mo>&#x0266d;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'natural':\n\t\tmmlString = mmlString + \"<mo>&#x0266e;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'sharp':\n\t\tmmlString = mmlString + \"<mo>&#x0266f;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'clubsuit':\n\t\tmmlString = mmlString + \"<mi>&#x02663;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'diamondsuit':\n\t\tmmlString = mmlString + \"<mi>&#x02662;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'heartsuit':\n\t\tmmlString = mmlString + \"<mi>&#x02661;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'spadesuit':\n\t\tmmlString = mmlString + \"<mi>&#x02664;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case '':\n\t\tmmlString = mmlString + \"<mi>&#x;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case '':\n\t\tmmlString = mmlString + \"<mi>&#x;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case '':\n\t\tmmlString = mmlString + \"<mi>&#x;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'leq':\n\t\tmmlString = mmlString + \"<mo>&#x02264;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'geq':\n\t\tmmlString = mmlString + \"<mo>&#x02267;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'equiv':\n\t\tmmlString = mmlString + \"<mo>&#x02261;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'prec':\n\t\tmmlString = mmlString + \"<mo>&#x0227a;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'succ':\n\t\tmmlString = mmlString + \"<mo>&#x227b;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'sim':\n\t\tmmlString = mmlString + \"<mo>&#x0223c;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'preceq':\n\t\tmmlString = mmlString + \"<mo>&#x0227c;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'succeq':\n\t\tmmlString = mmlString + \"<mo>&#x0227d;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'simeq':\n\t\tmmlString = mmlString + \"<mo>&#x02243;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'll':\n\t\tmmlString = mmlString + \"<mo>&#x0226a;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'gg':\n\t\tmmlString = mmlString + \"<mo>&#x0226b;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'asymp':\n\t\tmmlString = mmlString + \"<mo>&#x0224d;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'subset':\n\t\tmmlString = mmlString + \"<mo>&#x02282;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'supset':\n\t\tmmlString = mmlString + \"<mo>&#x02283;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'approx':\n\t\tmmlString = mmlString + \"<mo>&#x02248;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'subseteq':\n\t\tmmlString = mmlString + \"<mo>&#x02286;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'supseteq':\n\t\tmmlString = mmlString + \"<mo>&#x02287;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'cong':\n\t\tmmlString = mmlString + \"<mo>&#x02245;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'sqsubseteq':\n\t\tmmlString = mmlString + \"<mo>&#x02291;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'sqsupseteq':\n\t\tmmlString = mmlString + \"<mo>&#x02292;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'sqsubset':\n\t\tmmlString = mmlString + \"<mo>&#x0228f;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'sqsupset':\n\t\tmmlString = mmlString + \"<mo>&#x02290;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'bowtie':\n\t\tmmlString = mmlString + \"<mo>&#x022c8;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'in':\n\t\tmmlString = mmlString + \"<mo>&#x02208;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'ni':\n\t\tmmlString = mmlString + \"<mo>&#x0220b;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'propto':\n\t\tmmlString = mmlString + \"<mo>&#x0221d;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'vdash':\n\t\tmmlString = mmlString + \"<mo>&#x022a2;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'dashv':\n\t\tmmlString = mmlString + \"<mo>&#x022a3;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'models':\n\t\tmmlString = mmlString + \"<mo>&#x022a8;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'smile':\n\t\tmmlString = mmlString + \"<mo>smile</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'frown':\n\t\tmmlString = mmlString + \"<mo>frown</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'mid':\n\t\tmmlString = mmlString + \"<mo>&#x02758;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'parallel':\n\t\tmmlString = mmlString + \"<mo>&#x02016;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'doteq':\n\t\tmmlString = mmlString + \"<mo>&#x02250;</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'perp':\n\t\tmmlString = mmlString + \"<mo>perp</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case '':\n\t\treturn;\n\t\tbreak;\n\t case 'cos':\n\t\tmmlString = mmlString + \"<mo>cos</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'sin':\n\t\tmmlString = mmlString + \"<mo>sin</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'tan':\n\t\tmmlString = mmlString + \"<mo>tan</mo>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'csc':\n\t\treturn ;\n\t\tbreak;\n\t case 'sec':\n\t\treturn ;\n\t\tbreak;\n\t case 'cot':\n\t\treturn ;\n\t\tbreak;\n\t case 'arccos':\n\t\treturn ;\n\t\tbreak;\n\t case 'arcsin':\n\t\treturn ;\n\t\tbreak;\n\t case 'arctan':\n\t\treturn ;\n\t\tbreak;\n\t case 'cosh':\n\t\treturn ;\n\t\tbreak;\n\t case 'sinh':\n\t\treturn ;\n\t\tbreak;\n\t case 'tanh':\n\t\treturn ;\n\t\tbreak;\n\t case 'coth':\n\t\treturn ;\n\t\tbreak;\n\t case 'exp':\n\t\treturn ;\n\t\tbreak;\n\t case 'log':\n\t\treturn ;\n\t\tbreak;\n\t case 'arg':\n\t\treturn ;\n\t\tbreak;\n\t case 'deg':\n\t\treturn ;\n\t\tbreak;\n\t case 'det':\n\t\treturn ;\n\t\tbreak;\n\t case 'dim':\n\t\treturn ;\n\t\tbreak;\n\t case 'gcd':\n\t\treturn ;\n\t\tbreak;\n\t case 'hom':\n\t\treturn ;\n\t\tbreak;\n\t case 'inf':\n\t\treturn ;\n\t\tbreak;\n\t case 'ker':\n\t\treturn ;\n\t\tbreak;\n\t case 'lg':\n\t\treturn ;\n\t\tbreak;\n\t case 'lim':\n\t\treturn ;\n\t\tbreak;\n\t case 'liminf':\n\t\treturn ;\n\t\tbreak;\n\t case 'limsup':\n\t\treturn ;\n\t\tbreak;\n\t case 'ln':\n\t\treturn ;\n\t\tbreak;\n\t case 'max':\n\t\treturn ;\n\t\tbreak;\n\t case 'min':\n\t\treturn ;\n\t\tbreak;\n\t case 'Pr':\n\t\treturn ;\n\t\tbreak;\n\t case 'sup':\n\t\treturn ;\n\t\tbreak;\n// Greek\n\t case 'Alpha':\n\t\tmmlString = mmlString + \"<mi>&#x;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'alpha':\n\t\tmmlString = mmlString + \"<mi>&#x003b1;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Beta':\n\t\treturn ;\n\t\tbreak;\n\t case 'beta':\n\t\tmmlString = mmlString + \"<mi>&#x003b2;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Gamma':\n\t\tmmlString = mmlString + \"<mi>&#x00393;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'gamma':\n\t\tmmlString = mmlString + \"<mi>&#x003b3;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Delta':\n\t\tmmlString = mmlString + \"<mi>&#x00394;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'delta':\n\t\tmmlString = mmlString + \"<mi>&#x003b4;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Epsilon':\n\t\treturn ;\n\t\tbreak;\n\t case 'epsilon':\n\t\tmmlString = mmlString + \"<mi>&#x003b5;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'varepsilon':\n\t\treturn;\n\t\tbreak;\n\t case 'Zeta':\n\t\treturn ;\n\t\tbreak;\n\t case 'zeta':\n\t\tmmlString = mmlString + \"<mi>&#x003b6;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Eta':\n\t\treturn ;\n\t\tbreak;\n\t case 'eta':\n\t\tmmlString = mmlString + \"<mi>&#x003b7;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Theta':\n\t\tmmlString = mmlString + \"<mi>&#x00398;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'theta':\n\t\tmmlString = mmlString + \"<mi>&#x003b8;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'vartheta':\n\t\treturn;\n\t\tbreak;\n\t case 'Iota':\n\t\treturn ;\n\t\tbreak;\n\t case 'iota':\n\t\tmmlString = mmlString + \"<mi>&#x003b9;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Kappa':\n\t\treturn ;\n\t\tbreak;\n\t case 'kappa':\n\t\tmmlString = mmlString + \"<mi>&#x003ba;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Lambda':\n\t\tmmlString = mmlString + \"<mi>&#x0039b;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'lambda':\n\t\tmmlString = mmlString + \"<mi>&#x003bb;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Mu':\n\t\treturn ;\n\t\tbreak;\n\t case 'mu':\n\t\tmmlString = mmlString + \"<mi>&#x003bc;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Nu':\n\t\treturn ;\n\t\tbreak;\n\t case 'nu':\n\t\tmmlString = mmlString + \"<mi>&#x003bd;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Xi':\n\t\tmmlString = mmlString + \"<mi>&#x0039e;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'xi':\n\t\tmmlString = mmlString + \"<mi>&#x003be;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Omicron':\n\t\treturn ;\n\t\tbreak;\n\t case 'omicron':\n\t\treturn ;\n\t\tbreak;\n\t case 'Pi':\n\t\tmmlString = mmlString + \"<mi>&#x003a0;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'pi':\n\t\tmmlString = mmlString + \"<mi>&#x003c0;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Rho':\n\t\treturn ;\n\t\tbreak;\n\t case 'rho':\n\t\tmmlString = mmlString + \"<mi>&#x003c1;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'varrho':\n\t\tmmlString = mmlString + \"<mi>&#x003f1;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Sigma':\n\t\tmmlString = mmlString + \"<mi>&#x003f3;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'sigma':\n\t\tmmlString = mmlString + \"<mi>&#x003c3;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Tau':\n\t\treturn ;\n\t\tbreak;\n\t case 'tau':\n\t\tmmlString = mmlString + \"<mi>&#x003c4;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Upsilon':\n\t\tmmlString = mmlString + \"<mi>&#x003a5;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'upsilon':\n\t\tmmlString = mmlString + \"<mi>&#x003c5;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Phi':\n\t\tmmlString = mmlString + \"<mi>&#x003a6;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'phi':\n\t\tmmlString = mmlString + \"<mi>&#x003c6;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'varphi':\n\t\tmmlString = mmlString + \"<mi>&#x003d5;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Chi':\n\t\treturn ;\n\t\tbreak;\n\t case 'chi':\n\t\tmmlString = mmlString + \"<mi>&#x003c7;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Psi':\n\t\tmmlString = mmlString + \"<mi>&#x003a8;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'psi':\n\t\tmmlString = mmlString + \"<mi>&#x003c8;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'Omega':\n\t\tmmlString = mmlString + \"<mi>&#x003a9;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case 'omega':\n\t\tmmlString = mmlString + \"<mi>&#x003c9;</mi>\";\n\t\treturn tokArray.slice(1);\n\t\tbreak;\n\t case '':\n\t\treturn ;\n\t\tbreak;\n\t case '':\n\t\treturn ;\n\t\tbreak;\n\t case '':\n\t\treturn ;\n\t\tbreak;\n\t case '':\n\t\treturn ;\n\t\tbreak;\n\t case '':\n\t\treturn ;\n\t\tbreak;\n\t case '':\n\t\treturn ;\n\t\tbreak;\n\t case '':\n\t\treturn ;\n\t\tbreak;\n\t case '':\n\t\treturn ;\n\t\tbreak;\n\t case '':\n\t\treturn ;\n\t\tbreak;\n\t}\n\tmmlString = mmlString + tmp;\n\treturn tokArray.slice(1);\n }", "async function printFontAlignVoiceSupport() {\n\n /**\n * 〈BR〉: line break (if there is a closing tag (e.g. 〈/C〉), it should be placed in front of the closing tag, two consecutive line breaks indicate adding a null string.\n * 〈L〉〈/L〉: left aligned\n * 〈C〉〈/C〉: center aligned\n * 〈R〉〈/R〉: right aligned\n * 〈N〉〈/C〉: normal font size\n * 〈HB〉〈/HB〉: double font in height\n * 〈WB〉〈/WB〉: double font in width\n * 〈B〉〈/B〉: double font in size\n * 〈CB〉〈/CB〉: double font in size centred\n * 〈HB2〉〈/HB2〉: three times the font in height\n * 〈WB2〉〈/WB2〉: three times the font in width\n * 〈B2〉〈/B2〉: three times the font in size\n * 〈BOLD〉〈/BOLD〉: bold font\n * 〈LOGO〉〈/LOGO〉: logo (the tag content is a character string in Base64 format, temporarily not opened)\n * 〈OR〉〈/QR〉: QR code (the tag content is a value of QR code, which cannot exceed 256 characters)\n * 〈BARCODE〉〈/BARCODE〉: barcode (the content is a value of barcode)\n * 〈CUT〉: cutter command (active paper cutting, only valid for cutter printer. Note: the print order of cutter printer has a cutter instruction by default in the end.)\n */\n\n\nlet printContent= `no element:default font<BR>\n<BR>\nL element: <L>left<BR></L>\n<BR>\nR element: <R>right<BR></R>\n<BR>\nC element: <C>center<BR></C>\n<BR>\nN element:<N>normal font size<BR></N>\n<BR>\nHB element: <HB>double font height<BR></HB>\n<BR>\nWB element: <WB>double font width<BR></WB>\n<BR>\nB element: <B>double font size<BR></B>\n<BR>\nHB2 element: <HB2>triple font height<BR></HB2>\n<BR>\nWB2 element: <WB2>triple font width<BR></WB2>\n<BR>\nB2 element: <B2>triple font size<BR></B2>\n<BR>\nBOLD element: <BOLD>bold font<BR></BOLD>`\n\n\n\n printContent=printContent + '<BR>';\n // neseted using font and align element\n printContent=printContent + '<C>nested use:<BOLD>center bold</BOLD><BR></C>';\n\n // print barcode and QR\n printContent=printContent+'<BR>';\n printContent=printContent+'<C><BARCODE>9884822189</BARCODE></C>';\n printContent=printContent+'<C><QR>https://www.xpyun.net</QR></C>';\n\n let request = new model.PrinterRequest();\n\trequest.user = USER_NAME;\n\trequest.userKey = USER_KEY;\n\n\t//*Required*: The serial number of the printer\n\trequest.sn = OK_PRINTER_SN;\n\trequest.generateSign();\n\n\t//*Required*: The content to be printed can’t exceed 12288 bytes.\n\trequest.content=printContent;\n\n\t//The number of printed copies is 1 by default.\n\trequest.copies=1;\n\n //Print mode:\n //If the value is 0 or not specified, it will check whether the printer is online. If not online, it will not generate a print order and directly return the status code of an offline device.\n //If online, it will generate a print order and return the print order number.If the value is 1, it will not check whether the printer is online, directly generate a print order and return the print order number.\n //If the printer is not online, the order will be cached in the print queue and will be printed automatically when the printer is normally online.\n request.mode=0;\n\n //payment method:\n //Value range 41~55:\n //Alipay 41, WeChat 42, Cloud Payment 43, UnionPay Swipe 44, UnionPay Payment 45, Member Card Consumption 46, Member Card Recharge 47, Yipay 48, Successful Collection 49, Jialian Payment 50, One Wallet 51, JD Pay 52, Quick money payment 53, Granville payment 54, Xiangqian payment 55\n //It is only used for Xinye cloud printers that support the amount broadcast.\n request.payType=41;\n\n //Pay or not:\n //Value range 59~61:\n //Refund 59 to account 60 consumption 61.\n //It is only used for Xinye cloud printers that support the amount broadcast.\n\n request.payMode=60;\n\n //Payment amount:\n //Up to 2 decimal places are allowed.\n //It is only used for Xinye cloud printers that support the amount broadcast.\n request.money=20.15;\n\n let result = await service.xpYunPrint(request);\n\tconsole.log(result.httpStatusCode);\n\tconsole.log(result.content);\n\tconsole.log(result.content.code);\n\tconsole.log(result.content.msg);\n\n\t//resp.data: Return to order No. correctly \n\tconsole.log(result.content.data);\t\n}", "function formatMessage(txt) {\n return txt\n}", "function caml_finish_formatting(f, rawbuffer) {\n if (f.uppercase) rawbuffer = rawbuffer.toUpperCase();\n var len = rawbuffer.length;\n /* Adjust len to reflect additional chars (sign, etc) */\n if (f.signedconv && (f.sign < 0 || f.signstyle != '-')) len++;\n if (f.alternate) {\n if (f.base == 8) len += 1;\n if (f.base == 16) len += 2;\n }\n /* Do the formatting */\n var buffer = \"\";\n if (f.justify == '+' && f.filler == ' ')\n for (var i = len; i < f.width; i++) buffer += ' ';\n if (f.signedconv) {\n if (f.sign < 0) buffer += '-';\n else if (f.signstyle != '-') buffer += f.signstyle;\n }\n if (f.alternate && f.base == 8) buffer += '0';\n if (f.alternate && f.base == 16) buffer += \"0x\";\n if (f.justify == '+' && f.filler == '0')\n for (var i = len; i < f.width; i++) buffer += '0';\n buffer += rawbuffer;\n if (f.justify == '-')\n for (var i = len; i < f.width; i++) buffer += ' ';\n return new MlWrappedString (buffer);\n}", "function formatTextWithoutDash(\n lines,\n colLimit,\n cursorPosition,\n rowLimit,\n element\n) {\n var limitCount = colLimit;\n var wordStartPos = 0;\n var strg = \"\";\n var itrPosition = 0;\n for (var i = 0; i < lines.length; i++) {\n ch = lines[i];\n limitCount -= 1;\n itrPosition += 1;\n strg += ch;\n if (ch == \"\\n\") {\n if (lines.split(\"\\n\").length > rowLimit) {\n // strg =\n // strg.slice(0, cursorPosition.value - 1) +\n // strg.slice(cursorPosition.value);\n // itrPosition -= 1;\n // element.style.color = \"red\";\n // setTimeout(function () {\n // element.style.color = \"\";\n // }, 500);\n }\n limitCount = colLimit;\n continue;\n }\n\n if (limitCount == 0) {\n if (ch != \" \") {\n if (lines.split(\"\\n\").length < rowLimit) {\n strg = strg.slice(0, wordStartPos) + \"\\n\" + strg.slice(wordStartPos); // strg[:wordStartPos] + \"\\n\" + strg[wordStartPos:]\n\n limitCount = colLimit - (itrPosition - wordStartPos);\n itrPosition += 1;\n\n if (i < lines.length && cursorPosition != null) {\n cursorPosition.value += 1;\n }\n } else {\n strg =\n strg.slice(0, cursorPosition.value - 1) +\n strg.slice(cursorPosition.value);\n limitCount = colLimit;\n itrPosition += 1;\n element.style.color = \"red\";\n setTimeout(function () {\n element.style.color = \"\";\n }, 500);\n cursorPosition.value -= 1;\n }\n } else {\n if (lines.split(\"\\n\").length < rowLimit) {\n if (i + 1 != lines.length && lines[i + 1] != \"\\n\") {\n strg = strg.slice(0, itrPosition) + \"\\n\" + strg.slice(itrPosition);\n\n limitCount = colLimit;\n itrPosition += 1;\n if (i < lines.length && cursorPosition != null)\n cursorPosition.value += 1;\n }\n } else {\n strg =\n strg.slice(0, cursorPosition.value - 1) +\n strg.slice(cursorPosition.value);\n limitCount = colLimit;\n itrPosition += 1;\n element.style.color = \"red\";\n setTimeout(function () {\n element.style.color = \"\";\n }, 500);\n cursorPosition.value -= 1;\n }\n }\n }\n if (ch == \" \") {\n wordStartPos = itrPosition;\n }\n }\n return strg;\n}", "function changeSpecialText(rawDisplayText,textOne, textTwo, textThree, textFour) {\n \tvar displayText = rawDisplayText.replace(/%1/, textOne);\n \n \tif (textTwo != null){\n\t \tdisplayText = displayText.replace(/%2/, textTwo);\n\t}\n \tif (textThree != null){\n\t \tdisplayText = displayText.replace(/%3/, textThree);\n\t}\n \tif (textFour != null){\n\t \tdisplayText = displayText.replace(/%4/, textFour);\n\t}\t \n \treturn displayText;\n}", "function processText(text) {\n var displayText = \"\";\n var offset = 0;\n var start = -1;\n var positiveRanges = [];\n var negativeRanges = [];\n var marked = [];\n\n for (var i = 0; i < text.length; i++) {\n var char = text[i];\n var array = null;\n\n switch (char) {\n case Importance.POSITIVE:\n array = positiveRanges;\n break;\n case Importance.NEGATIVE:\n array = negativeRanges;\n break;\n default:\n displayText += char;\n marked.push(false);\n continue;\n }\n\n var relIndex = i - offset;\n if (start === -1) {\n start = relIndex;\n } else {\n array.push({\n start: start,\n end: relIndex\n });\n start = -1;\n }\n offset++;\n }\n\n vm.game.displayText = displayText;\n vm.game.marked = marked;\n vm.game.ranges = {\n positive: positiveRanges,\n negative: negativeRanges\n };\n }", "function formatModuleSelection (module) {\n // delete text after ':', including preceeding ' '\n return module.text.replace(/ *:.*/,''); \n}", "function make_paragraphs(t) {\n var lns = t.split(\"\\n\")\n var res = \"\"\n var prev = \"empty\"\n for(var i = 0; i < lns.length; i++) {\n var ln = lns[i]\n if(prev === \"quotes\") {\n if(ln === \"```\") {\n res += \"```\\n\\n\"\n prev = \"empty\"\n continue\n }\n res += ln + \"\\n\"\n continue\n }\n if(ln.length == 0) {\n if(prev === \"empty\") continue\n if(prev === \"list\") res += \"\\n\"\n else res += \"\\n\\n\"\n prev = \"empty\"\n continue\n }\n if(ln.startsWith(\"#\")) {\n if(prev !== \"empty\") res += \"\\n\\n\"\n res += ln + \"\\n\\n\"\n prev = \"empty\"\n continue\n }\n if(ln.startsWith(\"* \")) {\n res += ln + \"\\n\"\n prev = \"list\"\n continue\n }\n if(ln.startsWith(\"```\")) {\n if(prev !== \"empty\") res += \"\\n\\n\"\n res += ln + \"\\n\"\n prev = \"quotes\"\n continue\n }\n res += \" \" + ln\n prev = \"text\"\n }\n return res\n}", "function formatMultiDTab(textes) {\r\n\tlet textesArray = splitTextToArray(textes);\r\n\tlet newStringText = \"\";\r\n\tfor (let i = 0; i < textesArray.length; i++) {\r\n\t\tnewStringText = newStringText + \"\\n\" + reverseArrayIndex(textesArray[i]);\r\n\t}\r\n\treturn newStringText;\r\n}", "function buildText(str) {\r\n\tlet formatedText;\r\n\r\n\tif (!isListWithNumber) {\r\n\t\tif (MULTILINE_REGEX.test(str))\r\n\t\t\tstr = deleteMultiLineBreak(str);\r\n\r\n\t\tif (formatFirstLine)\r\n\t\t\tstr = LIST_SYMBOL + \" \" + str;\r\n\t\tformatedText = str.replace(/\\n/g, \"\\n\" + LIST_SYMBOL + \" \");\r\n\t}\r\n\r\n\tif (isListWithNumber) {\r\n\t\tstr = str.replace(/\\n{2,20}/g, \"\\n\");\r\n\t\tformatedText = addNumber(splitTextToArray(str));\r\n\t}\r\n\r\n\treturn formatedText;\r\n}", "_p() {\n // s = strings\n this._s = [];\n this._d = false;\n let context = this.context;\n\n context.font = this.font;\n\n if (!this._s.length && this._fw) {\n let parts = this.text.split(' ');\n let start = 0;\n let i = 2;\n\n // split the string into lines that all fit within the fixed width\n for (; i <= parts.length; i++) {\n let str = parts.slice(start, i).join(' ');\n let width = context.measureText(str).width;\n\n if (width > this._fw) {\n this._s.push(parts.slice(start, i - 1).join(' '));\n start = i - 1;\n }\n }\n\n this._s.push(parts.slice(start, i).join(' '));\n }\n\n if (!this._s.length && this.text.includes('\\n')) {\n let width = 0;\n this.text.split('\\n').map(str => {\n this._s.push(str);\n width = Math.max(width, context.measureText(str).width);\n });\n\n this._w = this._fw || width;\n }\n\n if (!this._s.length) {\n this._s.push(this.text);\n this._w = this._fw || context.measureText(this.text).width;\n }\n\n this.height = this._fs + ((this._s.length - 1) * this._fs * this.lineHeight);\n this._uw();\n }", "function solve() {\n String.format = function() {\n var result = arguments[0];\n\n for (var i = 0; i < arguments.length - 1; i++) {\n var matchExpression = new RegExp('\\\\{' + i + '\\\\}', 'gm');\n result = result.replace(matchExpression, arguments[i + 1]);\n }\n\n return result;\n };\n\n var frmt = '{0}, {1}, {0} text {2}';\n var text = String.format(frmt, 1, 'Pesho', 'Gosho');\n\n console.log(text);\n}", "function Formatter() {\n}", "function formatText(cmd, value) {\n document.execCommand(cmd, false, value);\n contentBox.focus();\n}", "function TextRenderer(){}// no need for block level renderers", "function formatPage() {\n $('.marked').each(function () {\n var text = $(this).text();\n text = text.replace(new RegExp('(\\\\\\\\n)', 'g'), \" \");\n text = text.replace(new RegExp('(\\\\\\\\\")', 'g'), \"\");\n $(this).html(marked(text));\n });\n $('.pre code').each(function(i, block) {\n hljs.highlightBlock(block);\n });\n }", "function createText(str, fmt, width) {\n \n if (!str) {\n str = \" \";\n }\n \n var lineSpace = 8;\n\n if (str === undefined || str === null) {\n str = \" \";\n }\n\n var ctx = textCtx;\n var words = [];\n var lines = [];\n \n ctx.save();\n \n // update canvas2d font state based on fmt object\n var setFontFromFormat = function(fmt) {\n \n ctx.fillStyle = 'hsl(' + 360 * (30 / 60) + ',100%,50%)';\n \n var font = fmt && fmt.font || \"\";\n //if (font.toLowerCase().indexOf(\"soma\") === -1) {\n font = \"SoMARegular\"; // default font\n //}\n\n font = font.split(\".ttf\").join(\"\");\n font = \"\" + fmt.size + \"px \" + font;\n\n var color = fmt && fmt.color || [1,1,1,1];\n color = [color[0] * 255, color[1] * 255, color[2] * 255, color[3]];\n color = \"rgba(\" + color + \")\";\n \n ctx.fillStyle = color;\n ctx.lineWidth = 2.5;\n ctx.strokeStyle = color;\n ctx.font = font;\n }\n \n // Add a list of words that share the same formatting \n var addWords = function(wordList, format) {\n wordList.forEach(function(strWord, i, wordList) {\n \n strWord.split(\"\\n\").forEach(function(strWord, i) {\n if (i>0) {\n words.push({\n text: \"\\n\", // make newline it's own word (helps with layout)\n format: format\n }); \n }\n words.push({\n text: strWord,\n format: format\n });\n });\n \n \n });\n };\n \n // Create a line object and append it to lines array\n var addLine = function() {\n \n var prevLine = lines[lines.length-1];\n var yPos = 0;\n \n if (prevLine) {\n yPos = prevLine.y + prevLine.height + lineSpace;\n }\n \n lines.push({\n x:0,\n y:yPos,\n text:\"\",\n height: 0,\n width: 0,\n words: []\n })\n }\n \n // Try adding a word to current last line. \n // (returns true on success)\n var addToLastLine = function(word) {\n var line = lines[lines.length-1];\n \n setFontFromFormat(word.format);\n var addedWidth = ctx.measureText(word.text+\" \").width;\n \n if ((line.words.length > 0 && line.width+addedWidth > width) || word.text == \"\\n\") {\n line.text = line.text.slice(0,-1);\n return false;\n } else {\n word.x = line.width;\n line.words.push(word);\n line.text += word.text+\" \";\n line.width += addedWidth;\n if (word.format.size > line.height) {\n line.height = word.format.size;\n }\n return true;\n }\n \n };\n \n // Create words from input\n if (Array.isArray(str) && Array.isArray(fmt) && str.length === fmt.length) {\n str.forEach(function(span, i, spans) {\n addWords(span.split(\" \"), fmt[i]);\n });\n } else {\n if (Array.isArray(fmt)) {\n fmt = fmt[0];\n }\n if (Array.isArray(str)) {\n str = str.join(\"\");\n }\n addWords(str.split(\" \"), fmt);\n }\n\n // Add first line object\n addLine();\n \n // Add words to text block \n // and creates a concatenated string of words to be rendered \n // (fmt object may limit lines for example)\n words = words.filter(function(word) {\n var addedWord = true;\n if (!addToLastLine(word)) {\n addLine();\n addedWord = addToLastLine(word);\n }\n return addedWord;\n }).map(function(word) {\n return word.text;\n }).reduce(function(a,b) {\n return a+\" \"+b;\n })\n \n var lastLine = lines[lines.length-1];\n \n // get max texture width of text block\n var maxWidth = (lines.length > 1) ? lines.reduce(function(a,b){\n return (a.width > b.width) ? a.width : b.width;\n }) : lines[0].width;\n \n textCanvas.width = maxWidth;\n textCanvas.height = lastLine.height + lastLine.y;\n //textCanvas.height = -lineSpace + (size + lineSpace) * lines.length + size*.3;\n \n // Draw text lines to canvas2d\n lines.forEach(function(line, i) {\n line.words.forEach(function(word) {\n setFontFromFormat(word.format);\n ctx.fillText(word.text, word.x, line.y+line.height);\n });\n });\n\n\n ctx.restore();\n \n ctx = gl;\n \n\n // Create a texture from canvas2d\n // Use that texture to create an Image node\n var textBlockNode = new Li.Image(handleLoadedTexture(ctx.createTexture(), textCanvas), textCanvas.width, textCanvas.height, true);\n texture = null;\n \n \n // Decorate Image node with Text node methods\n \n Object.defineProperty(textBlockNode, \"numLines\", {\n get: function() {\n return lines.length;\n }\n })\n \n Object.defineProperty(textBlockNode, \"text\", {\n get: function() {\n return words\n }\n })\n \n //getTextBoundsFor(lineNumber, [offset], [length]) // {text: \"foobar\", bounds:{x:20, y:10, width: 70, height: 10}}\n \n textBlockNode.getTextBoundsFor = function(lineNumber, offset, length) {\n \n var ctx = textCtx;\n var line = lines[lineNumber];\n \n if (offset !== undefined && offset !== null && length !== undefined && length !== null) {\n // sub metric\n \n ctx.save();\n \n var tempLine = {\n text: \"\", \n bounds:{\n x:0,\n y:line.y,\n width: 0,\n height: 0\n }\n };\n \n var getSubWords = function(line, start, end) {\n \n return line.words.map(function(word) {\n \n var newWord = { \n text:word.text.slice(start, end),\n format:word.format\n };\n end = Math.max(end-word.text.length,1)\n start = Math.max(start-word.text.length,1);\n return newWord;\n \n }).filter(function(word) {\n \n return word.text.length;\n \n });\n\n };\n \n getSubWords(line, 0, offset).forEach(function(word) {\n setFontFromFormat(word.format);\n var addedWidth = ctx.measureText(word.text+\" \").width;\n tempLine.bounds.x += addedWidth;\n });\n \n getSubWords(line, offset, length + offset).forEach(function(word) {\n \n setFontFromFormat(word.format);\n\n var addedWidth = ctx.measureText(word.text+\" \").width;\n tempLine.text += word.text+\" \";\n tempLine.bounds.width += addedWidth;\n if (word.format.size > tempLine.bounds.height) {\n tempLine.bounds.height = word.format.size;\n }\n \n });\n \n ctx.restore();\n \n return tempLine;\n \n \n } else {\n return {\n text: line.text, \n bounds:{\n x:0,\n y:line.y,\n width: line.width,\n height: line.height\n }\n }\n }\n \n \n }\n \n // myTextBlock.getLineNumberOffset(x,y); // { lineNumber:2, offset:30 } \n \n textBlockNode.getLineNumberOffset = function(x,y) {\n \n for (var i=0,l=lines.length;i<l;i++) {\n var bot = lines[i].y + lines[i].height;\n if (y <= bot) {\n break;\n }\n }\n \n var line = lines[i];\n var lineNumber = i;\n \n for (var n=0,l=line.words.length;n<l;n++) {\n \n if (line.words[n].x >= x) {\n break;\n }\n \n }\n \n var offset = line.words.slice(n).map(function(word) {\n return word.text;\n }).join(\" \").length;\n \n \n return { lineNumber:lineNumber, offset:offset } \n }\n \n return textBlockNode;\n\n }", "function escnotes(txt){\n txt=txt.replace(/<!--defang_/g,'&lt;');\n txt=txt.replace(/</g,'&lt;');\n txt=txt.replace(/-->/g,'&gt;');\n txt=txt.replace(/>/g,'&gt;');\n txt=txt.replace(/defang_@/g,'@');\n txt='<div>'+txt.replace(/\\n(Entered on [0-9\\-]+ at [0-9\\:]+ by .*?)\\n/mg,\"</div>\\n<b class='esc_user'>\\$1</b><div class='collapsible'>\");\n txt=txt.replace(/\\r\\n|\\n/g,'<br>');\n txt=txt.replace(/(http[s]?:\\/\\/[^ )\\n\\r\"<>]+)/g,'<a href=\"'+\"$1\"+'\" target=\"_blank\">'+\"$1</a>\");\n txt=txt.replace(/ (gid:)(\\S+) /g,' <a href=\"http://eiger.accessline.com/sw/SmartWatcher.html?type=gid&gid='+\"$2\"+'&internal=true\" target=\"_blank\">'+\"$1</a> <u>$2</u> \");\n return txt+'</div>';\n}", "function doSprintf() {\n\t var fstring = formatting.toString();\n\n\t var pad = function(str,ch,len) { var ps='';\n\t for(var i=0; i<Math.abs(len); i++) {\n\t\t\t ps+=ch;\n\t\t }\n\t return len>0?str+ps:ps+str;\n\t };\n\t var processFlags = function(flags,width,rs,arg) { \n\t var pn = function(flags,arg,rs) {\n\t if(arg>=0) { \n\t if(flags.indexOf(' ')>=0) {\n\t\t\t\t\t rs = ' ' + rs;\n\t\t\t\t } else if(flags.indexOf('+')>=0) {\n\t\t\t\t\t rs = '+' + rs;\n\t\t\t\t }\n\t } else {\n\t rs = '-' + rs;\n\t\t\t }\n\t return rs;\n\t };\n\t var iWidth = parseInt(width,10);\n\t if(width.charAt(0) == '0') {\n\t var ec=0;\n\t if(flags.indexOf(' ')>=0 || flags.indexOf('+')>=0) {\n\t\t\t\t ec++;\n\t\t\t }\n\t if(rs.length<(iWidth-ec)) {\n\t\t\t\t rs = pad(rs,'0',rs.length-(iWidth-ec));\n\t\t\t }\n\t return pn(flags,arg,rs);\n\t }\n\t rs = pn(flags,arg,rs);\n\t if(rs.length<iWidth) {\n\t if(flags.indexOf('-')<0) {\n\t\t\t\t rs = pad(rs,' ',rs.length-iWidth);\n\t\t\t } else {\n\t\t\t\t rs = pad(rs,' ',iWidth - rs.length);\n\t\t\t }\n\t } \n\t return rs;\n\t };\n\t var converters = [];\n\t converters.c = function(flags,width,precision,arg) { \n\t if (typeof(arg) == 'number') {\n\t\t\t return String.fromCharCode(arg);\n\t\t } else if (typeof(arg) == 'string') {\n\t\t\t return arg.charAt(0);\n\t\t } else {\n\t\t\t return '';\n\t\t }\n\t };\n\t converters.d = function(flags,width,precision,arg) { \n\t return converters.i(flags,width,precision,arg); \n\t };\n\t converters.u = function(flags,width,precision,arg) { \n\t return converters.i(flags,width,precision,Math.abs(arg)); \n\t };\n\t converters.i = function(flags,width,precision,arg) {\n\t var iPrecision=parseInt(precision, 10);\n\t var rs = ((Math.abs(arg)).toString().split('.'))[0];\n\t if(rs.length<iPrecision) {\n\t\t\t rs=pad(rs,' ',iPrecision - rs.length);\n\t\t }\n\t return processFlags(flags,width,rs,arg); \n\t };\n\t converters.E = function(flags,width,precision,arg) {\n\t return (converters.e(flags,width,precision,arg)).toUpperCase();\n\t };\n\t converters.e = function(flags,width,precision,arg) {\n\t iPrecision = parseInt(precision, 10);\n\t if(isNaN(iPrecision)) {\n\t\t\t iPrecision = 6;\n\t\t }\n\t rs = (Math.abs(arg)).toExponential(iPrecision);\n\t if(rs.indexOf('.')<0 && flags.indexOf('#')>=0) {\n\t\t\t rs = rs.replace(/^(.*)(e.*)$/,'$1.$2');\n\t\t }\n\t return processFlags(flags,width,rs,arg); \n\t };\n\t converters.f = function(flags,width,precision,arg) { \n\t iPrecision = parseInt(precision, 10);\n\t if(isNaN(iPrecision)) {\n\t\t\t iPrecision = 6;\n\t\t }\n\t rs = (Math.abs(arg)).toFixed(iPrecision);\n\t if(rs.indexOf('.')<0 && flags.indexOf('#')>=0) {\n\t\t\t rs = rs + '.';\n\t\t }\n\t return processFlags(flags,width,rs,arg);\n\t };\n\t converters.G = function(flags,width,precision,arg) { \n\t return (converters.g(flags,width,precision,arg)).toUpperCase();\n\t };\n\t converters.g = function(flags,width,precision,arg) {\n\t iPrecision = parseInt(precision, 10);\n\t absArg = Math.abs(arg);\n\t rse = absArg.toExponential();\n\t rsf = absArg.toFixed(6);\n\t if(!isNaN(iPrecision)) { \n\t rsep = absArg.toExponential(iPrecision);\n\t rse = rsep.length < rse.length ? rsep : rse;\n\t rsfp = absArg.toFixed(iPrecision);\n\t rsf = rsfp.length < rsf.length ? rsfp : rsf;\n\t }\n\t if(rse.indexOf('.')<0 && flags.indexOf('#')>=0) {\n\t\t\t rse = rse.replace(/^(.*)(e.*)$/,'$1.$2');\n\t\t }\n\t if(rsf.indexOf('.')<0 && flags.indexOf('#')>=0) {\n\t\t\t rsf = rsf + '.';\n\t\t }\n\t rs = rse.length<rsf.length ? rse : rsf;\n\t return processFlags(flags,width,rs,arg); \n\t }; \n\t converters.o = function(flags,width,precision,arg) { \n\t var iPrecision=parseInt(precision, 10);\n\t var rs = Math.round(Math.abs(arg)).toString(8);\n\t if(rs.length<iPrecision) {\n\t\t\t rs=pad(rs,' ',iPrecision - rs.length);\n\t\t }\n\t if(flags.indexOf('#')>=0) {\n\t\t\t rs='0'+rs;\n\t\t }\n\t return processFlags(flags,width,rs,arg); \n\t };\n\t converters.X = function(flags,width,precision,arg) { \n\t return (converters.x(flags,width,precision,arg)).toUpperCase();\n\t };\n\t converters.x = function(flags,width,precision,arg) { \n\t var iPrecision=parseInt(precision, 10);\n\t arg = Math.abs(arg);\n\t var rs = Math.round(arg).toString(16);\n\t if(rs.length<iPrecision) {\n\t\t\t rs=pad(rs,' ',iPrecision - rs.length);\n\t\t }\n\t if(flags.indexOf('#')>=0) {\n\t\t\t rs='0x'+rs;\n\t\t }\n\t return processFlags(flags,width,rs,arg); \n\t };\n\t converters.s = function(flags,width,precision,arg) { \n\t var iPrecision=parseInt(precision, 10);\n\t var rs = arg;\n\t if(rs.length > iPrecision) {\n\t\t\t rs = rs.substring(0,iPrecision);\n\t\t }\n\t return processFlags(flags,width,rs,0);\n\t };\n\n\t farr = fstring.split('%');\n\t retstr = farr[0];\n\t fpRE = /^([-+ #]*)(?:(\\d*)\\$|)(\\d*)\\.?(\\d*)([cdieEfFgGosuxX])(.*)$/;\n\t for(var i = 1; i<farr.length; i++) { \n\t fps=fpRE.exec(farr[i]);\n\t if(!fps) {\n\t\t\t continue;\n\t\t }\n\t\t var my_i = fps[2] ? fps[2] : i;\n\t if(arguments[my_i-1]!= \"undefined\") {\n\t retstr+=converters[fps[5]](fps[1],fps[3],fps[4],arguments[my_i-1]);\n\t }\n\t retstr += fps[6];\n\t }\n\t return retstr;\n\t}", "set richText(value) {}", "function Tf(a,b,c,d){this.type=a;this.name=b;this.A=c;this.qa=d;this.yb=[];this.align=-1;this.ab=!0}", "get richText() {}", "function $t(e,t){t=de(t);var n=D(t),r=e.display.externalMeasured=new gt(e.doc,t,n);r.lineN=n;var f=r.built=ct(e,r);return r.text=f.pre,a(e.display.lineMeasure,f.pre),r}", "getHyperlinkDisplayText(paragraph, fieldSeparator, fieldEnd, isNestedField, format) {\n let para = paragraph;\n if (para !== fieldEnd.line.paragraph) {\n isNestedField = true;\n return { displayText: '<<Selection in Document>>', 'isNestedField': isNestedField, 'format': format };\n }\n let displayText = '';\n let lineIndex = para.childWidgets.indexOf(fieldSeparator.line);\n let index = para.childWidgets[lineIndex].children.indexOf(fieldSeparator);\n for (let j = lineIndex; j < para.childWidgets.length; j++) {\n let lineWidget = para.childWidgets[j];\n if (j !== lineIndex) {\n index = -1;\n }\n for (let i = index + 1; i < lineWidget.children.length; i++) {\n let inline = lineWidget.children[i];\n if (inline === fieldEnd) {\n return { 'displayText': displayText, 'isNestedField': isNestedField, 'format': format };\n }\n if (inline instanceof TextElementBox) {\n displayText += inline.text;\n format = inline.characterFormat;\n }\n else if (inline instanceof FieldElementBox) {\n if (inline instanceof FieldElementBox && inline.fieldType === 0\n && !isNullOrUndefined(inline.fieldEnd)) {\n if (isNullOrUndefined(inline.fieldSeparator)) {\n index = lineWidget.children.indexOf(inline.fieldEnd);\n }\n else {\n index = lineWidget.children.indexOf(inline.fieldSeparator);\n }\n }\n }\n else {\n isNestedField = true;\n return { 'displayText': '<<Selection in Document>>', 'isNestedField': isNestedField, 'format': format };\n }\n }\n }\n return { 'displayText': displayText, 'isNestedField': isNestedField, 'format': format };\n }", "function qwerty_addSpaceText() {\r\n\tqwerty_appendText(\" \");\r\n}", "function qwerty_addSpaceText() {\r\n\tqwerty_appendText(\" \");\r\n}", "function qwerty_addSpaceText() {\r\n\tqwerty_appendText(\" \");\r\n}", "function _CodeBlock(txt, syntax){\n if(typeof syntax != \"object\") {return \"\";}\n txt = _clearHtml(txt);\n for(var i = 0; i < syntax.codeBase.length; i++){ \n let tag = \"\";\n let className = syntax.name + '-'+syntax.codeBase[i].color.substring(1);\n switch(syntax.codeBase[i].type) {\n case \"word\":\n tag = \"\\\\b(\" + syntax.codeBase[i].tag + \")\\\\b\";\n break;\n case \"regexp\":\n txt = _RegExpColor(txt, syntax.codeBase[i].tag, className);\n break;\n case \"str\":\n txt = _StrColor(txt, syntax.codeBase[i].tag, className);\n break;\n }\n if(tag!=\"\"){\n \n let regexp = new RegExp(tag, \"gim\");\n \n var pretxt = \"\";\n if (isUpperCase) { \n txt = txt.replace(regexp,'<span class='+syntax.name + '-'+syntax.codeBase[i].color.substring(1)+'>'+syntax.codeBase[i].tag.toUpperCase()+'</span>');\n }else{\n txt = txt.replace(regexp,'<span class='+syntax.name + '-'+syntax.codeBase[i].color.substring(1)+'>$1</span>'); \n }\n }\n }\n return txt;\n }", "function formatText(text, options) {\n var finalText = text;\n\n if (options && options.trimmed && text.length > 25)\n finalText = finalText.substring(0,25).trim() + \"…\";\n if (!(options && options.preserveWhitespace))\n finalText = finalText.trim();\n\n return finalText;\n}", "function formatText(text, options) {\n var finalText = text;\n\n if (options && options.trimmed && text.length > 25)\n finalText = finalText.substring(0,25).trim() + \"…\";\n if (!(options && options.preserveWhitespace))\n finalText = finalText.trim();\n\n return finalText;\n}", "function convertToPlain(rtf) {\n rtf = rtf.replace(/\\\\par[d]?/g, '');\n return rtf.replace(/\\{\\*?\\\\[^{}]+}|[{}]|\\\\\\n?[A-Za-z]+\\n?(?:-?\\d+)?[ ]?/g, '').trim();\n}", "function multiLineText(text, x, y, width, height) {\n return '<switch>\\n' +\n '<foreignObject x=\"' + x + '\" y=\"' + y + '\" width=\"' + width + '\" height=\"' + height + '\">\\n' +\n '<p xmlns=\"http://www.w3.org/1999/xhtml\">' + text + '</p>\\n' +\n '</foreignObject>\\n' +\n '<text x=\"' + x + '\" y=\"' + y + '\">' + text + '</text>\\n' +\n '</switch>\\n'\n}", "function ConvertFontFormat(vFont, nInType, nRetType)\n{\n var nLFSize = 28 + 32 * 2; //sizeof(LOGFONTW)\n var lpLF = AkelPad.MemAlloc(nLFSize);\n var hFont;\n var hDC;\n var nHeight;\n var nWeight;\n var bItalic;\n var vRetVal;\n var i;\n\n if (nInType == 1)\n {\n for (i = 0; i < nLFSize; ++i)\n AkelPad.MemCopy(lpLF + i, AkelPad.MemRead(vFont + i, 5 /*DT_BYTE*/), 5 /*DT_BYTE*/);\n }\n else if (nInType == 2)\n {\n if (! vFont)\n vFont = AkelPad.SystemFunction().Call(\"Gdi32::GetStockObject\", 13 /*SYSTEM_FONT*/);\n\n AkelPad.SystemFunction().Call(\"Gdi32::GetObjectW\", vFont, nLFSize, lpLF);\n }\n else if (nInType == 3)\n {\n hDC = AkelPad.SystemFunction().Call(\"User32::GetDC\", AkelPad.GetMainWnd());\n nHeight = -AkelPad.SystemFunction().Call(\"Kernel32::MulDiv\", vFont[2], AkelPad.SystemFunction().Call(\"Gdi32::GetDeviceCaps\", hDC, 90 /*LOGPIXELSY*/), 72);\n AkelPad.SystemFunction().Call(\"User32::ReleaseDC\", AkelPad.GetMainWnd(), hDC);\n\n nWeight = 400;\n bItalic = 0;\n if ((vFont[1] == 2) || (vFont[1] == 4))\n nWeight = 700;\n if (vFont[1] > 2)\n bItalic = 1;\n\n AkelPad.MemCopy(lpLF, nHeight, 3 /*DT_DWORD*/); //lfHeight\n AkelPad.MemCopy(lpLF + 16, nWeight, 3 /*DT_DWORD*/); //lfWeight\n AkelPad.MemCopy(lpLF + 20, bItalic, 5 /*DT_BYTE*/); //lfItalic\n AkelPad.MemCopy(lpLF + 28, vFont[0], 1 /*DT_UNICODE*/); //lfFaceName\n }\n\n if (nRetType == 1)\n vRetVal = lpLF;\n else if (nRetType == 2)\n {\n vRetVal = AkelPad.SystemFunction().Call(\"Gdi32::CreateFontIndirectW\", lpLF);\n AkelPad.MemFree(lpLF);\n }\n else if (nRetType == 3)\n {\n vRetVal = [];\n vRetVal[0] = AkelPad.MemRead(lpLF + 28, 1 /*DT_UNICODE*/); //lfFaceName\n\n nWeight = AkelPad.MemRead(lpLF + 16, 3 /*DT_DWORD*/); //lfWeight\n bItalic = AkelPad.MemRead(lpLF + 20, 5 /*DT_BYTE*/); //lfItalic\n\n if (nWeight < 600)\n vRetVal[1] = 1;\n else\n vRetVal[1] = 2;\n\n if (bItalic)\n vRetVal[1] += 2;\n\n hDC = AkelPad.SystemFunction().Call(\"User32::GetDC\", AkelPad.GetMainWnd());\n nHeight = AkelPad.MemRead(lpLF, 3 /*DT_DWORD*/); //lfHeight\n vRetVal[2] = -AkelPad.SystemFunction().Call(\"Kernel32::MulDiv\", nHeight, 72, AkelPad.SystemFunction().Call(\"Gdi32::GetDeviceCaps\", hDC, 90 /*LOGPIXELSY*/));\n AkelPad.SystemFunction().Call(\"User32::ReleaseDC\", AkelPad.GetMainWnd(), hDC); \n AkelPad.MemFree(lpLF);\n }\n\n return vRetVal;\n}", "function formatText(text, inputOptions) {\n if (!text || typeof text !== 'string') {\n return '';\n }\n\n let output = text;\n const options = Object.assign({}, inputOptions);\n const hasPhrases = /\"([^\"]*)\"/.test(options.searchTerm);\n\n if (options.searchMatches && !hasPhrases) {\n options.searchPatterns = options.searchMatches.map(convertSearchTermToRegex);\n } else {\n options.searchPatterns = parseSearchTerms(options.searchTerm).map(convertSearchTermToRegex).sort((a, b) => {\n return b.term.length - a.term.length;\n });\n }\n\n if (options.renderer) {\n output = Object(utils_markdown__WEBPACK_IMPORTED_MODULE_12__[\"formatWithRenderer\"])(output, options.renderer);\n output = doFormatText(output, options);\n } else if (!('markdown' in options) || options.markdown) {\n // the markdown renderer will call doFormatText as necessary\n output = utils_markdown__WEBPACK_IMPORTED_MODULE_12__[\"format\"](output, options);\n\n if (output.includes('class=\"markdown-inline-img\"')) {\n /*\n ** remove p tag to allow other divs to be nested,\n ** which allows markdown images to open preview window\n */\n const replacer = match => {\n return match === '<p>' ? '<div className=\"markdown-inline-img__container\">' : '</div>';\n };\n\n output = output.replace(/<p>|<\\/p>/g, replacer);\n }\n } else {\n output = sanitizeHtml(output);\n output = doFormatText(output, options);\n } // replace newlines with spaces if necessary\n\n\n if (options.singleline) {\n output = replaceNewlines(output);\n }\n\n if (htmlEmojiPattern.test(output.trim())) {\n output = '<span class=\"all-emoji\">' + output.trim() + '</span>';\n }\n\n return output;\n} // Performs most of the actual formatting work for formatText. Not intended to be called normally.", "static format(string, stringLength, rowNumber, formatType) {\n\n if(!string) {\n return null;\n }\n\n if(!stringLength && !rowNumber && !formatType) {\n return TextFormatter._defaultFormat(string);\n }\n\n if(stringLength && !rowNumber && !formatType) {\n return TextFormatter._formatWithLength(string, stringLength);\n }\n\n if(stringLength && rowNumber && !formatType) {\n return TextFormatter._formatWithLengthAndRow(string, stringLength, rowNumber);\n }\n\n if(stringLength && !rowNumber && formatType) {\n return TextFormatter._formatWithLengthAndType(string, stringLength, formatType);\n }\n\n if(!stringLength && rowNumber && !formatType) {\n return TextFormatter._formatWithRow(string, rowNumber);\n }\n\n if(!stringLength && rowNumber && formatType) {\n return TextFormatter._formatWithRowAndType(string, rowNumber, formatType);\n }\n\n if(!stringLength && !rowNumber && formatType) {\n return TextFormatter._formatWithType(string, formatType);\n }\n\n stringLength = parseInt(stringLength);\n rowNumber = parseInt(rowNumber);\n\n if( typeof string !== \"string\" && typeof stringLength !== \"number\" && \n typeof rowNumber !== \"number\" && typeof formatType !== \"string\" ) {\n return null;\n }\n\n const formatted = TextFormatter._getMatch(string, formatType);\n if(formatted == null) {\n return null;\n } \n \n let result = \"\";\n let lengthCounter = 0;\n let rowsCounter = 0;\n\n for(let substring of formatted) {\n substring = substring.trim();\n\n for(let i in substring) {\n result += substring[i];\n lengthCounter++;\n\n if(lengthCounter == stringLength) {\n lengthCounter = 0;\n result += \"<br\\/>\";\n rowsCounter++;\n }\n }\n if(lengthCounter != 0) {\n result += `<br\\/>`;\n rowsCounter++;\n }\n lengthCounter = 0;\n\n if(rowsCounter == rowNumber) {\n break;\n }\n }\n\n return result;\n }", "function formatText() {\n stroke(255);\n fill(255);\n textSize(20);\n textFont('Inconsolata');\n}", "function testOutput(text, check) {\n checkBlock.innerHTML += '<p><span class=\"code\">' + text.substring(0, text.indexOf(')') + 1) + \"</span>\" + text.substring(text.indexOf(')') + 1, text.length) + ': <span class=\"' + check + '\">' + e.cap(check) + '!</span></p><hr/>';\n }", "function applyCaretFormat() {\n\t\t\t\tvar rng, caretContainer, textNode, offset, bookmark, container, text;\n\n\t\t\t\trng = selection.getRng(true);\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\ttext = container.nodeValue;\n\n\t\t\t\tcaretContainer = getParentCaretContainer(selection.getStart());\n\t\t\t\tif (caretContainer) {\n\t\t\t\t\ttextNode = findFirstTextNode(caretContainer);\n\t\t\t\t}\n\n\t\t\t\t// Expand to word is caret is in the middle of a text node and the char before/after is a alpha numeric character\n\t\t\t\tif (text && offset > 0 && offset < text.length && /\\w/.test(text.charAt(offset)) && /\\w/.test(text.charAt(offset - 1))) {\n\t\t\t\t\t// Get bookmark of caret position\n\t\t\t\t\tbookmark = selection.getBookmark();\n\n\t\t\t\t\t// Collapse bookmark range (WebKit)\n\t\t\t\t\trng.collapse(true);\n\n\t\t\t\t\t// Expand the range to the closest word and split it at those points\n\t\t\t\t\trng = expandRng(rng, get(name));\n\t\t\t\t\trng = rangeUtils.split(rng);\n\n\t\t\t\t\t// Apply the format to the range\n\t\t\t\t\tapply(name, vars, rng);\n\n\t\t\t\t\t// Move selection back to caret position\n\t\t\t\t\tselection.moveToBookmark(bookmark);\n\t\t\t\t} else {\n\t\t\t\t\tif (!caretContainer || textNode.nodeValue !== INVISIBLE_CHAR) {\n\t\t\t\t\t\tcaretContainer = createCaretContainer(true);\n\t\t\t\t\t\ttextNode = caretContainer.firstChild;\n\n\t\t\t\t\t\trng.insertNode(caretContainer);\n\t\t\t\t\t\toffset = 1;\n\n\t\t\t\t\t\tapply(name, vars, caretContainer);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapply(name, vars, caretContainer);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Move selection to text node\n\t\t\t\t\tselection.setCursorLocation(textNode, offset);\n\t\t\t\t}\n\t\t\t}", "function applyCaretFormat() {\n\t\t\t\tvar rng, caretContainer, textNode, offset, bookmark, container, text;\n\n\t\t\t\trng = selection.getRng(true);\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\ttext = container.nodeValue;\n\n\t\t\t\tcaretContainer = getParentCaretContainer(selection.getStart());\n\t\t\t\tif (caretContainer) {\n\t\t\t\t\ttextNode = findFirstTextNode(caretContainer);\n\t\t\t\t}\n\n\t\t\t\t// Expand to word is caret is in the middle of a text node and the char before/after is a alpha numeric character\n\t\t\t\tif (text && offset > 0 && offset < text.length && /\\w/.test(text.charAt(offset)) && /\\w/.test(text.charAt(offset - 1))) {\n\t\t\t\t\t// Get bookmark of caret position\n\t\t\t\t\tbookmark = selection.getBookmark();\n\n\t\t\t\t\t// Collapse bookmark range (WebKit)\n\t\t\t\t\trng.collapse(true);\n\n\t\t\t\t\t// Expand the range to the closest word and split it at those points\n\t\t\t\t\trng = expandRng(rng, get(name));\n\t\t\t\t\trng = rangeUtils.split(rng);\n\n\t\t\t\t\t// Apply the format to the range\n\t\t\t\t\tapply(name, vars, rng);\n\n\t\t\t\t\t// Move selection back to caret position\n\t\t\t\t\tselection.moveToBookmark(bookmark);\n\t\t\t\t} else {\n\t\t\t\t\tif (!caretContainer || textNode.nodeValue !== INVISIBLE_CHAR) {\n\t\t\t\t\t\tcaretContainer = createCaretContainer(true);\n\t\t\t\t\t\ttextNode = caretContainer.firstChild;\n\n\t\t\t\t\t\trng.insertNode(caretContainer);\n\t\t\t\t\t\toffset = 1;\n\n\t\t\t\t\t\tapply(name, vars, caretContainer);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapply(name, vars, caretContainer);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Move selection to text node\n\t\t\t\t\tselection.setCursorLocation(textNode, offset);\n\t\t\t\t}\n\t\t\t}", "function wikitext_to_plain_text(wikitext) {\r\n\t\tif (!wikitext || !(wikitext = wikitext.trim())) {\r\n\t\t\t// 一般 template 中之 parameter 常有設定空值的狀況,因此首先篩選以加快速度。\r\n\t\t\treturn wikitext;\r\n\t\t}\r\n\t\t// TODO: \"《茶花女》维基百科词条'''(法语)'''\"\r\n\t\twikitext = wikitext\r\n\t\t// 去除註解 comments。\r\n\t\t// e.g., \"親会社<!-- リダイレクト先の「[[子会社]]」は、[[:en:Subsidiary]] とリンク -->\"\r\n\t\t// \"ロイ・トーマス<!-- 曖昧さ回避ページ -->\"\r\n\t\t.replace(/<\\!--[\\s\\S]*?-->/g, '')\r\n\t\t// 沒先處理的話,也會去除 <br />\r\n\t\t.replace(/<br(?:\\s[^<>]*)?>/ig, '\\n').replace(/<\\/?[a-z][^>]*>/g, '')\r\n\t\t// \"{{=}}\" → \"=\"\r\n\t\t.replace(/{{=\\s*}}/ig, '=')\r\n\t\t// e.g., remove \"{{En icon}}\"\r\n\t\t.replace(/{{[a-z\\s]+}}/ig, '')\r\n\t\t// e.g., \"[[link]]\" → \"link\"\r\n\t\t// 警告:應處理 \"[[ [[link]] ]]\" → \"[[ link ]]\" 之特殊情況\r\n\t\t// 警告:應處理 \"[[text | [[ link ]] ]]\", \"[[ link | a[1] ]]\" 之特殊情況\r\n\t\t.replace(\r\n\t\t\t\tPATTERN_wikilink_global,\r\n\t\t\t\tfunction(all_link, page_and_section, page_name, section_title,\r\n\t\t\t\t\t\tdisplayed_text) {\r\n\t\t\t\t\treturn displayed_text || page_and_section;\r\n\t\t\t\t})\r\n\t\t// e.g., \"ABC (英文)\" → \"ABC \"\r\n\t\t// e.g., \"ABC (英文)\" → \"ABC \"\r\n\t\t.replace(/[((][英中日德法西義韓諺俄独原][語语國国]?文?[名字]?[))]/g, '')\r\n\t\t// e.g., \"'''''title'''''\" → \" title \"\r\n\t\t// .remove_head_tail(): function remove_head_tail() @ CeL.data.native\r\n\t\t.remove_head_tail(\"'''\", 0, ' ').remove_head_tail(\"''\", 0, ' ')\r\n\t\t// 有時因為原先的文本有誤,還是會有 ''' 之類的東西留下來。\r\n\t\t.replace(/'{2,}/g, ' ').trim()\r\n\t\t// 此處之 space 應為中間之空白。\r\n\t\t.replace(/\\s{2,}/g, function(space) {\r\n\t\t\t// trim tail\r\n\t\t\treturn space.replace(/[^\\n]{2,}/g, ' ')\r\n\t\t\t// 避免連\\n都被刪掉。\r\n\t\t\t.replace(/[^\\n]+\\n/g, '\\n').replace(/\\n{3,}/g, '\\n\\n');\r\n\t\t}).replace(/[((] /g, '(').replace(/ [))]/g, ')');\r\n\r\n\t\treturn wikitext;\r\n\t}", "function formatReset() {\n DocumentApp.getActiveDocument().getBody().editAsText().setBold(false).setUnderline(false);\n}", "function qwerty_addSpaceText() {\n\tqwerty_appendText(\" \");\n}", "formatText(text) {\n return text.replace(/[^a-z0-9\\.'\"\\/:?=!+]+/gi, ' ');\n }", "function outputFilter(text) {\r\n return text.format_html_output();\r\n }", "function Quotation() {\r\n}", "function formatTeX(str) {\n let new_str = str.replace(/ /g, \"\");\n new_str = new_str.replace(/\\\\ldots/g, \"...\");\n\n let i = 0;\n while (i < new_str.length) {\n if (new_str.charAt(i) === \"}\") {\n if (new_str.charAt(i - 2) === \"{\") {\n new_str =\n new_str.slice(0, i - 2) +\n new_str.slice(i - 1, i) +\n new_str.slice(i + 1);\n }\n }\n i = i + 1;\n }\n return new_str;\n}", "function resultHighlight(text, term) {\n var terms = term.split(\" \");\n\n $.each(terms, function (key, term) {\n if (term.length >= 3) {\n term = term.replace(/(\\s+)/, \"(<[^>]+>)*$1(<[^>]+>)*\");\n var pattern = new RegExp(\"(\" + term + \")\", \"gi\");\n\n text = text.replace(pattern, \"<mark>$1</mark>\");\n }\n });\n\n return text;\n //remove the mark tag if needed\n //srcstr = srcstr.replace(/(<mark>[^<>]*)((<[^>]+>)+)([^<>]*<\\/mark>)/, \"$1</mark>$2<mark>$4\");\n }", "function formatCustom() {\n var tokens, data, seps, res;\n\n // Get the separators for localization.\n seps = separators(locale);\n\n // Tokenize the format string\n tokens = tokenize();\n\n // Generate the data used to process from the tokens\n data = generateFormatData(tokens);\n\n // Process the format data to generate the output.\n res = processData(data);\n\n return res;\n\n /**\n * Processes the given format data with the supplied number.\n * @param {object} data The format data as generated by\n * generateFormatData.\n */\n function processData(data) {\n var int, intNum, frac, fracNum, dpos, neg;\n\n // Apply adjustments\n neg = num < 0;\n num = Math.abs(num);\n\n if (num === 0) {\n num = num * data.zero.multiplier / data.zero.divisor;\n } else if (neg) {\n num = num * data.negative.multiplier /\n data.negative.divisor;\n } else {\n num = num * data.positive.multiplier /\n data.positive.divisor;\n }\n\n fracNum = Math.abs(num) - Math.floor(Math.abs(num));\n intNum = num - fracNum;\n int = String(intNum);\n\n if (num === 0) {\n int = processIntPart(data.zero);\n frac = processFracPart(data.zero);\n } else if (neg) {\n int = processIntPart(data.negative);\n frac = processFracPart(data.negative);\n } else {\n int = processIntPart(data.positive);\n frac = processFracPart(data.positive);\n }\n\n if (frac === false) {\n // This means we have rounded to zero, and need to change\n // format\n return processData(data);\n } else if (frac) {\n return int + seps.decimal + frac;\n } else {\n return int;\n }\n\n /**\n * Processes the integral part of the data.\n * @param {object} fmt The format object.\n */\n function processIntPart(fmt) {\n var i, cnt;\n\n // First try to normalize and balance the format\n // and number\n cnt = normalizePlaceholders();\n\n // If we need to group, add the group separators into\n // the format as literals.\n if (fmt.group) {\n addGroupLiterals(cnt);\n }\n\n // If we have a negative number, add it at the start of the\n // integral part as a literal.\n if (neg && cnt) {\n fmt.integral.unshift({\n type: 'literal',\n value: '-'\n });\n }\n\n // Go through and replace the placeholders.\n dpos = 0;\n for (i = 0; i < fmt.integral.length; i++) {\n if (fmt.integral[i].type === 'placeholder') {\n fmt.integral[i].type = 'literal';\n fmt.integral[i].value = int[dpos];\n dpos++;\n /* istanbul ignore if */\n } else if (fmt.integral[i].type !== 'literal') {\n // If this happens it is a dev error.\n throw new Error('Should not have tokens of type \"' +\n fmt.integral[i].type + '\"' + ' at this point!');\n }\n }\n return fmt.integral.map(value).join('');\n\n /**\n * Adds comma litrals to the format parts.\n * @param {number} phcnt The total number of placeholders.\n */\n function addGroupLiterals(phcnt) {\n var pos = 0, i;\n for (i = fmt.integral.length - 1; i >= 0; i--) {\n if (fmt.integral[i].type === 'placeholder') {\n pos++;\n if (pos < phcnt && pos > 0 && pos % 3 === 0) {\n fmt.integral.splice(i, 0, {\n type: 'literal',\n value: seps.separator\n });\n }\n }\n }\n }\n\n /**\n * Replaces \"#\" appearing after \"0\" with \"0\", and ensures the\n * placeholder count matches the int digit count.\n */\n function normalizePlaceholders() {\n var i, integ, has0, cnt, first;\n cnt = 0;\n for (i = 0; i < fmt.integral.length; i++) {\n integ = fmt.integral[i];\n if (integ.type === 'placeholder') {\n cnt++;\n if (first === undefined) {\n first = i;\n }\n if (integ.value === '0') {\n has0 = true;\n } else if (integ.value === '#' && has0) {\n integ.value = '0';\n }\n }\n }\n if (first === undefined) {\n first = 0;\n }\n\n // Add additional place holders with the first\n // until we have the same number of placeholders\n // as digits\n while (cnt > 0 && cnt < int.length) {\n fmt.integral.splice(first, 0, {\n type: 'placeholder',\n value: '#'\n });\n cnt++;\n }\n\n // We assume we have a first which points to a\n // placeholder (since cnt MUST be bigger than 0)\n while (int.length < cnt) {\n if (fmt.integral[first].value === '#') {\n fmt.integral.splice(first, 1);\n first = findFirstPlaceholder();\n cnt--;\n } else {\n int = '0' + int;\n }\n }\n\n return cnt;\n\n /** Find the first placeholder */\n function findFirstPlaceholder() {\n var i;\n for (i = 0; i < fmt.integral.length; i++) {\n if (fmt.integral[i].type === 'placeholder') {\n return i;\n }\n }\n return -1;\n }\n }\n }\n\n /**\n * Processes the fraction part\n * @param {object} fmt The format object.\n */\n function processFracPart(fmt) {\n var mult, was0, frac, pholders, idx, flag;\n if (!fmt.fraction.length) {\n return '';\n }\n pholders = fmt.fraction.filter(isPlaceholder);\n mult = Math.pow(10, pholders.length);\n was0 = fracNum === 0;\n fracNum = fracNum * mult;\n fracNum = Math.round(fracNum);\n if (!was0 && fracNum === 0 && intNum === 0) {\n return false;\n }\n frac = String(fracNum);\n\n // Ensure everything is in order.\n normalizePlaceholders();\n\n // Since we made the fraction an integer, we may have lost\n // significant 0s... put them back.\n frac = zeroPad(pholders.length, frac);\n\n // Remove any zeros from the end of frac, as well as #\n // placeholders that are not required (will not result in\n // any value being printed).\n frac = frac.split('');\n flag = true;\n while (frac.length) {\n if (flag && frac[frac.length - 1] === '0' &&\n pholders[pholders.length - 1].value === '#') {\n idx = fmt.fraction.indexOf(\n pholders[pholders.length - 1]\n );\n fmt.fraction.splice(idx, 1);\n } else {\n flag = false;\n pholders[pholders.length - 1].type = 'literal';\n pholders[pholders.length - 1].value =\n frac[frac.length - 1];\n }\n frac.pop();\n pholders.pop();\n }\n return fmt.fraction.map(value).join('');\n\n /** Ensures that all placeholders before the last 0 are 0 */\n function normalizePlaceholders() {\n var i, found;\n for (i = fmt.fraction.length - 1; i >= 0; i--) {\n if (fmt.fraction[i].type === 'placeholder') {\n if (found) {\n fmt.fraction[i].value = '0';\n } else if (fmt.fraction[i].value === '0') {\n found = true;\n }\n }\n }\n }\n }\n\n /**\n * Returns the value part of the supplied token.\n * @param {object} token The token to retrieve the value from.\n * @returns The token value.\n */\n function value(token) {\n return token.value;\n }\n\n /**\n * Returns true if this is a placeholder.\n * @param {object} token The token to check.\n */\n function isPlaceholder(token) {\n return token.type === 'placeholder';\n }\n }\n\n /**\n * Generates the format data from the supplied tokens.\n * @param {array} tokens The tokens to be used to generate the format\n * data.\n */\n function generateFormatData(tokens) {\n var i, sec, res, skip, pattern, curr;\n curr = 'positive';\n res = {\n positive: createSection()\n };\n sec = 0;\n pattern = res[curr].integral;\n for (i = 0; i < tokens.length; i++) {\n if (skip) {\n skip = false;\n continue;\n }\n switch (tokens[i].type) {\n case 'section':\n sec++;\n if (sec > 2) {\n // Stop processing.\n break;\n }\n if (tokens[i + 1] &&\n tokens[i + 1].type === 'section') {\n // We leave the section out if it is empty.\n continue;\n } else {\n curr = CUSTOM_FORMAT_SECTIONS[sec];\n res[curr] = createSection();\n pattern = res[curr].integral;\n }\n break;\n case 'skip':\n skip = true;\n // Add next as literal...\n if (tokens[i + 1]) {\n pattern.push({\n type: 'literal',\n value: tokens[i + 1].value\n });\n }\n break;\n case 'literal':\n pattern.push(tokens[i]);\n break;\n case 'placeholder':\n pattern.push(tokens[i]);\n break;\n case 'decimal':\n pattern = res[curr].fraction;\n break;\n case 'divisor':\n if (res[curr].divisor === 0) {\n res[curr].divisor =\n Math.pow(10, tokens[i].value.length);\n }\n break;\n case 'group':\n res[curr].group = true;\n break;\n case 'adjust':\n /* istanbul ignore else */\n if (tokens[i].value === '%') {\n if (res[curr].multiplier === 0) {\n res[curr].multiplier = 100;\n }\n } else if (tokens[i].value === '‰') {\n if (res[curr].multiplier === 0) {\n res[curr].multiplier = 1000;\n }\n } else {\n throw new Error('Unrecognized adjustment ' +\n 'value \"' + tokens[i].type + '\"');\n }\n pattern.push({\n type: 'literal',\n value: tokens[i].value\n });\n break;\n }\n }\n\n if (!res.negative) {\n res.negative = res.positive;\n }\n if (!res.zero) {\n res.zero = res.positive;\n }\n\n postProcess('positive');\n postProcess('negative');\n postProcess('zero');\n return res;\n\n /**\n * Flattens literals, and ensures valid divisor and multiplier\n * values.\n * @param {string} curr The current section being processed.\n */\n function postProcess(curr) {\n var i;\n if (res[curr].divisor === 0) {\n res[curr].divisor = 1;\n }\n if (res[curr].multiplier === 0) {\n res[curr].multiplier = 1;\n }\n for (i = 1; i < res[curr].integral.length; i++) {\n if (res[curr].integral[i].type === 'literal' &&\n res[curr].integral[i - 1].type === 'literal') {\n // Combine the 2 literals\n res[curr].integral[i - 1].value +=\n res[curr].integral[i].value;\n res[curr].integral.splice(i, 1);\n i--;\n }\n }\n for (i = 1; i < res[curr].fraction.length; i++) {\n if (res[curr].fraction[i].type === 'literal' &&\n res[curr].fraction[i - 1].type === 'literal') {\n // Combine the 2 literals\n res[curr].fraction[i - 1].value +=\n res[curr].fraction[i].value;\n res[curr].fraction.splice(i, 1);\n i--;\n }\n }\n }\n\n /** Creates a new section */\n function createSection() {\n return {\n group: false,\n divisor: 0,\n multiplier: 0,\n integral: [],\n fraction: []\n };\n }\n }\n\n /**\n * Tokenizes the custom format string to make it easier to work with.\n */\n function tokenize() {\n var i, res, char, divisor, divisorStop, lit, litStop, prev,\n token;\n\n res = [];\n divisor = '';\n lit = '';\n for (i = 0; i < fmt.length; i++) {\n token = undefined;\n divisorStop = true;\n litStop = true;\n char = fmt.charAt(i);\n switch (char) {\n case '\\\\':\n token = {\n type: 'skip',\n value: '\\\\'\n };\n break;\n case '0':\n token = {\n type: 'placeholder',\n value: '0'\n };\n break;\n case '#':\n token = {\n type: 'placeholder',\n value: '#'\n };\n break;\n case '.':\n token = {\n type: 'decimal',\n value: '.'\n };\n break;\n case ',':\n divisor += ',';\n divisorStop = false;\n break;\n case '%':\n token = {\n type: 'adjust',\n value: '%'\n };\n break;\n case '‰':\n token = {\n type: 'adjust',\n value: '‰'\n };\n break;\n case ';':\n token = {\n type: 'section'\n };\n break;\n default:\n lit += char;\n litStop = false;\n break;\n }\n\n if (divisorStop && divisor) {\n endDivisor(token);\n }\n if (lit && litStop) {\n endLit();\n }\n if (token) {\n res.push(token);\n }\n prev = char;\n }\n\n if (divisor) {\n endDivisor();\n }\n\n if (lit) {\n endLit();\n }\n\n return res;\n\n /**\n * Ends the divisor capture which may result in a divisor,\n * or a group\n * @param {object} token The token to check.\n */\n function endDivisor(token) {\n if (!token || token.type === 'decimal') {\n res.push({\n type: 'divisor',\n value: divisor\n });\n } else {\n res.push({\n type: 'group',\n value: ','\n });\n }\n divisor = '';\n }\n\n /** Ends a literal capture */\n function endLit() {\n res.push({\n type: 'literal',\n value: lit\n });\n lit = '';\n }\n }\n }", "function formatCustom() {\n var tokens, data, seps, res;\n\n // Get the separators for localization.\n seps = separators(locale);\n\n // Tokenize the format string\n tokens = tokenize();\n\n // Generate the data used to process from the tokens\n data = generateFormatData(tokens);\n\n // Process the format data to generate the output.\n res = processData(data);\n\n return res;\n\n /**\n * Processes the given format data with the supplied number.\n * @param {object} data The format data as generated by\n * generateFormatData.\n */\n function processData(data) {\n var int, intNum, frac, fracNum, dpos, neg;\n\n // Apply adjustments\n neg = num < 0;\n num = Math.abs(num);\n\n if (num === 0) {\n num = num * data.zero.multiplier / data.zero.divisor;\n } else if (neg) {\n num = num * data.negative.multiplier /\n data.negative.divisor;\n } else {\n num = num * data.positive.multiplier /\n data.positive.divisor;\n }\n\n fracNum = Math.abs(num) - Math.floor(Math.abs(num));\n intNum = num - fracNum;\n int = String(intNum);\n\n if (num === 0) {\n int = processIntPart(data.zero);\n frac = processFracPart(data.zero);\n } else if (neg) {\n int = processIntPart(data.negative);\n frac = processFracPart(data.negative);\n } else {\n int = processIntPart(data.positive);\n frac = processFracPart(data.positive);\n }\n\n if (frac === false) {\n // This means we have rounded to zero, and need to change\n // format\n return processData(data);\n } else if (frac) {\n return int + seps.decimal + frac;\n } else {\n return int;\n }\n\n /**\n * Processes the integral part of the data.\n * @param {object} fmt The format object.\n */\n function processIntPart(fmt) {\n var i, cnt;\n\n // First try to normalize and balance the format\n // and number\n cnt = normalizePlaceholders();\n\n // If we need to group, add the group separators into\n // the format as literals.\n if (fmt.group) {\n addGroupLiterals(cnt);\n }\n\n // If we have a negative number, add it at the start of the\n // integral part as a literal.\n if (neg && cnt) {\n fmt.integral.unshift({\n type: 'literal',\n value: '-'\n });\n }\n\n // Go through and replace the placeholders.\n dpos = 0;\n for (i = 0; i < fmt.integral.length; i++) {\n if (fmt.integral[i].type === 'placeholder') {\n fmt.integral[i].type = 'literal';\n fmt.integral[i].value = int[dpos];\n dpos++;\n /* istanbul ignore if */\n } else if (fmt.integral[i].type !== 'literal') {\n // If this happens it is a dev error.\n throw new Error('Should not have tokens of type \"' +\n fmt.integral[i].type + '\"' + ' at this point!');\n }\n }\n return fmt.integral.map(value).join('');\n\n /**\n * Adds comma litrals to the format parts.\n * @param {number} phcnt The total number of placeholders.\n */\n function addGroupLiterals(phcnt) {\n var pos = 0, i;\n for (i = fmt.integral.length - 1; i >= 0; i--) {\n if (fmt.integral[i].type === 'placeholder') {\n pos++;\n if (pos < phcnt && pos > 0 && pos % 3 === 0) {\n fmt.integral.splice(i, 0, {\n type: 'literal',\n value: seps.separator\n });\n }\n }\n }\n }\n\n /**\n * Replaces \"#\" appearing after \"0\" with \"0\", and ensures the\n * placeholder count matches the int digit count.\n */\n function normalizePlaceholders() {\n var i, integ, has0, cnt, first;\n cnt = 0;\n for (i = 0; i < fmt.integral.length; i++) {\n integ = fmt.integral[i];\n if (integ.type === 'placeholder') {\n cnt++;\n if (first === undefined) {\n first = i;\n }\n if (integ.value === '0') {\n has0 = true;\n } else if (integ.value === '#' && has0) {\n integ.value = '0';\n }\n }\n }\n if (first === undefined) {\n first = 0;\n }\n\n // Add additional place holders with the first\n // until we have the same number of placeholders\n // as digits\n while (cnt > 0 && cnt < int.length) {\n fmt.integral.splice(first, 0, {\n type: 'placeholder',\n value: '#'\n });\n cnt++;\n }\n\n // We assume we have a first which points to a\n // placeholder (since cnt MUST be bigger than 0)\n while (int.length < cnt) {\n if (fmt.integral[first].value === '#') {\n fmt.integral.splice(first, 1);\n first = findFirstPlaceholder();\n cnt--;\n } else {\n int = '0' + int;\n }\n }\n\n return cnt;\n\n /** Find the first placeholder */\n function findFirstPlaceholder() {\n var i;\n for (i = 0; i < fmt.integral.length; i++) {\n if (fmt.integral[i].type === 'placeholder') {\n return i;\n }\n }\n return -1;\n }\n }\n }\n\n /**\n * Processes the fraction part\n * @param {object} fmt The format object.\n */\n function processFracPart(fmt) {\n var mult, was0, frac, pholders, idx, flag;\n if (!fmt.fraction.length) {\n return '';\n }\n pholders = fmt.fraction.filter(isPlaceholder);\n mult = Math.pow(10, pholders.length);\n was0 = fracNum === 0;\n fracNum = fracNum * mult;\n fracNum = Math.round(fracNum);\n if (!was0 && fracNum === 0 && intNum === 0) {\n return false;\n }\n frac = String(fracNum);\n\n // Ensure everything is in order.\n normalizePlaceholders();\n\n // Since we made the fraction an integer, we may have lost\n // significant 0s... put them back.\n frac = zeroPad(pholders.length, frac);\n\n // Remove any zeros from the end of frac, as well as #\n // placeholders that are not required (will not result in\n // any value being printed).\n frac = frac.split('');\n flag = true;\n while (frac.length) {\n if (flag && frac[frac.length - 1] === '0' &&\n pholders[pholders.length - 1].value === '#') {\n idx = fmt.fraction.indexOf(\n pholders[pholders.length - 1]\n );\n fmt.fraction.splice(idx, 1);\n } else {\n flag = false;\n pholders[pholders.length - 1].type = 'literal';\n pholders[pholders.length - 1].value =\n frac[frac.length - 1];\n }\n frac.pop();\n pholders.pop();\n }\n return fmt.fraction.map(value).join('');\n\n /** Ensures that all placeholders before the last 0 are 0 */\n function normalizePlaceholders() {\n var i, found;\n for (i = fmt.fraction.length - 1; i >= 0; i--) {\n if (fmt.fraction[i].type === 'placeholder') {\n if (found) {\n fmt.fraction[i].value = '0';\n } else if (fmt.fraction[i].value === '0') {\n found = true;\n }\n }\n }\n }\n }\n\n /**\n * Returns the value part of the supplied token.\n * @param {object} token The token to retrieve the value from.\n * @returns The token value.\n */\n function value(token) {\n return token.value;\n }\n\n /**\n * Returns true if this is a placeholder.\n * @param {object} token The token to check.\n */\n function isPlaceholder(token) {\n return token.type === 'placeholder';\n }\n }\n\n /**\n * Generates the format data from the supplied tokens.\n * @param {array} tokens The tokens to be used to generate the format\n * data.\n */\n function generateFormatData(tokens) {\n var i, sec, res, skip, pattern, curr;\n curr = 'positive';\n res = {\n positive: createSection()\n };\n sec = 0;\n pattern = res[curr].integral;\n for (i = 0; i < tokens.length; i++) {\n if (skip) {\n skip = false;\n continue;\n }\n switch (tokens[i].type) {\n case 'section':\n sec++;\n if (sec > 2) {\n // Stop processing.\n break;\n }\n if (tokens[i + 1] &&\n tokens[i + 1].type === 'section') {\n // We leave the section out if it is empty.\n continue;\n } else {\n curr = CUSTOM_FORMAT_SECTIONS[sec];\n res[curr] = createSection();\n pattern = res[curr].integral;\n }\n break;\n case 'skip':\n skip = true;\n // Add next as literal...\n if (tokens[i + 1]) {\n pattern.push({\n type: 'literal',\n value: tokens[i + 1].value\n });\n }\n break;\n case 'literal':\n pattern.push(tokens[i]);\n break;\n case 'placeholder':\n pattern.push(tokens[i]);\n break;\n case 'decimal':\n pattern = res[curr].fraction;\n break;\n case 'divisor':\n if (res[curr].divisor === 0) {\n res[curr].divisor =\n Math.pow(10, tokens[i].value.length);\n }\n break;\n case 'group':\n res[curr].group = true;\n break;\n case 'adjust':\n /* istanbul ignore else */\n if (tokens[i].value === '%') {\n if (res[curr].multiplier === 0) {\n res[curr].multiplier = 100;\n }\n } else if (tokens[i].value === '‰') {\n if (res[curr].multiplier === 0) {\n res[curr].multiplier = 1000;\n }\n } else {\n throw new Error('Unrecognized adjustment ' +\n 'value \"' + tokens[i].type + '\"');\n }\n pattern.push({\n type: 'literal',\n value: tokens[i].value\n });\n break;\n }\n }\n\n if (!res.negative) {\n res.negative = res.positive;\n }\n if (!res.zero) {\n res.zero = res.positive;\n }\n\n postProcess('positive');\n postProcess('negative');\n postProcess('zero');\n return res;\n\n /**\n * Flattens literals, and ensures valid divisor and multiplier\n * values.\n * @param {string} curr The current section being processed.\n */\n function postProcess(curr) {\n var i;\n if (res[curr].divisor === 0) {\n res[curr].divisor = 1;\n }\n if (res[curr].multiplier === 0) {\n res[curr].multiplier = 1;\n }\n for (i = 1; i < res[curr].integral.length; i++) {\n if (res[curr].integral[i].type === 'literal' &&\n res[curr].integral[i - 1].type === 'literal') {\n // Combine the 2 literals\n res[curr].integral[i - 1].value +=\n res[curr].integral[i].value;\n res[curr].integral.splice(i, 1);\n i--;\n }\n }\n for (i = 1; i < res[curr].fraction.length; i++) {\n if (res[curr].fraction[i].type === 'literal' &&\n res[curr].fraction[i - 1].type === 'literal') {\n // Combine the 2 literals\n res[curr].fraction[i - 1].value +=\n res[curr].fraction[i].value;\n res[curr].fraction.splice(i, 1);\n i--;\n }\n }\n }\n\n /** Creates a new section */\n function createSection() {\n return {\n group: false,\n divisor: 0,\n multiplier: 0,\n integral: [],\n fraction: []\n };\n }\n }\n\n /**\n * Tokenizes the custom format string to make it easier to work with.\n */\n function tokenize() {\n var i, res, char, divisor, divisorStop, lit, litStop, prev,\n token;\n\n res = [];\n divisor = '';\n lit = '';\n for (i = 0; i < fmt.length; i++) {\n token = undefined;\n divisorStop = true;\n litStop = true;\n char = fmt.charAt(i);\n switch (char) {\n case '\\\\':\n token = {\n type: 'skip',\n value: '\\\\'\n };\n break;\n case '0':\n token = {\n type: 'placeholder',\n value: '0'\n };\n break;\n case '#':\n token = {\n type: 'placeholder',\n value: '#'\n };\n break;\n case '.':\n token = {\n type: 'decimal',\n value: '.'\n };\n break;\n case ',':\n divisor += ',';\n divisorStop = false;\n break;\n case '%':\n token = {\n type: 'adjust',\n value: '%'\n };\n break;\n case '‰':\n token = {\n type: 'adjust',\n value: '‰'\n };\n break;\n case ';':\n token = {\n type: 'section'\n };\n break;\n default:\n lit += char;\n litStop = false;\n break;\n }\n\n if (divisorStop && divisor) {\n endDivisor(token);\n }\n if (lit && litStop) {\n endLit();\n }\n if (token) {\n res.push(token);\n }\n prev = char;\n }\n\n if (divisor) {\n endDivisor();\n }\n\n if (lit) {\n endLit();\n }\n\n return res;\n\n /**\n * Ends the divisor capture which may result in a divisor,\n * or a group\n * @param {object} token The token to check.\n */\n function endDivisor(token) {\n if (!token || token.type === 'decimal') {\n res.push({\n type: 'divisor',\n value: divisor\n });\n } else {\n res.push({\n type: 'group',\n value: ','\n });\n }\n divisor = '';\n }\n\n /** Ends a literal capture */\n function endLit() {\n res.push({\n type: 'literal',\n value: lit\n });\n lit = '';\n }\n }\n }" ]
[ "0.6431396", "0.6182933", "0.6172128", "0.6172128", "0.61631304", "0.6008989", "0.5980674", "0.59631675", "0.5962245", "0.5959544", "0.59509754", "0.5932357", "0.5904384", "0.58850336", "0.588015", "0.5803011", "0.5771262", "0.5744228", "0.57395566", "0.5722318", "0.57033885", "0.57018703", "0.55933905", "0.55887526", "0.5576677", "0.55668426", "0.5566439", "0.55607426", "0.5555665", "0.5544604", "0.5544118", "0.5536606", "0.5511954", "0.55065256", "0.5498249", "0.54893863", "0.548372", "0.5460313", "0.54578364", "0.5456911", "0.54568964", "0.5421143", "0.54211015", "0.5417602", "0.5407947", "0.5374327", "0.53715074", "0.53707314", "0.5370251", "0.53526586", "0.5350309", "0.5340805", "0.53357404", "0.5328901", "0.53168666", "0.5311735", "0.53106433", "0.52926403", "0.5286488", "0.5285888", "0.52789056", "0.52785987", "0.5276915", "0.527539", "0.52671814", "0.52593493", "0.5249777", "0.52487135", "0.524673", "0.52381414", "0.52377886", "0.52292883", "0.52262443", "0.52182186", "0.5205098", "0.5203642", "0.5203642", "0.5203642", "0.5200807", "0.5199015", "0.5199015", "0.5197618", "0.5196788", "0.51915425", "0.5190237", "0.5186316", "0.51852244", "0.5183409", "0.518252", "0.518252", "0.5182263", "0.5181497", "0.5178137", "0.51716727", "0.516967", "0.5164591", "0.5164521", "0.51622164", "0.5160175", "0.5160175" ]
0.6100196
5
= Login page radio box checked =
function qll_utility_boxchecked() { $("#remember").attr('checked','checked'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideLogin() {\n\tvar signin = $$('#signin');\n\tsignin.each(function(signin) {\n\t\tvar tags = signin.select('input');\n\t\tvar selected = false;\n\t\ttags.each(function(tag) {if (tag.checked) selected=true});\n\t\tif (selected != true) {toggleLogin(signin.id, 0.0);}\n\t});\t\n}", "function onchecked() {\n if (vm.attestation.acceptTerms) {\n vm.openAuthenticateModal();\n } else {\n vm.isAuthenticated = false;\n }\n }", "function openSignUpBoolean(){\n\tvar radioBtn = document.getElementById(\"openSignUp\").checked;\n\tif(radioBtn === true){\n\t\tdocument.getElementById('hiddenSignUpIs').className = \"\";\n\t\tdocument.getElementById('hiddenSignUpIsNot').className = \"\";\n\t\tdocument.getElementById('hiddenSignUpIsEqual').className = \"\";\n\t\tdocument.getElementById('signUpSearchInput').className = \"\";\n\t}\n\telse{\n\t\tdocument.getElementById('hiddenSignUpIs').className = \"hiddenSignUpBoolean\";\n\t\tdocument.getElementById('hiddenSignUpIsNot').className = \"hiddenSignUpBoolean\";\n\t\tdocument.getElementById('hiddenSignUpIsEqual').className = \"hiddenSignUpBoolean\";\n\t\tdocument.getElementById('signUpSearchInput').className = \"hiddenSignUpBoolean\";\n\t}\t\n}", "function checkmark() {\n if ($scope.loginData.isChecked = false) {\n $('.radio-content input:text').val(\"\");\n }\n }", "_handleButton()\n {\n // Radio.channel('rodan').request(RODAN_EVENTS.REQUEST__AUTHENTICATION_LOGIN, {username: this.ui.textUsername.val(), password: this.ui.textPassword.val()}); \n }", "function onChangeLogin() {}", "function checkForLoggedIn() {\n const loginBtn = document.querySelector('form[action^=\"login.php\"] input.button');\n\n if (loginBtn) { // Have login button\n const swAccount = Object.assign(document.createElement('a'), {href: '#', textContent: 'Switch', id: 'multiacc'});\n loginBtn.parentNode.appendChild(swAccount);\n return '#multiacc';\n }\n}", "orderAccess() {\n loginPage.open();\n loginPage.username.setValue('[email protected]');\n loginPage.password.setValue('pepito');\n loginPage.submit();\n }", "function shrFormSelect() {\n if ($('#shrRadio1').is(\":checked\")) {\n app.SHRFlag = 1;\n window.location.hash = \"#prevailing1\";\n } else if ($('#shrRadio2').is(\":checked\")) {\n app.SHRFlag = 2;\n window.location.hash = \"#eventSpecific\";\n }\n}", "function pulsadoAleatorio() {\n if(document.getElementById(\"valor_aleatorio\").checked){\n sessionStorage.setItem(\"valor_aleatorio\",1);\n }\n else{\n sessionStorage.setItem(\"valor_aleatorio\",0);\n }\n}", "function radioCheck() {\n var rad1 = document.getElementById(\"rad1\");\n var rad2 = document.getElementById(\"rad2\");\n if (rad1.checked == true) {\n alert(\"the user is a \" + rad1.value);\n } else if (rad2.checked == true) {\n alert(\"the user is a \" + rad2.value);\n } else {\n alert(\"you have to select something\");\n }\n}", "function doLogin()\n{\n getSelectedItem();\n // here's the workaround - login functions are with token\n var selected_token = selected_slot.getToken();\n try {\n selected_token.login(false);\n var tok_status = document.getElementById(\"tok_status\");\n if (selected_token.isLoggedIn()) {\n tok_status.setAttribute(\"label\", \n bundle.GetStringFromName(\"devinfo_stat_loggedin\"));\n } else {\n tok_status.setAttribute(\"label\",\n bundle.GetStringFromName(\"devinfo_stat_notloggedin\"));\n }\n } catch (e) {\n doPrompt(bundle.GetStringFromName(\"login_failed\"));\n }\n enableButtons();\n}", "moveToNextSignUpStep() {\n console.log(this.checked);\n if (!this.checked) {\n alert(\"이용약관에 동의해주세요.\");\n } else {\n window.location.href = \"/users/signup2\";\n }\n }", "function login() {\n self.isLoggedIn = true;\n }", "function yesnoCheckUser() {\r\n\t\tif (document.getElementById('yesRav').checked) {\r\n\t\t\tdocument.getElementById('userop').style.display = 'block';\r\n\t\t} else {\r\n\t\t\tdocument.getElementById('userop').style.display = 'none';\r\n\t\t}\r\n\t}", "function handleClick() {\n setLogin(!login)\n }", "function toggleLogin () {\n console.log(\"Login Toggled\");\n // document.querySelector(\"core-pages\").selected = index;\n}", "function swcKeepMeSignedInChecked() {\n\tif ($.swcKeepMeSignedIn.value == true) {\n\t\tTi.App.Properties.setBool('remember', true);\n\t} else {\n\t\tTi.App.Properties.setBool('remember', false);\n\t}\n}", "function changeUserType(radioName){\n\tvar selValue = radioCheckedValueGet(radioName);\n\tif (!selValue) return;\t\t\n\n switch (parseInt (selValue, 10)){ \n \t\tcase 1:\t/* Admin */\n\t\t\t\tfieldStateChangeWr ('tf1_xauth tf1_xauth_hidden', '', 'tf1_pptp tf1_pptp_hidden tf1_l2tp tf1_l2tp_hidden tf1_l2tp_hidden tf1_sslvpn tf1_sslvpn_hidden tf1_captivePortal tf1_captivePortal_hidden tf1_openVpn tf1_openVpn_hidden', '');\n \t\tvidualDisplay ('tf1_pptp tf1_l2tp tf1_sslvpn tf1_captivePortal tf1_openVpn','configRow');\t \n \t\tvidualDisplay ('break_pptp break_l2tp break_sslvpn break_captivePortal break_openvpn','break');\n\t\t\t\t\tvidualDisplay ('tf1_xauth tf1_xauth_hidden','hide');\n \t\tvidualDisplay ('break_xauth','hide');\n \t\tenableTextFieldByAnchorClick('tf1_sslvpn','tf1_sslPortalName tf1_sslAuthType tf1_sslNTDOMAINProfile tf1_sslActiveDirectoryProfile tf1_sslLDAPProfile tf1_sslRadiusProfile','break_sslPortalName break_sslAuthType break_sslNTDOMAINProfile break_sslActiveDirectoryProfile break_sslLDAPProfile break_sslRadiusProfile','');\n \t\tchangeAuthType('tf1_sslAuthType');\t\n \t\t\t\tbreak; \n \t\tcase 2:\t/* Network */\n \t\t\tfieldStateChangeWr ('', '', 'tf1_pptp tf1_pptp_hidden tf1_l2tp tf1_l2tp_hidden tf1_xauth tf1_xauth_hidden tf1_sslvpn tf1_sslvpn_hidden tf1_captivePortal tf1_captivePortal_hidden tf1_openVpn tf1_openVpn_hidden', '');\n \t\tvidualDisplay ('tf1_pptp tf1_l2tp tf1_xauth tf1_xauth_hidden tf1_sslvpn tf1_captivePortal tf1_openVpn','configRow');\t \n \t\tvidualDisplay ('break_pptp break_l2tp break_xauth break_sslvpn break_captivePortal break_openvpn','break');\n \t\t\n \t\tenableTextFieldByAnchorClick('tf1_sslvpn','tf1_sslPortalName tf1_sslAuthType tf1_sslNTDOMAINProfile tf1_sslActiveDirectoryProfile tf1_sslLDAPProfile tf1_sslRadiusProfile','break_sslPortalName break_sslAuthType break_sslNTDOMAINProfile break_sslActiveDirectoryProfile break_sslLDAPProfile break_sslRadiusProfile','');\n \t\tchangeAuthType('tf1_sslAuthType');\t\n \t\tbreak; \t\t\n \t\tcase 3:\t/* Front Desk */\n \t\tcase 4:\t/* Guest */\n \t\t\tfieldStateChangeWr ('tf1_pptp tf1_pptp_hidden tf1_l2tp tf1_l2tp_hidden tf1_xauth tf1_xauth_hidden tf1_sslvpn tf1_sslvpn_hidden tf1_openVpn tf1_openVpn_hidden tf1_sslPortalName tf1_sslAuthType tf1_sslNTDOMAINProfile tf1_sslActiveDirectoryProfile tf1_sslLDAPProfile tf1_sslRadiusProfile tf1_captivePortal tf1_captivePortal_hidden', '', '', '');\n \t\tvidualDisplay ('tf1_pptp tf1_l2tp tf1_xauth tf1_xauth_hidden tf1_sslvpn tf1_openVpn tf1_sslPortalName tf1_sslAuthType tf1_sslNTDOMAINProfile tf1_sslActiveDirectoryProfile tf1_sslLDAPProfile tf1_sslRadiusProfile tf1_captivePortal','hide');\t \n \t\tvidualDisplay ('break_pptp break_l2tp break_xauth break_sslvpn break_sslPortalName break_sslAuthType break_sslNTDOMAINProfile break_sslActiveDirectoryProfile break_sslLDAPProfile break_sslRadiusProfile break_captivePortal break_openvpn','hide'); \t\t\n \t\tbreak;\n \t\t\n \t}\n}", "function handleSimpleLogin () {\n $scope.setFormStatus('simpleLogin');\n }", "function getRememberMestatus() {\n\t\tvar selected = document.getElementById(\"myCheck\").checked;\n\t\tif(selected) {\n\t\t\tsetRemeberMeCookie(\"remeberMe\", username, 1);\n\t\t} else {\n\t\t\tsetRemeberMeCookie(\"remeberMe\", \"\", -1);\n\t\t}\n\t}", "function loadCredentials() {\n\tvar checkbox = document.getElementById(\"rememberInput\"); \n\tvar loadStore = localStorage.getItem(\"AtmosphereLogin\");\n\tif (loadStore !== null) {\n\t\tcheckbox.checked = true;\n\t\tvar creds = JSON.parse(loadStore);\n\t\tdocument.getElementById(\"username\").value = creds.user;\n\t\tdocument.getElementById(\"password\").value = creds.pass;\n\t}\n\telse {\n\t\tcheckbox.checked = false;\n\t}\n}", "function checkLogin() {\r\n resultNode = dojo.byId('validated');\r\n resultWidget = dojo.byId('validated');\r\n if (resultNode && resultWidget) {\r\n saveResolutionToSession();\r\n // showWait();\r\n if (changePassword) {\r\n quitConfirmed = true;\r\n noDisconnect = true;\r\n var tempo=300;\r\n if (dojo.byId('notificationOnLogin')) {\r\n tempo=1500;\r\n } \r\n setTimeout('window.location = \"main.php?changePassword=true\";',tempo);\r\n } else {\r\n quitConfirmed = true;\r\n noDisconnect = true;\r\n url = \"main.php\";\r\n if (dojo.byId('objectClass') && dojo.byId(\"objectId\")) {\r\n url += \"?directAccess=true&objectClass=\"\r\n + dojo.byId('objectClass').value + \"&objectId=\"\r\n + dojo.byId(\"objectId\").value;\r\n }\r\n var tempo=400;\r\n if (dojo.byId('notificationOnLogin')) {\r\n tempo=1500;\r\n } \r\n setTimeout('window.location =\"'+url+'\";',tempo);\r\n }\r\n } else {\r\n hideWait();\r\n }\r\n}", "function switchToLogin(){\n\t\tturnService.closeWaitingAlert();\n\t\t$userLoginArea.show();\t\t\n\t\t$pageWrapper.hide();\n\t}", "function checkRemeberMeStatus() {\n\t\tvar user = getRememberMeCookie(\"remeberMe\");\n\t\tif(user != \"\" ) {\n\t\t\t$(\"#userName\").val(user);\n\t\t\t$(\"#myCheck\").selected(true);\n\t\t} else {\n\t\t\t$(\"#myCheck\").selected(false);\n\t\t}\n\t}", "handleShowPasswordSection() {\n this.setState({\n checked: !this.state.checked,\n });\n }", "function checkLogin() {\n\t$.getJSON(\"service/checkLogin.php\", function(data) {\n\t\tif (data['status'] == 'true') {\n\t\t\t// if login, show the interface of after login\n\t\t\thideElement('.non-user-item');\n\t\t\tshowElement('.user-item');\n\t\t\t//direct to the dashboard\n\t\t\tredirect('Dashboard');\n\t\t} else {\n\t\t\t// else, redirect to the home page\n\t\t\tshowElement('#slide-show');\n\t\t\tredirect('Home');\n\t\t}\n\t});\n}", "function isLoggedIn() {\n return $(\"#isloggedin\").text() == \"true\";\n}", "@radio('sidebar', 'show')\n show() {\n if (this.user.isConnected()) {\n this.showMenu();\n }else {\n this.showLoginForm();\n }\n }", "function authenticationSMTPTypeChange(radioName){\n var selValue = radioCheckedValueGet(radioName);\n if (!selValue) \n return;\n switch (parseInt(selValue, 10)) {\n case 1: /* None */\n fieldStateChangeWr('tf1_tlsSupport tf1_txtSmtpLoginUserName tf1_txtSmtpLoginPwd', '', '', '');\n vidualDisplay('tf1_tlsSupport tf1_txtSmtpLoginUserName tf1_txtSmtpLoginPwd', 'hide');\n vidualDisplay('breakTlsSupport break8 break9', 'hide');\n break;\n \n case 2: /* Plain Login */\n case 3: /* CRAM-MD5 */\n fieldStateChangeWr('', '', 'tf1_tlsSupport tf1_txtSmtpLoginUserName tf1_txtSmtpLoginPwd', '');\n vidualDisplay('tf1_tlsSupport tf1_txtSmtpLoginUserName tf1_txtSmtpLoginPwd', 'configRow');\n vidualDisplay('breakTlsSupport break8 break9', 'break');\n break;\n }\n}", "function initializePage_login()\r\n{\r\n page_login.initializeForm(page_userLogin);\r\n page_login.initializeButton(showPage_createAccount);\r\n}", "function handleLogin() {\n setIsLogin((isLogin) => !isLogin);\n }", "function loginTomtTomt() {\r\n Aliases.linkAuthorizationLogin.Click();\r\n\r\n let brukernavn = \"\";\r\n let passord = \"\";\r\n loggInn(brukernavn, passord);\r\n\r\n //Sjekk om feilmelding kommer frem: \r\n aqObject.CheckProperty(Aliases.textnodeBeklagerViFantIngenMedDe, \"Visible\", cmpEqual, true);\r\n aqObject.CheckProperty(Aliases.textnodeFyllInnDittPassord, \"contentText\", cmpEqual, \"Fyll inn ditt passord\");\r\n aqObject.CheckProperty(Aliases.textnodeFyllInnDinEPostadresse, \"contentText\", cmpEqual, \"Fyll inn din e-postadresse\");\r\n\r\n Aliases.linkHttpsTestOptimeraNo.Click();\r\n}", "function defaultCheck() {\n\t$(\"#radioWeekly\").prop('checked', true);\n}", "function checkLogin(){\n\tif (sessionStorage.getItem('user_email')==null ||sessionStorage.getItem('user_email')==null){\n\t\t$.mobile.changePage($(\"#login-page\"));\n\t}\n}", "[GETTER_IS_LOGIN](state) {\n return state.isLogin;\n }", "function radioHackOpen(){\n if($(\"input[name=\"+callerName+\"]\").size()> 1 && callerType == \"radio\") {\t\t// Hack for radio group button, the validation go the first radio\n caller = $(\"input[name=\"+callerName+\"]:first\");\n $.validationEngine.showTriangle = false;\n var callerId =\".\"+ $(caller).attr(\"id\");\n if($(callerId).size()==0){\n $.validationEngine.isError = true;\n }else{\n $.validationEngine.isError = false;\n }\n }\n if($(\"input[name=\"+callerName+\"]\").size()> 1 && callerType == \"checkbox\") {\t\t// Hack for checkbox group button, the validation go the first radio\n caller = $(\"input[name=\"+callerName+\"]:first\");\n $.validationEngine.showTriangle = false;\n var callerId =\"div.\"+ $(caller).attr(\"id\");\n //if($(callerId).size()==0){ $.validationEngine.isError = true; }else{ $.validationEngine.isError = false;}\n if($(callerId).size()==0){\n $.validationEngine.isErrorPrompt = false;\n }else{\n $.validationEngine.isErrorPrompt = true;\n }\n }\n }", "function toggle(radioButton) {\n if (window.localStorage == null) {\n alert('Local storage is required for changing providers');\n return;\n }\n window.localStorage.enableRaw = document.getElementById('enable-raw').checked && 'yes' || 'no';\n window.localStorage.enableRemember = document.getElementById('enable-remember').checked && 'yes' || 'no';\n}", "function autologin()\r\n{\r\n\tdocument.getElementsByName(\"bs_email\").item(0).value = generateFakeEmail();\r\n\tif(document.getElementsByName(\"require_terms_g\").length > 0)\r\n\t{\r\n\t\tdocument.getElementsByName(\"require_terms_g\").item(0).checked = true;\r\n\t}\r\n\tdocument.getElementsByName(\"bluesocket_g\").item(0).submit();\r\n}", "function checkLogIn() {\n\tif (localStorage[\"mcsa_checkin_firstname\"] != null || localStorage[\"mcsa_checkin_userid\"] != null)\n\t\twindow.location = \"checkin.html\";\n}", "function checkRadio(inputPersonType) {\n document.getElementById(inputPersonType).click();\n}", "function selectedSemester(radioGroup) {\n\n\t\t\t\tvar radioSem = document.getElementsByName(radioGroup);\n\t\t\t\t// var isSelected = false;\n\t\t\t\n\t\t\t\tfor ( var l = 0; l < radioSem.length; l++)\n\t\t\t\t\tif (radioSem.item(l).checked === true) \n\t\t\t\t\t\treturn true;\n\t\t\t\t\t\n\t\t\t\treturn false;\t\n\t\t\t\n\t\t}", "function loginInit ()\n {\n var usrObj = document.getElementById ('txtUserName'); \n var screenShowObj = document.getElementById ('hdSreenVal');\n if(screenShowObj)\n {\n var screenVal = parseInt(screenShowObj.value, 10);\n switch (screenVal)\n { \n case 1:\n fieldStateChangeWr ('txtUserName txtPwd txtNewPassWd txtCnfPwd', '', '', '');\n changeScreen ('LoginTbl PasswordChengeTbl ForcedLoginTbl', 'LoggedinTbl');\n var requestObj = getRequestObject ();\n\t\t var accessType = document.getElementById ('hdAccessType').value;\n\t\t if(parseInt (accessType,10) == 3) \n\t\t\t\t{\n \t\trunUserLoginCount (requestObj, document.getElementById ('hdUsrName').value,document.getElementById ('hdAlertType').value,document.getElementById ('hdMaxValue').value,document.getElementById ('hdAlertValue').value);\n\t\t\t\t}\n break;\n case 2:\n fieldStateChangeWr ('txtUserName txtPwd txtNewPassWd txtCnfPwd', '', '', '');\n changeScreen ('LoginTbl PasswordChengeTbl LoggedinTbl', 'ForcedLoginTbl');\n break;\n\t case 4:\n\t\t \t\t\tfieldStateChangeWr ('txtNewPassWd txtCnfPwd', '', 'txtUserName txtPwd', '');\n\t\t \t\t\tchangeScreen ('LoginTbl PasswordChengeTbl LoggedinTbl ForcedLoginTbl', '');\n var chkAuthObj = document.getElementById ('chkAuthTypeEnable');\n if (chkAuthObj)\n {\n if (chkAuthObj.checked)\n {\n fieldStateChangeWr ('', '', 'loginBtSla', '');\n }\n else\n {\n fieldStateChangeWr ('loginBtSla', '', '', '') ;\n }\n }\n\t\t\t\t break;\n case 0:\n default: \n fieldStateChangeWr ('txtNewPassWd txtCnfPwd', '', 'txtUserName txtPwd', '');\n changeScreen ('PasswordChengeTbl LoggedinTbl ForcedLoginTbl', 'LoginTbl');\n if (!usrObj) return;\n usrObj.focus (); \n break;\n }\n } \n }", "function checkLogin() {\n FB.getLoginStatus(function (response) {\n if (response.status === 'connected') {\n // we have user ! change button\n userInfo();\n buttonView('logIn')\n }\n else {\n // request user login\n logMe()\n }\n });\n }", "function checkSignIn(){\r\n if (getCookie(\"signedin\") == \"true\"){\r\n changeSignIn();\r\n return true;\r\n }\r\n return false;\r\n}", "async setLoginState() {\n const res = await fetch(\"/.auth/me\");\n const json = await res.json();\n if (json.clientPrincipal) {\n clientPrincipal = json.clientPrincipal;\n login.style.display = \"none\";\n logoutButton.style.display = \"inline-flex\";\n colorControl.style.display = \"flex\";\n } else {\n login.style.visibility = \"visible\";\n logoutButton.style.display = \"none\";\n }\n }", "handleGetid(){\n let RadioidNo = document.getElementById(\"idCaptureNo\")\n let RadioidYes = document.getElementById(\"idCaptureYes\")\n\n if (this.state.idCapture === \"true\") {\n RadioidYes.checked = true\n }\n if (this.state.idCapture === \"false\") {\n RadioidNo.checked = true\n }\n }", "function check_(){ \n if(username.value === \"user\" && password.value === \"user\"){\n location = \"./home.html\";\n } if (username.value === \"admin\" && password.value === \"admin\") {\n location = \"./admin\";\n } else {\n alert(\"Check your creditionals\")\n }\n}", "function RadioButton(value) {\n dmsManifestConfig.SelectedValue = value;\n if (value == \"Consignment\") {\n getConsignmentDetails();\n ManifestOrdersCtrl.ePage.Masters.Consignment = true;\n ManifestOrdersCtrl.ePage.Masters.SalesOrder = false;\n ManifestOrdersCtrl.ePage.Masters.ASNLine = false;\n } else if (value == \"ASNLine\") {\n // getASNDetails();\n ManifestOrdersCtrl.ePage.Masters.ASNLine = true;\n ManifestOrdersCtrl.ePage.Masters.Consignment = false;\n ManifestOrdersCtrl.ePage.Masters.SalesOrder = false;\n } else if (value == \"SalesOrder\") {\n getOrderDetails();\n ManifestOrdersCtrl.ePage.Masters.SalesOrder = true;\n ManifestOrdersCtrl.ePage.Masters.ASNLine = false;\n ManifestOrdersCtrl.ePage.Masters.Consignment = false;\n }\n GetConfigDetails(value);\n }", "function getSelectedRadio() {\n\t\tvar radios = document.forms[0].status;\n\t\tfor(var i=0; i<radios.length; i++) {\n\t\t\tif(radios[i].checked) {\n\t\t\t\tcrateValue = radios[i].value;\n\t\t\t}\n\t\t}\n\t} // End Selected Radio Button Function", "function loginAs(event,$obj){\r\n\t\tif(!$obj.hasClass('disabled')){\r\n\t\t\t$obj.addClass('disabled');\r\n\t\t\tlocation.href = 'j_spring_security_switch_user?j_username='+$obj.attr('param') + '&theme=' + $obj.attr('themeName');\r\n\t\t}\r\n\t}", "function getSelectedRadio(){\n\t\tvar radio = document.forms[0].mech;\n\t\tfor(var i=0; i<radio.lenth; i++){\n\t\t\tif(radio[i].checked){\n\t\t\t\tmechValue = radio[i].value;\n\t\t\t}\n\t\t}\n\t}", "function loginUgyldig() {\r\n Aliases.linkAuthorizationLogin.Click();\r\n\r\n let brukernavn = func.random(15) + \"@\" + func.random(7) + \".com\"\r\n let passord = func.random(8)\r\n loggInn(brukernavn, passord);\r\n\r\n //Sjekk om feilmelding kommer frem: \r\n aqObject.CheckProperty(Aliases.textnodeBeklagerViFantIngenMedDe, \"Visible\", cmpEqual, true);\r\n Aliases.linkHttpsTestOptimeraNo.Click();\r\n}", "function setRadioButtons(from) {\n\tvar lecture = \"\"\n\tif (from == \"register\") {\n\t\tif ($(\"#LEC101\").prop(\"checked\")) {\n\t\t\tlecture = \"101\"\n\t\t}\n\t\tif ($(\"#LEC102\").prop(\"checked\")) {\n\t\t\tlecture = \"102\"\n\t\t}\n\t} else {\n\t\tif ($(\"#LEC101U\").prop(\"checked\")) {\n\t\t\tlecture = \"101\"\n\t\t}\n\t\tif ($(\"#LEC102U\").prop(\"checked\")) {\n\t\t\tlecture = \"102\"\n\t\t}\n\t}\n\treturn lecture\n}", "function checkGuest(){\n\tif ($(\"select[name=main_company] option[value='\" + $(\"select[name=main_company]\").val() +\"']\").attr(\"guest\") === \"1\") {\n\t\t$(\"div.guestRadio\").show();\n\t} else {\n\t\t$(\"div.guestRadio input[value=yes]\").prop(\"checked\",false);\n\t\t$(\"div.guestRadio input[value=no]\").prop(\"checked\",true);\n\t\t$(\"div.guestRadio\").hide();\n\t};\n}", "function login(){\r\n activeUser = $(\"#LogUsername\").val();\r\n // $(\"#welPlay\").prop('disabled', false);\r\n\r\n alert('Login successful. You are now logged in as ' + activeUser);\r\n SwitchDisplay('welcome',true);\r\n $('#welLogin').html('Logout');\r\n\r\n}", "function checkLoggedIn(){\n\t//find the token\n\tvar tk = readCookie(\"tk\");\n\tif(tk)return true;\n\telse return false;\n}", "function loginClick() {\n\t username = $(\"#userName\").val();\n\t password = $(\"#password\").val();\n\t getRememberMestatus();\n\t var params = {\"username\":username,\"password\":password};\n\t var callerId = \"login\";\n\t var url = \"/logon\";\n\t reqManager.sendPost(callerId, url, params, loginSuccessHandler, loginErrorHandler, null);\n\t}", "closeLoginForm() {\n document.getElementById(\"showLoginForm\").checked = false;\n this.switchToLogin();\n updatePageTitle(\"Utforsk nye aktiviteter\");\n }", "function setRadio(num) {\n document.theForm.theRadio[0].checked = (num==0)?true:false;\n document.theForm.theRadio[1].checked = (num==1)?true:false;\n}", "function loginSetupPageReloadOnCondition(formObj)\n{\n var ceeRealmId = formObj.ceeRealmId.value;\n var realmId = formObj.authRealmId[formObj.authRealmId.selectedIndex].value;\n var prevSelectedRealmId = formObj.prevSelectedRealmId.value;\n\n if(prevSelectedRealmId==\"\" && realmId==ceeRealmId)\n {\n formObj.prevSelectedRealmId.value = realmId;\n formObj.submit();\n }\n else if(prevSelectedRealmId!=ceeRealmId && realmId == ceeRealmId)\n {\n formObj.prevSelectedRealmId.value = realmId;\n formObj.submit();\n }\n else if(prevSelectedRealmId==ceeRealmId && realmId != ceeRealmId)\n {\n formObj.prevSelectedRealmId.value = realmId;\n formObj.submit();\n }\n formObj.prevSelectedRealmId.value = realmId;\n}", "loginButton() {\n this.setState({\n loginPage: true,\n signupPage: false,\n homePage: false,\n categoryPage: false,\n venuePage: false,\n })\n }", "function checkLogin() {\r\n if (sessionStorage.loggedInUsername !== undefined) { //if there is a user logged in\r\n let userObject = JSON.parse(localStorage[sessionStorage.loggedInUsername]); //get the details of the user from local storage\r\n if (document.title === \"Snakes\") { //if on homepage\r\n document.getElementById(\"showUserName\").innerText = \"Username: \" + userObject['username']; //displays username of the user\r\n document.getElementById(\"play\").outerHTML = '<a href=\"play.php\" id=\"play\">Play</a>'; //play button with href play page\r\n }\r\n document.getElementById(\"choice\").outerHTML = '<a href=\"index.php\" onclick=\"signOut()\">Sign out</a>'; //sign out button appears\r\n } else { //if user not logged in\r\n document.getElementById(\"choice\").outerHTML = '<a href=\"sign-in.php\">Account</a>'; //sign in button appears\r\n if (document.title === \"Snakes\") { //if on homepage\r\n document.getElementById(\"play\").outerHTML = '<a href=\"sign-in.php\" id=\"play\">Play</a>'; //play button with href sign in\r\n }\r\n }\r\n}", "function showReOpRand(){\n\tvalue = document.getElementById('reOpValue');\n\n\tif(value.checked == true){\n\t\tdocument.getElementById('randRegOp').style.display='block';\n\t}\n\telse{\n\t\tdocument.getElementById('randRegOp').style.display='none';\n\t}\n}", "function viewRadio()\r\n{\r\n changeContent('content', '../Php/json.php', 'EX=radio');\r\n\t \r\n}", "function btnLoginClicked() {\n\tif ($.txtUserName.value.length != 0 && $.txtPassword.value.length != 0) {\n\t\t$.activityIndicator.show();\n\t\tvar hostIP = $.txtHostIP.value,\n\t\t username = $.txtUserName.value,\n\t\t password = $.txtPassword.value;\n\n\t\tif ($.swcKeepMeSignedIn.value == true) {\n\t\t\tLoginGlobal.saveLoginInformationToProperties(username, hostIP);\n\t\t}\n\t\tLoginGlobal.login(hostIP, username, password);\n\t} else {\n\t\talert(\"Please enter a username and password.\");\n\t}\n}", "function switchAuthModeHandler() {\n setIsLogin((prevState) => !prevState);\n }", "function handleLoggedIn(value) {\n\t\tchangeIsLoggedIn(value);\n\t}", "function checkLogin() {\r\n if (getCookie(\"GioeleSession\").exist) {\r\n autoLogin();\r\n } else {\r\n\r\n }\r\n}", "function test() {\n\tconsole.log(document.getElementById(\"smallCap\").checked);\n}", "function TurnOn(elmid)\n {\n if(document.getElementById(elmid))\n {\n document.getElementById(elmid).className = 'formbox';\n if(document.getElementById(elmid).type == 'radio')\n {\n document.getElementById(elmid).className = '';\n }\n document.getElementById(elmid).disabled = false;\n document.getElementById(elmid).readOnly = false;\n }\n }", "function checkedRadioButton(){\n console.log($(\"input:checkbox:not(:checked)\"));\n $(\"input:checkbox:not(:checked)\").prop(\"checked\", true);\n}", "function checkLogin(){\n if(!loggedIn){\n document.getElementById('myLogin').style.display='block'; //displays modal login page\n }\n else{\n alert(\"Good bye! \" + testId[currentUser]);\n document.getElementById('userLogin').innerHTML = \"Login\"; //changes Login into Logout\n currentUser = -1; //resets the user\n loggedIn = false; //not logged in\n }\n}", "logInOrSignUp() {\n if (this.state.pageName === 'LOG IN') {\n this.sendFormToLogIn();\n } else {\n this.sendFormToSignUp();\n }\n }", "function makeChoice()\r\n{\r\n\r\nif(document.getElementById(\"rabuse6\").checked)\r\n {\r\n document.form3.other.style.visibility=\"visible\";\r\n }\r\n else\r\n {\r\n document.form3.other.style.visibility=\"hidden\";\r\n document.form3.other.value=\"\";\r\n\r\n }\r\n/*\r\n var val = 0;\r\n for( i = 0; i < document.form3.rabuse.length; i++ )\r\n {\r\n if(document.getElementById(\"rabuse\"+i).checked)\r\n {\r\n val = document.getElementById(\"rabuse\"+i).value;\r\n\r\n if(val=='rabuse6')\r\n {\r\n document.form3.other.style.visibility=\"visible\";\r\n document.form3.other.disabled=false;\r\n document.form3.other.focus();\r\n }\r\n else\r\n {\r\n document.form3.other.style.visibility=\"hidden\";\r\n document.form3.other.value=\"\";\r\n }\r\n }\r\n else\r\n {\r\n document.form3.other.style.visibility=\"hidden\";\r\n }\r\n }\r\n*/\r\n}", "function authenticate() {\n success.value = true;\n fail.value = false; \n setTimeout(setLoggedIn, 100);\n}", "function check(form)\n{\n if(form.userid.value == \"Mike\" && form.pswrd.value == \"momo\") //Vi tjekker om ens username og password er Mike og momo\n {\n window.open('kedulandingpage.html') && window.close('login.html') //så kan man logge ind\n } else {\n alert(\"Brugernavn og/eller Password er ugyldigt. Prøv igen.\") //Ellers får man en besked om forkert brugerlogin\n }\n}", "function identifyLoginState() {\n\tif (window.sessionStorage.getItem(\"loginUser\") != \"\") {\n\t\t$(\".publish-area\").removeClass(\"hidden-window\", 700);\n\t\t$(\"#shadow\").fadeIn(700);\n\t} else {\n\t\talert(\"請先登入 !\");\n\t\t$(\".login-area\").removeClass(\"hidden-window\", 700);\n\t\t$(\"#shadow\").fadeIn(700);\n\t}\n}", "function mostrarContrasena(ID){\n var tipo = document.getElementById(ID);\n if (tipo.type == \"password\") {\n tipo.type = \"text\";\n document.getElementById(\"chk-password\").checked=true;\n } else if(tipo.type == \"text\"){\n tipo.type = \"password\";\n document.getElementById(\"chk-password\").checked=false;\n }\n}", "function bottons(inlogin){\n switch(inlogin){\n case true:\n document.getElementById('login-button').style.display='none'\n \n \n break;\n case false:\n document.getElementById('login-button').style.display='none'\n document.querySelector('close').disable=false\n break;\n \n }\n}", "function getUserPreferenceCall() {\n var result = featureTourElements.firstTimeUser;\n if (result === \"True\") {\n $(\"#firstTimeLogin\").show();\n } else if (result === \"False\") {\n $(\"#firstTimeLogin\").hide();\n }\n}", "function standardLogin() {\n\tvar baseUrl, url, params;\n\n\tbaseUrl = $('#form-edit input[name=base-url]').val();\n\turl = baseUrl + '/setup/admin/standard-login';\n\tparams = $('.has-ldap :input').serialize();\n\n\t$('.btn-save').attr('disabled', true);\n\t$('.yes-ldap, .no-ldap').hide();\n\t$('.progress').show();\n\n\t$.post(\n\t\turl,\n\t\tparams,\n\t\tfunction (data) {\n\t\t\t$('.progress').hide();\n\n\t\t\tif (data.status === true) {\n\t\t\t\twindow.location = baseUrl + '/setup/accounts/';\n\t\t\t} else {\n\t\t\t\t$('.has-ldap .message .content').html(data.message);\n\t\t\t\t$('.has-ldap .message').show();\n\t\t\t\t$('.no-ldap').show();\n\t\t\t\t$('.btn-save').attr('disabled', false);\n\t\t\t}\n\t\t},\n\t\t'json'\n\t);\n}", "function selectedGroups() {\n\tvar checkedboxx =\"\";\n\tvar sgroups = document.getElementsByTagName('input');\n\t\n\tfor(var i =0; sgroups[i]; i++){\n\t\tif(sgroups[i].checked){\n\t\t\tcheckedboxx += sgroups[i].value += \", \";\t\t\n\t\t}\t\n\t}\n\tcheckedboxx = checkedboxx.slice(0,-2);\n\t\n\tif(checkedboxx != \"\"){\n\t\t\n\t\twindow.location.href = \"next.html?\" + checkedboxx;\n\t}\n\telse{\n\t\t\n\t}\n\t\t\n}", "get btnLogin () { return $('#back-to-login') }", "function enableDivRadioInput(divRadio)\n{\n divRadio.click();\n}", "function getSelectedRadio(){\n\t\tvar radios = document.forms[0].sex;\n\t\tfor(var i=0; i<radios.length; i++){\n\t\t\tif(radios[i].checked){\n\t\t\t\tsexValue = radios[i].value;\n\t\t\t}\t\t\t\t\t\t\n\t\t}\n\t}", "function validate_userType() {\n var length = $(\"[name='userType']:checked\").length;\n if (length == 0) {\n $(\"#userTypeError\").show();\n $(\"#userTypeError\").html(\"***Please SELECT <b>User TYPE</b>\");\n $(\"#userTypeError\").css(\"color\", \"red\");\n userTypeError = false\n } else {\n\n $(\"#userTypeError\").hide();\n userTypeError = true;\n var elements = document.getElementsByName(\"userType\");\n for (var i = 0; i < elements.length; i++) {\n if (elements[i].checked && elements[i].defaultValue == \"Vendor\") {\n $(\"#userFor\").val(\"Purchase\")\n }\n if (elements[i].checked && elements[i].defaultValue == \"Customer\") {\n $(\"#userFor\").val(\"Sale\")\n }\n }\n $(\"#userForError\").hide();\n }\n\n return userTypeError;\n }", "function detectLogin(){\n /*obtengo los valores*/\n var email_user_=$.session.get(\"EmailUser\");\n var password_user_=$.session.get(\"PasswordUser\");\n var Object_user_=JSON.parse($.session.get(\"ObjectUser\"));\n if(typeof(email_user_)=='string' && typeof(password_user_)==\"string\")\n {\n $(\".email-user\").text(Object_user_.Name)\n\n }else{\n window.location=\"chat-login.html\";\n }\n }", "function setRadioButtonR(){\t\r\n\tif (polygon) {\r\n\t\tconsole.log(\"a\")\r\n\t\tdocument.getElementById('r1').checked = \"checked\";\r\n\t\t//document.getElementById('r2').checked = \"unchecked\";\r\n\t}else{\r\n\t\tconsole.log(\"b\")\r\n\t\tdocument.getElementById('r2').checked = \"checked\";\r\n\t\t//document.getElementById('r1').checked = \"unchecked\";\r\n\t}\r\n}", "function loginValidate ()\n {\n var txtFieldIdArr = new Array ();\n txtFieldIdArr[0] = \"txtUserName,\"+LANG_LOCALE['12144'];\n txtFieldIdArr[1] = \"txtPwd,\"+LANG_LOCALE['12074'];\n if (txtFieldArrayCheck (txtFieldIdArr) == false)\n return false;\n\n if (document.getElementById ('hdUserAgent'))\n document.getElementById ('hdUserAgent').value = navigator.userAgent;\n\n return true;\n }", "function vreme_isk_uk(){\n\tvar opcije = document.getElementsByName(\"vreme_radio\")\n\tif(opcije[0].checked == true){\n\t\tdocument.getElementById(\"vrem_ogr_input\").disabled = false\n\t\treturn true\n\t} else {\n\t\tdocument.getElementById(\"vrem_ogr_input\").disabled = true\n\t\treturn false\n\t}\n}", "function GetItemTrueFalseButton4(){\n var val1 = document.getElementById(\"exampleRadios1\").checked;\n var val2 = document.getElementById(\"exampleRadios2\").checked;\n var returnval;\n if(val1 === true){\n returnval = \"change\";\n }\n else if(val2 === true){\n returnval = \"else\";\n }else{\n returnval = \"N/A\";\n }\n // Validation(returnval); - Validation is currently done on text entries\n return returnval;\n}", "function opcion (){\nif (document.getElementById(\"male\").checked = true) {\n document.getElementById(\"female\").checked = false;\n}\nelse {\n document.getElementById(\"male\").checked = false;\n}}", "function init() {\nvar hiddenStatus = document.getElementById('hiddenstatus');\n\n\tvar selectedRadioBtn = selectedRadio();\n\n\tif(selectedRadioBtn != false)\n\t{\n\tdoubleClick(selectedRadioBtn);\n\tdoubleClick(selectedRadioBtn);\n\t}\n\telse\n\t{\n\t\t//no option exsit\n\t\tconsole.log(\"no option exist\");\n\t\tvar selectedRadioBtn = allRadios[0];\n\t\t//click 3 times\n\t\tdoubleClick(selectedRadioBtn);\n\t\tselectedRadioBtn.click(selectedRadio);\n\t\t\n\t}\n\tconsole.log(hiddenStatus.value + \" hidden in init \")\n}", "function checkLogin() {\n return attempt(Cookies.get('Authorization'), function (response) {\n auth = Cookies.get('Authorization');\n setAuthCookie(auth);\n $(\"#span-name\").text(response.department+' '+response.name);\n }, function () {\n window.location.replace(\"login.html\");\n });\n}", "isLoggedIn() {}", "function login() {\n if (ctrl.remember) {\n $window.localStorage.setItem('ldap_username', ctrl.username);\n $window.localStorage.setItem('ldap_password', ctrl.password);\n }\n ctrl.loading = true;\n ipcRenderer.send('do-log-in', ctrl.username, ctrl.password);\n }", "function radioChecked(){\n $('label.option', this).each(function(){\n if ($('input[type=radio]', this).is(':checked')) { \n $(this).addClass('checked');\n } else {\n $(this).removeClass('checked');\n }\n });\n }", "function rememberUser() {\r\n\tif(localStorage.remember) {\r\n\t\tgetId('name').value = localStorage.name;\r\n\t\tgetId('email').value = localStorage.email;\r\n\t\tgetId('phone').value = localStorage.phone;\r\n\t\tgetId('address').value = localStorage.address;\r\n\t\tgetId('remember').checked = localStorage.remember;\r\n\t}\r\n}", "function checkLoginState(type) {\nFB.getLoginStatus(function(response) {\nstatusChangeCallback(response, type);\n});\n}" ]
[ "0.6465876", "0.6412882", "0.62099004", "0.60516196", "0.601075", "0.592749", "0.59256065", "0.59194016", "0.5893278", "0.58865017", "0.5842532", "0.582517", "0.5813812", "0.5804552", "0.58035344", "0.578946", "0.57890266", "0.5785933", "0.57733613", "0.57556176", "0.5755454", "0.5749613", "0.5744531", "0.57380223", "0.5724118", "0.570995", "0.5703583", "0.5701373", "0.57002383", "0.56994826", "0.5689806", "0.5689226", "0.5677594", "0.5669501", "0.56481844", "0.5647835", "0.5639593", "0.5638651", "0.55994827", "0.55885744", "0.558677", "0.5574004", "0.55680346", "0.55447906", "0.5530546", "0.5524311", "0.5522684", "0.5517949", "0.5499526", "0.5493695", "0.5490163", "0.548508", "0.5483743", "0.5481904", "0.5481808", "0.5479973", "0.547492", "0.5469175", "0.5466876", "0.54603255", "0.5460137", "0.5435418", "0.5432613", "0.5432232", "0.54268456", "0.54201543", "0.5419668", "0.5412993", "0.5412876", "0.54123145", "0.5411893", "0.54071265", "0.5403768", "0.5398511", "0.5397984", "0.53966165", "0.5395798", "0.53923017", "0.5386356", "0.5378927", "0.5376713", "0.53743565", "0.53734386", "0.53707975", "0.53688705", "0.5364556", "0.5364445", "0.5362356", "0.53519434", "0.5348789", "0.53459626", "0.53435296", "0.5338923", "0.5334334", "0.53336614", "0.5323684", "0.5322765", "0.5322747", "0.5320146", "0.5313139" ]
0.6014854
4
= Notepad module =
function qll_utility_notepad() { object = document.createElement("div"); object.setAttribute('class', 'QLLNotepad'); inner="<div id='QLLNotepad'>" + qll_lang[21] + "</div>"; inner=inner + "<textarea id='QLLNotepadContent'>" + GM_getValue("QLLMenuNotepad:content",qll_lang[24]) + "</textarea>"; inner=inner + "<div id='QLLNotepadSave'>" + qll_lang[22] + "</div>"; object.innerHTML=inner; adv=document.getElementById('content'); adv.insertBefore(object,adv.childNodes[0]); $('#QLLNotepad').click(function(){qll_utility_notepad_switch();}); $('#QLLNotepadSave').click(function(){qll_utility_notepad_save();}); $('#QLLNotepadContent').hide(); $('#QLLNotepadSave').hide(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openNotepad() {\n\tvar courseID = getQueryVariable('course_id');\n\topenWin(\"/bin/common/notepad.pl?course_id=\"+courseID);\n}", "function Expt() {\r\n}", "function TextEditor() {}", "function Mod() {\r\n}", "function showAbout(){\n\talert(\"Niven is a browser based text editor.\\n\\nUse and modification of this tool are covered by the APACHE 2 license\\nviewable at http://www.apache.org/licenses/LICENSE-2.0\");\n}", "function Window_TextEdit() {\n\t\tthis.initialize(...arguments);\n\t}", "function TinyLisp(){ \n}", "editTattoo () {\n\n }", "handler(argv){\n notes.readNotes(argv.title);\n }", "function main() {\n\tvar docs;\n\n\tdebug( 'Generating REPL help documentation.' );\n\tcreateHelp();\n\n\tdebug( 'Loading REPL help documentation.' );\n\tdocs = require( HELP_OUTPUT );\n\n\tdebug( 'Generating REPL examples.' );\n\tcreateExamples( docs );\n} // end FUNCTION main()", "function help() {\n\n}", "function ListHelp() {\n}", "handler(argv) {\n notes.addNote(argv.title,argv.body)\n }", "function MZConsole(){}", "function help() {\n printLine('The following commands work. Hover them for more information.');\n printLine('' +\n ' <span class=\"yellow\" title=\"Explain the list of commands\">help</span>,' +\n ' <span class=\"yellow\" title=\"Clear the screen for freshness\">clear</span>,' +\n ' <span class=\"yellow\" title=\"List all the files in this directory\">ls</span>,' +\n ' <span class=\"yellow\" title=\"List all links on the website\">tree</span>,' +\n ' <span class=\"yellow\" title=\"Change directory to `dirname`\">cd </span>' +\n '<span class=\"blue\" title=\"Change directory to `dirname`\"><em>dirname</em></span>,' +\n ' <span class=\"yellow\" title=\"Show the contents of `filename`\">cat </span>' +\n '<span class=\"green\" title=\"Show the contents of `filename`\"><em>filename</em></span>'\n );\n printLine('<br>');\n printLine('You can also use the' +\n ' <kbd class=\"cyan\">Up</kbd> and' +\n ' <kbd class=\"cyan\">Down</kbd>' +\n ' keys to navigate through your command history.'\n );\n printLine('You can click on tree nodes if CLI is not your thing.' +\n ' You\\'ll still need to hit <kbd class=\"cyan\">Enter</kbd>.'\n );\n}", "man() {\n console.log('Peano - Expression := ');\n console.log('0 | ++expr | --expr | definition');\n console.log('definition = <Nom_fonction>(<arg>i, <arg>j, ...) { }');\n console.log('\\n');\n }", "function newLevel() {\n print(\"Created by MrMiner7592\");\n print(\"If you enjoy go +1 the mod topic\");\n clientMessage(\"Welcome to Scarcity\");\n clientMessage(\"[MOD] Enjoy!\");\n}", "function Rep() {\r\n}", "function Module(){}", "function Module(){}", "function export_text_DocGenerator() {\n\t//----Debugging------------------------------------------\n\t// The following alert-Command is useful for debugging \n\t//alert(\"docgenerator.js:export_text()-Call\")\n\t//----Create Object/Instance of DocGenerator----\n\t// var vMyInstance = new DocGenerator();\n\t// vMyInstance.export_text();\n\t//-------------------------------------------------------\n\tvar vReturn = \"\";\n\tvar vCR = \"\";\n\tfor (var i=1; i<=this.rows; i++) {\n\t\t//--Before and After Overwrite no insert of new line CR \n\t\tif (this[i][1].charAt(0) == \">\") {\n\t\t\tvCR = \" \";\n\t\t} else {\n\t\t\tvReturn += vCR + this[i][1];\n\t\t\tvCR = \" \\n\";\n\t\t}\n\t};\n\treturn vReturn;\n}", "edit() {\n }", "function displayHelp()\r\n{\r\n dwscripts.displayDWHelp(HELP_DOC);\r\n}", "function WorkspacePlain() {\n }", "function Module() {\r\n}", "function processAllText()\n{\n txt = wpTextbox1.value;\n if (txt=='version') alert('Викификатор '+wmVersion);\n processText();\n r(/^[\\n\\r]+/, '');\n wpTextbox1.value = txt;\n txt = '';\n if (window.auto_comment && window.insertSummary && !document.editform.wpSection.value)\n insertSummary('русификатор');\n}", "handler(argv){\n notes.addNote(argv.title, argv.body)\n }", "editCommand(){const richtext=this.shadowRoot.getElementById(\"richtext\"),editmode=richtext.contentDocument;editmode.designMode=\"on\"}", "function checknotes(){\r\n\r\n}", "open (text) {\n return super.open(text)\n }", "open (text) {\n return super.open(text)\n }", "function filemenu() {\r\n console.crlf();\r\n\tconsole.gotoxy(2,24);\r\n console.putmsg(mystText(\" Womp womp. Transfer section is not available. \\1n\\1c\\1hTry \\1b\\1hG\\1r\\1ho\\1y\\1ho\\1b\\1hg\\1g\\1hl\\1r\\1he\\1c?\\1n\"));\r\n console.pause();\r\n return;\r\n}", "function esBasics(){ askAboutInsert(insertableText.esBasics.text); }", "function displayHelp()\n{\n dwscripts.displayDWHelp(HELP_DOC);\n}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function main () {\n\n // Process the function only if document is not empty and lines are selected\n if (( UltraEdit.document.length > 0 ) && ( UltraEdit.activeDocument.isSel() )) {\n\n // Get current column mode\n var column_mode = UltraEdit.columnMode;\n\n // Deactivate column mode\n UltraEdit.columnModeOff();\n\n // Variable declaration\n var comment_txt = UltraEdit.activeDocument.selection;\n var comment_len = comment_txt.length;\n var comment_start = 1;\n var line = \"\";\n var tab = \"\";\n var line_comment = \"#\";\n\n // Get line terminator\n if ( UltraEdit.activeDocument.lineTerminator == 0 ) {\n var line_Terminator = \"\\r\\n\";\n } else {\n var line_Terminator = \"\\n\";\n }\n\n // Get column start : selection column - selection length\n comment_start = UltraEdit.activeDocument.currentColumnNum - comment_len;\n\n // For PERL files (extenstion : pl or pm)\n if (UltraEdit.activeDocument.isExt(\"pl\") || UltraEdit.activeDocument.isExt(\"pm\")) {\n line_comment = \"#\";\n // For VHDL files (extenstion : vhd)\n } else if ( UltraEdit.activeDocument.isExt(\"vhd\")) {\n line_comment = \"--\";\n // For Verilog/SystemVerilog files (extenstion : v or sv)\n } else if (UltraEdit.activeDocument.isExt(\"sv\") || UltraEdit.activeDocument.isExt(\"v\")) {\n line_comment = \"//\";\n }\n\n // Tab value according to column start\n for (i = 1; i < comment_start; i++) {\n tab += \" \";\n }\n\n // Print line 1 : comment character + ' ' + N * '-' + ' ' + comment character + line terminator\n line += line_comment;\n for (i = 0; i < ( comment_len + 2 ); i++) {\n line += \"-\";\n }\n line += line_comment;\n line += line_Terminator;\n\n // Print line 2 : space + comment character + ' ' + comment + ' ' + comment character + line terminator\n line += tab + line_comment + \" \" + comment_txt + \" \" + line_comment + line_Terminator;\n\n // Print line 1 : space + comment character + ' ' + N * '-' + ' ' + comment character\n line += tab;\n line += line_comment;\n for (i = 0; i < ( comment_len + 2 ); i++) {\n line += \"-\";\n }\n line += line_comment;\n\n // Print cartbridge\n UltraEdit.activeDocument.write( line );\n\n // Restore column mode if was previous true\n if ( column_mode ) {\n UltraEdit.columnModeOn;\n }\n }\n}", "function Help() {\n}", "function Help() {\n}", "get LinuxEditor() {}", "get WindowsEditor() {}", "function help() {\n console.log(`\n notes USAGE: notes \n\n --add | -a <your note> - add an entry to your notes\n --category <category name> - give your note a category\n\n --list | -l <optional category> - list all notes | list all notes in category\n\n --update | u <note id> update note. id required plus at least one option\n --note <note text> - will update the note's text content\n --category <category name> - will update the note's category\n\n --delete | -d <note id> - delete note by id\n `);\n\n process.exit();\n}", "help () {\n console.log(`\n Hello!\n If you want to play around with the imports provided to your WebBS module, or code that uses your module's exports, you need to provide the WebBS editor with a new module dependency provider function.\n The editor is available here as a global variable called \"WebBSEditor\" and you'll want to set the .moduleInstanceProvider field to a function that takes an instance of the editor and returns an object with two fields:\n .imports : An object that contains the imports to be provided to your module.\n .onInit : A function that takes the WebAssembly instance, which is run upon instantiation.\n\n See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance for more information.\n\n The default module dependency provider looks like this:\n\n WebBSEditor.moduleDependencyProvider = ${this.moduleDependencyProvider.toSource()};\n `);\n\n return \"Good Luck!\";\n }", "function StringHelp() {\n}", "function sayHello () {\n console.log('Hello Reader!')\n}", "function TTextNode() {}", "function TTextNode() {}", "function TTextNode() {}", "help(){\n console.log(`Module :\n NativeObserver\n Reflect\n RootBypass`);\n }", "greet() {\n\n }", "function displayHelp()\r\n{\r\n dwscripts.displayDWHelp(helpDoc);\r\n}", "openFile() {\n controller.openMarkdown();\n }", "show() { return this.tellModule(\"show\") }", "function TTextNode() { }", "function TTextNode() { }", "function Vn(e){e.doc.mode=He(e.options,e.doc.modeOption),Kn(e)}", "function FreeTextDocumentationView() {\r\n}", "function menu() {\nconsole.log(\"---------Address Book Operations--------\");\nconsole.log(\"\\t0. Close File and Exit\");\nconsole.log(\"\\t1. Add New Person and Save\");\nconsole.log(\"\\t2. Edit Person Data\");\nconsole.log(\"\\t3. Delete a Person\");\nconsole.log(\"\\t4. Sort by Last Name\");\nconsole.log(\"\\t5. Sort by ZIP\");\nconsole.log(\"\\t6. Print all Entries\");\n}", "textEnter() {}", "function miscNotes() {\n\t// Set element ID.\n\tvar id = \"misc-notes\";\n\n\tvar buttonName = \"Notes\";\n\n\t// Create an array-like object for titles.\n\tvar links = {\n\t\t\"Html within Html\": \"https://stackoverflow.com/questions/8988855/include-another-html-file-in-a-html-file\",\n\t\t\"Angular Modules and Controllers in Files\": \"https://www.w3schools.com/angular/angular_modules.asp\",\n\t\t\"Multiple Modules in AngularJS\": \"https://stackoverflow.com/questions/18512434/multiple-module-in-angularjs\", \n\t\t\"C++ if else shorthand\": \"https://stackoverflow.com/questions/24793916/shorthand-c-if-else-statement\" \n\t};\n\n\t// Call dropdownList with titles.\n\tdropdownList(id, buttonName, links);\n}", "static get description() { return 'Base class of all tool dialogs.'; }", "function btnTEOk() {\n app.ShowPopup ('ok button pressed\\n\\nstring was: '+gd.GetTxtEdit( ));\n}", "function Terminal () {}", "function greetings() {\n\n \n}", "static get TEXT() {\r\n return 1;\r\n }", "function onHelp( a_label )\n{\n helpWindow = window.open( 'edit_help.html#' + a_label, \"edit_help\" );\n helpWindow.focus();\n}", "function IM() {\n\t}", "openHelpPage() {}", "function displayHelp()\n{\n // Replace the following call if you are modifying this file for your own use.\n dwscripts.displayDWHelp(HELP_DOC);\n}", "function $textfile(path)\n{\n\tvar thisPtr=this;\n\tvar data=\"\";\n\tvar file=null;\n\tvar file_is_tmp = false;\n\t\t\n\tthis.inlet1=new this.inletClass(\"inlet1\",this,\"data is appended to the buffer. methods: \\\"bang\\\", \\\"clear\\\", \\\"write\\\", \\\"cr\\\", \\\"tab\\\", \\\"dump\\\", \\\"open\\\", \\\"read\\\", \\\"query\\\", \\\"length\\\", \\\"line\\\", \\\"tmpfile\\\", \\\"path\\\", \\\"writebin\\\"\");\t\n\n\tthis.outlet1 = new this.outletClass(\"outlet1\",this,\"text data\");\n\tthis.outlet2 = new this.outletClass(\"outlet2\",this, \"text info\");\n\t\n\t//append input\n\tthis.inlet1[\"anything\"]=function(str) {\n\t\tdata=(data.length)?data+\" \"+str:str; //prepend a space if there's already data in the buffer\t\n\t}\n\t\n\t//reset the data var\n\tthis.inlet1[\"clear\"]=function() {\n\t\tdata=\"\";\n\t}\t\n\t\n\t//write to disk\n\tthis.inlet1[\"write\"]=function() {\n\t\tfile=LilyUtils.writeDataToFile(file,data);\n\t}\n\t\n\t//write binary to disk\n\tthis.inlet1[\"writebin\"]=function() {\n\t\tif(file) LilyUtils.writeBinaryFile(file,data);\n\t}\t\n\t\n\t//create a tmp file\n\tthis.inlet1[\"tmpfile\"]=function(ext) {\n\t\tfile = LilyUtils.getTempFile(ext);\n\t\tfile_is_tmp = true;\n\t}\n\t\n\t//output the file path if it exists\n\tthis.inlet1[\"path\"]=function() {\n\t\tif(file && file.path)\n\t\t\tthisPtr.outlet2.doOutlet(file.path);\n\t\telse\n\t\t\tthisPtr.outlet2.doOutlet(\"bang\");\n\t}\n\t\n\t//new line\n\tthis.inlet1[\"cr\"]=function() {\n\t\tif(LilyUtils.navigatorPlatform() == \"windows\") {\n\t\t\tdata=data+\"\\r\\n\";\n\t\t} else {\n\t\t\tdata=data+\"\\n\";\n\t\t}\n\t}\n\t\n\t//new line\n\tthis.inlet1[\"tab\"]=function() {\n\t\tdata=data+\"\\t\";\n\t}\t\t\t\t\n\t\n\t//dump contents\n\tthis.inlet1[\"bang\"]=function() {\n\t\tthisPtr.outlet1.doOutlet(data);\n\t}\n\t\n\t//dump contents\n\tthis.inlet1[\"dump\"]=function() {\n\t\tthisPtr.outlet1.doOutlet(data);\n\t}\n\t\n\t//open in text window\n\tthis.inlet1[\"open\"]=function() {\n\t\tif(file)\n\t\t\tfile.launch();\n\t\telse\n\t\t\tLilyDebugWindow.error(\"file must be saved before it can be opened.\") //error\n\t}\t\n\t\n\t//read in a new file\n\tthis.inlet1[\"read\"]=function(p) {\n\t\treadFile(p,true);\t\t\n\t}\n\t\n\t//data array length\n\tthis.inlet1[\"query\"]=function() {\n\t\tvar arr=data.split(\"\\n\");\t\t\n\t\tthisPtr.outlet2.doOutlet(arr.length);\n\t}\n\t\n\t//data array length\n\tthis.inlet1[\"length\"]=function() {\t\t\n\t\tthisPtr.outlet2.doOutlet(data.length);\n\t}\t\n\t\n\t//output line by number\n\tthis.inlet1[\"line\"]=function(num) {\n\t\tvar arr=data.split(\"\\n\");\n\t\tif(typeof arr[parseInt(num)]!=\"undefined\")\n\t\t\tthisPtr.outlet1.doOutlet(arr[parseInt(num)]);\n\t}\n\t\n\t//remove the tmp file\n\tthis.destructor=function() {\n\t\tif(file_is_tmp) {\n\t\t\ttry {\n\t\t\t\tfile.remove(false);\t\n\t\t\t} catch(e) {\n\t\t\t\tLilyDebugWindow.error(e.name + \": \" + e.message);\n\t\t\t}\n\t\t}\n\t}\t\n\t\n\tfunction readFile(p,useFP) {\n\t\tvar fPath = null;\n\t\t\n\t\tif(p) {\n\t\t\t//get the path to the patch if we need it\n\t\t\tfPath = (p)?LilyUtils.getFilePath(p):\"\";\n\t\t\tif(!fPath) {\n\t\t\t\tLilyDebugWindow.error(\"Path \"+p+\" not found\");\n\t\t\t\treturn;\t\n\t\t\t}\t\t\t\n\t\t}\n\t\t\t\n\t\t//read the file.\t\n\t\tvar tmp=LilyUtils.readFileFromPath(fPath,useFP);\n\t\tdata=tmp.data;\n\t\tfile=tmp.file;\t\n\t}\n\t\n\treadFile(path,false); //open the file if a path is provided\n\t\n\t//called by the object creation method.\t\n\tthis.init=function() {\n\t\tthisPtr.controller.attachObserver(this.objID,\"dblclick\",function(){thisPtr.inlet1.open();},\"performance\");\t\t\t\n\t}\t\n\t\t\n\treturn this;\n}", "function Main()\n {\n \n }", "function About() {\n\n}", "function cmdEditPasteFirstChild() {}", "function insert_textpart_DocGenerator(pString,pi) {\n\t//----Debugging------------------------------------------\n\t// The following alert-Command is useful for debugging \n\t//alert(\"docgenerator.js:insert_textpart(pString,pi)-Call\")\n\t//----Create Object/Instance of DocGenerator----\n\t// var vMyInstance = new DocGenerator();\n\t// vMyInstance.insert_textpart(pString,pi);\n\t//-------------------------------------------------------\n\tthis.add(this.create_textpart(pString),pi);\n}", "printHelp () {\n let messages = this.div.querySelectorAll('.messages')[0]\n let template = this.div.querySelectorAll('template')[0]\n let messageDiv = document.importNode(template.content, true)\n\n messageDiv.querySelectorAll('.author')[0].textContent = ``\n messageDiv.querySelectorAll('.text')[0].innerHTML =\n `\n <hr>\n <p>You can use this commands in the chatt</p><br>\n <p>/help Show this dialog</p>\n <p>/nick NICK To change nickname</p>\n <p>/r MSG use 'Rövarspråk'</p>\n <p>/e MSG use Encryption</p>\n <p>/a MSG use Anton encryption</p>\n <hr>\n `\n messages.appendChild(messageDiv)\n }", "function descItem(item){\r\n exec(\"py description.py \" + item[0] + \" \" + item[1] + \" \" + item[2]);\r\n}", "function over(id_doc,id_help,texte,global,chaine)\r\n\t{\r\n\t\tikdoc(id_doc);// Add call of doc page\r\n\t\tset_text_help(id_help,texte,global,chaine,id_doc);\r\n\t}", "text () {\n\n }", "doEditMode() {\n\n }", "function getReply(){\n let {PythonShell} = require('python-shell')\n var path = require(\"path\")\n\n var options = {\n scriptPath : path.join(__dirname, './Engine/'),\n }\n\n console.log(options.scriptPath,\"Greetings\")\n\n var anton = new PythonShell('greetings.py',options);\n\n anton.on('message',function(message){\n console.log(message)\n })\n}", "function Wn(){}", "enterProgram(ctx) { console.log(\" %s: %s\", __function, ctx.getText()); }", "function Docs() {}", "function Editor() { }", "function Editor() { }", "function InFile() {\r\n}", "function printWelcome (welcomeText) {\n lineNum(8)\n println(welcomeText)\n line()\n}", "help(text) {\n return this.lib.help(text, __dirname);\n }", "function showHelp() {\t\n const helpText = fs.readFileSync('./help.txt',{encoding:'UTF-8'});\n console.log(helpText);\n}", "function update() {\n\t\tUtil.txt.setLibraryBrowser( Util.fs.getLibraries() );\n\t\tUtil.txt.setFileBrowser( Util.fs.getNotes(currentLib) );\n\t\tUtil.txt.setInputText( Util.fs.getNoteContent(currentLib,currentNote) );\n\t}", "function TTextNode(){}", "function openModuleClickTOC () {\r\n $(\"#toc li\").click (function () {\r\n var s = $(this).text().substr(1);\r\n s = s.substr (0,s.indexOf(\".\"));\r\n openModule (s);\r\n });\r\n}", "function createNoteTextarea(editNode, file)\n{\n editNode.append('<span class=\"displaySubheader\">Notes:</span><br />');\n notesBox = $('<textarea rows=\"6\" class=\"notesBox\"></textarea>');\n noteText = file.find(\".noteContainer > .displayText\").html();\n if (typeof noteText !== \"undefined\")\n {\n noteText = noteText.replace(/<br( \\/)?>/g, \"\\n\");\n notesBox.val(noteText);\n }\n editNode.append(notesBox);\n}", "function addModule() {\n $('<section>')\n .attr('id', 'rsw-discord')\n .addClass('rsw-custom-module rail-module')\n .append(\n $('<a>')\n .attr('href', ('https://discord.gg/s63bxtW'))\n .append(\n $('<img>')\n .attr('src', 'https://vignette.wikia.nocookie.net/vocaloid/images/2/2d/Discord-Logo-Color.png')\n ),\n $('<div>')\n .append(\n $('<p>')\n .append(\n 'Le Wiki VOCALOID a un serveur officiel de Discord ! Clique le bouton ci-dessous pour rejoindre et dialoguer avec les fans et des contributeurs en direct, ou clique ',\n $('<a>')\n .attr('href', mw.util.wikiGetlink('Wiki Vocaloid:Discord'))\n .text('ici'),\n ' pour lire les règles du tchat de ce serveur.'\n ),\n $('<a>')\n .attr('href', 'https://discord.gg/s63bxtW')\n .addClass('wds-button')\n .text('Recevoir une invitation')\n )\n )\n .insertBefore('#wikia-recent-activity');\n }", "function greeter() {\n\n}", "function NotepadParserListener() {\n antlr4.tree.ParseTreeListener.call(this);\n return this;\n }" ]
[ "0.6395507", "0.59570926", "0.5743267", "0.57229406", "0.5665321", "0.5632356", "0.563081", "0.56059414", "0.5572376", "0.5553755", "0.5529779", "0.5503143", "0.5490183", "0.54822886", "0.5475527", "0.5472017", "0.5458511", "0.54418945", "0.54402703", "0.54402703", "0.5438893", "0.54377985", "0.5421569", "0.5420542", "0.5406128", "0.5392772", "0.53853786", "0.5373534", "0.5368036", "0.53673154", "0.53673154", "0.535486", "0.53506166", "0.5336647", "0.53117365", "0.53117365", "0.53117365", "0.53117365", "0.53117365", "0.53117365", "0.53080565", "0.5292155", "0.5292155", "0.52859926", "0.5254751", "0.5242471", "0.52411836", "0.5230346", "0.5202757", "0.51993865", "0.51993865", "0.51993865", "0.5199177", "0.5190633", "0.51880413", "0.5184862", "0.5181744", "0.51764405", "0.51764405", "0.5172808", "0.5171155", "0.5170304", "0.5167904", "0.515545", "0.5152727", "0.5150753", "0.51464313", "0.51456517", "0.51444036", "0.5144024", "0.51334244", "0.5126784", "0.51254", "0.5120819", "0.51201755", "0.51175636", "0.51161104", "0.51121384", "0.50998527", "0.50981784", "0.50939804", "0.5089625", "0.5085403", "0.5082309", "0.50786346", "0.5073256", "0.50723356", "0.5063427", "0.5063427", "0.50560576", "0.5043952", "0.5041924", "0.5038607", "0.50355726", "0.50351775", "0.50321585", "0.5031235", "0.50296926", "0.50220454", "0.50186825" ]
0.65121025
0
= Article cache =
function qll_utility_article_cache() { var object = document.createElement("input"); object.setAttribute('class', 'arrowbutton'); object.setAttribute('type', 'button'); object.setAttribute('id','QLLArticleCacheReload'); object.setAttribute('value', qll_lang[26]); var button=document.getElementsByName('commit'); button=button[button.length-1]; button.parentNode.appendChild(object,button); object = document.createElement("input"); object.setAttribute('class', 'arrowbutton'); object.setAttribute('type', 'button'); object.setAttribute('id','QLLArticleCacheRemove'); object.setAttribute('value', qll_lang[27]); button.parentNode.appendChild(object,button); $("#QLLArticleCacheReload").click(function(){qll_utility_article_cache_reload();}); $("#QLLArticleCacheRemove").click(function(){qll_utility_article_cache_remove();}); $("input[name='commit']").click(function(){qll_utility_article_cache_save();}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cacheArticles(articles) {\n articleList = articleList.concat(articles);\n showTenMoreArticles();\n}", "function Cache() {}", "function EntryCache() {}", "function Cache() {\n this.docs = [];\n }", "function cacheToMemory(){\n // need to implement\n}", "get _cache() {\n return cache;\n }", "function Cache() {\n this.store = {};\n }", "function Cache() {\n this.store = {};\n }", "function Cache() {\n this.store = {};\n }", "function Cache() {\n this.store = {};\n }", "function Cache() {\n this.store = {};\n }", "function CacheEl() {\n \n }", "function SimpleCache() {\n this.cache = {};\n}", "function Cache() {\n\t\tthis.data = {};\n\t}", "function getArticles(){\n\n if('caches' in window){\n caches.match(BASE_URL+\"articles\")\n .then(function(response){\n if(response){\n response.json()\n .then(function(data){\n let articlesHTML = \"\";\n data.result.forEach(function(article){\n articlesHTML += `\n <div class=\"card\">\n <a href=\"./article.html?id=${article.id}\">\n <div class=\"card-image waves-effect waves-block waves-light\">\n <img src=\"${article.thumbnail}\" />\n </div>\n </a>\n <div class = \"card-content\">\n <span class=\"card-title truncate\">${article.title}</span>\n <p>${article.description}</p>\n </div>\n </div>\n `; \n });\n document.getElementById(\"articles\").innerHTML = articlesHTML;\n })\n }\n });\n }\n\n fetch(BASE_URL+\"articles\")\n .then(status)\n .then(json)\n .then(function(data){\n let articlesHTML = \"\";\n data.result.forEach(function(article){\n articlesHTML += `\n <div class=\"card\">\n <a href=\"./article.html?id=${article.id}\">\n <div class=\"card-image waves-effect waves-block waves-light\">\n <img src=\"${article.thumbnail}\" />\n </div>\n </a>\n <div class = \"card-content\">\n <span class=\"card-title truncate\">${article.title}</span>\n <p>${article.description}</p>\n </div>\n </div>\n `;\n });\n document.getElementById(\"articles\").innerHTML = articlesHTML;\n })\n .catch(error);\n}", "function MongoCache() {\n}", "function Cache() {\n this.map = {};\n}", "cacheEnable() {\n this.cache = new Map();\n }", "cache (archive) {\n this.cached = this.staged\n\n if (archive) {\n this.archived = this.cached\n }\n }", "function ContentLoader()\n{\n this.cache = true;\n}", "function getCache(cache) {\n cache = $cacheFactory('cacheId');\n cache.put(\"key\", \"value\");\n cache.put(\"another key\", \"another value\");\n console.log(cache.info());\n }", "function Cache_Cache()\n{\n\t//create a storage array\n\tthis.Storage = [];\n\t//fill the array with empty maps\n\tfor (var i = 0; i < __CACHE_TYPE_MAX; i++)\n\t{\n\t\t//create an empty array\n\t\tthis.Storage[i] = {};\n\t}\n\t//map of listeners\n\tthis.Listeners = {};\n\t//find the head\n\tthis.HTMLHeader = document.getElementsByTagName(\"head\")[0];\n}", "function AssetCache() {\n\n this.DEFAULT_CATEGORY = 'general';\n\n this.cache = {};\n this.loadStaging = [];\n\n this.cache[this.DEFAULT_CATEGORY] = {};\n\n}", "constructor() {\n this.cache = []; // array to allow fast access\n this.entryMap = new Map();\n }", "function Cache () {\n this.lru = new LRU({\n max: 500,\n maxAge: 1000 * 60 * 60 * 24\n })\n}", "constructor(setup) {\n super(setup);\n this.cache = {};\n this.nCache = 0;\n }", "function getArticles(){\n\n\tif ('caches' in window) {\n\t\tcaches.match(base_url + \"articles\").then(function(response){\n\t\t\tif (response) {\n\t\t\t\tresponse.json().then(function (data){\n\t\t\t\t\tvar articlesHTML = \"\"\n\t\t\t\t\tdata.result.forEach(function(article){\n\t\t\t\t\t\tarticlesHTML += `\n\t\t\t\t\t\t\t<div class=\"card\">\n\t\t\t <a href=\"./article.html?id=${article.id}\">\n\t\t\t <div class=\"card-image waves-effect waves-block waves-light\">\n\t\t\t <img src=\"${article.thumbnail}\" />\n\t\t\t </div>\n\t\t\t </a>\n\t\t\t <div class=\"card-content\">\n\t\t\t <span class=\"card-title truncate\">${article.title}</span>\n\t\t\t <p>${article.description}</p>\n\t\t\t </div>\n\t\t\t </div>\n\t\t\t\t\t\t`\n\t\t\t\t\t})\n\t\t\t\t\tdocument.getElementById(\"articles\").innerHTML = articlesHTML;\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t}\n\n\tfetch(base_url + \"articles\")\n\t\t.then(status)\n\t\t.then(json)\n\t\t.then(function(data){\n\t\t\t// Object/array Javascript dari response.json() masuk lewat data.\n\n\t\t\t// Menyusun komponen card artikel secara dinamis\n\t\t\tvar articlesHTML = \"\";\n\t\t\tdata.result.forEach(function(article){\n\t\t\t\tarticlesHTML += `\n\t\t\t\t\t<div class=\"card\">\n\t <a href=\"./article.html?id=${article.id}\">\n\t <div class=\"card-image waves-effect waves-block waves-light\">\n\t <img src=\"${article.thumbnail}\" />\n\t </div>\n\t </a>\n\t <div class=\"card-content\">\n\t <span class=\"card-title truncate\">${article.title}</span>\n\t <p>${article.description}</p>\n\t </div>\n\t </div>\n\t\t\t\t`\n\t\t\t})\n\t\t\t// sisipkan komoponen card ke dalam element dengan id #content\n\t\t\tdocument.getElementById(\"articles\").innerHTML = articlesHTML;\n\t\t})\n\t\t.catch(error)\n}", "emptyCache() {\n this.cache = {};\n }", "emptyCache() {\n this.cache = {};\n }", "function cache() {\n // TODO: Cache to Redis if on server\n if (!client) {\n return;\n }clearTimeout(pending);\n var count = resources.length;\n pending = setTimeout(function () {\n if (count == resources.length) {\n log(\"cached\");\n var cachable = values(resources).filter(not(header(\"cache-control\", \"no-store\")));\n localStorage.ripple = freeze(objectify(cachable));\n }\n }, 2000);\n }", "function ImageCache()\r\n{\r\n // the actual cache\r\n this.cache = new BST();\r\n //this.cache = new Array();\r\n}", "getPostDetails(id, post) {\n if (post) {\n let fullId = `${id}/${post.publishedAt.getFullYear()}/${post.id}`\n let deets = this.postCache.get(fullId)\n //this.set({post: deets})\n if (deets == null) {\n this.postCache.set(fullId, {})\n this.readFile(`/feeds/${fullId}.json`).then(obj => {\n this.postCache.set(fullId, obj)\n //this.set({post: obj})\n }, err => {})\n }\n }\n }", "function MapCache() {\n }", "function cache(x, t) {\n var c = this._cache[x._id] = this._cache[x._id] || {c: [], s: this._stamp};\n c.c.push(t);\n}", "cacheOne(storename, object) {\n this.cacheAll(storename, [object]);\n }", "getPosts(id) {\n let posts = this.postCache.get(id)\n //this.set({posts: posts})\n if (posts == null) {\n this.postCache.set(id, [])\n this.readFile(`/feeds/${id}.json`).then(meta => {\n this.postCache.set(id, meta.posts)\n //this.set({posts: meta.posts})\n }, err => {})\n }\n }", "function cache(){\n\n //Local array variable to carry in-session country data\n let countries = []\n\n return{\n\n //Operation to store Country object data\n addCountry : country => countries.push(country), \n\n //Get all (countries) operation, implemented just in case\n getAll : () => countries,\n\n //Operation to retrieve (find) a country based on its matching initials (id)\n findByInitials : (initials) => countries.find( c => c.id == initials )\n\n }\n}", "function updateCache() {\n if (currentCache > caches.length) {\n currentCache = 0;\n }\n currentCache++;\n showCache();\n}", "function set_cache(id,data){\n\t\tif(!cache.post_contents)\n\t\t\tcache.post_contents = [];\n\t\tcache.post_contents[id] = data;\n\t}", "function resetCache() {\n console.log('resetCache');\n cache = {};\n }", "function LockStore(){\n this.cache = {};\n}", "function cache() {\n document.documentElement.dataset.cached = true;\n var data = document.documentElement.outerHTML;\n fetch('./render-store/', { method: 'PUT', body: data }).then(function() {\n console.log('Page cached');\n });\n}", "function MemoryCache() {\n this._entries = [];\n}", "get cache() {\n return this.base.cache;\n }", "constructor() {\n /**\n * @private\n */\n this._cacheMap = new Map();\n }", "get Cache() {\n return this[sCache];\n }", "function viaCache(viaCacheComplete) {\n\t\t\t\t// Log\n\t\t\t\tme.log('debug', 'Feedr === remembering [' + feed.url + '] from cache');\n\n\t\t\t\t// Prepare\n\t\t\t\tvar meta = null;\n\t\t\t\tvar data = null;\n\t\t\t\tvar readTasks = TaskGroup.create().done(function (err) {\n\t\t\t\t\tviaCacheComplete(err, data, meta && meta.headers);\n\t\t\t\t});\n\n\t\t\t\treadTasks.addTask('read the meta data in a cache somewhere', function (viaCacheTaskComplete) {\n\t\t\t\t\treadMetaFile(feed.metaPath, function (err, result) {\n\t\t\t\t\t\tif (err || !result) {\n\t\t\t\t\t\t\tviaCacheTaskComplete(err);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmeta = result;\n\t\t\t\t\t\tviaCacheTaskComplete();\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\treadTasks.addTask('read the parsed data in a cache somewhere', function (viaCacheTaskComplete) {\n\t\t\t\t\treadFile(feed.path, function (err, rawData) {\n\t\t\t\t\t\tif (err || !rawData) {\n\t\t\t\t\t\t\tviaCacheTaskComplete(err);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (feed.parse === false || feed.parse === true && meta.parse === false) {\n\t\t\t\t\t\t\tdata = rawData;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tdata = JSON.parse(rawData.toString());\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tviaCacheTaskComplete(err);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tviaCacheTaskComplete();\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t// Fire the write tasks\n\t\t\t\treadTasks.run();\n\t\t\t}", "function cacheDom() {\n DOM.$quoteFeature = $('#quote');\n DOM.$quoteLink = $(document.createElement('a'));\n DOM.$author = $(document.createElement('p'));\n }", "function MapCache(){this.__data__={};}", "function MapCache(){this.__data__={};}", "function _cache(x, t) {\n\t var c = this._cache,\n\t cross = c[x._id] || (c[x._id] = {c: [], f: false});\n\t cross.c.push(t);\n\t}", "_cacheAdverts() {\n Meteor.call('AdManager.cacheAdverts');\n }", "function cacheItems(cacheID, htmlItemsArg){\n\t\t\t\n\t\tif(htmlItemsArg){\n\t\t\tvar htmlItems = htmlItemsArg;\n\t\t\tif(htmlItems != \"noitems\")\n\t\t\t\thtmlItems = jQuery(htmlItemsArg).clone();\n\t\t}else{\n\t\t\tvar htmlItems = g_objWrapper.children().clone();\n\t\t}\n\t\t\n\t\tg_objCache[cacheID] = htmlItems;\n\t}", "constructor() {\n this.cachedDictionary = {};\n }", "function Article(){\n\tvar id;\n\tvar title = \"\";\n\tvar subhead = \"\";\n\tvar picture = \"\";\n\tvar date;\n\tvar author;\n\tvar fiability;\n\tvar quality;\n\tvar text = \"\";\n\tvar is_read = false;\n\tvar status = \"draft\";\n\t// @todo : add an array \"categories\" to avoid deleting articles in all categories if not necessary.\n\n\tif(typeof Article.initialized == \"undefined\") {\n\t\tArticle.initialized = true;\n\n\t\tArticle.prototype.debug = function() {\n\t\t\treturn \" id: \"+this.id+\"\\n title: \"+this.title+\"\\n subhead: \"+this.subhead+\"\\n picture: \"+this.picture+\"\\n datetime: \"+this.datetime+\"\\n author: \"+this.author+\"\\n is_read: \"+this.is_read+\"\\n status: \"+this.status;\n\t\t};\n\n\t\tArticle.prototype.refresh = function () {\n\n\t\t};\n\n\t\tArticle.prototype.post = function () {\n\n\t\t};\n\n\t\tArticle.prototype.share = function () {\n\n\t\t};\n\n\t\tArticle.prototype.load = function (id) {\n\t\t\tif(article = $.jStorage.get('articles['+id+']')) {\n\t\t\t\tthis.id = id;\n\t\t\t\tthis.title = article.title;\n\t\t\t\tthis.picture = article.media;\n\t\t\t\tthis.author = article.author;\n\t\t\t\tthis.subhead = article.subhead;\n\t\t\t\tthis.date = article.date;\n\t\t\t\tthis.quality = article.quality;\n\t\t\t\tthis.fiability = article.fiability;\n\t\t\t}\n\t\t\treturn this;\n\t\t};\n\n\t\t// Save in local storage for faster refresh\n\t\tArticle.prototype.save = function() {\n\t\t\t$.jStorage.set('articles['+this.id+']', this);\n\t\t};\n\n\t\t// Print article in html\n\t\tArticle.prototype.show = function (id) {\n\t\t\tvar article = $.jStorage.get('articles['+id+']');\n\t\t\tconsole.log(article.picture);\n\t\t\tif(!!article.picture) {\t\n\t\t\t\tvar $img = $('<img>', {\n\t\t\t\t\tsrc: DOMAIN_WEBSITE + \"media/\" + article.picture,\n\t\t\t\t\talt: article.title,\n\t\t\t\t});\n\t\t\t\t$img.appendTo('#img-article');\n\t\t\t}\n\n\t\t\t$('#article .article_body').html(article.subhead);\n\t\t\t$('#article .article_title').text(article.title);\n\t\t\t$('#article .article_author').text(article.author);\n\n\t\t\tvar timestamp = article.date;\n\t\t\tvar date = new Date(timestamp * 1000);\n\t\t\tvar datevalues = [\n\t\t\t date.getFullYear()\n\t\t\t ,date.getMonth()+1\n\t\t\t ,date.getDate()\n\t\t\t ,date.getHours()\n\t\t\t ,date.getMinutes()\n\t\t\t ,date.getSeconds()\n\t\t\t ];\n\n\t\t\tif(datevalues[1]<10){\n\t\t\t\tmonth = '0' + datevalues[1];\n\t\t\t\tdatevalues[1] = month;\n\t\t\t}\n\n\t\t\t$('#article .date').text(datevalues[2]+'/'+datevalues[1]+'/'+datevalues[0]);\n\n\t\t\t$('#article .fiability').html(\"<b>Fiabilité</b> : \" + article.fiability);\n\t\t\t$('#article .quality').html(\"<b>Qualité</b> : \" + article.quality);\n\n\t\t\tvar $link_write = $('<a>', {\n\t\t\t\t\thref: \"write-comment.html?id=\"+article.id,\n\t\t\t\t\tid: \"write-comment-button\",\n\t\t\t\t\ttext: \"Ecrire un commentaire\",\n\t\t\t\t\tid: \"write-comment-button\"\n\t\t\t});\n\t\t\t$link_write.attr('data-ajax', 'false');\n\t\t\t$link_write.attr('data-role', 'button');\n\t\t\t$link_write.appendTo('#comment');\n\n\t\t\tvar $link_read = $('<a>', {\n\t\t\t\t\thref: \"read-comment.html?id=\"+article.id,\n\t\t\t\t\tid: \"read-comment-button\",\n\t\t\t\t\ttext: \"Lire les commentaires\",\n\t\t\t\t\tid: \"read-comment-button\"\n\t\t\t});\n\t\t\t$link_read.attr('data-ajax', 'false');\n\t\t\t$link_read.attr('data-role', 'button');\n\t\t\t$link_read.appendTo('#comment');\n\n\t\t\tvar current_user = $.jStorage.get('current_user');\n\t\t\tif(current_user == null){\n\t\t\t\t$('#write-comment-button').addClass('ui-disabled');\n\t\t\t}\n\n\t\t};\n\n\t\tArticle.prototype.showItem = function(category) {\n\n\t\t\tvar article = $.jStorage.get('articles['+this.id+']');\n\n\t\t\tvar timestamp = article.date;\n\t\t\tvar date = new Date(timestamp * 1000);\n\t\t\tvar datevalues = [\n\t\t\t date.getFullYear()\n\t\t\t ,date.getMonth()+1\n\t\t\t ,date.getDate()\n\t\t\t ,date.getHours()\n\t\t\t ,date.getMinutes()\n\t\t\t ,date.getSeconds()\n\t\t\t ];\n\n\t\t\tif(datevalues[1]<10){\n\t\t\t\tmonth = '0' + datevalues[1];\n\t\t\t\tdatevalues[1] = month;\n\t\t\t}\n\n\t\t\t$li = $('<li>');\n\t\t\t$a = $('<a>', {\n\t\t\t\thref: \"article.html?id=\"+this.id+\"&category=\" + category.id,\n\t\t\t\trel: \"external\",\n\t\t\t\tclass: \"articleBtn\"\n\t\t\t});\n\n\t\t\t$p = $('<p>', {\n\t\t\t\ttext: 'écrit le '+datevalues[2]+' / '+datevalues[1]+' / '+datevalues[0],\n\t\t\t});\n\n\t\t\t$h3 = $('<h3>', {\n\t\t\t\ttext: this.title,\n\t\t\t});\n\t\t\t$div = $('<div>', {\n\t\t\t\ttext: this.subhead\n\t\t\t});\n\n\t\t\tif(!!article.picture) { \n\t\t\t\t$div = $('<div>', {\n\t\t\t\t\tclass: \"thumb\"\n\t\t\t\t});\t\n\n\t\t\t\t$img = $('<img>', {\n\t\t\t\t\tsrc: DOMAIN_WEBSITE + \"media/\" + article.picture\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$div = $('<div>', {\n\t\t\t\t\tclass: \"no-thumb\"\n\t\t\t\t});\n\n\t\t\t\t$img = $('<img>', {\n\t\t\t\t\tsrc: \"css/icons/42-photos.png\"\n\t\t\t\t});\n\t\t\t}\n\n\n\t\t\t$img.appendTo($div);\n\n\t\t\t$div.appendTo($a);\n\t\t\t$h3.appendTo($a);\n\t\t\t$p.appendTo($a);\n\n\t\t\t$a.appendTo($li);\n\n\t\t\t$li.appendTo('#reader #articles');\n\n\t\t\t$('#reader #articles:visible').listview('refresh');\n\t\t};\n\n\t}\n}", "async establishCachedContent() {\n this._establishUserFollowIds(\"author\");\n this._establishUserFollowIds(\"review_author\");\n this._establishUserBlockedIds(\"author\");\n this._establishUserBlockedIds(\"review_author\");\n return await this._establisCachedListenList();\n }", "function cache_date() {\r\n x = new Date();\r\n return x.getFullYear() + \"-\" + eval(x.getMonth() + 1) + \"-\" + x.getDate();\r\n}", "function getArticles() {\n if (\"caches\" in window) {\n caches.match(base_url + \"teams\").then(function (response) {\n if (response) {\n response.json().then(function (data) {\n let teamsHTML = \"\";\n let teams = data.teams;\n\n teams.forEach(function (teams) {\n let crestUrl = teams.crestUrl;\n if (\n crestUrl === null ||\n crestUrl === undefined ||\n crestUrl === \"\"\n ) {\n crestUrl = \"../not-found.png\";\n } else {\n crestUrl = crestUrl.replace(/^http:\\/\\//i, \"https://\");\n }\n teamsHTML += team(teams, crestUrl);\n document.getElementById(\"articles\").innerHTML = teamsHTML;\n });\n });\n }\n });\n }\n\n fetch(base_url + \"teams\", {\n headers: {\n \"X-Auth-Token\": token,\n },\n })\n .then(status)\n .then(json)\n .then(function (data) {\n let teamsHTML = \"\";\n let teams = data.teams;\n // console.log(teams);\n teams.forEach(function (teams) {\n let crestUrl = teams.crestUrl;\n if (crestUrl === null || crestUrl === undefined || crestUrl === \"\") {\n crestUrl = \"../not-found.png\";\n } else {\n crestUrl = crestUrl.replace(/^http:\\/\\//i, \"https://\");\n }\n teamsHTML += team(teams, crestUrl);\n });\n document.getElementById(\"articles\").innerHTML = teamsHTML;\n })\n .catch(error);\n}", "reset() {\n this.cache = {};\n }", "function clear() {\n cache = {};\n}", "function gatherAllCachedData() {\n return $.extend({}, cache);\n }", "function getCache() {\n if (!cache) {\n cache = new lru_cache_1.default();\n }\n return cache;\n}", "function getCache() {\n if (!cache) {\n cache = new lru_cache_1.default();\n }\n return cache;\n}", "async updateCache() {\n this._cache = await this.model.query();\n }", "function _cache(x, t) {\n var c = this._cache,\n cross = c[x._id] || (c[x._id] = {c: [], f: false});\n cross.c.push(t);\n}", "function getDateDataCache() {\n return dateDataCache;\n}", "initializeCache() {\n this.cache = Array.from({length: nway},\n () => Array.from({length: size},\n () => Array.from({length: k},\n () => {\n return {\n data: '0'.repeat(bits),\n time: 0\n }\n }))); \n }", "function getFromCache(request){\n if(cacheObj.hasOwnProperty([request])){\n cacheObj[request][1] = new Date(); //update date\n cacheObj[request][2] += 1; //update times used\n return cacheObj[request][0]; //obj result\n }else\n return null;\n}", "function clear () {\n\tcache = {};\n}", "function clear() {\n cache = {};\n}", "function clear() {\n cache = {};\n}", "function clear() {\n cache = {};\n}", "function getCache() {\n\t\t\n\t\t// rebuild the cache\n\t\tbuild();\n\t\t\n\t\treturn {\n\t\t\tframeDom: frDOM,\n\t\t\tcodeDom: cmDOM\n\t\t};\n\t}", "getCache() {\n this.logger.trace(\"Getting cache key-value store\");\n return this.cache;\n }", "function getInfo(){\t\t\n\treturn cachedInfo;\n}", "get cache() {\n let res = new Map();\n this.all().forEach(x => res.set(x.ID, x.data));\n return res;\n }", "function clearCache() {\n _cache = {};\n }", "function _cache() {\n $window = $(window);\n $body = $('body');\n $html = $('html');\n $header = $('.site-header');\n $banner = $('.banner');\n headerHeight = 55;\n subnavOffsetTop = 360;\n $subnav = $('.sub-nav');\n }", "function loadCacheData() {\n var data = storage ? storage.cachedData : null;\n cachedData = data ? angular.fromJson(data) : {};\n }", "function cacheService($window,\n logger) {\n\n logger = logger.getLogger('cacheService');\n\n /*\n * Public interface\n */\n\n var service = {};\n\n /**\n * Sets the cache data for the specified request.\n * @param {!string} url URL of the REST service call.\n * @param {?map=} params Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url.\n * If the value is not a string, it will be JSONified.\n * @param {Object} data The received data.\n * @param {Date=} date The cache date, now date is used if not specified.\n */\n service.setCacheData = function(url, params, data, date) {\n var cacheKey = getCacheKey(url, params);\n\n cachedData[cacheKey] = {\n date: date || new Date(),\n data: data\n };\n\n logger.log('Cache set for key: \"' + cacheKey + '\"');\n\n saveCacheData();\n };\n\n /**\n * Gets the cached data (if possible) for the specified request.\n * @param {!string} url URL of the REST service call.\n * @param {?map=} params Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url.\n * If the value is not a string, it will be JSONified.\n * @return {?Object} The cached data or null if no cached data exists for this request.\n */\n service.getCacheData = function(url, params) {\n var cacheKey = getCacheKey(url, params);\n var cacheEntry = cachedData[cacheKey];\n\n if (cacheEntry) {\n logger.log('Cache hit for key: \"' + cacheKey + '\"');\n return cacheEntry.data;\n }\n\n return null;\n };\n\n /**\n * Gets the cached data date (if possible) for the specified request.\n * @param {!string} url URL of the REST service call.\n * @param {?map=} params Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url.\n * If the value is not a string, it will be JSONified.\n * @return {?Object} The cached data date or null if no cached data exists for this request.\n */\n service.getCacheDate = function(url, params) {\n var cacheKey = getCacheKey(url, params);\n var cacheEntry = cachedData[cacheKey];\n return cacheEntry ? cacheEntry.date : null;\n };\n\n /**\n * Clears the cached data (if exists) for the specified request.\n * @param {!string} url URL of the REST service call.\n * @param {?map=} params Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url.\n * If the value is not a string, it will be JSONified.\n */\n service.clearCacheData = function(url, params) {\n var cacheKey = getCacheKey(url, params);\n cachedData[cacheKey] = undefined;\n logger.log('Cache cleared for key: \"' + cacheKey + '\"');\n saveCacheData();\n };\n\n /**\n * Cleans cache entries older than the specified date.\n * @param {date=} expirationDate The cache expiration date. If no date is specified, all cache is cleared.\n */\n service.cleanCache = function(expirationDate) {\n if (expirationDate) {\n angular.forEach(cachedData, function(value, key) {\n if (expirationDate >= value.date) {\n cachedData[key] = undefined;\n }\n });\n } else {\n cachedData = {};\n }\n saveCacheData();\n };\n\n /**\n * Sets the cache persistence.\n * Note that changing the cache persistence will also clear the cache from its previous storage.\n * @param {'local'|'session'=} persistence How the cache should be persisted, it can be either\n * in the local or session storage, or if no parameters is provided it will be only in-memory (default).\n */\n service.setPersistence = function(persistence) {\n service.cleanCache();\n storage = persistence === 'local' || persistence === 'session' ? $window[persistence + 'Storage'] : null;\n\n loadCacheData();\n };\n\n /*\n * Internal\n */\n\n var cachedData = {};\n var storage = null;\n\n /**\n * Gets the cache key for the specified url and parameters.\n * @param {!string} url The request URL.\n * @param {?map=} params Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url.\n * If the value is not a string, it will be JSONified.\n * @return {string} The corresponding cache key.\n */\n function getCacheKey(url, params) {\n return url + (params ? angular.toJson(params) : '');\n }\n\n /**\n * Saves the current cached data into persisted storage.\n */\n function saveCacheData() {\n if (storage) {\n storage.cachedData = angular.toJson(cachedData);\n }\n }\n\n /**\n * Loads cached data from persisted storage.\n */\n function loadCacheData() {\n var data = storage ? storage.cachedData : null;\n cachedData = data ? angular.fromJson(data) : {};\n }\n\n /*\n * Initializes service.\n */\n\n loadCacheData();\n\n return service;\n }", "get entityCache$() {\n return this.entityServicesElements.entityCache$;\n }", "function startCaching () {\n cachingInterval = setInterval(getBogPrice, CACHING_TIME)\n}", "loadSave() {\n var resp = []\n var source = localStorage.getItem('articles') !== null ? localStorage.getItem('articles') : articleData\n source.forEach(function(obj) {\n var article = new articleDataStructure(obj.articleId, obj.title, obj.body, obj.hits)\n resp.push(article)\n }, this)\n return resp\n }", "function _cache() {\n assignModal = $('#assignModal')\n $showAssign = $('.showAssign')\n $customerServiceStaff = $('#customerServiceStaff')\n $operator = $('#operator')\n $itemId = $('#itemId')\n }", "function cache(siteName, config) {\n const harvest = prepare(siteName, config);\n harvest.cache((err) => {\n if (!err) console.log('Harvest cached.'); // eslint-disable-line\n });\n}", "populateCache(key, details, result) {\n persistentCacheDebug(\"Populating cache for \" + key);\n\n let cache = this.persistentCache;\n\n let depsWithHashes = this.hashDependencies(details);\n let outputContents = this.readOutputs(details);\n\n cache.set(this.dependenciesKey(key), JSON.stringify(depsWithHashes));\n cache.set(this.outputKey(key), JSON.stringify(outputContents));\n }", "function regenerateNewCache(){\n //special ordering for new so it is always the same, selecting\n //offset regions breaks otherwise\n database.sequelize.query(\"SELECT imdb_id, title, type FROM movies WHERE type = 'movie' ORDER BY NULLIF(regexp_replace(year, E'\\\\D', '', 'g'), '')::int DESC, \\\"createdAt\\\" DESC LIMIT 16 OFFSET \" + pageNumber * 16,\n {model: database.Movie}\n ).then(function(movies){\n cache.set(\"new_0\", JSON.stringify(movies), global.FontPageTTL, function(err, success){\n if(err){\n logger.error(\"CACHE_SET_FAILURE: new_0\");\n }else{\n logger.debug(\"CACHE_SET_SUCCESS: new_0\");\n }\n });\n });\n }", "function add_cache(pn){\n pn = Math.max(0, Math.min(comic_totals, pn));\n\n if( pn in cache_image){\n console.log( pn + \" already cached\");\n return;\n }\n cache_image[ pn ] = $( '<img />' ).attr( 'src', comic_images[ pn-1 ])\n}", "function cacheFn(fn) {\n var cache={};\n \n return function(arg){\n if (cache[arg]){\n return cache[arg];\n }\n else{\n cache[arg] = fn(arg);\n return cache[arg];\n }\n }\n}", "async initCache() {\n return await reusePromiseForever(this, this._initCache);\n }", "function cacheFn(fn) {\n var cache={}\n return function(arg){\n if (cache[arg]){\n return cache[arg];\n }\n else{\n cache[arg] = fn(arg);\n return cache[arg];\n }\n }\n}", "setEntityCache(cache, tag) {\n this.dispatch(new SetEntityCache(cache, tag));\n }", "function getArticles() {\n if (\"caches\" in window) {\n caches.match(standing).then(function(response) {\n if (response) {\n response.json().then(function(data) {\n let articlesHTML = \"\";\n data.standings.forEach(function(standing){\n let info = \"\";\n standing.table.forEach(function(article) {\n info += `<tr>\n <td>${article.position}</td>\n <td><img class=\"responsive-img\" width=\"24\" height=\"24\" src=\"${ article.team.crestUrl || 'img/empty_badge.svg'}\"> ${article.team.name}</td>\n <td>${article.playedGames}</td>\n <td>${article.won}</td>\n <td>${article.draw}</td>\n <td>${article.lost}</td>\n <td>${article.goalsFor}</td>\n <td>${article.goalsAgainst}</td>\n <td>${article.goalDifference}</td>\n <td>${article.points}</td>\n </tr>`;\n })\n articlesHTML += `\n <div class=\"col s12 m12\">\n <div class=\"card\">\n <div class=\"card-content\">\n <h5 class=\"header\">${standing.stage}</h5>\n <table class=\"responsive-table striped\">\n <thead>\n <tr>\n <th>Position</th>\n <th>Team</th>\n <th>Played</th>\n <th>Won</th>\n <th>Draw</th>\n <th>Lost</th>\n <th>GF</th>\n <th>GA</th>\n <th>GD</th>\n <th>Points</th>\n </tr>\n </thead>\n <tbody>` + info + `</tbody>\n </table>\n </div>\n </div>\n </div>`\n });\n // Sisipkan komponen card ke dalam elemen dengan id #content\n document.getElementById(\"articles\").innerHTML = articlesHTML;\n });\n }\n });\n }\n\n fetchAPI(standing)\n .then(status)\n .then(json)\n .then(function(data) {\n // Objek/array JavaScript dari response.json() masuk lewat data.\n // Menyusun komponen card artikel secara dinamis\n let articlesHTML = \"\";\n data.standings.forEach(function(standing){\n let info = \"\";\n standing.table.forEach(function(article) {\n info += `<tr>\n <td>${article.position}</td>\n <td><img class=\"responsive-img\" width=\"24\" height=\"24\" src=\"${ article.team.crestUrl || 'img/empty_badge.svg'}\"> ${article.team.name}</td>\n <td>${article.playedGames}</td>\n <td>${article.won}</td>\n <td>${article.draw}</td>\n <td>${article.lost}</td>\n <td>${article.goalsFor}</td>\n <td>${article.goalsAgainst}</td>\n <td>${article.goalDifference}</td>\n <td>${article.points}</td>\n </tr>`;\n })\n articlesHTML += `\n <div class=\"col s12 m12\">\n <div class=\"card\">\n <div class=\"card-content\">\n <h5 class=\"header\">${standing.stage}</h5>\n <table class=\"responsive-table striped\">\n <thead>\n <tr>\n <th>Position</th>\n <th>Team</th>\n <th>Played</th>\n <th>Won</th>\n <th>Draw</th>\n <th>Lost</th>\n <th>GF</th>\n <th>GA</th>\n <th>GD</th>\n <th>Points</th>\n </tr>\n </thead>\n <tbody>` + info + `</tbody>\n </table>\n </div>\n </div>\n </div>`\n });\n // Sisipkan komponen card ke dalam elemen dengan id #content\n document.getElementById(\"articles\").innerHTML = articlesHTML;\n })\n .catch(error);\n}", "function cache( opts, cb ) {\n/*\nImplements generic cache. Looks for cache given opts.key and, if found, returns cached results on cb(results);\notherwse, if not found, returns results via opts.make(probeSite, opts.parms, cb). If cacheing fails, then opts.default \nis returned. The returned results will always contain a results.ID for its cached ID. If a opts.default is not provided,\nthen the cb callback in not made.\n*/\n\tvar \n\t\tsql = this,\n\t\tprobeSite = DB.probeSite,\n\t\tdefRec = {ID:0};\n\t\n\tif ( opts.key )\n\t\tsql.forFirst( \n\t\t\t\"\", \n\t\t\t\"SELECT ID,Results FROM app.cache WHERE least(?,1) LIMIT 1\", \n\t\t\t[ opts.key ], rec => {\n\n\t\t\tif (rec) \n\t\t\t\ttry {\n\t\t\t\t\tcb( Copy( JSON.parse(rec.Results), {ID:rec.ID}) );\n\t\t\t\t}\n\t\t\t\tcatch (err) {\n\t\t\t\t\tif ( opts.default )\n\t\t\t\t\t\tcb( Copy(opts.default, defRec ) );\n\t\t\t\t}\n\n\t\t\telse\n\t\t\tif ( opts.make ) \n\t\t\t\tif (probeSite)\n\t\t\t\t\topts.make( probeSite.tag(opts.parms || {}), ctx => {\n\n\t\t\t\t\tif (ctx) \n\t\t\t\t\t\tsql.query( \n\t\t\t\t\t\t\t\"INSERT INTO app.cache SET Added=now(), Results=?, ?\", \n\t\t\t\t\t\t\t[ JSON.stringify(ctx || opts.default), opts.key ], \n\t\t\t\t\t\t\tfunction (err, info) {\n\t\t\t\t\t\t\t\tcb( Copy(ctx, {ID: err ? 0 : info.insertId}) );\n\t\t\t\t\t\t});\n\n\t\t\t\t\telse \n\t\t\t\t\tif ( opts.default )\n\t\t\t\t\t\tcb( Copy(opts.default, {ID: 0}) );\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t\tcb( defRec );\n\n\t\t\telse\n\t\t\tif ( opts.default )\n\t\t\t\tcb( Copy(opts.default, defRec) );\n\t\t});\n\t\n\telse\n\tif ( opts.default )\n\t\tcb( Copy(opts.default, defRec) );\n\t\n}", "function _cacheData(key, value) {\n\t cache[key] = { timeStamp: _getTimeStamp(), value: value };\n\t return value;\n\t}", "setCache(url, data) {\n this.cache[this.hashValue(url)] = data;\n return this.getCache(url);\n }", "function getCacheableEntity(key, id, request, refresh) {\n console.time('getCacheableEntity:' + key);\n\n if (!refresh && cache[key]) {\n console.timeEnd('getCacheableEntity:' + key);\n return $q.when(cache[key]);\n }\n\n return spEntityService.getEntity(id, request, { batch: true }).then(function (entity) {\n cache[key] = entity;\n console.timeEnd('getCacheableEntity:' + key);\n console.log('getCacheableEntity: cache count', _.keys(cache).length);\n return entity;\n\n }, function (error) {\n console.error('spWorkflowService: error %o requesting %s', error, key, id, request);\n throw error;\n });\n }", "function regenerateAlphaCache(){\n database.Movie.findAll({\n limit: 16,\n where: {\n type: \"movie\"\n },\n order: [\n [\"title\", \"ASC\"],\n [\"imdbRating\", \"DESC\"]\n ],\n attributes: [\"imdb_id\", \"title\"]\n }).then(function(movies){\n cache.set(\"alpha_0\", JSON.stringify(movies), global.FontPageTTL, function(err, success){\n if(err){\n logger.error(\"CACHE_SET_FAILURE: alpha_0\");\n }else{\n logger.debug(\"CACHE_SET_SUCCESS: alpha_0\");\n }\n });\n });\n }", "async function fillAndSet() {\n const resp = await fetchFn();\n if (resp.status > 200) {\n /*\n * When the fetchFn returns an error, no caching.\n */\n return resp\n }\n const body = await resp.text()\n const entry = {\n body: body,\n contentType: resp.headers.get('content-type'),\n time: Date.now()\n }\n fly.cache.set(key, JSON.stringify(entry), 86400)\n return resp\n }", "function clearCache() {\n cache = undefined;\n}", "async fetch () {\n\t\tif (this.notFound.length === 0) {\n\t\t\treturn;\t// got 'em all from the cache ... yeehaw\n\t\t}\n\t\telse if (this.notFound.length === 1) {\n\t\t\t// single ID fetch is more efficient\n\t\t\treturn await this.fetchOne();\n\t\t}\n\t\telse {\n\t\t\treturn await this.fetchMany();\n\t\t}\n\t}" ]
[ "0.7462856", "0.7321859", "0.6930257", "0.68522054", "0.67983466", "0.67194504", "0.67155236", "0.67155236", "0.67155236", "0.66237557", "0.66237557", "0.6590004", "0.6561721", "0.6556369", "0.65069604", "0.6502354", "0.6496045", "0.64868766", "0.6453134", "0.63835233", "0.6354168", "0.63487", "0.6343374", "0.63371855", "0.63361984", "0.62845165", "0.6272286", "0.6260216", "0.6260216", "0.6226782", "0.6194367", "0.6192467", "0.6176105", "0.61307555", "0.6128056", "0.6119713", "0.61125326", "0.611012", "0.61052066", "0.60760266", "0.6067902", "0.60405374", "0.60375905", "0.60236543", "0.6018243", "0.59929246", "0.59564537", "0.59482825", "0.5945815", "0.5945815", "0.5943987", "0.594062", "0.59226686", "0.5902609", "0.5891418", "0.5867744", "0.5866208", "0.5863384", "0.5860646", "0.5860064", "0.58522516", "0.5834014", "0.5834014", "0.5827904", "0.5813774", "0.58118546", "0.5804948", "0.57955813", "0.57935005", "0.5791959", "0.5791959", "0.5791959", "0.57836694", "0.5777744", "0.577253", "0.5761809", "0.5756967", "0.57497525", "0.5748498", "0.57454383", "0.5741784", "0.5739574", "0.5733366", "0.5703527", "0.5700469", "0.5683872", "0.5682887", "0.5681529", "0.56791115", "0.5674968", "0.56726754", "0.5671263", "0.5669147", "0.56659615", "0.56656563", "0.56652087", "0.5661273", "0.5652371", "0.5643574", "0.5639118", "0.562068" ]
0.0
-1
= Article signature =
function qll_utility_article_signature() { content=document.getElementById('article_comment'); content.value=content.value+ '\n' + GM_getValue("QLLMenuArticleSignature:content",""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Article(title, body) {\n this.title = title;\n this.body = body;\n}", "function createMetadata(article) {\n // Authors. Title. Journal. Year Month;Volume(Issue):Pages. Times cited: n. Percentile rank in Field: n.\n var year = parseInt(article.cover_date.split(\".\")[2]);\n var month = parseInt(article.cover_date.split(\".\")[1]);\n return article.authors.replace(new RegExp('\\\\|', 'g'), ', ') + \". \" +\n article.title + \". \" +\n article.publication_name + \". \" +\n year + \" \" + month + \";\" +\n article.volume + \"(\" + article.issue + \"):\" + article.pages + \". \" +\n \"Times cited: \" + article.citation_count + \". \" +\n \"Percentile rank in field: \" + article.percentile_rank_dummy_data + \".<br /><br />\" +\n \"<a href='http://vivo.med.cornell.edu/display/pubid\" + article.scopus_doc_id + \"'>View details &#9654;</a>\";\n}", "get signature() {\n return this._signature;\n }", "get signature() {\n return this._signature;\n }", "function ArticlesDetails() {\n}", "get signature() {\n\t\treturn this.__signature;\n\t}", "function Article (title, category, point, summary, image){\n\t\tthis.title = title;\n\t\tthis.category = category;\n\t\tthis.point = point;\n\t\tthis.summary = summary;\n\t\tthis.image = image;\n\t\t}", "function note(authorinfo) /* (authorinfo : authorinfo) -> string */ {\n return authorinfo.note;\n}", "function Article (opts) {\n this.author = opts.author;\n this.authorUrl = opts.authorUrl;\n this.title = opts.title;\n this.category = opts.category;\n this.body = opts.body;\n this.publishedOn = opts.publishedOn;\n}", "get signature() {\n return this.payload['signature'];\n }", "signature (sigOrTitle) {\n const signatures = this.signatures;\n // if given a title for an existing signature, returns it\n if (signatures.hasOwnProperty(sigOrTitle)) return signatures[sigOrTitle];\n // constructs a new signature or uses an existing one (if an existing one was passed in)\n const signature = (sigOrTitle instanceof Signature ? sigOrTitle : new Signature(sigOrTitle, this));\n return signatures[signature.title] = signature;\n }", "function Article(){\r this.nr = null;\r this.folder = null;\r this.images = [];\r this.price = null;\r this.txt = null;\r this.name = null;\r this.group = null;\r this.discr = null;\r this.brand = null;\r this.footage = [];\r this.comp = null;\r this.imgcomp = null;\r this.rqitem = null;\r}", "function findArticles() {}", "getAuthor() {return \"de/odex\";}", "function AuthorVO() {\n\n }", "articleMaker(title, imageLink, author, date, text, url) {\n author = author ? author : \"Anonymous\";\n return (\n '<div class=\"box\"><article class=\"media\"><div class=\"media-left\"><a href=\"' +\n url +\n '\"><figure class=\"image is-64x64\"><img src=\"' +\n imageLink +\n '\" alt=\"No Image\"/></figure></a></div><div class=\"media-content\"><div class=\"content\"><p><a href=\"' +\n url +\n '\"><strong>' +\n title +\n \"</strong></a> <small>\" +\n author +\n \"</small> <small>\" +\n date +\n \"</small><br />\" +\n text +\n \"</p></div></div></article></div>\"\n );\n }", "function makeArticle(obj){\n this.title = obj.title;\n this.category = obj.category;\n this.author = obj.author;\n this.authorUrl = obj.authorUrl;\n this.publishedOn = obj.publishedOn;\n this.body = obj.body;\n }", "function publish_article(articleid)\n{\n change_article_state(articleid, \"publish\", \"pubbtn-a\" + articleid);\n}", "function mergeSigEnt(sig, ent) {\n sig.content = ent.content;\n sig.uri = ent.uri;\n sig.rating = ent.rating;\n sig.title = ent.title;\n\n return sig;\n }", "function createArticleSearchArticle(article, date, img) {\n return {\n 'title': article['headline']['main'].replace(/&#8217;/g, '\\'').replace(/&#8216;/g, '\\'').replace(/&#8212;/g, '-').replace(/&#038;/g, '&'),\n 'url': article['web_url'],\n 'img': (img === undefined ? '' : img['url']),\n 'height': (img === undefined ? '' : img['height']),\n 'width': (img === undefined ? '' : img['width']),\n 'date': date,\n 'byline': ((article['byline'] === null || article['byline'] === undefined) ? '' : (article['byline']['original'] || '')).replace(/&#8217;/g, '\\'').replace(/&#8216;/g, '\\'').replace(/&#8212;/g, '-').replace(/&#038;/g, '&'),\n 'abstract': (article['abstract'] === null ? (article['snippet'] || '') : article['abstract']).replace(/&#8217;/g, '\\'').replace(/&#8216;/g, '\\'').replace(/&#8212;/g, '-').replace(/&#038;/g, '&')\n };\n}", "getPublicKeyThumbprint() {\n throw new Error(\"Method not implemented.\");\n }", "function attribute (quote, author) {\n console.log(quote + author)\n}", "function create(article) {\n article.type = 'article';\n article._id = 'article-' + (new Date()).toISOString();\n return db.put(article);\n }", "function Signature(name = i18n(\"optionsSignatureNewName\"), text = \"\", html = \"\", autoSwitch = \"\") {\n this.id = uuidv4();\n this.name = name;\n this.text = text;\n this.html = html;\n this.autoSwitch = autoSwitch;\n}", "function defaultSignatures(){\r\n\n //CETE\r\n var accman=Components.classes[\"@mozilla.org/messenger/account-manager;1\"].getService(Components.interfaces.nsIMsgAccountManager);\r\n var ident=accman.defaultAccount.defaultIdentity;\r\n var nom=ident.fullName;\r\n var org=ident.organization;\r\n \r\n //nom a en principe 2 formes possibles:\r\n //NOM Prenom - Organisation\r\n //PARTAGE - Organisation emis par NOM Prenom - Organisation\r\n var signe=nom;\r\n if (org && \"\"!=org){\r\n var cn=\"\";\r\n var tab=nom.split(\" emis par \");\r\n if (1<tab.length){\r\n cn=tab[1];\r\n }\r\n else{\r\n cn=nom;\r\n }\r\n \r\n tab=cn.split(\" - \");\r\n if (1<tab.length){\r\n signe=tab[0]+\"\\n\\n\"+org;\r\n }\r\n }\r\n \r\n return signe;\r\n //FIN CETE\r\n /*\n return \"[email protected] (authors email)\"\r\n +\"`\"+\r\n \"some people ask why [\\\\n] isn't supported, \\n\"+\r\n \"it's because it's simpler than that, use the [enter] key \";\r\n */\n}", "function parseArticle(article){\n var data = {\n headline: qs.unescape(article.headline),\n subhead: qs.unescape(article.subhead),\n url: qs.unescape(article.getURL),\n authorName: qs.unescape(article.getAuthor[0]),\n }\n data.userName = lookUpUser(data.authorName);\n return data;\n}", "function ArticleTag(id, articleId, tagId) {\n this.id = id;\n this.articleId = articleId;\n this.tagId = tagId;\n}", "function Article(){\n\tvar id;\n\tvar title = \"\";\n\tvar subhead = \"\";\n\tvar picture = \"\";\n\tvar date;\n\tvar author;\n\tvar fiability;\n\tvar quality;\n\tvar text = \"\";\n\tvar is_read = false;\n\tvar status = \"draft\";\n\t// @todo : add an array \"categories\" to avoid deleting articles in all categories if not necessary.\n\n\tif(typeof Article.initialized == \"undefined\") {\n\t\tArticle.initialized = true;\n\n\t\tArticle.prototype.debug = function() {\n\t\t\treturn \" id: \"+this.id+\"\\n title: \"+this.title+\"\\n subhead: \"+this.subhead+\"\\n picture: \"+this.picture+\"\\n datetime: \"+this.datetime+\"\\n author: \"+this.author+\"\\n is_read: \"+this.is_read+\"\\n status: \"+this.status;\n\t\t};\n\n\t\tArticle.prototype.refresh = function () {\n\n\t\t};\n\n\t\tArticle.prototype.post = function () {\n\n\t\t};\n\n\t\tArticle.prototype.share = function () {\n\n\t\t};\n\n\t\tArticle.prototype.load = function (id) {\n\t\t\tif(article = $.jStorage.get('articles['+id+']')) {\n\t\t\t\tthis.id = id;\n\t\t\t\tthis.title = article.title;\n\t\t\t\tthis.picture = article.media;\n\t\t\t\tthis.author = article.author;\n\t\t\t\tthis.subhead = article.subhead;\n\t\t\t\tthis.date = article.date;\n\t\t\t\tthis.quality = article.quality;\n\t\t\t\tthis.fiability = article.fiability;\n\t\t\t}\n\t\t\treturn this;\n\t\t};\n\n\t\t// Save in local storage for faster refresh\n\t\tArticle.prototype.save = function() {\n\t\t\t$.jStorage.set('articles['+this.id+']', this);\n\t\t};\n\n\t\t// Print article in html\n\t\tArticle.prototype.show = function (id) {\n\t\t\tvar article = $.jStorage.get('articles['+id+']');\n\t\t\tconsole.log(article.picture);\n\t\t\tif(!!article.picture) {\t\n\t\t\t\tvar $img = $('<img>', {\n\t\t\t\t\tsrc: DOMAIN_WEBSITE + \"media/\" + article.picture,\n\t\t\t\t\talt: article.title,\n\t\t\t\t});\n\t\t\t\t$img.appendTo('#img-article');\n\t\t\t}\n\n\t\t\t$('#article .article_body').html(article.subhead);\n\t\t\t$('#article .article_title').text(article.title);\n\t\t\t$('#article .article_author').text(article.author);\n\n\t\t\tvar timestamp = article.date;\n\t\t\tvar date = new Date(timestamp * 1000);\n\t\t\tvar datevalues = [\n\t\t\t date.getFullYear()\n\t\t\t ,date.getMonth()+1\n\t\t\t ,date.getDate()\n\t\t\t ,date.getHours()\n\t\t\t ,date.getMinutes()\n\t\t\t ,date.getSeconds()\n\t\t\t ];\n\n\t\t\tif(datevalues[1]<10){\n\t\t\t\tmonth = '0' + datevalues[1];\n\t\t\t\tdatevalues[1] = month;\n\t\t\t}\n\n\t\t\t$('#article .date').text(datevalues[2]+'/'+datevalues[1]+'/'+datevalues[0]);\n\n\t\t\t$('#article .fiability').html(\"<b>Fiabilité</b> : \" + article.fiability);\n\t\t\t$('#article .quality').html(\"<b>Qualité</b> : \" + article.quality);\n\n\t\t\tvar $link_write = $('<a>', {\n\t\t\t\t\thref: \"write-comment.html?id=\"+article.id,\n\t\t\t\t\tid: \"write-comment-button\",\n\t\t\t\t\ttext: \"Ecrire un commentaire\",\n\t\t\t\t\tid: \"write-comment-button\"\n\t\t\t});\n\t\t\t$link_write.attr('data-ajax', 'false');\n\t\t\t$link_write.attr('data-role', 'button');\n\t\t\t$link_write.appendTo('#comment');\n\n\t\t\tvar $link_read = $('<a>', {\n\t\t\t\t\thref: \"read-comment.html?id=\"+article.id,\n\t\t\t\t\tid: \"read-comment-button\",\n\t\t\t\t\ttext: \"Lire les commentaires\",\n\t\t\t\t\tid: \"read-comment-button\"\n\t\t\t});\n\t\t\t$link_read.attr('data-ajax', 'false');\n\t\t\t$link_read.attr('data-role', 'button');\n\t\t\t$link_read.appendTo('#comment');\n\n\t\t\tvar current_user = $.jStorage.get('current_user');\n\t\t\tif(current_user == null){\n\t\t\t\t$('#write-comment-button').addClass('ui-disabled');\n\t\t\t}\n\n\t\t};\n\n\t\tArticle.prototype.showItem = function(category) {\n\n\t\t\tvar article = $.jStorage.get('articles['+this.id+']');\n\n\t\t\tvar timestamp = article.date;\n\t\t\tvar date = new Date(timestamp * 1000);\n\t\t\tvar datevalues = [\n\t\t\t date.getFullYear()\n\t\t\t ,date.getMonth()+1\n\t\t\t ,date.getDate()\n\t\t\t ,date.getHours()\n\t\t\t ,date.getMinutes()\n\t\t\t ,date.getSeconds()\n\t\t\t ];\n\n\t\t\tif(datevalues[1]<10){\n\t\t\t\tmonth = '0' + datevalues[1];\n\t\t\t\tdatevalues[1] = month;\n\t\t\t}\n\n\t\t\t$li = $('<li>');\n\t\t\t$a = $('<a>', {\n\t\t\t\thref: \"article.html?id=\"+this.id+\"&category=\" + category.id,\n\t\t\t\trel: \"external\",\n\t\t\t\tclass: \"articleBtn\"\n\t\t\t});\n\n\t\t\t$p = $('<p>', {\n\t\t\t\ttext: 'écrit le '+datevalues[2]+' / '+datevalues[1]+' / '+datevalues[0],\n\t\t\t});\n\n\t\t\t$h3 = $('<h3>', {\n\t\t\t\ttext: this.title,\n\t\t\t});\n\t\t\t$div = $('<div>', {\n\t\t\t\ttext: this.subhead\n\t\t\t});\n\n\t\t\tif(!!article.picture) { \n\t\t\t\t$div = $('<div>', {\n\t\t\t\t\tclass: \"thumb\"\n\t\t\t\t});\t\n\n\t\t\t\t$img = $('<img>', {\n\t\t\t\t\tsrc: DOMAIN_WEBSITE + \"media/\" + article.picture\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$div = $('<div>', {\n\t\t\t\t\tclass: \"no-thumb\"\n\t\t\t\t});\n\n\t\t\t\t$img = $('<img>', {\n\t\t\t\t\tsrc: \"css/icons/42-photos.png\"\n\t\t\t\t});\n\t\t\t}\n\n\n\t\t\t$img.appendTo($div);\n\n\t\t\t$div.appendTo($a);\n\t\t\t$h3.appendTo($a);\n\t\t\t$p.appendTo($a);\n\n\t\t\t$a.appendTo($li);\n\n\t\t\t$li.appendTo('#reader #articles');\n\n\t\t\t$('#reader #articles:visible').listview('refresh');\n\t\t};\n\n\t}\n}", "function makeSignature(params) {\n\tif (!params) return \"()\";\n\tvar signature = \"(\"\n\t+\n\tparams.filter(\n\t\tfunction($) {\n\t\t\treturn $.name.indexOf(\".\") == -1; // don't show config params in signature\n\t\t}\n\t).map(\n\t\tfunction($) {\n\t\t\treturn $.name;\n\t\t}\n\t).join(\", \")\n\t+\n\t\")\";\n\treturn signature;\n}", "function getSignature() {\r\n var encode = \"\"\r\n for(var i = 0; i < arguments.length; i++) {\r\n encode += arguments[i]\r\n }\r\n encode += secret\r\n return Qt.md5(encode)\r\n}", "constructor(Author, title, price) {\n this.author = Author;\n this.title = title;\n this.price = price\n }", "function articleAttributes(article) {\n article.className = \"note shadow-sm\";\n article.id = \"note-article\";\n return article;\n}", "function uploadArticle(url){\n extractor.extractData(url, function(err,data){\n /*\n data.content: article body\n data.title : article title\n data.domain : article source\n data.summary: article summary\n data.author : article author\n */\n addArticle(data.content, data.title, data.domain);\n });\n}", "function articleToEvent(article) {\n\t\t\t\t\tvar date = article.pub_date.split('T')[0].split('-').join(','),\n\t\t\t\t\t\tevent_ = {\n\t\t\t\t\t\t\tstartDate: date,\n\t\t\t\t\t\t\tendDate: date,\n\t\t\t\t\t\t\theadline: article.headline.main,\n\t\t\t\t\t\t\ttext: article.lead_paragraph || article.snippet\n\t\t\t\t\t\t};\n\t\t\t\t\t// todo: template text?\n\t\t\t\t\t// todo: images\n\t\t\t\t\treturn event_;\n\t\t\t\t}", "returnOriginalSignatureSource() {\n return this.type.toString() + \"000\" + this.amt.toString();\n }", "function processArticle(content) {\n if (!content) {\n console.error(\"processArticle didn't find any content to process!\");\n return;\n }\n if (!fm.test(content)) {\n console.error(\"Bad content:\", content);\n console.error(\"Front-matter considers this content invalid.\");\n return;\n }\n var article = fm(content.toString()); // We have an article object\n article.attributes.date = moment(article.attributes.date); //Remember to format() back to string from within jade\n // debug junk\n // var gotTags = article.attributes.tags;\n // if (gotTags){\n // console.log(\"Got tags:\", gotTags);\n // } else {\n // console.log(\"This article has no tags:\", article.path);\n // }\n\n return article;\n}", "function getSignature() {\n var encode = \"\"\n for(var i = 0; i < arguments.length; i++) {\n encode += arguments[i]\n }\n encode += secret\n return Qt.md5(encode)\n}", "postArticle(Articles) {\n\n\t\treturn axios.post(\"/api/saved\", {Articles});\n\t\n\t}", "set signature(signature) {\n if (signature)\n this._signature = signature;\n }", "function signature() {\r\n\tvar r = \"\", t, v;\r\n\tfor (var i = 0; i < arguments.length; i++) {\r\n\t\tv = arguments[i];\r\n\t\tt = typeof v;\r\n\t\tif (i) {\r\n\t\t\tr += ',';\r\n\t\t}\r\n\t\tr += t === 'object' ? (v ? identifier(v.constructor) : '') : t;\r\n\t}\r\n\treturn r;\r\n}", "function DiggArticle (){\n\t\t\tArticle.call(this, \n\t\t\t\t// TITLE\n\t\t\t\tresponse.data.feed[0].content.title_alt, \n\t\t\t\t// CATEGORY\n\t\t\t\tresponse.data.feed[0].content.description, \n\t\t\t\t// DIGGS\n\t\t\t\tresponse.data.feed[0].diggs.count,\n\t\t\t\t// DESCRIPTION\n\t\t\t\tresponse.data.feed[0].content.tags[0].display, \n\t\t\t\t// IMAGE\n\t\t\t\tresponse.data.feed[0].content.media.images[8].url\n\t\t\t\t)\n\t\t}", "function createArticle (articleInfo) {\n try {\n return fetch('/api/newarticle', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n title: articleInfo.title,\n subtitle: articleInfo.subtitle,\n link: articleInfo.link,\n source: articleInfo.source,\n stance: articleInfo.stance\n })\n });\n } catch (err) {\n console.log(err);\n }\n}", "constructor(title, author, isbn) {\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n }", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0xbaafe5e0;\n this.SUBCLASS_OF_ID = 0x1aca5644;\n\n this.author = args.author;\n this.publishedDate = args.publishedDate;\n }", "function test(){\n\tassert.ok(ostatus.salmon.verify_signature(me, key));\n}", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0x16115a96;\n this.SUBCLASS_OF_ID = 0x1aca5644;\n\n this.title = args.title;\n this.articles = args.articles;\n }", "function articleToHTML(article) {\n return '<article class=\"article\">' +\n ' <section class=\"featuredImage\">' +\n ' </section>' +\n ' <section class=\"articleContent\">' +\n ' <a href=\"#\"><h3>' + article.name + '</h3></a>' +\n ' <h6>' + article.location.formattedAddress + '</h6>' +\n ' </section>' +\n ' <section class=\"impressions\">' +\n article.stats.checkinsCount +\n ' </section>' +\n ' <section class=\"score ' + article.class +'\">' +\n article.score +\n ' </section>' +\n ' <div class=\"clearfix\"></div>' +\n '</article>'; \n}", "function name(authorinfo) /* (authorinfo : authorinfo) -> string */ {\n return authorinfo.name;\n}", "function setArticle(article){\n cleanArticleFields(); \n \n if(article){\n $('.author').text('Author: ');\n $('.date').text('Date: '); \n $('.title').append('<span>' + article.title + '</span>' );\n var authorWithLink = '<span> <a href=\\'mailto:'\n + article.authorEmail \n + '\\'>' + article.author \n +'</a></span>';\n \n $('.author').append(authorWithLink);\n $('.date').append('<span>' + article.date + '</span>' ); \n $('.text').append( article.text );\n $('.text').append( '<p> <button>Remove article</button></p>' );\n $('.article-view button').on('click', function(){\n removeArticle(article._id);\n });\n \n } else {\n showDefaultPage(errorArticleObject); \n }\n }", "function email(authorinfo) /* (authorinfo : authorinfo) -> string */ {\n return authorinfo.email;\n}", "function printArticle(txt) {\n var s = s_gi(s_account);\n s.linkTrackEvents = s.events = 'event18';\n s.trackExternalLinks = false;\n s.linkTrackVars = 'prop9,eVar9,events';\n s.tl(this, 'o', txt);\n}", "constructor(title, author, isbn) {\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n }", "function Article (opts) {\n for (key in opts) {\n this[key] = opts[key];\n }\n}", "constructor() {\n logger.checkAbstract(new.target, lib_esm_Signer);\n Object(lib_esm[\"d\" /* defineReadOnly */])(this, \"_isSigner\", true);\n }", "verifySignature(metadata) {\n const signature = metadata.signatures[this.keyID];\n if (!signature)\n throw new error_1.UnsignedMetadataError('no signature for key found in metadata');\n if (!this.keyVal.public)\n throw new error_1.UnsignedMetadataError('no public key found');\n const publicKey = (0, key_1.getPublicKey)({\n keyType: this.keyType,\n scheme: this.scheme,\n keyVal: this.keyVal.public,\n });\n const signedData = metadata.signed.toJSON();\n try {\n if (!utils_1.crypto.verifySignature(signedData, publicKey, signature.sig)) {\n throw new error_1.UnsignedMetadataError(`failed to verify ${this.keyID} signature`);\n }\n }\n catch (error) {\n if (error instanceof error_1.UnsignedMetadataError) {\n throw error;\n }\n throw new error_1.UnsignedMetadataError(`failed to verify ${this.keyID} signature`);\n }\n }", "constructor(title, author, isbn) {\n // whatever passes in as params will be assigned to title, author, isbn\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n }", "function Article(rawDataObj) {\n // DONE: Use the JS object that is passed in to complete this constructor function:\n // Save ALL the properties of `rawDataObj` into `this`\n this.title = rawDataObj.title;\n this.category = rawDataObj.category;\n this.author = rawDataObj.author;\n this.authorUrl = rawDataObj.authorUrl;\n this.publishedOn = rawDataObj.publishedOn;\n this.body = rawDataObj.body;\n}", "function serializeSignature(writeStream, object) {\r\n if (object.type === IEd25519Signature_1.ED25519_SIGNATURE_TYPE) {\r\n serializeEd25519Signature(writeStream, object);\r\n }\r\n else {\r\n throw new Error(`Unrecognized signature type ${object.type}`);\r\n }\r\n}", "function address(authorinfo) /* (authorinfo : authorinfo) -> string */ {\n return authorinfo.address;\n}", "async package(artifact, signature) {\n return (0, bundle_1.toDSSEBundle)(artifactDefaults(artifact), signature);\n }", "function getSignature()\n{\n var timeStamp = Math.floor((new Date()).getTime()/1000);\n return (md5(api_key+shared_secret+timeStamp));\n}", "constructor(signature) {\n if (!signature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n this._signature = signature;\n }", "constructor(signature) {\n if (!signature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n this._signature = signature;\n }", "function back_from_image_doc() {\n\tif(action == 'delivered' || action == 'pick-up') {\n\t\tshow('page-signature');\n\t} else {\n\t\tshow('page-album');\n\t}\n}", "function signTheFile() {\n var plaintext = document.querySelector('.output').value\n // initialize\n var sig = new KJUR.crypto.Signature({\"alg\": \"SHA1withRSA\"});\n // initialize for signature generation\n sig.init(object_2.private_key); // rsaPrivateKey of RSAKey object\n // update data\n sig.updateString(plaintext)\n // calculate signature\n signature = sig.sign()\n alert(\"signature signed.If you will make any changes in given signature it will become invalid\");\n } // end of signTheFile click handler", "constructor(id,title,ISBN,publishedDate,author){\n this.id=id;\n this.title=title;\n this.ISBN=ISBN;\n this.publishedDate=publishedDate;\n this.author=author;\n }", "function SignatureParams() {\n this.prefix = \"\";\n }", "constructor(article, tagsArticles) {\n this.article = article || null;\n this.tagMap = {};\n this.tagsArticles = tagsArticles || [];\n this.tagsArticles.forEach( (el) => {\n this.tagMap[el.tag.name] = el.tag;\n });\n }", "function addArticle(content, title, domain){\n var newArticle = {\n \"tag\" : db.db.length,\n \"article\" : content,\n \"title\" : title,\n \"domain\": domain,\n \"position\": 0\n }\n db.db.push(newArticle)\n}", "async function createArticle(title, content, photo, authorId, rang){\n\n const article = new Article({title, content, photo, authorId, rang})\n\n return promise = new Promise((resolve, reject)=>{\n article.save((err, article)=>\n {\n if (err){ reject(err); return}\n resolve(article)\n })\n })\n\n}", "static postArticle(req, res) {\n const { error } = validation.validateArticle(req.body);\n if (error) {\n return res.status(400).json({\n status: 400,\n error: error.details[0].message.replace(/[/\"]/g, ''),\n });\n }\n\n const article = {\n id: articles.length + 1,\n createdOn: moment().format('LLL'),\n title: req.body.title,\n article: req.body.article,\n comments: [],\n };\n\n articles.push(article);\n return res.status(201).json({\n status: 201,\n message: 'article successfully created',\n data: {\n id: article.id,\n createdOn: moment().format('LLL'),\n title: req.body.title,\n article: req.body.article,\n },\n });\n }", "function viewArticle() {\n\t\t//set the content of the elements using the list items' attributes\n\t\t$(\"article h1\").html($(this).attr(\"title\"));\n\t\t$(\"article img\").attr(\"src\", $(this).attr(\"backgr\"));\n\t\t$(\"article h4\").html($(this).attr(\"author\") + \" - \" + $(this).attr(\"date\"));\n\t\t$(\"article .content\").html($(this).attr(\"description\"));\n\t}", "function serializeEd25519Signature(writeStream, object) {\r\n writeStream.writeByte(\"ed25519Signature.type\", object.type);\r\n writeStream.writeFixedHex(\"ed25519Signature.publicKey\", ed25519_1.Ed25519.PUBLIC_KEY_SIZE, object.publicKey);\r\n writeStream.writeFixedHex(\"ed25519Signature.signature\", ed25519_1.Ed25519.SIGNATURE_SIZE, object.signature);\r\n}", "function emailArticle(txt) {\n var s = s_gi(s_account);\n s.linkTrackEvents = s.events = 'event19';\n s.trackExternalLinks = false;\n s.linkTrackVars = 'prop9,eVar9,events';\n s.tl(this, 'o', txt);\n}", "function _getMetadata(anchor) {\n\t\treturn '';\n\t}", "constructor(\n\t\t\t\ttitle,\n\t\t\t\tlink,\n\t\t\t\tauthor,\n\t\t\t\timg,\n\t\t\t\tbody){\n\t\t\t\t\tthis.title = title;\n\t\t\t\t\tthis.link = link;\n\t\t\t\t\tthis.author = author;\n\t\t\t\t\tthis.img = img;\n\t\t\t\t\tthis.body = body;\n\t}", "function publish( txn ){\n\n\tcheckForMissingArg( txn, \"transaction\" );\n\t\n\treturn Blockchain.sign(txn);\n}", "checkActivateAuthor () {\n /* nothing */\n }", "setSignature(signer, signature) {\n this.signature = { signer, signature };\n }", "function serializeSignature(signature) {\n var params = signature.parameters;\n var res = {\n parameters: params.map(serializeSymbol),\n returnType: getReturnType(signature),\n documentation: ts.displayPartsToString(signature.getDocumentationComment(undefined))\n };\n for (var i = 0; i < params.length; i++) {\n var node = params[i].valueDeclaration;\n if (!!node) {\n res.parameters[i].isOptional = checker.isOptionalParameter(node);\n }\n }\n return res;\n }", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0xf259a80b;\n this.SUBCLASS_OF_ID = 0x1aca5644;\n\n this.url = args.url;\n this.webpageId = args.webpageId;\n this.authorPhotoId = args.authorPhotoId;\n this.author = args.author;\n this.date = args.date;\n this.blocks = args.blocks;\n this.caption = args.caption;\n }", "function mmArticleMaker(article, title, mdText) {\n this.name = 'mm-content-' + article;\n this.template = '#mm-content-article-template';\n this.path = '/' + article + '.html';\n this.components = {\n 'mm-quickstart': mmQuickStart,\n 'mm-content-heading': mmContentHeading\n };\n\n this.data = function () {\n return {\n title: title,\n mdText: mdText,\n prevLink: mmArticleLink(article, 'prev'),\n nextLink: mmArticleLink(article, 'next')\n };\n };\n\n this.mixins = [drawerMixin, samecaseMixin, markedMixin];\n}", "function signature(text)\n { \n var sig = 0, len = text.length\n if(len > magic)\n len = magic\n for(var tdx = 0; tdx < len; ++tdx) \n {\n sig <<= 8\n sig += char(text, tdx)\n }\n return sig\n }", "constructor(title, author, year){\n this.title = title,\n this.author = author,\n this.year = year \n }", "function authors(titleinfo) /* (titleinfo : titleinfo) -> list<authorinfo> */ {\n return titleinfo.authors;\n}", "function createArticleSection(article) {\n var section = \n `<div class = \"card\">\n <div class = \"card-body\">\n <h3 class = \"card-title\">\n <a href = ${article.url}>\n ${article.headline}\n </a>\n <a class = \"btn btn-primary save\">\n Save Article\n </a>\n </h3>\n <p class = \"card-text\">\n ${article.summary}\n </p>\n </div>\n </div>`;\n section.data(\"_id\", article._id);\n return section;\n }", "saveArticle(articleData) {\n console.log(articleData)\n return axios.post(\"/api/articles\", articleData);\n }", "function sign(params) {\n params.key = key;\n params.timestamp = Math.round(new Date().getTime());\n params.signature = crypto.createHmac('sha256', secret).update(params.key + params.timestamp).digest('hex');\n return params;\n}", "function createRandomArticle() {\n const id = DataSeeder.randomId();\n const ticket_id = DataSeeder.randomId();\n const sender_id = DataSeeder.randomId();\n const subject = DataSeeder.randomString(10);\n const body = DataSeeder.randomString(50);\n const content_type = DataSeeder.randomString(10);\n const internal = DataSeeder.randomBool();\n const type = DataSeeder.randomString(10);\n const sender = \"System\";\n const from = DataSeeder.randomMail();\n const to = DataSeeder.randomMail();\n const cc = DataSeeder.randomMail();\n const createdById = DataSeeder.randomId();\n const updatedById = DataSeeder.randomId();\n const updatedAt = DataSeeder.randomIsoTimestamp();\n const createdAt = DataSeeder.randomIsoTimestamp();\n\n return {\n id,\n ticket_id,\n sender_id,\n subject,\n body,\n content_type,\n internal,\n type,\n sender,\n from,\n to,\n cc,\n created_by_id: createdById,\n updated_by_id: updatedById,\n updated_at: updatedAt,\n created_at: createdAt,\n };\n}", "function signature(req, res, next) {\n let date = new Date();\n date = date.toISOString()\n date = date.replace(/\\.[0-9]{2,3}/, '');\n \n //let data = \"AWSAccessKeyId=\"+access_key+\"&AssociateTag=\"+AssociateTag+\"&Condition=\"+req.body.Condition+\"&Operation=\"+req.body.Operation+\"&ResponseGroup=\"+req.body.ResponseGroup+\"&SearchIndex=\"+req.body.SearchIndex+\"&Service=\"+req.body.Service+\"&Timestamp=\"+date+\"&Title=\"+req.body.Title+\"&Version=\"+req.body.Version;\n let data = \"AWSAccessKeyId=\"+access_key+\"&AssociateTag=\"+associate_tag+\"&Keywords=\"+req.body.Keywords+\"&Operation=ItemSearch&ResponseGroup=OfferListings,Images,ItemAttributes&SearchIndex=All&Service=AWSECommerceService&Timestamp=\"+date;\n \n data = encodeURIComponent(data);\n data = data.replace(/%3D/g, \"=\");\n data = data.replace(/%26/g, \"&\");\n \n let request = \"GET\"+\"\\n\"+\"webservices.amazon.com\"+\"\\n\"+\"/onca/xml\"+\"\\n\"+ data;\n let signature = crypto.createHmac('sha256', secret_key).update(request).digest('base64');\n signature = encodeURIComponent(signature);\n let url=`http://webservices.amazon.com/onca/xml?`+data+`&Signature=`+signature;\n f_request.get(url, function (err, response, body) {\n if (err) res.status(500).json({'err': err});\n parseString(body, function (err, result) {\n let list_items = result.ItemSearchResponse.Items[0].Item;\n let items = [];\n let item = {};\n list_items.forEach((i) => {\n item[\"DetailPageURL\"]=i.DetailPageURL[0];\n item[\"ItemLinks\"]=i.ItemLinks[0];\n item[\"LargeImage\"]=i.LargeImage[0].URL[0];\n item[\"ItemAttributes\"]=i.ItemAttributes[0];\n if(i.Offers[0].Offer){\n console.log(i.Offers[0].Offer[0].OfferListing[0]);\n item[\"Offer\"]=i.Offers[0].Offer[0].OfferListing[0];\n items.push(item);\n }\n \n });\n //console.log(items);\n return res.status(200).json({'json': items});\n });\n });\n}", "fetch () {\n return Api().get('signatures/');\n }", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0xbdf9653b;\n this.SUBCLASS_OF_ID = 0x83199eb2;\n\n this.id = args.id;\n this.accessHash = args.accessHash;\n this.shortName = args.shortName;\n this.title = args.title;\n this.description = args.description;\n this.photo = args.photo;\n this.document = args.document || null;\n }", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0xf4e096c3;\n this.SUBCLASS_OF_ID = 0xfaf846f4;\n\n this.title = args.title;\n this.description = args.description;\n this.photo = args.photo || null;\n this.invoice = args.invoice;\n this.payload = args.payload;\n this.provider = args.provider;\n this.providerData = args.providerData;\n this.startParam = args.startParam;\n }", "function addArticleClicked(event){\n addResource(\"article\", this, event)\n }", "static initialize(obj, signatureHField, signatureImageField, signatureImageIncludeBorderField, signatureImageIncludeReasonField, signatureImageIncludeSignedByField, signatureImageIncludeSignedDateField, signatureImageTypeField, signaturePageField, signatureWField, signatureXField, signatureYField, signerEmailField, signerFullNameField, signerIndentificationNumberField, signerLocationField, signerMobileNumberField, signerReasonField, signerTrustOriginField, signerTrustReferenceField) { \n obj['SignatureHField'] = signatureHField;\n obj['SignatureImageField'] = signatureImageField;\n obj['SignatureImageIncludeBorderField'] = signatureImageIncludeBorderField;\n obj['SignatureImageIncludeReasonField'] = signatureImageIncludeReasonField;\n obj['SignatureImageIncludeSignedByField'] = signatureImageIncludeSignedByField;\n obj['SignatureImageIncludeSignedDateField'] = signatureImageIncludeSignedDateField;\n obj['SignatureImageTypeField'] = signatureImageTypeField;\n obj['SignaturePageField'] = signaturePageField;\n obj['SignatureWField'] = signatureWField;\n obj['SignatureXField'] = signatureXField;\n obj['SignatureYField'] = signatureYField;\n obj['SignerEmailField'] = signerEmailField;\n obj['SignerFullNameField'] = signerFullNameField;\n obj['SignerIndentificationNumberField'] = signerIndentificationNumberField;\n obj['SignerLocationField'] = signerLocationField;\n obj['SignerMobileNumberField'] = signerMobileNumberField;\n obj['SignerReasonField'] = signerReasonField;\n obj['SignerTrustOriginField'] = signerTrustOriginField;\n obj['SignerTrustReferenceField'] = signerTrustReferenceField;\n }", "function insertArticle(article) {\n\tvar head = articleList.head;\n\tvar node = head;\n\n\tfor (var _node = head; _node !== null; _node = _node.next) {\n\t\tif (_node.data.author === article.author) {\n\t\t\tnode = _node;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tarticleList.add(article, node);\n}", "saveBook(title, author, image, link, description){\n var newBook = {\n title: title,\n author: author,\n description: description,\n image: image,\n link: link\n };\n API.saveBook(newBook)\n .then(\n alert(\"Book saved!\")\n )\n .catch(err => console.log(err));\n }", "function createAuthor() {\n\tvar body = {\n\t\tname: 'Testing-new',\n about: 'Working',\n thumbnail: 'https://lh4.googleusercontent.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/photo.jpg',\n image: 'https://lh4.googleusercontent.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/photo.jpg',\n facebook: ' ',\n twitter: \"twitter1.com\",\n instagram: 'instagram1.com',\n snapchat: 'snapchat_handle1',\n other: 'mywebsite1.com'\n }\n var snippet = {\n \tbody: body\n }\n rimer.author.create(snippet, function(error, value) {\n\t\tif(error) {\n\t\t\tconsole.log(error)\n\t\t}\n\t\telse {\n\t\t\tconsole.log(value)\n\t\t}\n\t})\n}", "function createDummyArticle (timeAdded) {\n if (timeAdded) {\n return {\n time_added: 1457167982 // eslint-disable-line camelcase\n }\n }\n\n return {\n time_added: 1457167982, // eslint-disable-line camelcase\n time_updated: 1459846382 // eslint-disable-line camelcase\n }\n}", "function Note(content) {\n this.content = content;\n}" ]
[ "0.591111", "0.5885551", "0.58005184", "0.58005184", "0.57932127", "0.5787186", "0.5784885", "0.5768627", "0.5707028", "0.5680155", "0.5663203", "0.5572938", "0.55285347", "0.54634506", "0.5451425", "0.5442048", "0.5430306", "0.53897995", "0.5381715", "0.5380694", "0.53636414", "0.5351089", "0.5350712", "0.5330219", "0.52807", "0.5233641", "0.5224808", "0.5195287", "0.51929486", "0.51823443", "0.5179949", "0.5173386", "0.51509374", "0.51241547", "0.51188827", "0.5106524", "0.5097746", "0.5096443", "0.5095849", "0.5080939", "0.50783426", "0.5060155", "0.5058099", "0.50550103", "0.5054686", "0.5054373", "0.5049377", "0.5044632", "0.50134", "0.5006653", "0.50043726", "0.49914172", "0.49885005", "0.49769968", "0.49760672", "0.49758726", "0.4975864", "0.4974442", "0.4964198", "0.49627385", "0.49610102", "0.4958017", "0.4958017", "0.49571282", "0.49397102", "0.4923881", "0.4910598", "0.49031684", "0.4901018", "0.48950234", "0.48845658", "0.48748887", "0.48726985", "0.4871291", "0.4870596", "0.48680463", "0.4866024", "0.48506442", "0.48496106", "0.484767", "0.48377267", "0.48373958", "0.48360047", "0.48282662", "0.48209906", "0.480695", "0.48046774", "0.48017034", "0.47986573", "0.47956908", "0.47896463", "0.4787937", "0.47846895", "0.4774667", "0.4772511", "0.4764725", "0.47580716", "0.47574654", "0.47242704", "0.47202954" ]
0.64325213
0
= Article comments quotes =
function qll_utility_article_quote() { coa = $("#profileholder .smalldotted:first").text(); coh = document.getElementById('profileholder').getElementsByTagName('h1')[0].getElementsByTagName('span')[0]; $(".articlerelated .box:first").append("<div class='rankholder' id='QLLMenuArticleQuoteArticle'><span class='shadow'>Q</span><span class='value'>Q</span></div>"); query = document.getElementById("QLLMenuArticleQuoteArticle"); query.setAttribute('onmouseover',"QLLMenuArticleQuote=new String(window.getSelection());"); // query.setAttribute('onclick',"if(QLLMenuArticleQuote.length>0){document.getElementById('article_comment').value= document.getElementById('article_comment').value + '\\n <a class=\"informer\" target=\"_blank\" href=\"" + coa.getAttribute('href') + "\"> " + coa.innerHTML + "@"+ coh.innerHTML +":\\n' + QLLMenuArticleQuote +' </a> '; document.getElementById('article_comment').focus();}"); query.setAttribute('onclick',"if(QLLMenuArticleQuote.length>0){document.getElementById('article_comment').value= document.getElementById('article_comment').value + '\\n" + coa + "@"+ coh.innerHTML +":\\n\"\"' + QLLMenuArticleQuote +'\"\"\\n'; document.getElementById('article_comment').focus();}"); content=document.getElementById('article_comment'); coh=document.getElementById('comments_div'); cominst=coh.getElementsByTagName('div'); for(com in cominst) { if(cominst[com].getAttribute('class')=='articlecomments') { s=cominst[com].getElementsByTagName('div')[1]; auth = s.getElementsByTagName('a')[1].getAttribute('title'); s = s.getElementsByTagName('span')[0]; s.setAttribute('onmouseover',"QLLMenuArticleQuote=new String(window.getSelection());"); // s.setAttribute('onclick',"if(QLLMenuArticleQuote.length==0){ document.getElementById('article_comment').value= document.getElementById('article_comment').value + '\\n <a target=\"_blank\" href=\"" + s.getAttribute('href') + "\"> @" + s.getAttribute('title') + " </a> : '; document.getElementById('article_comment').focus();}else{document.getElementById('article_comment').value= document.getElementById('article_comment').value + '\\n <a class=\"informer\" target=\"_blank\" href=\"" + s.getAttribute('href') + "\"> @" + s.getAttribute('title') + ":\\n' + QLLMenuArticleQuote +' </a> '; document.getElementById('article_comment').focus();}"); s.setAttribute('onclick',"if(QLLMenuArticleQuote.length==0){ document.getElementById('article_comment').value= document.getElementById('article_comment').value + '\\n@" + auth + " : '; document.getElementById('article_comment').focus();}else{document.getElementById('article_comment').value= document.getElementById('article_comment').value + '\\n@" + auth + ":\\n\"\"' + QLLMenuArticleQuote +'\"\"\\n'; document.getElementById('article_comment').focus();}"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doquote(objID,strAuthor){\r\n\tdocument.inputform.message.value += \"[quote=\"+strAuthor+\"] \"+document.getElementById(objID).innerText+\" [/quote]\\n\";\r\n\twindow.location.hash=\"comment\";\r\n}", "function Comment(){\n this.id;\n this.user_id;\n this.entry_id;\n this.date;\n this.text;\n}", "function getQuote (){\r\n // quotes and authors -- \r\n var quotes = [ \"Try to be a rainbow in someone's cloud.\", \r\n\t\"Health is the greatest gift, contentment the greatest wealth, faithfulness the best relationship.\",\r\n\t\"I've learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel.\",\r\n\t\"If you look at what you have in life, you'll always have more. If you look at what you don't have in life, you'll never have enough.\",\r\n\t\"I can't change the direction of the wind, but I can adjust my sails to always reach my destination.\", \r\n\t\"Believe you can and you're halfway there.\",\r\n\t\"Do or do not. There is no try.\",\r\n\t\"Strive not to be a success, but rather to be of value.\",\r\n\t\"The most common way people give up their power is by thinking they don’t have any.\",\r\n\t\"It is during our darkest moments that we must focus to see the light.\",\r\n\t\"Change your thoughts and you change your world.\", \r\n\t\"You can't use up creativity. The more you use, the more you have.\",\r\n\t\"I have learned over the years that when one's mind is made up, this diminishes fear.\", \r\n\t\"A person who never made a mistake never tried anything new.\",\r\n\t\"What's money? A man is a success if he gets up in the morning and goes to bed at night and in between does what he wants to do.\",\r\n\t\"If you want to lift yourself up, lift up someone else.\",\r\n\t\"Just because you are happy, it does not mean that the day is perfect, but that you have looked beyond its imperfections.\",\r\n\t\"Don't gain the world and lose your soul, wisdom is better than silver or gold.\", \r\n\t\"Money is numbers and numbers never end. If it takes money to be happy, your search for happiness will never end.\",\r\n\t\"A man who stands for nothing will fall for anything.\",\r\n\t\"Education is our passport to the future, for tomorrow belongs to the people who prepare for it today.\", \r\n\t\"We cannot think of being acceptable to others until we have first proven acceptable to ourselves.\", \r\n\t\"It always seems impossible until it's done.\",\r\n\t\"As we let our own light shine, we unconsciously give other people permission to do the same.\",\r\n\t\"Be yourself; everyone else is already taken.\",\r\n\t\"Be the change that you wish to see in the world.\",\r\n\t\"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment.\",\r\n\t\"For every minute you are angry you lose sixty seconds of happiness.\"]; \r\n \r\n\t\r\n\t\r\n\t\r\n\t\r\n\tvar authors = [\"Maya Angelou\",\r\n\t\"buddha\", \r\n\t\"Maya Angelou\",\r\n\t\"Oprah Winfrey\", \r\n\t\"Jimmy Dean\",\r\n\t\"Theodore Roosevelt\",\r\n\t\"Yoda\",\r\n\t\"Albert Einstein\",\r\n\t\"Alice Walker\",\r\n\t\"Aristotle Onassis\", \r\n\t\"Norman Vincent Peal\", \r\n\t\"Maya Angelou\", \r\n\t\"Rosa Parks\",\r\n\t\"Albert Einstein\",\r\n\t\"Bob Dylan\", \r\n\t\"Booker T. Washington\", \r\n\t\"Bob Marley\", \r\n\t\"Bob Marley\", \r\n\t\"Bob Marley\", \r\n\t\"Malcolm X\",\r\n\t\"Malcolm X\", \r\n\t\"Malcolm x\", \r\n\t\"Nelson Mandela\", \r\n\t\"Nelson Mandela\",\r\n\t\"Oscar Wilde\",\r\n\t\"Mahatma Gandhi\",\r\n\t\"Ralph Waldo Emerson\",\r\n\t\"Ralph Waldo Emerson\"];\r\n \r\n\t \r\n\t \r\n\t \r\n\t //key variable for randomization-- \r\n randomNum = Math.floor(Math.random()*quotes.length);\r\n //Assign random variable to author and quote--\r\n randomQuote = quotes[randomNum];\r\n author = \" - \" + authors[randomNum];\r\n /*calls quotes and respective author to location in html--*/ \r\n $(\".quote\").text(randomQuote);\r\n $(\".author\").text(author);\r\n}", "function extractQuote(article) {\n\n let para = article.firstChild;\n paraStr = para.textContent;\n\n if (paraStr.indexOf('\"')> -1) {\n let b = document.createElement('blockquote')\n quote = paraStr.split('\"')[1];\n b.textContent = '\"' + quote + '\"';\n // console.log(b.textContent)\n article.replaceChild(b, para);\n return para;\n } \n else {\n return null;\n // console.log('no changes');\n }\n // console.log(paraStr)\n}", "function inspiringQuote() {\r\n // Example quotes: \r\n // \"If opportunity doesn't knock, build a door.\"\r\n // \"The best way out is always through.\"\r\n // BEGIN CODE \r\n \r\n // END CODE\r\n}", "getComments(){\n\n }", "function getQuotes() {\n return [\n\n 'When I die, I want to go peacefully like my grandfather did - in his sleep. Not yelling and screaming like the passengers in his car.',\n 'I have six locks on my door all in a row. When I go out, I lock every other one. I figure no matter how long somebody stands there picking the locks, they are always locking three.',\n 'Always borrow money from a pessimist. He won\\'t expect it back.',\n 'The scientific theory I like best is that the rings of Saturn are composed entirely of lost airline luggage.',\n 'Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings.',\n 'First the doctor told me the good news: I was going to have a disease named after me.',\n 'A successful man is one who makes more money than his wife can spend. A successful woman is one who can find such a man.',\n 'How do you get a sweet little 80-year-old lady to say the F word? Get another sweet little 80-year-old lady to yell \"BINGO!\"',\n 'My therapist told me the way to achieve true inner peace is to finish what I start. So far I\\'ve finished two bags of M&Ms and a chocolate cake. I feel better already.',\n 'Dogs have masters. Cats have staff.',\n 'Knowledge is knowing a tomato is a fruit; wisdom is not putting it in a fruit salad.',\n 'Why do people say \"no offense\" right before they\\'re about to offend you?',\n 'I love deadlines. I like the whooshing sound they make as they fly by.',\n 'By all means, marry. If you get a good wife, you\\'ll become happy; if you get a bad one, you\\'ll become a philosopher.',\n 'I asked God for a bike, but I know God doesn\\'t work that way. So I stole a bike and asked for forgiveness.',\n 'The best way to lie is to tell the truth ... carefully edited truth.',\n 'Do not argue with an idiot. He will drag you down to his level and beat you with experience.',\n 'The only mystery in life is why the kamikaze pilots wore helmets.',\n 'Going to church doesn\\'t make you a Christian any more than standing in a garage makes you a car.',\n 'A bargain is something you don\\'t need at a price you can\\'t resist.',\n 'If at first you don\\'t succeed ... so much for skydiving.',\n 'Never, under any circumstances, take a sleeping pill and a laxative on the same night.',\n 'If you steal from one author, it\\'s plagiarism; if you steal from many, it\\'s research.',\n 'If you think nobody cares if you\\'re alive, try missing a couple of car payments.',\n 'How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?',\n 'My mother never saw the irony in calling me a son-of-a-bitch.',\n 'God gave us our relatives; thank God we can choose our friends.',\n 'A stockbroker urged me to buy a stock that would triple its value every year. I told him, \"At my age, I don\\'t even buy green bananas.\"',\n 'Some cause happiness wherever they go; others, whenever they go.',\n 'Patience is something you admire in the driver behind you, but not in one ahead.',\n 'I couldn\\'t repair your brakes, so I made your horn louder.',\n 'Children: You spend the first 2 years of their life teaching them to walk and talk. Then you spend the next 16 telling them to sit down and shut-up.',\n 'I intend to live forever. So far, so good.',\n 'A diplomat is someone who can tell you to go to hell in such a way that you will look forward to the trip.',\n 'Money can\\'t buy happiness, but it sure makes misery easier to live with.',\n 'Nothing sucks more than that moment during an argument when you realize you\\'re wrong.',\n 'By the time a man realizes that his father was right, he has a son who thinks he\\'s wrong.',\n 'We\\'ve all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true.',\n 'Why didn\\'t Noah swat those two mosquitoes?',\n 'If evolution really works, how come mothers only have two hands?',\n 'I dream of a better tomorrow, where chickens can cross the road and not be questioned about their motives.',\n 'Women who seek to be equal with men lack ambition.',\n 'When you go into court you are putting your fate into the hands of twelve people who weren\\'t smart enough to get out of jury duty.',\n 'Those people who think they know everything are a great annoyance to those of us who do.',\n 'By working faithfully eight hours a day you may eventually get to be boss and work twelve hours a day.',\n 'When tempted to fight fire with fire, remember that the Fire Department usually uses water.',\n 'It\\'s true hard work never killed anybody, but I figure, why take the chance?',\n 'America is a country where half the money is spent buying food, and the other half is spent trying to lose weight.',\n 'To err is human, to blame it on somebody else shows management potential.',\n 'I read recipes the same way I read science fiction. I get to the end and I think, \"Well, that\\'s not going to happen.\"',\n 'The trouble with being punctual is that nobody\\'s there to appreciate it.',\n 'If you do a job too well, you\\'ll get stuck with it.',\n 'Before I got married I had six theories about bringing up children; now I have six children and no theories.',\n 'A filing cabinet is a place where you can lose things systematically.',\n 'The trouble with eating Italian food is that five or six days later, you\\'re hungry again.',\n 'Insanity is hereditary. You get it from your children.',\n 'Instead of getting married again, I\\'m going to find a woman I don\\'t like and just give her a house.',\n 'A bank is a place that will lend you money, if you can prove that you don\\'t need it.',\n 'Politics is supposed to be the second oldest profession. I have come to realize that it bears a very close resemblance to the first.',\n 'It is amazing how quickly the kids learn to drive a car, yet are unable to understand the lawn mower, snowblower and vacuum cleaner.',\n 'I hate housework! You make the beds, you do the dishes - and six months later you have to start all over again.',\n 'We hope that, when the insects take over the world, they will remember with gratitude how we took them along on all our picnics.',\n 'Evening news is where they begin with \"Good evening,\" and then proceed to tell you why it isn\\'t.',\n 'My husband wanted one of those big-screen TVs for his birthday. So I just moved his chair closer to the one we have already.',\n 'According to most studies, people\\'s number one fear is public speaking. Number two is death. Death is number two! Does that sound right? That means to the average person, if you go to a funeral, you\\'re better off in the casket than doing the eulogy.',\n 'Retirement at 65 is ridiculous. When I was 65 I still had pimples.',\n 'An archaeologist is the best husband a woman can have; the older she gets the more interested he is in her.',\n 'The shinbone is a device for finding furniture in a dark room.',\n 'Housework can\\'t kill you, but why take a chance?',\n 'All you need to grow fine, vigorous grass is a crack in your sidewalk.',\n 'You know you\\'re getting old when you stoop to tie your shoelaces and wonder what else you could do while you\\'re down there.',\n 'The best time to give advice to your children is while they\\'re still young enough to believe you know what you\\'re talking about.',\n 'Tell a man there are 300 billion stars in the universe and he\\'ll believe you. Tell him a bench has wet paint on it and he\\'ll have to touch it to be sure.',\n 'Politicians and diapers have one thing in common. They should both be changed regularly, and for the same reason.',\n 'The human brain is a wonderful thing. It starts working the moment you are born, and never stops until you stand up to speak in public.',\n 'Misers aren\\'t fun to live with, but they make wonderful ancestors.',\n 'The odds of going to the store for a loaf of bread and coming out with only a loaf of bread are three billion to one.',\n 'When opportunity knocks, some people are in the backyard looking for four-leaf clovers.',\n 'Life expectancy would grow by leaps and bounds if green vegetables smelled as good as bacon.',\n 'I told my wife the truth. I told her I was seeing a psychiatrist. Then she told me the truth: that she was seeing a psychiatrist, two plumbers, and a bartender.',\n 'There is nothing so annoying as to have two people go right on talking when you\\'re interrupting.',\n 'The best way to keep children home is to make the home a pleasant atmosphere ... and let the air out of the tires.',\n 'I grew up with six brothers. That\\'s how I learned to dance - waiting for the bathroom.',\n 'If you even dream of beating me you\\'d better wake up and apologize.',\n 'Inside me there\\'s a thin person struggling to get out, but I can usually sedate him with four or five cupcakes.',\n 'To keep your marriage brimming, with love in the loving cup, whenever you\\'re wrong admit it; whenever you\\'re right shut up.',\n 'People who read the tabloids deserve to be lied to.',\n 'I was such an ugly kid. When I played in the sandbox the cat kept trying to cover me up.',\n 'You want a friend in Washington? Get a dog.',\n 'At every party, there are two kinds of people-those who want to go home and those who don\\'t. The trouble is, they are usually married to each other.',\n 'I\\'ve had bad luck with both my wives. The first one left me and the second one didn\\'t.',\n 'I have to exercise early in the morning before my brain figures out what I\\'m doing.',\n 'To attract men, I wear a perfume called New Car Interior.',\n 'Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe.',\n 'My favorite machine at the gym is the vending machine.',\n 'I always arrive late at the office, but I make up for it by leaving early.',\n 'Human genius has its limits, but stupidity does not.',\n 'You\\'ve got to be very careful if you don\\'t know where you are going, because you might not get there.',\n 'I never said most of the things I said.',\n 'When you come to a fork in the road, take it.'\n ];\n }", "render () {\n let comments = this.props.data.map(comment => {\n return <article dangerouslySetInnerHTML={{ __html: marked(comment.text) }} />\n })\n\n return (\n <aside>\n {comments}\n </aside>\n )\n }", "comments(parent, args, { db }, info) {\n return db.comments;\n }", "function Quote(text, author, tags) {\n this.text = text;\n this.author = author;\n this.tags = tags || [];\n }", "function displayQuote(data){\n if( data.quoteText.length > 120){\n DOMelement.quoteText.classList.add('long-quote')\n }else{\n DOMelement.quoteText.classList.remove('long-quote')\n }\n if(data.quoteAuthor === ''){\n DOMelement.author.innerText = 'UnKnown'\n }else{\n DOMelement.author.innerText = data.quoteAuthor\n }\n DOMelement.quoteText.innerText = data.quoteText;\n}", "comments(comment) {\n // console.log(`Incoming comment: ${comment.text}`)\n }", "function writeQuote(){\n generateQuote();\n var quoteText = displayQuote.quote;\n var authorText = displayQuote.author;\n quote.textContent = quoteText;\n author.textContent = authorText;\n}", "function qll_utility_article_signature()\r\n{\r\n\tcontent=document.getElementById('article_comment');\r\n\tcontent.value=content.value+ '\\n' + GM_getValue(\"QLLMenuArticleSignature:content\",\"\");\r\n}", "function cite(author, quote) {\n console.log(`${author} said: \"${quote}\"`);\n}", "function convertquotes(str, initial) {\n\t\t\t\tvar lines = body.split('\\n')\n\t\t\t\tinList = false\n\t\t\t\tfor (let l=0;l<lines.length;l++) {\n\t\t\t\t\tif (lines[l].startsWith(initial) && inList) lines[l] = lines[l].substring(1)+'<br>'\n\t\t\t\t\telse if (lines[l].startsWith(initial)) {\n\t\t\t\t\t\tinList = true\n\t\t\t\t\t\tlines[l] = '<blockquote>'+lines[l].substring(1)+'<br>'\n\t\t\t\t\t\t}\n\t\t\t\t\telse if (! lines[l].startsWith(initial) && inList) {\n\t\t\t\t\t\tinList = false\n\t\t\t\t\t\tlines[l] = '</blockquote>'+lines[l]\n\t\t\t\t\t\t}\n\t\t\t\t\telse inList = false\n\t\t\t\t\t}\n\t\t\t\treturn lines.join('\\n')\n\t\t\t\t}", "static modifyTable() { return 'article_comments'; }", "function soothingQuote() {\r\n // Example quotes: \r\n // \"For every minute you are angry you lose sixty seconds of happiness.\"\r\n // \"Don’t waste your time in anger, regrets, worries, and grudges. Life is too short to be unhappy.\"\r\n // BEGIN CODE \r\n \r\n // END CODE\r\n}", "commentEl() {\n return `<li class=\"comment\" id=${this.id}\">\n <h4>${this.commentContent}</h4>\n </li>`;\n }", "function changeQuote()\r\n{\r\nvar quotes = new Array(\r\n'<p>&quot;OpenCourseWare is exactly the kind of thing that universities should be doing.&quot;</p><ul><li><strong>Larry Birenbaum</strong><br />MIT Class of 1969 and OCW supporter<br /> United States</li></ul>', \r\n'<p>&quot;Through OCW, I am part of a movement to help make education free and available to the world.&quot;</p><p><ul><li><strong>Clinton Blackburn</strong><br />MIT student<br />United States</li></ul>', \r\n'<p>&quot;I was amazed that a university such as MIT would freely give access to its educational information.&quot;</p><ul><li><b>Triatno Yudo Harjoko</b><br />Educator<br />Indonesia</li></ul>',\r\n'<p>&quot;I found lecture notes, handouts and slides from presentations, and some problem sets. It helped me a lot.&quot;</p><ul><li><b>Maria Karamitsou</b><br />Student<br />Greece</li></ul>',\r\n'<p>&quot;OCW opens up knowledge across the world and allows universities to benchmark teaching.&quot;</p><ul><li><b>Fran&ccedil;ois Viruly</b><br />Educator<br />South Africa</li></ul>',\r\n'<p>&quot;My life is in teaching. To have a chance to do that with a world audience is just wonderful.&quot;</p><ul><li><b>Gilbert Strang</b><br />MIT Mathematics professor<br />United States</li></ul>',\r\n'<p>&quot;It\\'s a great opportunity for students to become extraordinary engineers.&quot;</p><ul><li><b>Juan Lara</b><br />Student<br />Mexico</li></ul>',\r\n'<p>&quot;It puts a previously untouchable subject within reach for anyone who is interested.&quot;</p><ul><li><b>Wendy Ermold</b><br />Self Learner<br />United States</li></ul>',\r\n'<p>&quot;I strive to make as much as possible enjoyable and educational at the same time.&quot;</p><ul><li><b>Amy Santee</b><br />Educator<br />United States</li></ul>',\r\n'<p>&quot;It\\'s an important way to ensure the quality of my courses.&quot;</p><ul><li><b>Shirley Harrell</b><br />Educator<br />United States</li></ul>',\r\n'<p>&quot;OCW will enable us to create better educational linkages.&quot;</p><ul><li><b>Karen Willcox</b><br />MIT Aeronautics and Astronautics professor<br />United States</li></ul>');\r\n\r\nvar images = new Array (\r\n\"/images/wihomeimages/birenbaum.jpg\", \r\n\"/images/wihomeimages/blackburn.jpg\", \r\n\"/images/wihomeimages/harjoko.jpg\",\r\n\"/images/wihomeimages/karamitsou.jpg\",\r\n\"/images/wihomeimages/viruly.jpg\",\r\n\"/images/wihomeimages/gil3.jpg\",\r\n\"/images/wihomeimages/juan_banner.jpg\",\r\n\"/images/wihomeimages/wendy_banner.jpg\",\r\n\"/images/wihomeimages/santee_banner.jpg\",\r\n\"/images/wihomeimages/harrell_banner.jpg\",\r\n\"/images/wihomeimages/willcox_banner.jpg\");\r\n\r\nvar links = new Array (\r\n\"/donate/ocw-course-champions-program/larry-birenbaum/\", \r\n\"/about/ocw-stories/clinton-blackburn/\", \r\n\"/about/ocw-stories/triatno-yudo-harjoko/\",\r\n\"/about/ocw-stories/maria-karamitsou/\",\r\n\"/about/ocw-stories/francois-viruly/\",\r\n\"/about/ocw-stories/gilbert-strang/\",\r\n\"/about/ocw-stories/juan-lara/\",\r\n\"/about/ocw-stories/wendy-ermold/\",\r\n\"/about/ocw-stories/amy-santee/\",\r\n\"/about/ocw-stories/shirley-harrell/\",\r\n\"/about/ocw-stories/karen-willcox/\");\r\n\r\nvar rand = Math.floor(Math.random()*quotes.length);\r\nvar txt='';\r\ntxt+='<ul><li class=\"email\"><a href=\"javascript:emailPopUp()\">Email this page<\\/a><\\/li><\\/ul>';\r\nif(document.getElementById(\"switchbutton\"))\r\n\tdocument.getElementById(\"switchbutton\").innerHTML=txt;\r\ndocument.getElementById(\"RichTextPlaceholder1\").style.backgroundImage = \"url(\"+images[rand]+\")\";\r\nvar mainQuotesPlaceHolder = document.getElementById(\"quote_main\");\r\nif(mainQuotesPlaceHolder){\r\n\tmainQuotesPlaceHolder.innerHTML = quotes[rand] + '<p><a href=\"' + links[rand] + '\" class=\"bullet\">Read more<\\/a><\\/p>';\r\n\t}\r\n//Enable survey on Site Home Page\r\n//Hack for Opera -- dont know why Opera is running both window.onload and changequote functions for site home page. All others run changequote only\r\n//if(!(navigator.appName =='Opera'))\r\ncustomResearch();\r\n}", "function setQuote() {\n quoteText.innerHTML = quoteList[index].quote;\n quoteAuthor.innerHTML = \"-- \"+quoteList[index].author;\n }", "function sfjquotePost(postid, intro, rte)\n{\n\tsfjtoggleLayer('sfpostform');\t\n\tvar postcontent = document.getElementById(postid).innerHTML;\n\tdocument.addpost.newtopicpost.value = '<blockquote>'+intro+postcontent+'</blockquote><hr />';\n\n\tif (rte)\n\t{\n\t\ttinyMCE.get('newtopicpost').getBody().innerHTML = '<blockquote>'+intro+postcontent+'</blockquote><hr /><p><br /></p>';\n\t}\n}", "function getQuote(quoteTxt, author){\n const quotediv = document.getElementById('quote');\n quotediv.innerHTML = `\"${quoteTxt}\" - ${author}`;\n}", "get comment() {\n return this.getStringAttribute('comment');\n }", "function quotePost(postid, intro, rte)\n{\n\ttoggleLayer('sfentryform');\t\n\tvar postcontent = document.getElementById(postid).innerHTML;\n\tdocument.addpost.newtopicpost.value = '<blockquote>'+intro+postcontent+'</blockquote><hr />';\n\n\tif (rte)\n\t{\n\t\ttinyMCE.getInstanceById('mce_editor_0').getBody().innerHTML = '<blockquote>'+intro+postcontent+'</blockquote><hr /><p><br /></p>';\n\t}\n}", "function Add_Comments()\n{\n\tDeleteFlag = false;\n\tvar lines = SeparateTextArea(Comments.commentsWindow.document.myComments.comments.value,60)\n\n\tvar object = new AGSObject(authUser.prodline,\"ES01.1\");\n\t\tobject.event \t= \"ADD\";\n\t\tobject.rtn \t= \"MESSAGE\";\n\t\tobject.longNames = true;\n\t\tobject.lfn\t= \"ALL\";\n\t\tobject.tds \t= false;\n\t\tobject.field \t= \"FC=A\"\n\t\t\t\t+ \"&ECM-COMPANY=\"+parseFloat(authUser.company)\n\t\t\t\t+ \"&ECM-EMPLOYEE=\"+parseFloat(Comments.Employee)\n\t\t\t\t+ \"&ECM-CMT-TYPE=TR\"\n\t\t\t\t+ \"&ECM-DATE=\"+Comments.Date\n\n\tfor(var i=0,j=1;i<lines.length;i++,j++)\n\t{\n\t\tif(i<lines.length)\n\t\t\tlines[i] = unescape(DeleteIllegalCharacters(escape(lines[i])))\n\n\t\tobject.field += \"&LINE-FC\"+j+\"=A\"\n\t\t\t// PT 127924\n\t\t\t// + \"&ECM-SEQ-NBR\"+j+\"=\"\t+ j\n\t\t\t+ \"&ECM-CMT-TEXT\"+j+\"=\"\t+ escape(lines[i])\n\t}\n\t\n\tobject.dtlField = \"LINE-FC;ECM-CMT-TEXT\";\n\tobject.debug = false;\n\tobject.func = \"parent.RecordsAdded_Comments()\"\n\tAGS(object,\"jsreturn\")\n}", "function makingQuote(quoteOb) {\n message = makingTags(quoteOb.tags);\n message += '<p class=\"quote\">' + quoteOb.quote + '</p>';\n message += '<p class=\"source\">' + quoteOb.source;\n message += makingProperty(quoteOb.citation, 'citation');\n message += makingProperty(quoteOb.year, 'year');\n message += '</p>';\n return message;\n}", "function generate_quotes(quotes){\n if(quotes.error){\n return \"\"\n }\n let head = \"<h1>Quotes</h1><div>\"\n let tail = \"</div>\"\n quotes.forEach( (quote, i) => {\n if(i >= 5) return;\n let char_quote = quote.quote.replace(\"\\n\", \"<br>\");\n let h2 = `<h2 class=\"quote\">${char_quote}<br>- ${quote.character}</h2><br>`;\n head += h2;\n })\n\n return head + tail;\n}", "renderComment(comment){\n const {admin_email, content, cid} = comment;\n return (\n <div key={'comment-'+cid}>\n <Typography type=\"body2\" gutterBottom>\n {this.getTechnicalName(admin_email)}\n <br/>\n {admin_email} \n </Typography>\n <Typography type=\"body1\" gutterBottom>\n <span dangerouslySetInnerHTML={{__html: content}}></span>\n </Typography>\n <Divider className={this.props.classes.divider}/>\n </div>\n )\n }", "function quote(mc) {\n var s = $.trim(mc.find('.mc-viewsource-text').text());\n $('#id_text').val('\\n\\n[quote]' + s + '[/quote]');\n}", "function registerQuotes() {\n addQuote(\n \"Some days are just bad days, that's all. You have to experience sadness to know happiness, and I remind myself that not every day is going to be a good day, that's just the way it is!\",\n \"Dita Von Teese\",\n \"Dancer\",\n \"BrainyQuote\",\n \"1989\",\n [\"Bad Days\", \"Sadness\", \"Remind\"]\n );\n\n addQuote(\n \"I don't go by or change my attitude based on what people say. At the end of the day, they, too, are judging me from their perspective. I would rather be myself and let people accept me for what I am than be somebody who I am not, just because I want people's approval.\",\n \"Karan Patel\",\n \"Actor\",\n \"BrainyQuote\",\n \"1995\",\n [\"Accept\", \"Approval\", \"Rather\"]\n );\n\n addQuote(\n \"Every day I feel is a blessing from God. And I consider it a new beginning. Yeah, everything is beautiful.\",\n \"Prince\",\n \"Musician\",\n \"BrainyQuote\",\n \"1978\",\n [\"Beautiful\", \"Blessing\", \"Baby Jesus\"]\n );\n\n addQuote(\n \"I am happy every day, because life is moving in a very positive way.\",\n \"Lil Yachty\",\n \"Musician\",\n \"BrainyQuote\",\n \"2017\",\n [\"Postive\", \"Good\", \"Happy\"]\n );\n\n addQuote(\n \"Nobody on this earth is perfect. Everybody has their flaws; everybody has their dark secrets and vices.\",\n \"Juice WRLD\",\n \"God\",\n \"BrainyQuote\",\n \"2018\",\n [\"Secrets\", \"Jesus\", \"Flaws\"]\n );\n}", "function getarticlebody(sortBy, commentVisibility, action, clickElem) {\n if (sortBy == \"sort-by-vote\") {\n urlToLoad = commentMostRatedPathBody;\n } else {\n urlToLoad = commentArticlePathBody;\n }\n $.getJSON(urlToLoad, function(data) {\n //controllo se la data è cambiata\n commentTimeStampBody = data.timestamp;\n if (commentTimeStampHead != commentTimeStampBody) {\n //$(\"#box-contributi #\"+sortBy+\" .contributo\").remove();\n getArticleHead();\n }\n\n //Definisco la lista dei commenti \n var commentList = data.commentList;\n loadMore = false;\n addcomment(commentList, commentVotingPath, sortBy, loadMore, commentVisibility);\n\n if (action == \"viewReply\") {\n createReplyContent(clickElem);\n }\n })\n}", "function Comment(autor, descricao) {\n this.autor = autor;\n this.descricao = descricao;\n}", "function displayQuote() {\n let newQuote = pickFromArray(data);\n let newAuthorName = newQuote.author;\n let newQuoteParagraph = newQuote.quote;\n paragraphQuote.innerText = newQuoteParagraph;\n paragraphAuthorName.innerText = newAuthorName;\n}", "addContent(comments) {\n let $self = $(`#${this.idDOM}`);\n let $container = $self.children('.article-big-comments-list');\n\n if(comments.length === 0) return;\n\n this.lastCommentID = comments[comments.length - 1].id;\n let commentsObj = comments.map(comment => new Comment(comment, false));\n commentsObj.forEach(comment => comment.create($container));\n this.comments = this.comments.concat(commentsObj);\n }", "function JournalComments(forum) {\r\n\tthis.ServicePath = servicesPath + \"journal.comments.service.php\";\r\n\tthis.Template = \"journal_comments\";\r\n\tthis.ClassName = \"JournalComments\";\r\n\tthis.Columns = 3;\r\n\r\n\tthis.Forum = forum;\r\n}", "function renderQuote(quote){\n return `<li class='quote-card'>\n <blockquote class=\"blockquote\">\n <p class=\"mb-0\">${quote.quote}</p>\n <footer class=\"blockquote-footer\">${quote.author}</footer>\n <br>\n <button data-like-id=${quote.id} class='btn-success'>Likes: <span>${quote.likes.length}</span></button>\n <button data-delete-id=${quote.id} class='btn-danger'>Delete</button>\n </blockquote>\n </li>`\n }", "function DspEmpComments()\n{\n\tComments.Text = \"\"\n\tvar obj;\n\n\tfor (var i=0; i<self.jsreturn.NbrRecs; i++)\n\t{\n\t\tobj = self.jsreturn.record[i];\n\n\t\t// PT 127924 extra space added in comments maked comments hard to read\n\t\t// Comments.Text \t\t+= obj.cmt_text + \" \";\n\t\tComments.Text \t\t\t+= obj.cmt_text;\n\t\tComments.SequenceNumber\t= parseFloat(obj.ln_nbr);\n\t\tComments.UserId\t\t\t= obj.user_id;\n\t\tComments.ProxyId\t\t= obj.proxy_id;\n\t}\n\n\tif (self.jsreturn.NbrRecs > 0)\n\t{\n\t\tComments.Event \t\t\t= \"CHANGE\";\n\t}\n\t\n\tif (self.jsreturn.Next != '')\n\t{\n\t\twindow.open(self.jsreturn.Next,\"jsreturn\");\n\t}\n\telse\n\t{\n\t\tWriteComments();\n\t}\n}", "function getComments (){\n JobService.GetAllComments( vm.workData.JobOfferId)\n .then( function(response){\n\n vm.comments = response.data;\n processComments();\n\n }, function(response){\n console.log(\"no sirvió\")\n })\n }", "function upliftingQuote() {\r\n // Example quotes:\r\n // \"The first step is you have to say that you can.\"\r\n // \"Rise above the storm and you will find the sunshine.\",\r\n // BEGIN CODE \r\n \r\n // END CODE\r\n}", "function displayQuote({ number, title, description }) {\n const output = [\n '',\n `[#${ colors.blue(number) }] ${ colors.bold(title) }`,\n '',\n description\n ];\n\n output.forEach(line => console.log(line));\n}", "function createComments(comment) {\n const section = document.createElement('li');\n section.setAttribute('class', 'list-group-item');\n // generate abbr\n const abbr = document.createElement('abbr');\n const publishDate = new Date(comment.published * 1000);\n abbr.setAttribute ('title', 'published at ' + publishDate);\n abbr.innerText = comment.author + ': ';\n // generate span\n const span = document.createElement('span');\n span.innerText = comment.comment; \n //append\n section.appendChild(abbr);\n section.appendChild(span);\n return section;\n}", "function displayQuote(quoteText, quoteAuthor) {\n quoteDisplayEl.textContent = '\"' + quoteText + '\"' + \" -\" + quoteAuthor;\n}", "function addQuoteEvent(tr) {\n var q = tr.querySelector(\".c_footicons .right [href*='/post/']\")\n q.className += \" beta-highlight\"\n q.title = \"Ctrl-click to quick quote.\"\n\n // Hint\n q.addEventListener(\"mouseover\", hint(q.title))\n q.addEventListener(\"mouseout\", function(e) {\n var bp = document.querySelector(\"#beta-popup\")\n bp.parentNode.removeChild(bp)\n })\n\n q.addEventListener(\"click\", function(e){\n if (e.ctrlKey && e.button === 0) {\n e.preventDefault()\n\n verb(\"Quick quoting...\")\n\n // tr :: Elem\n var tr = this.parentNode.parentNode.parentNode\n var p = tr.previousElementSibling.previousElementSibling\n var post = p.children[1].cloneNode(true)\n // u :: String\n var u = p.previousElementSibling.children[0].textContent.trim()\n\n // XXX wont this crash and explode if the parentNode of some child\n // is already gone\n var bs = post.getElementsByTagName(\"blockquote\")\n var cs = post.getElementsByClassName(\"editby\")\n for (var i = 0; i < bs.length; i++)\n post.removeChild(bs[i])\n // > no concat function for HTMLCollection\n // are u kidding me\n for (var i = 0; i < cs.length; i++)\n post.removeChild(cs[i])\n\n // t :: String\n var t = fromBBCode(post).trim()\n\n var bbcode = \"[quote=\" + u + \"]\" + t + \"[/quote]\"\n\n quickReply().value += bbcode\n\n }\n })\n}", "function addComments(com, number) {\n var elCom = document.getElementById(\"Comment\")\n var comLine = document.createElement(\"h\");\n comLine.innerHTML = \"Comment n°\" + number + \" : <BR>\" + com + \"<BR>\";\n elCom.appendChild(comLine);\n}", "function addQuoteFromPost(quote){\n quote.likes = []\n document.getElementById(\"quote-list\").innerHTML += renderQuote(quote)\n }", "showComments() {\n let $self = $(`#${this.idDOM}`);\n let $content = $self.children('.article-big-content');\n\n this.commentSection = new CommentSection(this.config.id);\n this.commentSection.create($content);\n }", "get comments() {\r\n return new Comments(this);\r\n }", "function attribute (quote, author) {\n console.log(quote + author)\n}", "function loveQuote () {\n return getPart.call(quotes.love.first) + \", \" + getPart.call(quotes.love.middle) + \", \" + getPart.call(quotes.love.last);\n}", "function blockquote (ctx, node) {\n const macro = ctx.blockquote || defaultMacro\n const innerText = require('../all')(ctx, node)\n return macro(innerText.trim())\n}", "function fetchTaskComment(commentID) {\n var comment = document.getElementById(\"comment-\" + commentID);\n var content = comment.getElementsByClassName(\"comment-content\")[0].innerHTML;\n content = content.replace(/<br>/g, '\\n');\n $(\"#txtTaskComment\").val(content);\n $(\"#btnSubmitComment\").val(\"Save\").attr(\"onclick\", \"updateTaskComment(\" + commentID + \")\");\n}", "function loadComment(e, object) {\n commentNodeKey = object.part.data.key;\n var node = findNode(commentNodeKey, globalLogicData);\n document.getElementById('NoteOneOnHTML').value = node.notes[0];\n document.getElementById('NoteTwoOnHTML').value = node.notes[1];\n document.getElementById('NoteThreeOnHTML').value = node.notes[2];\n document.getElementById(\"addCommentBtn\").click();\n}", "function getComments() {\n console.log(\"getComments\");\n fetch('/data')\n .then(response => response.json())\n .then((comments) => {\n var comment_content = '';\n for (var i = 0; i < comments.length; i++) {\n comment_content = comment_content + comment_item_code;\n comment_content = comment_content + comments[i].userName;\n comment_content = comment_content + comment_name_code;\n comment_content = comment_content + comments[i].currentTime;\n comment_content = comment_content + comment_time_code;\n comment_content = comment_content + comments[i].commentText;\n comment_content = comment_content + comment_text_code;\n }\n console.log(comment_content);\n document.getElementById('comment-list').innerHTML = comment_content;\n });\n}", "constructor(commentor, content, id) {\n\t\tthis.commentor = commentor;\n\t\tthis.content = content;\n\t\tthis.id = id;\n\t}", "function getComments(articleId) {\n\t\t\treturn $http.get('http://localhost:4000/comments?articleId=' + articleId).success(function (res) {\n\t\t\t\treturn res;\n\t\t\t});\n\t\t}", "function addquote(post_id, username, l_wrote)\n{\n\tvar message_name = 'message_' + post_id;\n\tvar theSelection = '';\n\tvar divarea = false;\n\n\tif (l_wrote === undefined)\n\t{\n\t\t// Backwards compatibility\n\t\tl_wrote = 'wrote';\n\t}\n\n\tif (document.all)\n\t{\n\t\tdivarea = document.all[message_name];\n\t}\n\telse\n\t{\n\t\tdivarea = document.getElementById(message_name);\n\t}\n\n\t// Get text selection - not only the post content :(\n\t// IE9 must use the document.selection method but has the *.getSelection so we just force no IE\n\tif (window.getSelection && !is_ie && !window.opera)\n\t{\n\t\ttheSelection = window.getSelection().toString();\n\t}\n\telse if (document.getSelection && !is_ie)\n\t{\n\t\ttheSelection = document.getSelection();\n\t}\n\telse if (document.selection)\n\t{\n\t\ttheSelection = document.selection.createRange().text;\n\t}\n\n\tif (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)\n\t{\n\t\tif (divarea.innerHTML)\n\t\t{\n\t\t\ttheSelection = divarea.innerHTML.replace(/<br>/ig, '\\n');\n\t\t\ttheSelection = theSelection.replace(/<br\\/>/ig, '\\n');\n\t\t\ttheSelection = theSelection.replace(/&lt\\;/ig, '<');\n\t\t\ttheSelection = theSelection.replace(/&gt\\;/ig, '>');\n\t\t\ttheSelection = theSelection.replace(/&amp\\;/ig, '&');\n\t\t\ttheSelection = theSelection.replace(/&nbsp\\;/ig, ' ');\n\t\t}\n\t\telse if (document.all)\n\t\t{\n\t\t\ttheSelection = divarea.innerText;\n\t\t}\n\t\telse if (divarea.textContent)\n\t\t{\n\t\t\ttheSelection = divarea.textContent;\n\t\t}\n\t\telse if (divarea.firstChild.nodeValue)\n\t\t{\n\t\t\ttheSelection = divarea.firstChild.nodeValue;\n\t\t}\n\t}\n\n\ttheSelection = jQuery.trim(theSelection);\n\tif (theSelection)\n\t{\n\t\tif (bbcodeEnabled)\n\t\t{\n\t\t\tinsert_text('[quote=\"' + username + '\"]' + theSelection + '[/quote]\\n');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinsert_text(username + ' ' + l_wrote + ':' + '\\n');\n\t\t\tvar lines = split_lines(theSelection);\n\t\t\tfor (i = 0; i < lines.length; i++)\n\t\t\t{\n\t\t\t\tinsert_text('> ' + lines[i] + '\\n');\n\t\t\t}\n\t\t}\n\t}\n\n\treturn;\n}", "function ccontent() {\n return wrap('ccontent', or(ctext, quotedPair, comment)());\n }", "function ccontent() {\n return wrap('ccontent', or(ctext, quotedPair, comment)());\n }", "function ccontent() {\n return wrap('ccontent', or(ctext, quotedPair, comment)());\n }", "function ccontent() {\n return wrap('ccontent', or(ctext, quotedPair, comment)());\n }", "function NewComment() {\n\t}", "function displayQuote() {\n currentQuote++;\n $(\".quote\").text(quotes[currentQuote]);\n }", "function comment() {\n //Disselect all highlighted annotations\n $( \".annot\").removeClass( \"annot-highlight\");\n //Hide the comment button\n $('.highlighter-container').hide();\n //Scroll to the comment form\n $(document).scrollTop( $(\"#respond\").offset().top );\n\n var html = $('.highlighter-container').data(\"htmlSel\");\n\n if(html != ''){\n //Add form fields to the comment form\n if($(\".comment-form-quote\").length == 0){\n $(\".comment-form-comment\").before( '<p class=\"comment-form-quote\"></p>' );\n }\n $(\".comment-form-quote\").html('<span class=\"annot-hide\">Comment on Text</span> \"'+html+'\"');\n\n if($(\"#comment_quote\").length == 0){\n $(\"#comment_parent\").after('<input type=\"hidden\" name=\"comment_quote\" id=\"comment_quote\">');\n }\n $(\"#comment_quote\").attr(\"value\", html);\n\n var idPrev = $('.highlighter-container').data(\"idPrev\");\n if($(\"#comment_quote_idprev\").length == 0){\n $(\"#comment_quote\").after('<input type=\"hidden\" name=\"comment_quote_idprev\" id=\"comment_quote_idprev\">');\n }\n $(\"#comment_quote_idprev\").attr(\"value\", idPrev);\n\n var htmlPrev = $('.highlighter-container').data(\"htmlPrev\");\n if($(\"#comment_quote_prev\").length == 0){\n $(\"#comment_quote\").after('<input type=\"hidden\" name=\"comment_quote_prev\" id=\"comment_quote_prev\">');\n }\n $(\"#comment_quote_prev\").attr(\"value\", htmlPrev);\n\n var idAfter = $('.highlighter-container').data(\"idAfter\");\n if($(\"#comment_quote_idafter\").length == 0){\n $(\"#comment_quote\").after('<input type=\"hidden\" name=\"comment_quote_idafter\" id=\"comment_quote_idafter\">');\n }\n $(\"#comment_quote_idafter\").attr(\"value\", idAfter);\n\n var htmlAfter = $('.highlighter-container').data(\"htmlAfter\");\n if($(\"#comment_quote_after\").length == 0){\n $(\"#comment_quote\").after('<input type=\"hidden\" name=\"comment_quote_after\" id=\"comment_quote_after\">');\n }\n $(\"#comment_quote_after\").attr(\"value\", htmlAfter);\n }\n }", "add(info) {\r\n if (typeof info === \"string\") {\r\n info = { text: info };\r\n }\r\n const postBody = jsS(extend(metadata(\"Microsoft.SharePoint.Comments.comment\"), info));\r\n return this.clone(Replies_1, null).postCore({ body: postBody }).then(d => {\r\n return extend(new Comment(odataUrlFrom(d)), d);\r\n });\r\n }", "function parseCollectComments(comment) {\n\t\n var parsed = \"\";\n parsed += '<div class=\"text\">\\n';\n parsed += '<table class=\"table table-bordered\"><tbody>';\n \n\tvar count = 0;\n\tvar allComments = JSON.parse(comment);\n\t\n for (var i in allComments) {\n\t\tvar entry = allComments[i];\n var name = entry[0];\n var comment = entry[1];\n\t\t\n\t\tif(count == 0){\n\t\t\tparsed += '<tr class=\"info\">';\n\t\t}\n//Creating rows\n parsed += '<td><center>' + name + '<br><br><h5>' + comment + '</h5></center></td>';\n\t\tcount += 1;\n\t\t\n\t\tif(count == 1){\n\t\t\tparsed += '</tr>'\n\t\t\tcount = 0;\n\t\t}\n }\n\t\n\tif(parsed > 0){\n\t\tparsed += '</tr>'\n\t}\n\t\n parsed += '</table>';\n parsed += '</div>\\n\\n';\n return parsed;\n}", "function getStringForComments (comments){\n let tempstr = '';\n comments.forEach((a, index) => { \n tempstr += `* ${a.message} \\n written by:${a.nickName}\n ${getStringForCommentOnComment(a.commentOnComment)}\n`; \n });\n return tempstr;\n}", "articleMaker(title, imageLink, author, date, text, url) {\n author = author ? author : \"Anonymous\";\n return (\n '<div class=\"box\"><article class=\"media\"><div class=\"media-left\"><a href=\"' +\n url +\n '\"><figure class=\"image is-64x64\"><img src=\"' +\n imageLink +\n '\" alt=\"No Image\"/></figure></a></div><div class=\"media-content\"><div class=\"content\"><p><a href=\"' +\n url +\n '\"><strong>' +\n title +\n \"</strong></a> <small>\" +\n author +\n \"</small> <small>\" +\n date +\n \"</small><br />\" +\n text +\n \"</p></div></div></article></div>\"\n );\n }", "add(info) {\r\n if (typeof info === \"string\") {\r\n info = { text: info };\r\n }\r\n const postBody = jsS(extend(metadata(\"Microsoft.SharePoint.Comments.comment\"), info));\r\n return this.clone(Comments_1, null).postCore({ body: postBody }).then(d => {\r\n return extend(this.getById(d.id), d);\r\n });\r\n }", "function getComments(article_id, pageNumber, pageSize) {\n\n return $http.get(URLS.BASE + URLS.ARTICLES + article_id + \"/\" + URLS.COMMENTS + pageNumber + '/' + pageSize)\n .then((responce) => {\n return responce.data;\n })\n .catch((error) => {\n console.log(error);\n return $q.reject(error);\n });\n\n }", "function packageComments(){\n let currentShipment = vm.customers[vm.currentIndices.customer].orders[vm.currentIndices.order].shipments[vm.currentIndices.shipment];\n if (currentShipment !== undefined) {\n if(currentShipment.comments != undefined){\n var string = \"\";\n for(let i = 0;i < currentShipment.comments.length; i++){\n string += '<px-accordion disabled=true style=font-weight:normal header-value=\"';\n string += currentShipment.comments[i].comment_date;\n string += '\"></px-accordion><span style=font-weight:normal>'\n string += currentShipment.comments[i].comment + '</span><br />';\n }\n document.getElementById(\"PACKAGE_COMMENTS\").innerHTML = string;\n }\n }\n }", "function DeleteComment()\n{\n\tif (seaConfirm(getSeaPhrase(\"DELETE_COMMENTS?\",\"TE\"), \"\", FireFoxDeleteComment))\n\t{\n\t\tDelete_Comments(\"true\");\n\t}\n}", "function composeQuote(response) {\n quote.text = response.quoteText;\n response.quoteAuthor === \"\" ? quote.author = \"Unknown\" : quote.author = response.quoteAuthor;\n //Show here directly the quote\n $(\"blockquote p\").text(quote.text);\n $(\"blockquote cite\").text(quote.author);\n}", "function cmnt(){\n commentText=document.getElementById('comment'); // Accessing the comment written in comment box\n allComments=document.getElementById('all-comments'); // Accessing the area where comment needs to be published\n if(commentText.value!=''){\n allComments.style.display='block';\n allComments.innerHTML='<div class=\"single-comment\">'+ commentText.value +'</div>' + allComments.innerHTML;\n commentText.value='';\n }\n}", "function make_comment(comment){\n const section = createElement('section', null);\n let author_date = createElement('div', null, {class: 'author-date-container'});\n section.appendChild(author_date);\n author_date.appendChild(createElement('h3', comment.author));\n const date = new Date(parseFloat(comment.published) * 1000);\n author_date.appendChild(createElement('p', date.toLocaleString(), {class:'comment-date'}));\n section.appendChild(createElement('p', comment.comment));\n return section;\n}", "function getRandomQuote() {\n var theQuoteAndAuthor = quotesArray[Math.floor(Math.random() * quotesArray.length)]\n document.getElementById(\"quote\").innerHTML = '\" ' + theQuoteAndAuthor[0];\n document.getElementById(\"author\").innerHTML = '- ' + theQuoteAndAuthor[1];\n }", "function fetchComments() {\n fetch(`https://sneaker-db.herokuapp.com//api/v1/comments/`)\n .then(r => r.json())\n .then((data) => {\n allComments = data\n viewComments()\n })\n}", "function printQuote(quotes) {\n var words = getRandomQuote();\n html = '<p class=\"quote\">' + words.quote + '</p>' + '';\n html += '<p class=\"source\">' + words.source + ''; \n if (words.citation != null) {\n html += '<span class=\"citation\">' + words.citation + '</span>';\n };\n if (words.year != null) {\n html += '<span class=\"year\">' + words.year + '</span>';\n };\n if (words.tag != null) {\n html += '<span class=\"tag\">' + words.tag + '</span>';\n };\n html += '</p>';\n var outputDiv = document.getElementById('quote-box');\n outputDiv.innerHTML = html;\n document.body.style.background = randomColor();\n return html;\n}", "function initializeQuotes(quote) {\n let quoteCard = document.createElement('li')\n quoteCard.classList.add('quote-card')\n quoteCard.innerHTML = `\n <blockquote class=\"blockquote\">\n <p class=${quote.id}>${quote.quote}</p>\n <footer class=\"blockquote-footer\">${quote.author}</footer>\n <br>\n <button class='btn-success'>Likes: <span>${quote.likes.length}</span></button>\n <button class='btn-danger'>Delete</button>\n </blockquote>`\n quoteList.append(quoteCard)\n}", "function quotesFetch(quotes) {\n return {\n type: QUOTES_FETCH,\n payload: quotes\n }\n}", "function refreshThatQuote() {\n randomQuote++;\n if(typeof quotes[randomQuote] == 'undefined') {\n randomQuote = 0;\n }\n $(\"#author\").empty().append(\"- \").append(quotes[randomQuote].author);\n $(\"#quote\").empty().append(quotes[randomQuote].message);\n}", "function blockquote(h, node) {\n return h(node, 'blockquote', wrap(all(h, node), true));\n}", "function opencomments(upperCase){\n clickAnchor(upperCase,getItem(\"comments\"));\n}", "function getQuote() {\n\t$.getJSON(\"https://gist.githubusercontent.com/jbmartinez/6982650ade1ee5e9527f/raw/e7099c184abec96b9d3c63ecb1fa44170eaf5299/quotes.json\", function(json){\n \t\tvar ranNum = Math.floor(Math.random() * json.length);\n \t\tvar randomQuote = json[ranNum];\n \t\t$(\".qouteText\").text('\"'+ randomQuote.text + '\"');\n \t$(\".author\").text(\"— \" + randomQuote.author);\n \t});\n}", "get comments() {\n\t\treturn this.__comments;\n\t}", "function annotateQuote(quote) {\n return {\n target: [\n {\n selector: [quoteSelector(quote)],\n },\n ],\n };\n}", "function fetchComments(quantity=5) {\n \n const endpoint = '/data?';\n var queryString = new URLSearchParams();\n queryString.append('quantity', String(quantity));\n const url = endpoint + queryString.toString();\n\n fetch(url).then(response => response.json()).then((commentData) => {\n let commentContent = \"\";\n\n if (commentData.length === 0 ) { // if there are no existing comments\n // disable the delete comments button & display \"No Comments\"\n document.getElementById('delete-comments-button').setAttribute('disabled','true');\n commentContent = '<div class=\"comment\"><p class=\"body-text\">No Comments</p></div>';\n document.getElementById('comment-list').innerHTML = commentContent;\n\n } else { // otherwise display the comments and any attached image\n for (let i = 0; i < commentData.length; i++) {\n let commentText = commentData[i].commentText; // The actual comment\n \n // Comment author name: \"'Anonymous' if there was not a name submitted.\"\n let commentAuthor = commentData[i].commentAuthor === \"\" ? \"Anonymous\" : commentData[i].commentAuthor; \n \n let authorEmailContent = \"\";\n // Show email if the user said so\n if (commentData[i].showEmail == true) {\n // 'No email provided' if comment had been submitted before implementation of authentication\n let authorEmail = commentData[i].authorEmail === \"\" ? \"No email provided\" : commentData[i].authorEmail;\n authorEmailContent = '<p class=\"footnote-text\"> ' + authorEmail + '</p>';\n }\n\n // Display image as well, if there is an image\n let blobKey = commentData[i].blobKey;\n fetchCommentImage(blobKey).then((imageUrl) => {\n commentContent += '<div class=\"comment\"><div class=\"flex-item\"><p class=\"body-text\"><b>' + commentAuthor + '</b></p>'\n + authorEmailContent\n + '<p class=\"body-text\">' + commentText + '</p></div>'; // outer <div> not closed yet\n\n if (imageUrl === null) { // No image\n commentContent += '</div>'; // close outer div\n } else if (imageUrl === undefined) { // Error occured\n commentContent += '<div class=\"body-text\">Error fetching image</div></div>';\n } else {\n commentContent += '<div class=\"flex-item\"><a href=' + imageUrl + ' target=\"_blank\"><img class=\"comment-image\" src=' \n + imageUrl + '></a></div></div>'; // add image\n }\n document.getElementById('comment-list').innerHTML = commentContent;\n });\n }\n }\n });\n}", "setCommentsOn(on) {\r\n return this.getItem().then(i => {\r\n const updater = new Item(i, `SetCommentsDisabled(${!on})`);\r\n return updater.update({});\r\n });\r\n }", "function spannertons() {\n $('blockquote').html('<span>no quote</span>')\n }", "async function frontComments() {\n const CommentsText = [];\n const OwnId = []; //frontcomments own id\n const ParentId = []; //or storyid\n const Ownkids = []; //front comment kids\n const kidolen = [];\n const [, kidos, Title, Url] = await StoriesOnFrontPage();\n\n const allkids = [].concat(...kidos);\n\n const requests = allkids.map((x) =>\n fetch(`https://hacker-news.firebaseio.com/v0/item/${x}.json?print=pretty`)\n );\n const response = await Promise.all(requests);\n const filter = await Promise.all(response.map((res) => res.json()));\n\n for (const [k, v] of filter.entries()) {\n if (v.deleted !== true) {\n CommentsText.push(v.text);\n OwnId.push(v.id);\n ParentId.push(v.parent);\n Ownkids.push(v.kids);\n } else {\n OwnId.push(v.id);\n ParentId.push(v.parent);\n }\n }\n\n return [OwnId, ParentId, Ownkids, CommentsText, kidolen];\n //OwnId:frontcomments own id\n //ParentId:or storyid\n //Ownkids:kids of front comment\n}", "function M_Comment (){\n var arrayCopy = [...commnet];\n arrayCopy.unshift(write);\n Setcommnet( arrayCopy ); \n }", "function getComments(){\n fetch('/data').then(response => response.json()).then((comments) => {\n const historyEl = document.getElementById('history');\n console.log(comments + \" and \" + comments.length);\n for(i=0; i<comments.length; i++){\n addCommentToDom(historyEl, comments[i]);\n }\n });\n }", "function printQuote() {\n var ranQuot = getRandomQuote();\n htmlString = ' ';\n htmlString += '<p class=\"quote\">' + ranQuot.quote + '</p>';\n htmlString += '<p class=\"source\">' + ranQuot.source;\n if (ranQuot.citation || ranQuot.year){\n htmlString += '<span class=\"citation\">' + ranQuot.citation + '</span>';\n htmlString += '<span class=\"year\">' + ranQuot.year + '</span>';\n '</p>';\n }\n document.getElementById('quote-box').innerHTML = htmlString;\n return htmlString;\n}", "function Delete_Comments(flag)\n{\n\tvar object = new AGSObject(authUser.prodline,\"ES01.1\");\n\t\tobject.event \t= \"CHANGE\";\n\t\tobject.rtn \t= \"MESSAGE\";\n\t\tobject.longNames = true;\n\t\tobject.lfn\t= \"ALL\";\n\t\tobject.tds \t= false;\n\t\tobject.field \t= \"FC=D\"\n\t\t\t\t+ \"&ECM-COMPANY=\"+parseFloat(authUser.company)\n\t\t\t\t+ \"&ECM-EMPLOYEE=\"+parseFloat(Comments.Employee)\n\t\t\t\t+ \"&ECM-CMT-TYPE=TR\"\n\t\t\t\t+ \"&ECM-DATE=\"+Comments.Date\n\t\tobject.func = \"parent.RecordsDeleted_Comments('\"+flag+\"')\";\n\t\tobject.debug = false;\n\tAGS(object,\"jsreturn\");\n}", "disableComments() {\r\n return this.setCommentsOn(false).then(r => {\r\n this.commentsDisabled = true;\r\n return r;\r\n });\r\n }", "function initializeQuote() {\n clearQuote()\n printQuote()\n}", "function appendThought(thought, author, location, toggle) {\n\tvar thoughts = $(\"#thoughts-div\")[0];\n\n\tvar thoughtBlockQuote = document.createElement(\"blockquote\");\n\tif(toggle) thoughtBlockQuote.setAttribute(\"class\",\"blockquote\");\n\telse thoughtBlockQuote.setAttribute(\"class\",\"blockquote-reverse\");\n\tthoughts.appendChild(thoughtBlockQuote);\n\t\n\tvar thoughtP = document.createElement(\"p\");\n\tthoughtP.innerHTML = thought;\n\tthoughtBlockQuote.appendChild(thoughtP);\n\t\n\tvar thoughtSmall = document.createElement(\"small\");\n\tthoughtSmall.innerHTML = author + \", <em>\" + location + \"</em>\";\n\tthoughtBlockQuote.appendChild(thoughtSmall);\t\n}", "get comment() {\n\t\treturn this.__comment;\n\t}", "get comment() {\n\t\treturn this.__comment;\n\t}", "function alphamatiseComment(url) {\n reddit.get(\n url,\n {},\n function (error, response, body) {\n console.log(error);\n let info = JSON.parse(body);\n console.log(info[1].data.children[0]);\n const commentId = 't1_' + info[1].data.children[0].data.id;\n const alphaComment = alphabetChecker(info[1].data.children[0].data.body);\n const username = info[1].data.children[0].data.author;\n console.log(username);\n getUserTopComments(commentId, alphaComment, username);\n })\n}" ]
[ "0.62734485", "0.6271485", "0.6270597", "0.6188914", "0.61154795", "0.6011577", "0.5962815", "0.5892786", "0.58524454", "0.5828363", "0.5812693", "0.5796907", "0.5785868", "0.5768783", "0.5766025", "0.5751945", "0.5751822", "0.57265", "0.5725106", "0.5685492", "0.56563824", "0.56514525", "0.5648735", "0.5645325", "0.5639287", "0.56267494", "0.5622551", "0.5563326", "0.5550291", "0.5550026", "0.5543337", "0.551295", "0.5467065", "0.54589397", "0.54512143", "0.54444367", "0.5421707", "0.54207844", "0.5419907", "0.5405625", "0.53836435", "0.53785574", "0.53753644", "0.53674215", "0.53424084", "0.534206", "0.53255224", "0.53254324", "0.5321965", "0.5315165", "0.53069055", "0.5299539", "0.52956986", "0.52951777", "0.5290113", "0.52840984", "0.5277036", "0.5276663", "0.5276663", "0.5276663", "0.5276663", "0.52760124", "0.5264535", "0.52625144", "0.5257179", "0.5256222", "0.52549726", "0.52519256", "0.52473867", "0.52404153", "0.52402663", "0.5238767", "0.52320755", "0.52235657", "0.52233213", "0.5220346", "0.5209038", "0.5208533", "0.52052116", "0.51955354", "0.519474", "0.5192325", "0.5189842", "0.5188496", "0.5178849", "0.5175256", "0.517431", "0.51701015", "0.515634", "0.51555794", "0.5153198", "0.5152124", "0.51460683", "0.5146002", "0.5143053", "0.5135829", "0.5135256", "0.51348674", "0.51348674", "0.51341534" ]
0.60413194
5
= Erepublik menu modifications =
function qll_module_erepmenu() { var menu= new Array(); var ul = new Array(); menu[0]=document.getElementById('menu'); for(i=1;i<=6;i++) menu[i]=document.getElementById('menu'+i); // menu[1].innerHTML=menu[1].innerHTML + '<ul></ul>'; menu[2].innerHTML=menu[2].innerHTML + '<ul></ul>'; menu[3].innerHTML=menu[3].innerHTML + '<ul></ul>'; menu[6].innerHTML=menu[6].innerHTML + '<ul></ul>'; for(i=1;i<=6;i++) ul[i]=menu[i].getElementsByTagName("ul")[0]; if(qll_opt['module:erepmenu:design']) { //object.setAttribute('class','new_feature_small'); // menu[2].getElementsByTagName("a")[0].href = "http://economy.erepublik.com/en/time-management"; /*aux = ul[2].removeChild(ul[2].getElementsByTagName("li")[6]); // adverts ul[6].appendChild(aux); */ object = document.createElement("li"); object.innerHTML='<a href="http://economy.erepublik.com/en/work">' + "Work" + '</a>'; ul[2].appendChild(object); object = document.createElement("li"); object.innerHTML='<a href="http://economy.erepublik.com/en/train">' + "Training grounds" + '</a>'; ul[2].appendChild(object); object = document.createElement("li"); object.innerHTML='<a href="http://www.erepublik.com/en/my-places/newspaper">' + "Newspaper" + '</a>'; ul[2].appendChild(object); object = document.createElement("li"); object.innerHTML='<a href="http://www.erepublik.com/en/economy/inventory">' + "Inventory" + '</a>'; ul[2].appendChild(object); object = document.createElement("li"); object.innerHTML='<a href="http://www.erepublik.com/en/my-places/organizations">' + "Organizations" + '</a>'; ul[2].appendChild(object); object = document.createElement("li"); object.innerHTML='<a href="http://economy.erepublik.com/en/company/create">' + qll_lang[97] + '</a>'; ul[2].appendChild(object); object = document.createElement("li"); object.innerHTML='<a href="http://www.erepublik.com/en/military/campaigns">' + qll_lang[69] + '</a>'; ul[3].appendChild(object); //ul[4].insertBefore(object,ul[4].getElementsByTagName("li")[3]) object = document.createElement("li"); object.innerHTML='<a href="http://www.erepublik.com/en/loyalty/program">' + "Loyalty program" + '</a>'; ul[6].appendChild(object); object = document.createElement("li"); object.innerHTML='<a href="http://www.erepublik.com/en/gold-bonus/1">' + "Gold bonus" + '</a>'; ul[6].appendChild(object); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function menuOptions() {}", "function menuhrres() {\r\n\r\n}", "_overriddenMenuHandler() { }", "function simulat_menu_infos() {\n display_menu_infos();\n}", "function zoto_set_menu_box_edit(){\n\tthis.$uber({label_text:_('edit'), open_event:'onclick'});\n//\tthis.zoto_menu_box({label_text:_('edit'), open_event:'onclick'});\n}", "function initMenu(){\n\toutlet(4, \"vpl_menu\", \"clear\");\n\toutlet(4, \"vpl_menu\", \"append\", \"properties\");\n\toutlet(4, \"vpl_menu\", \"append\", \"help\");\n\toutlet(4, \"vpl_menu\", \"append\", \"rename\");\n\toutlet(4, \"vpl_menu\", \"append\", \"expand\");\n\toutlet(4, \"vpl_menu\", \"append\", \"fold\");\n\toutlet(4, \"vpl_menu\", \"append\", \"---\");\n\toutlet(4, \"vpl_menu\", \"append\", \"duplicate\");\n\toutlet(4, \"vpl_menu\", \"append\", \"delete\");\n\n\toutlet(4, \"vpl_menu\", \"enableitem\", 0, myNodeEnableProperties);\n\toutlet(4, \"vpl_menu\", \"enableitem\", 1, myNodeEnableHelp);\n outlet(4, \"vpl_menu\", \"enableitem\", 3, myNodeEnableBody);\t\t\n outlet(4, \"vpl_menu\", \"enableitem\", 4, myNodeEnableBody);\t\t\n}", "function menuHandler() {\n console.log('menuHandler');\n\n agent.add('Questi sono alcuni dei modi in cui posso aiutarti nella tua visita al nostro store online')\n agent.add(new Suggestion(`Esplorazione delle categorie`));\n agent.add(new Suggestion(`Ricerca prodotto specifico`));\n agent.add(new Suggestion(`Suggerimento prodotto`));\n}", "function testMenuPostion( menu ){\n \n }", "function menu(_func){\n\tif(myNodeInit){\t\t\n\t\tif(_func == \"properties\"){\n\t\t\topenproperties();\n\t\t} else if(_func == \"collapse\"){\n \tmyExpandedMode = 0;\n\t\t\texpand();\n \toutlet(4, \"vpl_menu\", \"setitem\", 3, \"expand\");\n \toutlet(4, \"vpl_menu\", \"setitem\", 4, \"fold\");\n\t\t} else if(_func == \"expand\" || _func == \"unfold\"){\n \tmyExpandedMode = 2;\n\t\t\texpand();\n \toutlet(4, \"vpl_menu\", \"setitem\", 3, \"collapse\");\n \toutlet(4, \"vpl_menu\", \"setitem\", 4, \"fold\");\n } else if(_func == \"fold\"){\n \tmyExpandedMode = 1;\n\t\t\texpand();\n \toutlet(4, \"vpl_menu\", \"setitem\", 3, \"collapse\");\n \toutlet(4, \"vpl_menu\", \"setitem\", 4, \"unfold\");\n\t\t} else if(_func == \"duplicate\"){\n\t\t\t;\n\t\t} else if(_func == \"delete\"){\n\t\t\t;\n\t\t} else if(_func == \"help\"){\n\t\t\toutlet(2, \"load\", \"bs.help.node.\" + myNodeHelp + \".maxpat\");\n\t\t}\n\t}\n}", "function Vmenu2()\r\n{\r\n\twindow.colorlink = $(\"a.tablelinkssearch\").css(\"color\");\r\n\t$('.Vmenu2 ul li a').hover(\r\n\tfunction()\r\n\t{\r\n\t\tif($(this).parent().attr('class')!='hr')\r\n\t\t\t$(this).addClass('menu_active');\r\n\t},\r\n\tfunction()\r\n\t{\r\n\t\tif($(this).parent().attr('class')!='hr')\r\n\t\t\t$(this).removeClass('menu_active'); \r\n\t}); \r\n\t$('.Vmenu2 ul li ul').hide();\r\n\t$('li[@view=topitem]:has(ul:has(a.current))').find('a:first').css('color',$(\"a.current\").css(\"color\"));\r\n\t$('.Vmenu2 ul li:has(ul) span').bind('click',function()\r\n\t{\r\n\t\tvar par = $(this).parent();\r\n\t\tvar parc = $('a.current').parent();\r\n\t\t$(par).find('ul:first').slideToggle(); \r\n\t\tif ($(this).find('img.pmimg').attr('src') == 'include/img/plus.gif') \r\n\t\t{\r\n\t\t\t// add to cookie opened menu\r\n\t\t\taddOpenMenuItemIdToCookie($(par).find('ul:first').attr(\"id\"));\r\n\t\t\t$(this).find('img.pmimg').attr('src', 'include/img/minus.gif');\r\n\t\t\tif($('a.current',par).length && $(par).attr('id')!=$(parc).attr('id'))\r\n\t\t\t\t$(par).find('a:first').css('color',window.colorlink);\r\n\t\t\t$(par).find('ul:has(a.current)').each(function(parc)\r\n\t\t\t{\r\n\t\t\t\t$(this).parent().find('img.pmimg:first').attr('src','include/img/minus.gif');\r\n\t\t\t\tif($('a.current',this).length && $(this).parent().attr('id')!=$(parc).attr('id'))\r\n\t\t\t\t\t$(this).parent().find('a:first').css('color',window.colorlink);\r\n\t\t\t\taddOpenMenuItemIdToCookie($(this).attr(\"id\"));\r\n\t\t\t\t$(this).slideDown();\r\n\t\t\t});\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\t// remove from cookie opened menu\r\n\t\t\t\tremoveOpenMenuFromCookie($(par).find('ul:first').attr(\"id\"));\r\n\t\t\t\t// remove all children from cookie\r\n\t\t\t\t$(par).find('ul').each(function()\r\n\t\t\t\t{\r\n\t\t\t\t\tremoveOpenMenuFromCookie($(this).attr(\"id\"));\r\n\t\t\t\t});\r\n\t\t\t\t$(this).find('img.pmimg').attr('src', 'include/img/plus.gif');\r\n\t\t\t\tif($('a.current',par).length && $(par).attr('id')!=$(parc).attr('id'))\r\n\t\t\t\t\t$(par).find('a:first').css('color',$(\"a.current\").css(\"color\"));\r\n\t\t\t}\r\n\t\treturn false;\r\n\t});\r\n\tif($('.Vmenu2 li[@view=topitem]:has(ul)').length && $('.Vmenu2 ul:first').length)\r\n\t{\r\n\t\t$('.Vmenu2_links').css('display','block');\r\n\t\t$('a.plus_minus').click(function()\r\n\t\t{\r\n\t\t if(flag)\r\n\t\t {\r\n\t\t\t\t$(this).parent().parent().find('ul li ul').slideUp('slow');\r\n\t\t\t\t$('a.plus_minus').empty();\r\n\t\t\t\t$('img.pmimg').attr('src','include/img/plus.gif');\r\n\t\t\t\t$('a.plus_minus').append('<img src=\\\"include/img/plus.gif\\\" border=0> &nbsp;&nbsp;'+TEXT_EXPAND_ALL);\r\n\t\t\t\tflag = 0;\r\n\t\t\t\t// on collapse all, remove all ids from cookie\r\n\t\t\t\tdelete_cookie('openMenuItemIds', cookieRoot, '');\r\n\t\t\t\t$(this).parent().parent().find('li:has(ul:has(a.current))').each(function()\r\n\t\t\t\t{\r\n\t\t\t\t\t$(this).find('a:first').css('color',$(\"a.current\").css(\"color\"));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t else{\r\n\t\t\t\t\t$(this).parent().parent().find('ul li ul').slideDown('slow');\r\n\t\t\t\t\t$('a.plus_minus').empty();\r\n\t\t\t\t\t$('img.pmimg').attr('src','include/img/minus.gif');\r\n\t\t\t\t\t$('a.plus_minus').append('<img src=\\\"include/img/minus.gif\\\" border=0> &nbsp;&nbsp;'+TEXT_COLLAPSE_ALL);\r\n\t\t\t\t\tflag = 1;\r\n\t\t\t\t\t// on expand all add all ids to cookie\r\n\t\t\t\t\t$(this).parent().parent().find('ul li ul').each(function()\r\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\taddOpenMenuItemIdToCookie($(this).attr(\"id\"));\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$(this).parent().parent().find('li:has(ul:has(a.current))').each(function()\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$(this).find('a:first').css('color',window.colorlink);\r\n\t\t\t\t\t});\t\r\n\t\t\t\t}\r\n\t\t\treturn false; \r\n\t\t});\r\n\t}\t\r\n\tif($.browser.msie)\r\n\t\t$('.Vmenu2 ul li').css('padding','5px 0');\t\r\n}", "function loadMenu() {\n // Works only with nav-links that have 'render' instead of 'component' below in return\n if (istrue) {\n // Do not show these buttons to unauthorise user\n document.getElementById(\"edit\").children[6].style.display = \"none\";\n document.getElementById(\"edit\").children[5].style.display = \"none\";\n document.getElementById(\"edit\").children[4].style.display = \"none\";\n document.getElementById(\"edit\").children[3].style.display = \"none\";\n }\n }", "function Estiliza_menu_itens()\n{\n //PARA CADA ITEM DO MENU, BASTA CHAMAR A FUNÇÃO ABAIXO, ESPECIFICANDO\n //SEU INDICE(NUMERO), SUA COR(STRING), SEU CONTEUDO(STRING), SEU LABEL(STRING)\n //Estiliza_item(Indice, Cor, Conteudo, Texto Lateral);\n Estiliza_item(0,\"blue\",\"+\",\"Adicionar\");\n Estiliza_item(1,\"red\",\"Botão\");\n}", "function ips_menu_events()\n{\n}", "function onOpen() { CUSTOM_MENU.add(); }", "function addMenu(){\n var appMenu = new gui.Menu({ type: 'menubar' });\n if(os.platform() != 'darwin') {\n // Main Menu Item 1.\n item = new gui.MenuItem({ label: \"Options\" });\n var submenu = new gui.Menu();\n // Submenu Items.\n submenu.append(new gui.MenuItem({ label: 'Preferences', click :\n function(){\n // Add preferences options.\n // Edit Userdata and Miscellaneous (Blocking to be included).\n\n var mainWin = gui.Window.get();\n\n\n var preferWin = gui.Window.open('./preferences.html',{\n position: 'center',\n width:901,\n height:400,\n focus:true\n });\n mainWin.blur();\n }\n }));\n\n submenu.append(new gui.MenuItem({ label: 'User Log Data', click :\n function(){\n var mainWin = gui.Window.get();\n\n var logWin = gui.Window.open('./userlogdata.html',{\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus:true\n });\n }\n }));\n\n submenu.append(new gui.MenuItem({ label: 'Exit', click :\n function(){\n gui.App.quit();\n }\n }));\n\n item.submenu = submenu;\n appMenu.append(item);\n\n // Main Menu Item 2.\n item = new gui.MenuItem({ label: \"Transfers\"});\n var submenu = new gui.Menu();\n // Submenu 1.\n submenu.append(new gui.MenuItem({ label: 'File Transfer', click :\n function(){\n var mainWin = gui.Window.get();\n var aboutWin = gui.Window.open('./filetransfer.html',{\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus: true\n });\n mainWin.blur();\n }\n }));\n item.submenu = submenu;\n appMenu.append(item);\n\n // Main Menu Item 3.\n item = new gui.MenuItem({ label: \"Help\" });\n var submenu = new gui.Menu();\n // Submenu 1.\n submenu.append(new gui.MenuItem({ label: 'About', click :\n function(){\n var mainWin = gui.Window.get();\n var aboutWin = gui.Window.open('./about.html', {\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus: true\n });\n mainWin.blur();\n }\n }));\n item.submenu = submenu;\n appMenu.append(item);\n gui.Window.get().menu = appMenu;\n }\n else {\n // menu for mac.\n }\n\n}", "function f_set_menubar()\r\n{\r\n var retval = // # English # German\r\n [\r\n [\r\n [\"elem_menu\" ,\"Element\" ,\"Element\" ], \r\n [ \"input_item\" ,\"New (Alt-N)\" ,\"Neu (Alt-N)\" ],\r\n [ \"change_item\" ,\"Change (F2)\" ,\"&Auml;ndern (F2)\" ],\r\n [ \"delete_item\" ,\"Delete (Del)\" ,\"L&ouml;schen (Entf)\" ],\r\n [ \"copy_item\" ,\"Copy by Ref (Ctrl-L)\" ,\"Link Kopieren (Strg-L)\" ],\r\n [ \"clone_item\" ,\"Clone (Ctrl-C)\" ,\"Vollst. Kopieren (Strg-C)\" ],\r\n [ \"cut_item\" ,\"Cut (Ctrl-X)\" ,\"Ausschn. (Strg-X)\" ],\r\n [ \"paste_item\" ,\"Paste (Ctrl-V)\" ,\"Einf&uumlgen (Strg-V)\" ],\r\n [ \"export_item\" ,\"Export (Ctrl-Shift-Alt-E)\" ,\"Exportieren (Strg-Shift-Alt-E)\" ],\r\n [ \"do_nothing\" ,\"--------------------\" ,\"--------------------\" ],\r\n [ \"lock_topic\" ,\"Lock (Ctrl-Shift-Alt-L)\" ,\"Festhalten (Strg-Shift-Alt-L)\" ],\r\n [ \"as_news\" ,\"as News Ticker\" ,\"als Nachr.-Ticker\" ],\r\n [ \"as_date\" ,\"as Date Ticker\" ,\"als Termine-Ticker\" ] \r\n ],\r\n \r\n c_LANG_LIB_TREE_ELEMTYPE\r\n ,\r\n [\r\n [\"fav_menu\" ,\"Favorites\" ,\"Favoriten\" ],\r\n [ \"save_favorite\" ,\"Save\" ,\"Speichern\" ],\r\n [ \"load_favorite\" ,\"Load\" ,\"Laden\" ],\r\n [ \"delete_favorite\" ,\"Delete Single\" ,\"Einzeln L&ouml;schen\" ],\r\n [ \"deleteall_favorites\" ,\"Delete All\" ,\"Alle L&ouml;schen\" ] \r\n ], \r\n [\r\n [\"setup_menu\" ,\"Setup\" ,\"Einstellungen\" ],\r\n [ \r\n [\"lang_menu\" ,\"Language\" ,\"Sprache\" ],\r\n ( [\"#output_list\", \"language_select\"]).concat(c_LANG.slice(1,c_LANG.length)) \r\n ] , \r\n [ \r\n [\"db_type\" ,\"Database Type\" ,\"Datenbank-Typ\" ],\r\n [\"#output_list\" ,\"db_type\", \"XML\", \"SQL-Based\"] // \"XML Localhost\", \"XML WWW\", \"SQL-Based WWW\"]\r\n // [\"xml_local\" ,\"XML Localhost\" ,\"XML Localhost\" ],\r\n // [\"xml_web\" ,\"XML on WWW\" ,\"XML im WWW\" ],\r\n // [\"disco_web\" ,\"DISCO on WWW\" ,\"DISCO\" ]\r\n \r\n ] ,\r\n // [\r\n // [\"setup_path_menu\" ,\"Setup Path\" ,\"Pfad zu Einstellungen\" ],\r\n // [\r\n // [\"setup_path_type\" ,\"Type of Source\" ,\"Quellentyp\" ],\r\n // [\"#output_list\" ,\"setup_src_type\", \"RAM\", \"Cookie\", \"DISCO!\", \"XML\"]\r\n // ],\r\n // [\r\n // [\"setup_path_url\" ,\"Path/URL\" ,\"Pfad/URL\" ],\r\n // [\"#input_field\" ,\"setup_src_path\"]\r\n // ]\r\n // ]\r\n [\r\n [\"disp_type\" ,\"Display Type\" ,\"Darstellung\" ],\r\n [\"#output_list\" ,\"disp_type\", \"Tree\", \"Bubbles\"]\r\n // [\"disp_tree\" ,\"Tree ()\" ,\"Baum ()\" ],\r\n // [\"disp_bubbles\" ,\"Bubbles ()\" ,\"Kugeln ()\" ]\r\n ] ,\r\n [\r\n [\"other_setups\" ,\"Other Setups\" ,\"Andere Einstellg.\" ], \r\n [\"#output_list\" ,\"aux_setups\", \"Config Subtree\"] \r\n ],\r\n [\r\n [\"permissions\" ,\"Permissions\" ,\"Zugriffsrechte\" ],\r\n [\"#output_list\" ,\"change\", \"change=\"+String(1-uc_browsing_change_permission)]\r\n ]\r\n ], \r\n [ \r\n // Menu Title \r\n [\"help_menu\" ,\"Help\" ,\"Hilfe\" ],\r\n // [ \"tutorial\" ,\"Tutorial\" ,\"Tutorial\" ],\r\n [ \"erase_cookies\" ,\"Clear Cookies\" ,\"Cookies löschen\" ],\r\n [ \"send_err_log\" ,\"Send Error Log\" ,\"Fehlerbericht senden\" ],\r\n [ \"display_hint\" ,\"Hints\" ,\"Tips\" ],\r\n [ \"source_code\" ,\"Source Code\" ,\"Quellcode\" ],\r\n [ \"display_version\" ,\"Current Version\" ,\"Aktuelle Version\" ]\r\n ]\r\n \r\n ];\r\n\r\n return retval; \r\n}", "function setMenu() {\n //添加快捷键\n\tlet applicationOptions = [\n\t\t{ label: \"About Kungfu\", click: showKungfuInfo},\n\t\t{ label: \"Settings\", accelerator: \"CmdOrCtrl+,\", click: openSettingDialog },\n\t\t{ label: \"Close\", accelerator: \"CmdOrCtrl+W\", click: function() { console.log(BrowserWindow.getFocusedWindow().close()); }}\n\t]\n\n\tif(platform === 'mac') {\n\t\tapplicationOptions.push(\n\t\t\t{ label: \"Quit\", accelerator: \"Command+Q\", click: function() { app.quit(); }},\n\t\t)\n\t}\n\n\tconst template = [\n\t{\n\t\tlabel: \"Kungfu\",\n\t\tsubmenu: applicationOptions\n\t}, \n\t{\n\t\tlabel: \"Edit\",\n\t\tsubmenu: [\n\t\t\t{ label: \"Copy\", accelerator: \"CmdOrCtrl+C\", selector: \"copy:\" },\n\t\t\t{ label: \"Paste\", accelerator: \"CmdOrCtrl+V\", selector: \"paste:\" },\n\t\t]\n\t}];\n\t\n\tMenu.setApplicationMenu(Menu.buildFromTemplate(template))\n}", "expandMenu() {\r\n\t}", "function fnc_child_set_menu()\n{\n\tfnc_SET_variables_de_menu('2311');\n}", "function createMenu() {\n var ui = SpreadsheetApp.getUi();\n\n ui.createMenu('Tools')\n .addItem('Fix Range Error', 'fixMe')\n .addSeparator()\n .addItem('About', 'about')\n .addToUi();\n}", "function zoto_album_menu_box_edit(){\n\tthis.$uber({label_text:_('edit'), open_event:'onclick'});\n//\tthis.zoto_menu_box({label_text:_('edit'), open_event:'onclick'});\n}", "_updateHAXCEMenu() {\n this._ceMenu.ceButtons = [\n {\n icon: this.locked ? \"icons:lock\" : \"icons:lock-open\",\n callback: \"haxClickInlineLock\",\n label: \"Toggle Lock\",\n },\n {\n icon: this.published ? \"lrn:view\" : \"lrn:view-off\",\n callback: \"haxClickInlinePublished\",\n label: \"Toggle published\",\n },\n {\n icon: \"editor:format-indent-increase\",\n callback: \"haxIndentParent\",\n label: \"Move under parent page break\",\n disabled: !pageBreakManager.getParent(this, \"indent\"),\n },\n {\n icon: \"editor:format-indent-decrease\",\n callback: \"haxOutdentParent\",\n label: \"Move out of parent page break\",\n disabled: !pageBreakManager.getParent(this, \"outdent\"),\n },\n ];\n }", "function lijstSubMenuItem() {\n\n if ($mLess.text() == \"meer\") {\n $mLess.text(\"minder\")\n } else {\n $mLess.text(\"meer\");\n\n }\n $list.toggleClass('hidden')\n $resum.get(0).scrollIntoView('slow');\n event.preventDefault()\n }", "function getSubChapterMenu(){\n\t\n}", "function install_menu() {\n let config = {\n name: script_id,\n submenu: 'Settings',\n title: script_title,\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "function showMenu(value)\r\n{\r\n //alert(\"show javascript menu\");\r\n //document.result_form.reset();\r\n document.result_form.HIDDEN_COLUMN.value=value;\r\n i2uiShowMenu('editorMenu');\r\n}", "function installMenu() {\n wkof.Menu.insert_script_link({\n name: script_name,\n submenu: \"Settings\",\n title: script_name,\n on_click: openSettings,\n });\n }", "function install_menu() {\n var config = {\n name: 'dashboard_level',\n submenu: 'Settings',\n title: 'Dashboard Level',\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "function setup_menu() {\n $('div[data-role=\"arrayitem\"]').contextMenu('context-menu1', {\n 'remove item': {\n click: remove_item,\n klass: \"menu-item-1\" // a custom css class for this menu item (usable for styling)\n },\n }, menu_options);\n $('div[data-role=\"prop\"]').contextMenu('context-menu2', {\n 'remove item': {\n click: remove_item,\n klass: \"menu-item-1\" // a custom css class for this menu item (usable for styling)\n },\n }, menu_options);\n }", "function GM_registerMenuCommand(){\n // TODO: Elements placed into the page\n }", "function mainMenuShow () {\n $ (\"#menuButton\").removeAttr (\"title-1\");\n $ (\"#menuButton\").attr (\"title\", htmlSafe (\"Stäng menyn\")); // i18n\n $ (\"#menuButton\").html (\"×\");\n $ (\".mainMenu\").show ();\n}", "function OsNavAdditionInfo() {\r\n $('.os-menu a[href=\"#\"]').on('click', function (event) {\r\n event.preventDefault();\r\n });\r\n $('.os-menu li').has('ul').addClass('li-node').parent().addClass('ul-node');\r\n //$('.os-menu .mega-menu:not(.menu-fullwidth)').parent().css('position', 'relative')\r\n }", "updateMenuItemsDisplay () {\n const pg = this.page\n if (!pg) {\n // initial page load, header elements not yet attached but menu items\n // would already be hidden/displayed as appropriate.\n return\n }\n if (!this.user.authed) {\n Doc.hide(pg.noteMenuEntry, pg.walletsMenuEntry, pg.marketsMenuEntry, pg.profileMenuEntry)\n return\n }\n Doc.show(pg.noteMenuEntry, pg.walletsMenuEntry, pg.profileMenuEntry)\n if (Object.keys(this.user.exchanges).length > 0) {\n Doc.show(pg.marketsMenuEntry)\n } else {\n Doc.hide(pg.marketsMenuEntry)\n }\n }", "function scene::BuildMenu(folder)\r\n{\r\n local idx = 0;\r\n local fb = FileBrowser();\r\n local files = fb.BroseDir(folder,\"*.gbt,*.ml\");\r\n local uiman = system.GetUIMan();\r\n local scrsz = SIZE();\r\n local xpos = 2;\r\n local menuYpos = uiman.GetScreenGridY(0)-16; // font index(0-3)\r\n local slot = 0;\r\n \r\n\tmaps.resize(0);\r\n menubar.resize(0);\r\n \r\n if(files)\r\n {\r\n maps.resize(files);\r\n menubar.resize(files+4); // for top and remote\r\n }\r\n \r\n menubar[slot] = UiControl();\r\n menubar[slot].Create(0, xpos, menuYpos, xpos+70, menuYpos + 7);\r\n menubar[slot].SetFont(3);\r\n menubar[slot].SetText(\"Curent Folder: \" + folder, 0);\r\n menubar[slot].SetImage(\"topmenu.bmp\");\r\n menubar[slot].SetColor(0xCCCCCC, 0xCCCCCC);\r\n slot++;\r\n menuYpos -= 4;\r\n\r\n// makes button for remote downloading\r\n menuYpos-=3;\r\n menubar[slot] = UiControl();\r\n menubar[slot].Create(100, xpos, menuYpos, xpos+40, menuYpos+3);\r\n menubar[slot].SetFont(1);\r\n menubar[slot].SetText(\"> Remote Levels\", 0);\r\n menubar[slot].SetImage(\"topmenu.bmp\");\r\n menubar[slot].SetColor(0xCCCC00, 0xCCCCCC);\r\n slot++;\r\n \r\n \r\n // makes button for getting back to bspmaps\r\n menubar[slot] = UiControl();\r\n menubar[slot].Create(101, xpos+40, menuYpos, xpos+80, menuYpos+3);\r\n menubar[slot].SetFont(1);\r\n menubar[slot].SetText(\"> Local levels\", 0);\r\n menubar[slot].SetImage(\"topmenu.bmp\");\r\n menubar[slot].SetColor(0xCCCC00, 0xCCCCCC);\r\n slot++;\r\n \r\n // makes button for getting back to bspmaps\r\n menubar[slot] = UiControl();\r\n menubar[slot].Create(102, xpos+80, menuYpos, xpos+120, menuYpos+3);\r\n menubar[slot].SetFont(1);\r\n menubar[slot].SetText(\"> Master Server\", 0);\r\n menubar[slot].SetImage(\"topmenu.bmp\");\r\n menubar[slot].SetColor(0xCCCC00, 0xCCCCCC);\r\n slot++;\r\n \r\n menuYpos -= 4;\r\n\r\n \r\n for( idx=0; idx < files; idx+=1)\r\n {\r\n local lf = fb.GetAt(idx);\r\n if(lf == \"\") break;\r\n\r\n maps[idx] = folder+lf;\r\n\r\n menubar[slot] = UiControl();\r\n menubar[slot].Create(idx, xpos+(idx), menuYpos, xpos+(idx)+40, menuYpos+3);\r\n menubar[slot].SetFont(1);\r\n menubar[slot].SetText(lf, 0);\r\n menubar[slot].SetImage(\"freebut.bmp\");\r\n menubar[slot].SetColor(0xCCCC44, 0xCCCCCC);\r\n\r\n menuYpos-=3;\r\n slot++;\r\n }\r\n}", "function displayMenu() {\n var menu = \"1/ Afficher les personnages\\n\";\n menu += \"2/ Calcule de la moyenne d'Age\\n\";\n menu += \"3/ Ajouter un personnage\\n\";\n menu += \"4/ Supprimer un personnage\\n\";\n menu += \"5/ Afficher un personnage\\n\";\n menu += \"0/ Quitter\\n\";\n return menu;\n}", "function MenuProvider(e){function n(){}return e(\"$mdMenu\").setDefaults({methods:[\"placement\"],options:n})}", "function fixClientsMenu() {\n fixMenu(clientsSectionMenu);\n }", "function showMenu(arg)\r\n\t{\r\n\t\tswitch(arg)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t\t$('#menu').html(\"\");\r\n\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\t$('#menu').html(\"<h1 id='title' style='position:relative;top:20px;left:-40px;width:500px;'>Sheep's Snake</h1><p style='position:absolute;top:250px;left:-50px;font-size:1.1em;' id='playA'>Press A to play!</p><p style='position:absolute;top:280px;left:-50px;font-size:1.1em;' id='playB'>Press B for some help !</p>\");\r\n\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "function DfoMenu(/**string*/ menu)\r\n{\r\n\tSeS(\"G_Menu\").DoMenu(menu);\r\n\tDfoWait();\r\n}", "function modifyEventContextMenu() {\n displayEventEditWindow();\n}", "function onOpen() {\n var sheet = SpreadsheetApp.getActiveSpreadsheet();\n var entries = [//{ name : \"Read Data\", functionName : \"readRows\" },\n { name : \"1 - See Dialog Box, 4 - Display Second Control\", functionName : \"S1_S4_display_hello_world_label\" },\n { name : \"2 - Make panel disappear\", functionName : \"make_panel_disappear\" },\n { name : \"3 - text control works, 5 - Text Control data shows in SS\", functionName : \"display_text_control\" }\n ];\n sheet.addMenu(\"Stories\", entries);\n}", "function fixReviewsMenu() {\n fixMenu(reviewsSectionMenu);\n }", "function handleMenu(){\n\t$(\"#examples-menu\").mouseover(function(){\n\t\tvar position = $(\"#examples-menu\").offset();\n\t\tvar top = $(\"#examples-menu\").outerHeight();\n\t\t$(\"ul.examples\").offset({left:position.left, top:top+position.top});\n\t\t$(\"ul.examples\").show();\n\t})\n\t$(\"h1,table,img,form\").mouseover(function(){\n\t\t$(\"ul.examples\").offset({left:0, top:0});\n\t\t$(\"ul.examples\").hide();\n\t})\t\n}", "function customizeWiki() {\n addCharSubsetMenu();\n addHelpToolsMenu();\n addDigg();\n}", "function menuLateralDireito()\n {\n $('#optionPlus').toggle();//exibe o menu lateral direito se estiver oculto\n\n }", "actAsMenu_() {\n return this;\n }", "function setApplicationMenu() {\n const template = [\n {\n label: 'Application',\n submenu: [\n {label: 'About Application', selector: 'orderFrontStandardAboutPanel:'},\n {type: 'separator'},\n {\n label: 'Quit',\n accelerator: 'Command+Q',\n click() {\n app.quit();\n }\n }\n ]\n },\n {\n label: 'Edit',\n submenu: [\n {label: 'Undo', accelerator: 'CmdOrCtrl+Z', selector: 'undo:'},\n {label: 'Redo', accelerator: 'Shift+CmdOrCtrl+Z', selector: 'redo:'},\n {type: 'separator'},\n {label: 'Cut', accelerator: 'CmdOrCtrl+X', selector: 'cut:'},\n {label: 'Copy', accelerator: 'CmdOrCtrl+C', selector: 'copy:'},\n {label: 'Paste', accelerator: 'CmdOrCtrl+V', selector: 'paste:'},\n {label: 'Select All', accelerator: 'CmdOrCtrl+A', selector: 'selectAll:'}\n ]\n }\n ];\n\n Menu.setApplicationMenu(Menu.buildFromTemplate(template));\n}", "function thememascot_menuzord() {\n $(\"#menuzord\").menuzord({\n align: \"left\",\n effect: \"slide\",\n animation: \"none\",\n indicatorFirstLevel: \"<i class='fa fa-angle-down'></i>\",\n indicatorSecondLevel: \"<i class='fa fa-angle-right'></i>\"\n });\n $(\"#menuzord-right\").menuzord({\n align: \"right\",\n effect: \"slide\",\n animation: \"none\",\n indicatorFirstLevel: \"<i class='fa fa-angle-down'></i>\",\n indicatorSecondLevel: \"<i class='fa fa-angle-right'></i>\"\n });\n }", "menuHandler(newMenuChoices) {\n this.help.stopVideo();\n switch (newMenuChoices) {\n case MenuChoices.library:\n this.libraryMenu();\n break;\n case MenuChoices.export:\n this.exportMenu();\n break;\n case MenuChoices.help:\n this.helpMenu();\n break;\n case MenuChoices.edit:\n this.editMenu();\n break;\n case MenuChoices.save:\n this.saveMenu();\n break;\n case MenuChoices.load:\n this.loadMenu();\n break;\n case MenuChoices.null:\n this.cleanMenu();\n this.closeMenu();\n break;\n }\n }", "function printMenu() {\n console.log(\"\\n<====== PENDAFATARAN SISWA BARU ======>\");\n console.log(\"<====== SMKN 1 RPL ======>\");\n console.log(\"\\n<====== Menu ======>\");\n console.log(\"1. Registrasi\");\n console.log(\"2. Input Nilai\");\n console.log(\"3. Lihat Profil\");\n console.log(\"4. Informasi Kelulusan\");\n console.log(\"5. keluar\");\n }", "function loadMenu(){\n\t\tpgame.state.start('menu');\n\t}", "function onOpen() {\n createMenu();\n}", "function cdd_menu0(){//////////////////////////Start Menu Data/////////////////////////////////\n/**********************************************************************************************\n\n\tMenu 0 - General Settings and Menu Structure\n\n\t**See the menu_styles.css file for additional customization options**\n\n***********************************************************************************************/\n\n/*---------------------------------------------\nIcon Images\n---------------------------------------------*/\n\n//Define two types of unlimited icon images below, associate any image\n//with any item using both the 'icon_rel' and 'icon_abs' parameter in the\n//sub menu structure section (set to the index number of the icon image)\n\n\n //Relative positioned icon images (flow with main menu or sub item text)\n\n\tthis.rel_icon_image0 = \"menu/sample_images/bullet.gif\"\n\tthis.rel_icon_rollover0 = \"menu/sample_images/bullet_hl.gif\"\n\tthis.rel_icon_image_wh0 = \"13,8\"\n\t\n\n\n //Absolute positioned icon images (coordinate positioned - relative to \n //right top corner of the menu item displaying the icon.)\n\n\tthis.abs_icon_image0 = \"menu/sample_images/arrow.gif\"\n\tthis.abs_icon_rollover0 = \"menu/sample_images/arrow.gif\"\n\tthis.abs_icon_image_wh0 = \"13,10\"\n\tthis.abs_icon_image_xy0 = \"-15,4\"\n\n\n\n\n/*---------------------------------------------\nDivider Settings\n---------------------------------------------*/\n\n\n\tthis.use_divider_caps = false\t\t//cap the top and bottom of each menu group\n\tthis.divider_width = 3\t\t\t//space between entries on horizontal menus\n\tthis.divider_height = 0\t\t\t//border width between vertical submenu entries\n\n\n //available specific settings\n\n\tthis.use_divider_capsX = true\n\n\n\n/*---------------------------------------------\nMenu Orientation and Sizing\n---------------------------------------------*/\n\n\n\tthis.is_horizontal = false\t\t//false = vertical menus, true = horizontal menus\n\tthis.is_horizontal_main = true\n\n\t\n\tthis.menu_width = 200\t\t\t//applies to vertical menus\n\tthis.menu_width_items = 90\t\t//width of buttons in horizontal menu\n\t\n\t\n\n //available specific settings\n\t\n\n\tthis.is_horizontalX = true\n\t\n\tthis.menu_widthX = 200\n\n\tthis.menu_width_itemsX = 100\n\tthis.menu_width_itemX_X = 100\n\n\t\n\n\n/*---------------------------------------------\nOptional Style Sheet Class Name Association\n---------------------------------------------*/\n\n//Use the following section to optionally associate menu groups \n//and menu items with existing CSS classes from your site.\n\n\n\n //global class names\n\n\t//this.main_menu_class = \"myclassname\"\n\t//this.main_items_class = \"myclassname\"\n\t//this.main_items_rollover_class = \"myclassname\"\n\n\t//this.sub_menu_class = \"myclassname\"\n\t//this.sub_items_class = \"myclassname\"\n\t//this.sub_items_rollover_class = \"myclassname\"\n\n\n //specific menu items\n\n\t//this.item_classX_X = \"myclassname\"\n\t//this.item_rollover_classX_X = \"myclassname\"\n\n\n\n/*---------------------------------------------\nExposed Menu Events - Custom Script Attachment\n---------------------------------------------*/\n\n\n\tthis.show_menu = \"\";\n\tthis.hide_menu = \"\";\n\n\n //available specific settings\n\n\n\t//this.show_menuX = \"alert('show id')\";\n\t//this.hide_menuX = \"alert('hide id')\";\n\n\n\n/*------------------------------------------------\nMenu Width & Height Adjustments for DOM Browsers\n-------------------------------------------------*/\n\n /*Note: The following settings are optional and are made available\n for tweaking the menu to perfection on all browsers and platforms.\n The menu will function without error regardless of the settings below.\n\n Opera and other DOM browsers take different approaches\n to how they calculate widths and heights of items which have\n CSS padding and borders defined. With the settings below\n re-define the total left-right and top-bottom combined border \n and padding values. These values are used by DOM browsers\n (ns7, opera, Mozilla, etc.) to correct the menu dimensions.*/\n\n\n\n //Menu Width & Height Adjustments (padding + borders)\n\n\tthis.pb_width_main_menu = 12;\t\n\tthis.pb_width_sub_menus = 16;\n\n\tthis.pb_height_main_menu = 12;\n\tthis.pb_height_sub_menus = 16;\n\n\t\n\tthis.pb_width_menuX = 0;\n\tthis.pb_height_menuX = 0;\n\tthis.pb_width_main_itemsX = 0;\n\tthis.pb_width_sub_itemsX = 0;\n\n\n\n //Item Width Adjustments (padding + borders)\n\n\tthis.pb_width_main_items = 12;\n\tthis.pb_width_sub_items = 12;\n\n\n\n //Opera 5 & 6 - alternate HTML display (Opera 7 displays menu 100%)\n\n\tthis.opera_old_display_html = \"Please update your opera browser.\";\n\n\n\n/*---------------------------------------------\nMain Menu Group and Items\n---------------------------------------------*/\n\n\n //Main Menu Group 0\n\n\t\n\tthis.item0 = \"HISTORY\"\n\t//this.url0 = \"myurl.html\"\t\n\n\tthis.item1 = \"ISSUES\"\n\t//this.url1 = \"myurl.html\"\t\n\t\n\tthis.item2 = \"CREATORS\"\n\t//this.url2 = \"myurl.html\"\t\n\t\n\tthis.item3 = \"FANS\"\n\t//this.url3 = \"myurl.html\"\t\n\t\n\tthis.item4 = \"MERCH\"\n\t//this.url4 = \"myurl.html\"\t\n\t\n\tthis.item5 = \"MEDIA\"\n\t//this.url5 = \"myurl.html\"\t\n\t\n\tthis.item6 = \"ART\"\n\t//this.url6 = \"myurl.html\"\t\n\t\n\tthis.item7 = \"FUN/GAMES\"\n\t//this.url7 = \"myurl.html\"\t\n\t\n\n/*---------------------------------------------\nSub Menu Group and Items\n---------------------------------------------*/\n\n //Sub Menu 0\n\n\tthis.menu_xy0 = \"-82,17\"\n\tthis.menu_width0 = 150\n\n\tthis.item0_0 = \"DD's Origin & Powers\"\n\tthis.item0_1 = \"Daredevil's Costume\"\n this.item0_2 = \"Cast Bios\"\n\tthis.item0_3 = \"Plot Summary\"\n\tthis.item0_4 = \"Nelson & Murdock\"\n\tthis.item0_5 = \"Issue Chronology\"\n\tthis.item0_6 = \"Guest Checklist\"\n\tthis.item0_7 = \"First Meetings\"\n\tthis.item0_8 = \"DD & Spidey\"\n\tthis.item0_9 = \"Other Daredevils\"\n\tthis.item0_10 = \"Women of DD\"\n this.item0_11 = \"Sales\"\n\n\tthis.icon_abs0_4 = 0\n\tthis.icon_abs0_8 = 0\n\n\tthis.url0_0 = 'origin.htm'\n\tthis.url0_1 = 'costume.htm'\n\tthis.url0_2 = 'cast.htm'\n\tthis.url0_3 = 'plot.htm'\n\tthis.url0_4 = ''\n\tthis.url0_5 = 'chrono.htm'\n\tthis.url0_6 = 'guests.htm'\n\tthis.url0_7 = 'firstmeetings.htm'\n\tthis.url0_8 = ''\n\tthis.url0_9 = 'otherdds.htm'\n\tthis.url0_10= 'women.htm'\n\tthis.url0_11= 'spideysales.htm'\n\n //Sub Menu 0_4\n\n\tthis.menu_xy0_4 = \"-4,2\"\n\tthis.menu_width0_4 = 150\n\n\tthis.item0_4_0 = \"The Law Offices of...\"\n\tthis.item0_4_1 = \"Famous Clients\"\n\tthis.item0_4_2 = \"Nelson vs. Murdock\"\n\tthis.item0_4_3 = \"Legal Terms/Definitions\"\n\n\tthis.url0_4_0 = 'legalcareer.htm'\n\tthis.url0_4_1 = 'legalclients.htm'\n\tthis.url0_4_2 = 'legalversus.htm'\n\tthis.url0_4_3 = 'legalterms.htm'\n\n\n //Sub Menu 0_8\n\n\tthis.menu_xy0_8 = \"-4,2\"\n\tthis.menu_width0_8 = 150\n\n\tthis.item0_8_0 = \"Comparison\"\n\tthis.item0_8_1 = \"Significant Events\"\n\tthis.item0_8_2 = \"Appearances Together\"\n\tthis.item0_8_3 = \"Spider-Man vs. DD\"\n\tthis.item0_8_4 = \"Saving Each Other\"\n this.item0_8_5 = \"Sales\"\n\n\tthis.url0_8_0 = 'spideycompare.htm'\n\tthis.url0_8_1 = 'spideyevents.htm'\n\tthis.url0_8_2 = 'spideyappear.htm'\n\tthis.url0_8_3 = 'spideyvsdd.htm'\n\tthis.url0_8_4 = 'spideysaves.htm'\n\tthis.url0_8_5 = 'spideysales.htm'\n\n //Sub Menu 1\n\t\n\tthis.menu_xy1 = \"-82,17\"\n\tthis.menu_width1 = 150\n \n\tthis.item1_0 = \"Recommended Reading\"\n\tthis.item1_1 = \"Volume 1\"\n\tthis.item1_2 = \"Volume 2\"\n\tthis.item1_3 = \"Annuals\"\n\tthis.item1_4 = \"Specials/Mini-Series\"\t\n\tthis.item1_5 = \"Graphic Novels\"\n\tthis.item1_6 = \"Cross-Appearances\"\n\tthis.item1_7 = \"International Issues\"\n\tthis.item1_8 = \"Trade Paperbacks\"\n\tthis.item1_9 = \"Hardcovers\"\n\tthis.item1_10= \"Reprints\"\t\n\tthis.item1_11= \"Cybercomics\"\n\n\tthis.icon_abs1_6 = 0\n\tthis.icon_abs1_7 = 0\n\n\tthis.url1_0 = 'recommended.htm'\n\tthis.url1_1 = 'volume1.htm'\n\tthis.url1_2 = 'volume2.htm'\n\tthis.url1_3 = 'annuals.htm'\n\tthis.url1_4 = 'specials.htm'\n\tthis.url1_5 = 'graphic.htm'\n\tthis.url1_6 = ''\n\tthis.url1_7 = ''\n\tthis.url1_8 = 'tpbs.htm'\n\tthis.url1_9 = 'hardcovers.htm'\n\tthis.url1_10= 'reprints.htm'\n\tthis.url1_11= 'online.htm'\n\n //Sub Menu 1_6\n\n\tthis.menu_xy1_6 = \"-4,2\"\n\tthis.menu_width1_6 = 150\n\n\tthis.item1_6_0 = \"Appearance Checklist\"\n\tthis.item1_6_1 = \"Major Appearances\"\n\tthis.item1_6_2 = \"Minor Appearances\"\n\tthis.item1_6_3 = \"Cameo/Bit Appearances\"\n\tthis.item1_6_4 = \"Non-Appearances\"\n\tthis.item1_6_5 = \"Alternate Appearances\"\n\tthis.item1_6_6 = \"Honorable Mentions\"\n\tthis.item1_6_7 = \"Parodies/Spoofs\"\n\tthis.item1_6_8 = \"Pinups\"\n\n\tthis.url1_6_0 = 'appear.htm'\n\tthis.url1_6_1 = 'appmaj.htm'\n\tthis.url1_6_2 = 'appmin.htm'\n\tthis.url1_6_3 = 'appbit.htm'\n\tthis.url1_6_4 = 'appnon.htm'\n\tthis.url1_6_5 = 'appalt.htm'\n\tthis.url1_6_6 = 'mentions.htm'\n\tthis.url1_6_7 = 'parodies.htm'\n\tthis.url1_6_8 = 'artpinup.htm'\n\n //Sub Menu 1_7\n\n\tthis.menu_xy1_7 = \"-4,2\"\n\tthis.menu_width1_7 = 150\n\n\tthis.item1_7_0 = \"Brazil (Brasil)\"\n\tthis.item1_7_1 = \"Finland (Suomi)\"\n\tthis.item1_7_2 = \"France\"\n\tthis.item1_7_3 = \"Germany (Deutschland)\"\n\tthis.item1_7_4 = \"Italy (Italia)\"\n\tthis.item1_7_5 = \"Norway (Nörge)\"\n\tthis.item1_7_6 = \"Spain (Espańa)\"\n\tthis.item1_7_7 = \"Sweden (Sverige)\"\n\tthis.item1_7_8 = \"United Kingdom\"\n\tthis.item1_7_9 = \"Uruguay\"\n\n\tthis.url1_7_0 = 'intl_bra.htm'\n\tthis.url1_7_1 = 'intl_fin.htm'\n\tthis.url1_7_2 = 'intl_fra.htm'\n\tthis.url1_7_3 = 'intl_ger.htm'\n\tthis.url1_7_4 = 'intl_ita.htm'\n\tthis.url1_7_5 = 'intl_nor.htm'\n\tthis.url1_7_6 = 'intl_esp.htm'\n\tthis.url1_7_7 = 'intl_swe.htm'\n\tthis.url1_7_8 = 'intl_uk.htm'\n\tthis.url1_7_9 = 'intl_uru.htm'\n\n\n\n //Sub Menu 2\n\n\tthis.menu_xy2 = \"-82,17\"\n\tthis.menu_width2 = 125\n\t\n\tthis.item2_0 = \"Creator Checklist\"\n\tthis.item2_1 = \"Interviews\"\n\tthis.item2_2 = \"Creator Bios\"\n\tthis.item2_3 = \"Guestbook Entries\"\n\n\tthis.url2_0 = 'creators.htm'\n\tthis.url2_1 = 'interviews.htm'\n\tthis.url2_2 = 'creabios.htm'\n\tthis.url2_3 = 'halloffame.htm'\n\n\n\n //Sub Menu 3\n\n\tthis.menu_xy3 = \"-82,17\"\n\tthis.menu_width3 = 150\n\t\n\tthis.item3_0 = \"Fan Art\"\n\tthis.item3_1 = \"Fan Fiction\"\n\tthis.item3_2 = \"Custom Figures\"\n\tthis.item3_3 = \"Body Art (Tattoos)\"\n\tthis.item3_4 = \"Custom Trading Cards\"\n\tthis.item3_5 = \"Published Fan Letters\"\n\tthis.item3_6 = \"Fan Parodies\"\n\tthis.item3_7 = \"Misc. Fan Creations\"\n\tthis.item3_8 = \"Guestbook\"\n\n\tthis.url3_0 = 'artfan.htm'\n\tthis.url3_1 = 'fanfiction.htm'\n\tthis.url3_2 = 'fanfigs.htm'\n\tthis.url3_3 = 'artbody.htm'\n\tthis.url3_4 = 'fancards.htm'\n\tthis.url3_5 = 'fanletters.htm'\n\tthis.url3_6 = 'fanparodies.htm'\n\tthis.url3_7 = 'fanmisc.htm'\n\tthis.url3_8 = 'http://books.dreambook.com/kevinqhall/ddbook.html'\n\n\n\n //Sub Menu 4\n\n\tthis.menu_xy4 = \"-82,17\"\n\tthis.menu_width4 = 180\n\n\tthis.item4_0 = \"For Sale or Trade\"\n\tthis.item4_1 = \"Cards, Stickers, & Pogs\"\n\tthis.item4_2 = \"Toys, Games, & Puzzles\"\n\tthis.item4_3 = \"Action Figures\"\n\tthis.item4_4 = \"Diecast Vehicles\"\n\tthis.item4_5 = \"Pins & Patches\"\n\tthis.item4_6 = \"Stamps & Coins\"\n\tthis.item4_7 = \"Food & Candy\"\n\tthis.item4_8 = \"Clothes & Apparel\"\n\tthis.item4_9 = \"T-Shirts\"\n\tthis.item4_10= \"Costumes\"\n\tthis.item4_11= \"Calendars\"\n\tthis.item4_12= \"Household Items\"\n\tthis.item4_13= \"Stationery\"\n\tthis.item4_14= \"Wall Hangings/Window Clings\"\n\n\tthis.icon_abs4_1 = 0\n\n\tthis.url4_0 = 'mercwant.htm'\n\tthis.url4_1 = 'merccard.htm'\n\tthis.url4_2 = 'merctoys.htm'\n\tthis.url4_3 = 'mercfigs.htm'\n\tthis.url4_4 = 'diecast.htm'\n\tthis.url4_5 = 'mercpins.htm'\n\tthis.url4_6 = 'stamps.htm'\n\tthis.url4_7 = 'mercfood.htm'\n\tthis.url4_8 = 'mercclth.htm'\n\tthis.url4_9 = 'merctees.htm'\n\tthis.url4_10= 'merccost.htm'\n\tthis.url4_11= 'merccal.htm'\n\tthis.url4_12= 'merchous.htm'\n\tthis.url4_13= 'mercstat.htm'\n\tthis.url4_14= 'mercwall.htm'\n\t\n //Sub Menu 4_1\n\n\tthis.menu_xy4_1 = \"-4,2\"\n\tthis.menu_width4_1 = 160\n\n\tthis.item4_1_0 = \"Custom Trading Cards\"\n\tthis.item4_1_1 = \"Trading Cards: 1960s\"\n\tthis.item4_1_2 = \"Trading Cards: 1970s\"\n\tthis.item4_1_3 = \"Trading Cards: 1980s\"\n\tthis.item4_1_4 = \"Trading Cards: 1990-1992\"\n\tthis.item4_1_5 = \"Trading Cards: 1993-1995\"\n\tthis.item4_1_6 = \"Trading Cards: 1996-2000\"\n\tthis.item4_1_7 = \"Trading Cards: 2001-2003\"\n\tthis.item4_1_8 = \"Trading Cards: DD Movie\"\n\tthis.item4_1_9 = \"Phone Cards\"\n\tthis.item4_1_10= \"Promotional Cards\"\n\tthis.item4_1_11= \"Collectible Card Games\"\n\tthis.item4_1_12= \"Stickers\"\n\tthis.item4_1_13= \"Pogs\"\n\n\tthis.url4_1_0 = 'fancards.htm'\n\tthis.url4_1_1 = 'cards60s.htm'\n\tthis.url4_1_2 = 'cards70s.htm'\n\tthis.url4_1_3 = 'cards80s.htm'\n\tthis.url4_1_4 = 'cards90-92.htm'\n\tthis.url4_1_5 = 'cards93-95.htm'\n\tthis.url4_1_6 = 'cards96-00.htm'\n\tthis.url4_1_7 = 'cards01-03.htm'\n\tthis.url4_1_8 = 'cardsdd.htm'\n\tthis.url4_1_9 = 'cardsphone.htm'\n\tthis.url4_1_10= 'cardspromo.htm'\n\tthis.url4_1_11= 'cardsccg.htm'\n\tthis.url4_1_12= 'stickers.htm'\n\tthis.url4_1_13= 'pogs.htm'\n\n\n\n\n //Sub Menu 5\n\n\tthis.menu_xy5 = \"-82,17\"\n\tthis.menu_width5 = 165\n\n\tthis.item5_0 = \"Books\"\n\tthis.item5_1 = \"Movies\"\n\tthis.item5_2 = \"Television\"\n\tthis.item5_3 = \"Video Games/CyberComics\"\n\tthis.item5_4 = \"Fanzines\"\n\tthis.item5_5 = \"Feature Articles\"\n\tthis.item5_6 = \"Sightings\"\n\tthis.item5_7 = \"Music\"\n\tthis.item5_8 = \"Braille\"\n\tthis.item5_9 = \"Newspaper\"\n\n\tthis.icon_abs5_0 = 0\n\n\tthis.url5_0 = ''\n\tthis.url5_1 = 'movies.htm'\n\tthis.url5_2 = 'tv.htm'\n\tthis.url5_3 = 'online.htm'\n\tthis.url5_4 = 'fanzines.htm'\n\tthis.url5_5 = 'articles.htm'\n\tthis.url5_6 = 'sightings.htm'\n\tthis.url5_7 = 'music.htm'\n\tthis.url5_8 = 'braille.htm'\n\tthis.url5_9 = 'newspaper.htm'\n\n //Sub Menu 5_0\n\n\tthis.menu_xy5_0 = \"-4,2\"\n\tthis.menu_width5_0 = 145\n\n\tthis.item5_0_0 = \"Pocketbooks/Fiction\"\n\tthis.item5_0_1 = \"Graphic Novels\"\n\tthis.item5_0_2 = \"Trade Paperbacks\"\n\tthis.item5_0_3 = \"Hardcovers\"\n\tthis.item5_0_4 = \"Miscellaneous Books\"\n\tthis.item5_0_5 = \"Activity/Coloring Books\"\n\n\tthis.url5_0_0 = 'fiction.htm'\n\tthis.url5_0_1 = 'graphic.htm'\n\tthis.url5_0_2 = 'tpbs.htm'\n\tthis.url5_0_3 = 'hardcovers.htm'\n\tthis.url5_0_4 = 'miscbooks.htm'\n\tthis.url5_0_5 = 'coloring.htm'\n\n\n //Sub Menu 6\n\n\tthis.menu_xy6 = \"-82,17\"\n\tthis.menu_width6 = 150\n\n\tthis.item6_0 = \"Fan Art\"\n\tthis.item6_1 = \"Statues & Figures\"\n\tthis.item6_2 = \"Portfolios, Prints, & Lithographs\"\n\tthis.item6_3 = \"Posters\"\n\tthis.item6_4 = \"Sketchagraph Gallery\"\n\tthis.item6_5 = \"Splash Pages\"\n\tthis.item6_6 = \"Sketches/Drawings\"\n\tthis.item6_7 = \"Pinups\"\n\tthis.item6_8 = \"Authentix Cover Gallery\"\n\tthis.item6_9 = \"Body Art (Tattoos)\"\n\tthis.item6_10= \"Preview Art\"\n\tthis.item6_11= \"Licensed Images\"\n\n\tthis.url6_0 = 'artfan.htm'\n\tthis.url6_1 = 'artsculp.htm'\n\tthis.url6_2 = 'artpro.htm'\n\tthis.url6_3 = 'artpost.htm'\n\tthis.url6_4 = 'artsgrph.htm'\n\tthis.url6_5 = 'artsplsh.htm'\n\tthis.url6_6 = 'artsktch.htm'\n\tthis.url6_7 = 'artpinup.htm'\n\tthis.url6_8 = 'artauth.htm'\n\tthis.url6_9 = 'artbody.htm'\n\tthis.url6_10= 'artpreview.htm'\n\tthis.url6_11= 'artlic.htm'\n\n //Sub Menu 7\n\n\tthis.menu_xy7 = \"-142,17\"\n\tthis.menu_width7 = 160\n\n\tthis.item7_0 = \"Top Ten...\"\n\tthis.item7_1 = \"Quotes\"\n\tthis.item7_2 = \"Lawyer Jokes\"\n\tthis.item7_3 = \"Bloopers\"\n\tthis.item7_4 = \"Parodies/Spoofs\"\n\tthis.item7_5 = \"Trivia\"\n\tthis.item7_6 = \"Online Puzzles/Games\"\n\tthis.item7_7 = \"Printable Puzzles\"\n\n\tthis.icon_abs7_0 = 0\n\tthis.icon_abs7_6 = 0\n\tthis.icon_abs7_7 = 0\n\n\tthis.url7_0 = ''\n\tthis.url7_1 = 'quotes.htm'\n\tthis.url7_2 = 'shyster.htm'\n\tthis.url7_3 = 'bloopers.htm'\n\tthis.url7_4 = 'parodies.htm'\n\tthis.url7_5 = 'trivia.htm'\n\tthis.url7_6 = 'puzzles.htm'\n\tthis.url7_7 = ''\n\n //Sub Menu 7_0\n\n\tthis.menu_xy7_0 = \"-269,3\"\n\tthis.menu_width7_0 = 150\n\n\tthis.item7_0_0 = \"Ways to Defeat Stiltman\"\n\tthis.item7_0_1 = \"Favorite DD Stories\"\n\tthis.item7_0_2 = \"Toughest Foes\"\n\tthis.item7_0_3 = \"Favorite DD Story Arcs\"\n\tthis.item7_0_4 = \"Favorite DD Villains\"\n\tthis.item7_0_5 = \"Fav. DD Supporting Cast\"\n\tthis.item7_0_6 = \"Favorite DD Team-Ups\"\n\tthis.item7_0_7 = \"Underrated DD Creators\"\n\tthis.item7_0_8 = \"Aerial Moves\"\n\n\tthis.url7_0_0 = 'ttstilts.htm'\n\tthis.url7_0_1 = 'ttissues.htm'\n\tthis.url7_0_2 = 'tttough.htm'\n\tthis.url7_0_3 = 'ttarcs.htm'\n\tthis.url7_0_4 = 'ttbadguy.htm'\n\tthis.url7_0_5 = 'ttsuppor.htm'\n\tthis.url7_0_6 = 'ttteamup.htm'\n\tthis.url7_0_7 = 'ttunder.htm'\n\tthis.url7_0_8 = 'ttdaringmoves.htm'\n\n //Sub Menu 7_6\n\n\tthis.menu_xy7_6 = \"-299,3\"\n\tthis.menu_width7_6 = 180\n\n\tthis.item7_6_0 = \"Concentration: DD Covers\"\n\tthis.item7_6_1 = \"Concentration: Sketchagraphs\"\n\tthis.item7_6_2 = \"Word Search: DD Villains\"\n\tthis.item7_6_3 = \"Word Search: Women of DD\"\n\tthis.item7_6_4 = \"Word Search: DD Creators\"\n\n\tthis.url7_6_0 = 'puzconcentration1.htm'\n\tthis.url7_6_1 = 'puzconcentration2.htm'\n\tthis.url7_6_2 = 'puzsrch1online.htm'\n\tthis.url7_6_3 = 'puzsrch2online.htm'\n\tthis.url7_6_4 = 'puzsrch3online.htm'\n\n //Sub Menu 7_7\n\n\tthis.menu_xy7_7 = \"-299,3\"\n\tthis.menu_width7_7 = 180\n\n\tthis.item7_7_0 = \"Matching: Marvel Nemeses\"\n\tthis.item7_7_1 = \"Matching: Marvel Couples\"\n\tthis.item7_7_2 = \"Matching: Weapons of Choice\"\n\tthis.item7_7_3 = \"Word Search: DD Villains\"\n\tthis.item7_7_4 = \"Word Search: Women of DD\"\n\tthis.item7_7_5 = \"Word Search: DD Creators\"\n\n\tthis.url7_7_0 = 'puzmtch1.htm'\n\tthis.url7_7_1 = 'puzmtch2.htm'\n\tthis.url7_7_2 = 'puzmtch3.htm'\n\tthis.url7_7_3 = 'puzsrch1.htm'\n\tthis.url7_7_4 = 'puzsrch2.htm'\n\tthis.url7_7_5 = 'puzsrch3.htm'\n\n\n\n}///////////////////////// END Menu Data /////////////////////////////////////////", "function ModifyMenuPanel(editor) {\n\tthis.editor = editor;\n\tthis.menus = {};\n\tthis.menuColumn = null;\n\tthis.menuContainer = null;\n\t\n}", "function click_lyrMenu_조회(ui) {\n\n processRetrieve({});\n\n }", "function initmenu(levels,height,width,delay,type)\r\n{\r\nif (populatemenuitems==\"true\")\r\n{\r\nfor (i=0;i<=levels-1;i++)\r\n{\r\nMENU_ITEMS[i] = ITEMS[i+1];\r\n}\r\n}\r\n\r\n//setting the height\r\nglobheight=height;\r\ngloblevel=levels;\r\nglobwidth=width;\r\nglobdelay=delay;\r\n\r\nif (populatemenuitems==\"false\")\r\n{\r\n if (type==\"horizontal\")\r\n {\r\n //Defaults for horizontal\r\n MENU_POS['block_left'] = [0, 0];\r\n MENU_POS['top'] = [0];\r\n MENU_POS['left'] = [globwidth];\r\n globtype=\"horizontal\";\r\n }\r\n else\r\n { \r\n //Defaults for vertical\r\n MENU_POS['block_left'] = [0, globwidth];\r\n MENU_POS['top'] = [0, 0];\r\n MENU_POS['left'] = [0, 0];\r\n globtype=\"vertical\";\r\n }\r\n}\r\n}", "function mainMenu() {\n hideOverlay();\n showOverlay();\n getId('quitText').innerHTML = \"Go to the<br>MAIN MENU?\";\n\tgetId('buttonLeftText').innerHTML = \"Yes\";\n\tgetId('buttonRightText').innerHTML = \"Back\";\n}", "function showMainMenu() {\n E.showMenu({\n '': {\n 'title': 'Informational Clock',\n 'back': back\n },\n 'Dual stage unlock': {\n value: config.dualStageUnlock,\n format: value => (value == 0) ? \"Off\" : `${value} taps`,\n min: 0,\n step: 1,\n onchange: value => {\n config.dualStageUnlock = value;\n saveSettings();\n }\n },\n 'Seconds display': showSecondsMenu,\n 'Day of week format': {\n value: config.date.dayFullName,\n format: value => value ? 'Full name' : 'Abbreviation',\n onchange: value => {\n config.date.dayFullName = value;\n saveSettings();\n }\n },\n 'Date format': () => {\n E.showMenu({\n '': {\n 'title': 'Date format',\n 'back': showMainMenu,\n },\n 'Order': {\n value: config.date.mmdd,\n format: value => value ? 'Month first' : 'Date first',\n onchange: value => {\n config.date.mmdd = value;\n saveSettings();\n }\n },\n 'Separator': {\n value: SEPARATORS.map(item => item.char).indexOf(config.date.separator),\n format: value => SEPARATORS[value].name,\n min: 0,\n max: SEPARATORS.length - 1,\n wrap: true,\n onchange: value => {\n config.date.separator = SEPARATORS[value].char;\n saveSettings();\n }\n },\n 'Month format': {\n // 0 = number only\n // 1 = abbreviation\n // 2 = full name\n value: config.date.monthName ? (config.date.monthFullName ? 2 : 1) : 0,\n format: value => ['Number', 'Abbreviation', 'Full name'][value],\n min: 0,\n max: 2,\n wrap: true,\n onchange: value => {\n if (value == 0) config.date.monthName = false;\n else {\n config.date.monthName = true;\n config.date.monthFullName = (value == 2);\n }\n saveSettings();\n }\n }\n });\n },\n 'Bottom row': {\n value: BOTTOM_ROW_OPTIONS.map(item => item.val).indexOf(config.bottomLocked.display),\n format: value => BOTTOM_ROW_OPTIONS[value].name,\n min: 0,\n max: BOTTOM_ROW_OPTIONS.length - 1,\n wrap: true,\n onchange: value => {\n config.bottomLocked.display = BOTTOM_ROW_OPTIONS[value].val;\n saveSettings();\n }\n },\n 'Shortcuts': showShortcutMenu,\n 'Fast load shortcuts': showFastLoadMenu,\n 'Bar': showBarMenu,\n 'Low battery color': () => {\n E.showMenu({\n '': {\n 'title': 'Low battery color',\n back: showMainMenu\n },\n 'Low battery threshold': {\n value: config.lowBattColor.level,\n min: 0,\n max: 100,\n format: value => `${value}%`,\n onchange: value => {\n config.lowBattColor.level = value;\n saveSettings();\n }\n },\n 'Color': {\n value: COLOR_OPTIONS.map(item => colorString(item.val)).indexOf(colorString(config.lowBattColor.color)),\n format: value => COLOR_OPTIONS[value].name,\n min: 0,\n max: COLOR_OPTIONS.length - 1,\n wrap: false,\n onchange: value => {\n config.lowBattColor.color = COLOR_OPTIONS[value].val;\n saveSettings();\n }\n }\n });\n },\n });\n }", "function Menu(n=0) {\n\n switch (n) {\n case 1: var btn = Array(1,5);break;\n case 2: var btn = Array(2,4,6);break;\n case 3: var btn = Array(0,3);break;\n default: document.getElementById(\"steuerung\").style.display = \"none\";\n return;\n }\n\n /* hide all */\n for (var c=1;c<7;c++) {document.getElementById(\"btn\"+c).style.display = \"none\";}\n\n // display chosen buttons\n for (c=0;c<btn.length;c++) {\n if (btn[c] > 0)\n document.getElementById(\"btn\"+btn[c]).style.display = \"inline-block\";\n }\n\n document.getElementById(\"steuerung\").style.display = \"block\";\n if (document.getElementById(\"plugin__flashcard_edit_btn\")!=null) {\n if (JSINFO['access']==\"editor\") document.getElementById(\"plugin__flashcard_edit_btn\").style.display = \"inline-block\";\n }\n \n}", "function menuMissionAdmin(){\nvar menuModule=[]\n\t\tmenuModule.push('<div id=\"tabsMissions\"><ul><li>');\n\t\tmenuModule.push('<a href=\"#creerMiss\">Creer une nouvelle missions</a></li>');\n\t\tmenuModule.push('<li><a href=\"#modifMiss\">Remplir des questionnaires</a>');\n\t\tmenuModule.push('</li><li><a href=\"#suppMiss\">Supprimer un module</a></li></ul>');\n\t\tmenuModule.push('<div id=\"creerMiss\"><p>ici se trouveront les fonctions pour la creation des module</p></div>');\n\t\tmenuModule.push('<div id=\"modifMiss\"><p> ici pour la modif des modules</p></div>');\n\t\tmenuModule.push('<div id=\"suppMiss\"><p>ici la suppression</p><div></div>');\n\t\t$(\"#container\").html(menuModule.join(''));\n\t\t$(\"#tabsMissions\").tabs();\n}", "addMenuItem(menuItem){\r\n\r\n }", "function onOpen() {\n var ui = SpreadsheetApp.getUi()\n ui.createMenu('U3A Menu')\n .addSubMenu(ui.createMenu('CourseDetails').addItem('Change Course Status', 'loadCourseStatusSidebar'))\n .addSeparator()\n .addSubMenu(\n ui\n .createMenu('CalendarImport')\n .addItem('Schedule Zoom Meeting', 'selectedZoomSessions')\n .addItem('Email Session Advice', 'createSessionAdviceEmail')\n .addItem('Import Calendar', 'loadCalendarSidebar')\n .addItem('Create CourseDetails', 'createCourseDetails')\n )\n .addSeparator()\n .addItem('Email Registration Info to SELECTED Members', 'selectedHTMLRegistrationEmails')\n .addSeparator()\n .addSubMenu(\n ui\n .createMenu('Database')\n .addItem('Email ALL Enrollees - HTML', 'allHTMLRegistrationEmails')\n .addItem('Email SELECTED Enrollees - PDF', 'selectedRegistrationEmails')\n .addItem('Email SELECTED Enrollees - HTML', 'selectedHTMLRegistrationEmails')\n .addItem('Create Database', 'buildDB')\n )\n .addSeparator()\n .addSubMenu(\n ui\n .createMenu('Wordpress Actions')\n .addItem('Create Course Program', 'makeCourseDetailForWordPress')\n .addItem('Create Enrolment Form', 'updateWordpressEnrolmentForm')\n .addItem('Import Enrolment Responses', 'makeEnrolmentCSV')\n )\n .addSeparator()\n .addSubMenu(ui.createMenu('Other Actions').addItem('I&R Enrolment Sheet', 'selectedAttendanceRegister'))\n .addSeparator()\n .addItem('Help', 'loadHelpSidebar')\n .addToUi()\n}", "function quickLinks(){\n\t\tvar menu = find(\"//td[@class='menu']\", XPFirst);\n\t\tfor (var j = 0; j < 2; j++) for (var i = 0; i < menu.childNodes.length; i++) if (menu.childNodes[i].nodeName == 'BR') removeElement(menu.childNodes[i]);\n\t\tmenu.innerHTML += '<hr/>';\n\t\tmenu.innerHTML += '<a href=\"login.php\">' + T('LOGIN') + '</a>';\n\t\tmenu.innerHTML += '<a href=\"allianz.php\">' + T('ALIANZA') + '</a>';\n\t\tmenu.innerHTML += '<a href=\"a2b.php\">' + T('ENV_TROPAS') + '</a>';\n\t\tmenu.innerHTML += '<a href=\"warsim.php\">' + T('SIM') + '</a>';\n\t\tmenu.innerHTML += '<hr/>';\n\t\tmenu.innerHTML += '<a href=\"http://trcomp.sourceforge.net/?lang=' + idioma + '\" target=\"_blank\">' + T('COMP') + '</a>';\n//\t\tmenu.innerHTML += '<a href=\"http://travmap.shishnet.org/?lang=' + idioma + '\" target=\"_blank\">' + T('MAPA') + '</a>';\n//\t\tmenu.innerHTML += '<a href=\"http://www.denibol.com/~victor/travian_calc/\" target=\"_blank\">' + T('CALC') + '</a>';\n\t\tmenu.innerHTML += '<a href=\"http://www.denibol.com/proyectos/travian_beyond/\" target=\"_blank\">Travian Beyond</a>';\n\t}", "function initMenu() {\n\n //removeSelectedClassForMenu();\n\n //$('.sub-menu > .sub-menu__item').eq(selectedIndex).addClass('sub-menu__item--active', 'active');\n \n }", "rebuildMenu() {\n\n let bridgeItems = [];\n let oldItems = this.menu._getMenuItems();\n\n this.refreshMenuObjects = {};\n\n this.bridesData = this.hue.checkBridges();\n\n for (let item in oldItems){\n oldItems[item].destroy();\n }\n\n for (let bridgeid in this.hue.instances) {\n\n bridgeItems = this._createMenuBridge(bridgeid);\n\n for (let item in bridgeItems) {\n this.menu.addMenuItem(bridgeItems[item]);\n }\n\n this.menu.addMenuItem(\n new PopupMenu.PopupSeparatorMenuItem()\n );\n }\n\n let refreshMenuItem = new PopupMenu.PopupMenuItem(\n _(\"Refresh menu\")\n );\n refreshMenuItem.connect(\n 'button-press-event',\n () => { this.rebuildMenu(); }\n );\n this.menu.addMenuItem(refreshMenuItem);\n\n let prefsMenuItem = new PopupMenu.PopupMenuItem(\n _(\"Settings\")\n );\n prefsMenuItem.connect(\n 'button-press-event',\n () => {Util.spawn([\"gnome-shell-extension-prefs\", Me.uuid]);}\n );\n this.menu.addMenuItem(prefsMenuItem);\n\n this.refreshMenu();\n }", "function initMenuUI() {\n clearMenu();\n let updateBtnGroup = $(\".menu-update-btn-group\");\n let modifyBtnGroup = $(\".menu-modify-btn-group\");\n let delBtn = $(\"#btn-delete-menu\");\n\n setMenuTitle();\n $(\"#btn-update-menu\").text(menuStatus == \"no-menu\" ? \"创建菜单\" : \"更新菜单\");\n menuStatus == \"no-menu\" ? hideElement(modifyBtnGroup) : unhideElement(modifyBtnGroup);\n menuStatus == \"no-menu\" ? unhideElement(updateBtnGroup) : hideElement(updateBtnGroup);\n menuStatus == \"no-menu\" ? setDisable(delBtn) : setEnable(delBtn);\n }", "function setSHMenuParam(url, type, gr, pre) {\n url_SHMenu = url;\n type_SHMenu = type;\n gr_SHMenu = gr;\n pre_SHMenu = pre;\n }", "function onOpen() {\n SpreadsheetApp.getUi().createMenu('Equipment requests')\n .addItem('Set up', 'setup_')\n .addItem('Clean up', 'cleanup_')\n .addToUi();\n}", "function createDefaultMenu(obj){\r\n\r\n var arrayStr = obj.attr(\"id\").split(\".\");\r\n var nodeType = arrayStr[2];\r\n var treeType = arrayStr[3];\r\n\r\n var stageSeq = \"0\";\r\n var emapId = \"\";\r\n\r\n var nodeName=obj.attr(\"name\");\r\n var timedID=obj.attr(\"ext_id\");\r\n var abstractID=obj.attr(\"abstract_id\");\r\n\t\t\r\n return {\r\n \t\"Name\" : {\r\n \t\tlabel : nodeName\r\n \t},\r\n \t\"Timed ID Info\" : {\r\n \t\tlabel : timedID,\r\n \t\taction : function (obj) {\r\n \t\t}\t\r\n \t},\r\n \t\"Abstract ID Info\" : {\r\n \t\tlabel : abstractID,\r\n \t\taction : function (obj) {\r\n \t\t},\t\r\n\t \tseparator_after : true\r\n \t},\r\n \t\"Query EMAGE\" : {\r\n \t\tlabel : \"Search EMAGE\",\r\n \t\taction : function (obj) {\r\n \t\t\tif (timedID === \"EMAP:0\") {\r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \t\t\tvar url = 'http://www.emouseatlas.org/emagewebapp/pages/emage_general_query_result.jsf?structures=' + timedID + '&exactmatchstructures=true&includestructuresynonyms=true';\r\n \t\t\twindow.open(url);\r\n \t\t}\t\r\n \t},\r\n \t\"Query GXD\" : {\r\n\t\tlabel : \"Search GXD\",\r\n\t \taction : function (obj) {\r\n\t\t\ttimedID = timedID.replace(/EMAP:/,\"\");\r\n\t\t \tif (timedID === \"0\") {\r\n\t\t \t\treturn;\r\n\t\t \t}\t\r\n\t\t \tvar url = 'http://www.informatics.jax.org/searches/expression_report.cgi?edinburghKey=' + timedID + '&sort=Gene%20symbol&returnType=assay%20results&substructures=structures';\r\n\t\t \twindow.open(url);\r\n\t \t}\r\n \t},\r\n \t\"Query Google\" : {\r\n\t label : \"Search Google\",\r\n \t \taction : function (obj) {\r\n\t\t \tvar url = 'http://www.google.co.uk/search?q=' + nodeName;\r\n\t\t \twindow.open(url);\r\n\t \t}\r\n \t},\r\n \t\"Query Wikipedia\" : {\r\n\t \tlabel : \"Search Wikipedia\",\r\n \t \taction : function (obj) {\r\n\t\t \tvar url = 'http://en.wikipedia.org/wiki/' + nodeName;\r\n\t\t \twindow.open(url);\r\n\t \t}\r\n \t}\r\n }\r\n}", "function onPrefChange(prefName) {\n menu.items = createMenuItems();\n}", "function updateMenu() {\n 'use strict';\n\n // Get references to the menus:\n var os = document.getElementById('os');\n var os2 = document.getElementById('os2');\n\n // Determine the options:\n if (os.value == 'Windows') {\n var options = ['7 Home Basic', '7 Home Premium', '7 Professional', '7 Ultimate', 'Vista', 'XP'];\n } else if (os.value == 'Mac OS X') {\n options = ['10.7 Lion', '10.6 Snow Leopard', '10.5 Leopard', '10.4 Tiger'];\n } else options = null;\n\n // Update the menu:\n if (options) {\n os2.disabled = false;\n os2.style.visibility = 'visible';\n\n // Call populateMenu function to clear existing options and add new ones\n populateMenu(os2, options);\n\n } else { // No selection!\n // Disable the element\n os2.disabled = true;\n // Change visibility to hidden\n os2.style.visibility = 'hidden';\n }\n} // End of updateMenu() function.", "function setupMenu() {\n // console.log('setupMenu');\n\n document.getElementById('menuGrip')\n .addEventListener('click', menuGripClick);\n\n document.getElementById('menuPrint')\n .addEventListener('click', printClick);\n\n document.getElementById('menuHighlight')\n .addEventListener('click', menuHighlightClick);\n\n const menuControls = document.getElementById('menuControls');\n if (Common.isIE) {\n menuControls.style.display = 'none';\n } else {\n menuControls.addEventListener('click', menuControlsClick);\n }\n\n document.getElementById('menuSave')\n .addEventListener('click', menuSaveClick);\n\n document.getElementById('menuExportSvg')\n .addEventListener('click', exportSvgClick);\n\n document.getElementById('menuExportPng')\n .addEventListener('click', exportPngClick);\n\n PageData.MenuOpen = (Common.Settings.Menu === 'Open');\n}", "function install_menu() {\n var config = {\n name: 'lesson_lock',\n submenu: 'Settings',\n title: 'Lesson Lock',\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "function init() {\n let menu = $E('menu', {\n id: kUI.prefMenu.id,\n label: kUI.prefMenu.label,\n accesskey: kUI.prefMenu.accesskey\n });\n\n if (kSiteList.length) {\n let popup = $E('menupopup');\n\n $event(popup, 'command', onCommand);\n\n kSiteList.forEach(({name, disabled}, i) => {\n let menuitem = popup.appendChild($E('menuitem', {\n label: name + (disabled ? ' [disabled]' : ''),\n type: 'checkbox',\n checked: !disabled,\n closemenu: 'none'\n }));\n\n menuitem[kDataKey.itemIndex] = i;\n });\n\n menu.appendChild(popup);\n }\n else {\n $E(menu, {\n tooltiptext: kUI.prefMenu.noSiteRegistered,\n disabled: true\n });\n }\n\n $ID('menu_ToolsPopup').appendChild(menu);\n }", "function lcDisplayTypeMenu(itemArray) {\n actualArray = new Array();\n //the list does not include the first two items.\n for (i = 2; i < itemArray.length; i++) {\n actualArray[i-2] = itemArray[i];\n }\n new PopupMenu(\"Learning Curve Types\", \"LearningCurveTypes\", actualArray, mouse_x, mouse_y,\n parseSelectedType, itemArray[1]);\n}", "function selectMenu() {\n\tif (menuActive()) { //Si on est dans le menu, on lance la fonction appropriée\n\t\tvar fn = window[$(\".menu_item_selected\").attr(\"action\")];\n\t\tif(typeof fn === 'function') {\n\t\t\tfn();\n\t\t}\n\t} else if (delAllActive()) { //Si on est dans la validation du delete\n\t\tdelAll();\n\t}\n}", "function manageMenu() {\n if (menuOpen) {\n menuOpen = false;\n closeMenu();\n } else {\n menuOpen = true;\n openMenu();\n }\n}", "HideMenus() {\n this.HideMenuSubs();\n this.HideMenusAuds();\n }", "setupMenu () {\n let dy = 17;\n // create buttons for the action categories\n this.menu.createButton(24, 0, () => this.selectionMode = 'info', this, null, 'info');\n this.menu.createButton(41, 0, () => this.selectionMode = 'job', this, null, 'job');\n // create buttons for each command\n for (let key of Object.keys(this.jobCommands)) {\n let button = this.menu.createButton(0, dy, () => this.jobCommand = key, this, this.jobCommands[key].name);\n dy += button.height + 1;\n }\n // set the hit area for the menu\n this.menu.calculateHitArea();\n // menu is closed by default\n this.menu.hideMenu();\n }", "function initializeMenu() {\n robotMenu = Menus.addMenu(\"Robot\", \"robot\", Menus.BEFORE, Menus.AppMenuBar.HELP_MENU);\n\n CommandManager.register(\"Select current statement\", SELECT_STATEMENT_ID, \n robot.select_current_statement);\n CommandManager.register(\"Show keyword search window\", TOGGLE_KEYWORDS_ID, \n search_keywords.toggleKeywordSearch);\n CommandManager.register(\"Show runner window\", TOGGLE_RUNNER_ID, \n runner.toggleRunner);\n CommandManager.register(\"Run test suite\", RUN_ID,\n runner.runSuite)\n robotMenu.addMenuItem(SELECT_STATEMENT_ID, \n [{key: \"Ctrl-\\\\\"}, \n {key: \"Ctrl-\\\\\", platform: \"mac\"}]);\n \n robotMenu.addMenuDivider();\n\n robotMenu.addMenuItem(RUN_ID,\n [{key: \"Ctrl-R\"},\n {key: \"Ctrl-R\", platform: \"mac\"},\n ]);\n\n robotMenu.addMenuDivider();\n\n robotMenu.addMenuItem(TOGGLE_KEYWORDS_ID, \n [{key: \"Ctrl-Alt-\\\\\"}, \n {key: \"Ctrl-Alt-\\\\\", platform: \"mac\" }]);\n robotMenu.addMenuItem(TOGGLE_RUNNER_ID,\n [{key: \"Alt-R\"},\n {key: \"Alt-R\", platform: \"mac\"},\n ]);\n }", "function populateMenu()\t{\r\n\tfor(var i = 0; i < searches.length; ++i) \r\n\t\tGM_registerMenuCommand(\r\n\t\t\t\"Toggle \" + searches[i].title + \" link\", \r\n\t\t\tfunction(search) {\r\n\t\t\t\treturn function() {\r\n\t\t\t\t\tif(GM_getValue(search.title, false)) {\r\n\t\t\t\t\t\tGM_deleteValue(search.title); \r\n\t\t\t\t\t\tsearch.show();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse { \r\n\t\t\t\t\t\tGM_setValue(search.title, true);\r\n\t\t\t\t\t\tsearch.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}(searches[i])\r\n\t\t);\t\r\n}", "function menuItemClick(thisMsg)\n{\n // So they selected something... cycle through the options and execute.\n // Game menu...\n if (thisMsg == \"Exit\")\t\t\n window.close()\n else if (thisMsg == \"New\")\n faceClick()\n else if ((thisMsg == \"Beginner\") || (thisMsg == \"Intermediate\") || (thisMsg == \"Expert\")) {\n\t initMines(thisMsg);\n }\n else if (thisMsg == \"Custom\") {\n \n }\n else if (thisMsg == \"Personal\") {\n }\n else if (thisMsg == \"World\") {\n }\n // Options menu\n else if (thisMsg == \"Marks\") {\n useQuestionMarks = ! useQuestionMarks;\n }\n else if (thisMsg == \"Area\") {\n useMacroOpen = ! useMacroOpen;\n }\n else if (thisMsg == \"First\") {\n useFirstClickUseful = ! useFirstClickUseful;\n\t }\n else if (thisMsg == \"Remaining\") {\n openRemaining = ! openRemaining;\n updateNumBombs();\n\t }\n // Help menu\n else if (thisMsg == \"About\") {\talertBox('Locate the hidden bombs in the mine field without stepping on them!'); }\n else if (thisMsg == \"Instructions\") {\talertBox('Click the tiles to reveal them. Numbers indicate the amount of bombs around. Right click the mines.'); }\n // Since we clicked, close the menu.\n closeAllMenus();\n // Always return a false to prevent the executing of the default href.\n // (this is a neat trick - we've already handled the event, so we bypass the default href link)\n return false; }", "function openExcursionsMenu($event) {\n ActivityTracker(EventLogFactory.action.excursionsList.contextMenu());\n list.excursionMenu.show($event);\n }", "function onOpen() {\n var sheet = SpreadsheetApp.getActiveSpreadsheet();\n var entries = [{\n name: \"Generate\",\n functionName: \"convert\"\n }, {\n name: \"Settings\",\n functionName: \"showInfoPopup\"\n }];\n sheet.addMenu(appName, entries);\n}", "function main() {\n MenuItem.init();\n sizeUI();\n }", "function itinToHere(){\n\tremoveContextualMenu()\n\n}", "getMenuOptions() {\n return ['NewRecipe', 'View', 'Home','Search']\n }", "function MenuManager() {\n\tvar PLAYER_OPTIONS = {\n\t\tHuman:PLAYER_HUMAN, \t\n\t\tRandom:PLAYER_RANDOM,\t\t\n\t\tWeak:PLAYER_HEURISTIC,\t\t\n\t\t//Theseus:PLAYER_THESEUS,\t\n\t\tMinotaur:PLAYER_ALPHABETA,\t\n\t\t'EvilKingMinos':PLAYER_MINOTAUR_PLUS,\t\n\t\tNetwork:PLAYER_NETWORK,\t\t\t\t\t\t\n\t\t//wasm:PLAYER_WASM,\t\n\t\t//MonteCarlo:PLAYER_MONTECARLO,\n\t\t//MCTS:PLAYER_MCTS,\n\t};\t\n\t\t\n\tthis.properties = new MenuProperties();\n\tthis.rootMenu = new dat.GUI();\t\n\t\n\t//Options - secondary root\t\n\tvar optionsMenu = this.rootMenu.addFolder('Options');\t\t\t\n\t\n\t//Display menu\n\tvar displayMenu = optionsMenu.addFolder('Display');\t\n\tdisplayMenu.add(this.properties, 'showLabels').onChange(this.persistChange);\t\t\n\tdisplayMenu.add(this.properties, 'showPath').onChange(this.persistChange);\n\tdisplayMenu.add(this.properties, 'showDistance').onChange(this.persistChange);\n\tdisplayMenu.add(this.properties, 'showWallColors').onChange(this.persistChange);\n\t\t\n\n\t//Debug menu\n\tvar debugMenu = optionsMenu.addFolder('Debug');\t\n\tdebugMenu.add(this.properties, 'showGrid');\n\tdebugMenu.add(this.properties, 'showCenters');\t\n\tdebugMenu.add(this.properties, 'showPositions').onChange(this.persistChange);\n\tdebugMenu.add(this.properties, 'showCoordinates');\n\tdebugMenu.add(this.properties, 'animSpeed', 0, 5000);\t\n\n\t//Links menu\n\t//var linksMenu = optionsMenu.addFolder('Links');\t\t\t\t\n\t\n\n\t//Root menu\t\t\t\n\tthis.rootMenu.add(this.properties, 'player1', PLAYER_OPTIONS).onChange(this.onChangePlayer);\n\tthis.rootMenu.add(this.properties, 'player2', PLAYER_OPTIONS).onChange(this.onChangePlayer);\t\n\tthis.rootMenu.add(this.properties, 'hotkeys');\n\n\t//Configure button hack\n\tvar propertyNodes = document.querySelectorAll('.dg.main .property-name');\t\t\t\n\tfor (var n = 0; n < propertyNodes.length; n++) {\n\t\tvar title = propertyNodes[n].innerHTML;\t\t\t\n\t\tif (title == 'player1' || title == 'player2') {\n\t\t\tvar node = propertyNodes[n];\n\t\t\t\n\t\t\tvar btnNode = document.createElement('img');\t\t\n\t\t\tbtnNode.className += 'config-button ' + title;\t\n\t\t\tbtnNode.setAttribute('data-name', title);\n\t\t\tnode.nextSibling.appendChild(btnNode);\n\t\t\tbtnNode.onclick = function(e) {\n\t\t\t\tif (!e) var e = window.event;\n\t\t\t\tvar player = (this.dataset[\"name\"] == \"player1\")? PLAYER1 : PLAYER2;\n\t\t\t\tgame.onPlayerConfig(player);\n\t\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t}\t\n\t\n}", "function initHelpTextSideMenu() {\n\n\t//Defines the sizes for each button on the\n\t// side menu \n\thideCalSize = 45;\n\tgoogleLinkSize = 45;//Google link\n\ttransSize = 45;// Transparency button\n\televSize = 45;// Elevation options\n\tpaletteSize = 130;// Pallete button\n\ttransectSize = 45;// Transect tool button\n\tdownloadDataSize = 45;// Download data button\n\thelpSize = 60;// Help button\n\tmainmenuSize = 120; //Size of main menu TODO change depending on size\n\toptMenuSize = 140; //Size of optional menu TODO cahnge depending on size\n\n\tfirstTopPos = 70;//Initial position for main menu\n\n\toffset = firstTopPos;\n\tvar l1;\n\tvar t1;\n\n\tl1 = getleft(\"mainMenuParent\") - 215;\n\tt1 = getop(\"mainMenuParent\");\n\t$(\"#mainMenuParentHover\").css(\"top\", t1 + \"px\");\n\t$(\"#mainMenuParentHover\").css(\"left\", l1 + \"px\");\n\n\n\tif (testVisibility(\"transParent\")) {\n\n\t\tl1 = getleft(\"transParent\") - 215;\n\t\tt1 = getop(\"transParent\");\n\t\t$(\"#transParentHover\").css(\"top\", t1 + \"px\");\n\t\t$(\"#transParentHover\").css(\"left\", l1 + \"px\");\n\t}\n\n\n\tl1 = getleft(\"optionalMenuParent\") - 220;\n\tt1 = getop(\"optionalMenuParent\");\n\t$(\"#optionalMenuParentHover\").css(\"top\", t1 + \"px\");\n\t$(\"#optionalMenuParentHover\").css(\"left\", l1 + \"px\");\n\n\tif (testVisibility(\"elevationParent\")) {\n\t\tvar l, w, t;\n\t\tw = getwidth(\"elevationParent\");\n\t\tl = getleft(\"elevationParent\");\n\t\tl = l + w;\n\t\tt = getop(\"elevationParent\");\n\n\t\t$(\"#elevationParentHover\").css(\"top\", t + \"px\");\n\t\t$(\"#elevationParentHover\").css(\"left\", l + \"px\");\n\n\t}\n\tif (testVisibility(\"transectParent\")) {\n\t\tvar l, w, t;\n\t\tw = getwidth(\"transectParent\");\n\t\tl = getleft(\"transectParent\");\n\n\t\tl = l + w;\n\t\tt = getop(\"transectParent\");\n\n\t\t$(\"#transectParentHover\").css(\"top\", t + \"px\");\n\t\t$(\"#transectParentHover\").css(\"left\", l + \"px\");\n\n\t}\n\tif (testVisibility(\"palettesMenuParent\")) {\n\n\t\tvar l, w, t;\n\n\t\tw = getwidth(\"palettesMenuParent\");\n\t\tl = getleft(\"palettesMenuParent\");\n\n\t\tl = l + w;\n\t\tt = getop(\"palettesMenuParent\");\n\n\t\t$(\"#palettesHover\").css(\"top\", t + \"px\");\n\t\t$(\"#palettesHover\").css(\"left\", l + \"px\");\n\n\t}\n\tif (testVisibility(\"hideCalendarButtonParent\")) {\n\t\tvar l, w, t;\n\n\t\tl = getleft(\"hideCalendarButtonParent\");\n\t\tw = getwidth(\"hideCalendarButtonParent\");\n\n\t\tl = l + w;\n\t\tt = getop(\"hideCalendarButtonParent\");\n\n\t\t$(\"#hideCalendarHover\").css(\"top\", t + \"px\");\n\t\t$(\"#hideCalendarHover\").css(\"left\", l + \"px\");\n\n\t}\n}", "handleInteliUiMenu() {\n //import InteliUI API to be able to communicate with the editor\n var inteliUiApi = new InteliUiApi();\n var container = $('#inteliUi-container');\n\n //start empty inteliUi\n $('#inteliui-start').click(() => {\n inteliUiApi.startEmptyInteliUi(container);\n });\n\n //start empty inteliUi\n $('#inteliui-start-and-open-file').click(() => {\n inteliUiApi.startInteliUiWithOptionFromFile(container);\n });\n\n $('#export-option').click(() => {\n inteliUiApi.getOptionFromWorkspace(container);\n });\n\n }", "function menu_standard() {\n\t$('#menu').removeClass('menu_reverse');\n\t$('.ico_home').removeClass('ico_home_reverse');\n\t$('.menu_child:not(.ico_home)').css('visibility', 'visible');\n}", "function showMainMenu(){\n addTemplate(\"menuTemplate\");\n showMenu();\n}", "menuButtonClicked() {}", "function menuSetup() {\n\t\t\tmenu.classList.remove(\"no-js\");\n\n\t\t\tmenu.querySelectorAll(\"ul\").forEach((submenu) => {\n\t\t\t\tconst menuItem = submenu.parentElement;\n\n\t\t\t\tif (\"undefined\" !== typeof submenu) {\n\t\t\t\t\tlet button = convertLinkToButton(menuItem);\n\n\t\t\t\t\tsetUpAria(submenu, button);\n\n\t\t\t\t\t// bind event listener to button\n\t\t\t\t\tbutton.addEventListener(\"click\", toggleOnMenuClick);\n\t\t\t\t\tmenu.addEventListener(\"keyup\", closeOnEscKey);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "function onMenuItemClick(p_sType, p_aArgs, p_oValue) {\n if (p_oValue == \"startVM\") \t{ \n\t\tYAHOO.vnode.container.dialog1.show()\n\t\tYAHOO.vnode.container.dialog1.focus()\n }\n\telse if (p_oValue == \"terminateVM\") {\n\t\tYAHOO.vnode.container.dialog2.show()\n\t\tYAHOO.vnode.container.dialog2.focus()\n }\n else if (p_oValue == \"stateVM\") {\n YAHOO.vnode.container.dialog3.show()\n\t\tYAHOO.vnode.container.dialog3.focus()\n }\n else if (p_oValue == \"upTimeVM\") {\n YAHOO.vnode.container.dialog4.show()\n\t\tYAHOO.vnode.container.dialog4.focus()\n }\n else if (p_oValue == \"startVG\") {\n YAHOO.vnode.container.dialog5.show()\n\t\tYAHOO.vnode.container.dialog5.focus()\n }\n else if (p_oValue == \"stateVG\") {\n YAHOO.vnode.container.dialog6.show()\n\t\tYAHOO.vnode.container.dialog6.focus()\n }\n else if (p_oValue == \"terminateVG\") {\n YAHOO.vnode.container.dialog7.show()\n\t\tYAHOO.vnode.container.dialog7.focus()\n }\n else if (p_oValue == \"adminPanel\") {\n if (checkPermission()) {\n YAHOO.vnode.container.dialog8.show()\n\t \tYAHOO.vnode.container.dialog8.focus()\n }\n else {\n alert(\"User is not allowed\")\n }\n }\n}", "function click_lyrMenu_조회(ui) {\n\n v_global.process.handler = processRetrieve;\n\n if (!checkUpdatable({})) return;\n\n processRetrieve({});\n\n }", "function click_lyrMenu_조회(ui) {\n\n if (ui.object == \"lyrMenu\" && ui.element == \"조회\") {\n var args = { target: [{ id: \"frmOption\", focus: true }] };\n gw_com_module.objToggle(args);\n } else {\n processRetrieve({});\n }\n\n }", "function qll_system_menu()\r\n{\r\n\tmenu = document.createElement(\"div\");\r\n\tmenu.setAttribute('id','QLLSMenu');\r\n\tmenu.setAttribute('name','QLLSMenu');\r\n\tdocument.getElementsByTagName(\"body\")[0].appendChild(menu);\r\n\t\r\n\th = document.createElement(\"div\");\r\n\th.setAttribute('id','QLLSMenuHolder_open');\r\n\th.setAttribute('class','QLLSMenuHolder');\r\n\th.innerHTML= '<div class=\"QLLSMenuMHeader\" id=\"QLLSMenuMHeader_open\">'+qll_lang[5]+'</div><div class=\"QLLSMenuContainer\" id=\"QLLSMenuContainer_open\"><div class=\"QLLSMenuHeader\" id=\"QLLSMenuHeader_open\">'+qll_lang[5]+'</div></div>';\r\n\th.setAttribute('onmouseover','document.getElementById(\"QLLSMenuContainer_open\").setAttribute(\"style\",\"display:block;\");');\r\n\th.setAttribute('onmouseout','document.getElementById(\"QLLSMenuContainer_open\").setAttribute(\"style\",\"display:none;\");');\r\n\tmenu.appendChild(h);\r\n\t$(\"#QLLSMenuHeader_open\").click(qll_menu);\r\n\r\n\tch = Number(document.getElementById(\"QLLSMenuContainer_open\").offsetHeight)+5;\r\n\tif(window.innerHeight-60 < ch) ch = Number(Number(window.innerHeight)-60);\r\n\tGM_addStyle(\"#QLLSMenuContainer_open {height:\"+ch+\"px;}\");\r\n\t$(\"#QLLSMenuContainer_open\").hide();\r\n\t\r\n\t\r\n\th = document.createElement(\"div\");\r\n\th.setAttribute('id','QLLSMenuHolder_info');\r\n\th.setAttribute('class','QLLSMenuHolder');\r\n\th.innerHTML= '<div class=\"QLLSMenuMHeader\" id=\"QLLSMenuMHeader_info\">'+qll_lang[82]+'</div><div class=\"QLLSMenuContainer\" id=\"QLLSMenuContainer_info\"><div class=\"QLLSMenuHeader\" id=\"QLLSMenuHeader_info\">'+qll_lang[82]+'</div></div>';\r\n\th.setAttribute('onmouseover','document.getElementById(\"QLLSMenuContainer_info\").setAttribute(\"style\",\"display:block;\");');\r\n\th.setAttribute('onmouseout','document.getElementById(\"QLLSMenuContainer_info\").setAttribute(\"style\",\"display:none;\");');\r\n\tmenu.appendChild(h);\r\n\t\r\n\tinfo = document.getElementById('QLLSMenuContainer_info');\r\n\tinfo.innerHTML = info.innerHTML + '<a class=\"QLLSMenuElement\" id=\"QLLSMenuElement_changelog\" href=\"#QLLSMenu\">'+qll_lang[18]+'</a> \\\r\n\t\t<a class=\"QLLSMenuElement\" href=\"http://www.erepublik.com/en/newspaper/186857/1\" target=\"_blank\">'+qll_lang[83]+'</a> \\\r\n\t\t<a class=\"QLLSMenuElement\" href=\"http://economy.erepublik.com/en/citizen/donate/1376818\" target=\"_blank\">'+qll_lang[84]+'</a>';\r\n\t$(\"#QLLSMenuElement_changelog\").click(function(){qll_fun_showDisplayBox(qll_lang[18], qll_serverURI + '/changelog', true);});\r\n\t\r\n\tch = Number(document.getElementById(\"QLLSMenuContainer_info\").offsetHeight)+5;\r\n\tif(window.innerHeight-60 < ch) ch = Number(Number(window.innerHeight)-60);\r\n\tGM_addStyle(\"#QLLSMenuContainer_info {height:\"+ch+\"px;}\");\r\n\t$(\"#QLLSMenuContainer_info\").hide();\r\n}", "function spellsMenu() {\n $scope.menuTitle = createText(\"Spells\", [20, 10]);\n createText(\"Not yet implemented\", [50, 80], {});\n }", "function onOpen(){\n var ui=SpreadsheetApp.getUi();\n var menu = ui.createMenu(\"FMV Tracker\");\n \n var labSubMenu = ui.createMenu(\"Labelers\");\n labSubMenu.addItem(\"Attempt\", \"showFormAttempt\");\n labSubMenu.addItem(\"R0\", \"showFormR0\");\n labSubMenu.addItem(\"R1\", \"showFormR1\");\n labSubMenu.addItem(\"R10\", \"showFormR10\");\n menu.addSubMenu(labSubMenu);\n\n var qaSubMenu = ui.createMenu(\"QA\");\n qaSubMenu.addItem(\"Tools\",\"showQAForm\");\n menu.addSubMenu(qaSubMenu);\n\n labSubMenu.addSeparator();\n menu.addSeparator();\n menu.addItem(\"Metrics\",\"viewMets\");\n menu.addSeparator();\n menu.addToUi();\n}" ]
[ "0.7617758", "0.72968394", "0.70223653", "0.695241", "0.693029", "0.68904614", "0.6844699", "0.6794213", "0.6769936", "0.67649275", "0.67300034", "0.6721052", "0.6720158", "0.67093915", "0.67083114", "0.670166", "0.66980916", "0.66859573", "0.66540426", "0.66423494", "0.6639634", "0.6598227", "0.65897846", "0.6544525", "0.65105057", "0.65052575", "0.6501052", "0.6492272", "0.6449325", "0.6440371", "0.6432184", "0.6412069", "0.641071", "0.63891983", "0.6387163", "0.6386984", "0.63750964", "0.6367558", "0.6366553", "0.635081", "0.63497925", "0.63477993", "0.6346096", "0.6345075", "0.6324866", "0.6317029", "0.6312766", "0.6291639", "0.6289246", "0.62854284", "0.62778723", "0.6277672", "0.6270542", "0.6260005", "0.625491", "0.6246829", "0.62431276", "0.6240025", "0.6239477", "0.6236302", "0.62329704", "0.62242556", "0.62238353", "0.62218237", "0.6216158", "0.6211759", "0.62090784", "0.62033933", "0.61968887", "0.6193075", "0.61884624", "0.61873513", "0.6185833", "0.6182726", "0.6181775", "0.6180871", "0.6168163", "0.6166805", "0.6166413", "0.61662006", "0.61617553", "0.6156527", "0.6156223", "0.6156144", "0.61493397", "0.6148794", "0.6144125", "0.614349", "0.6139409", "0.6137989", "0.6136341", "0.6133374", "0.61333185", "0.61309206", "0.6129724", "0.6128184", "0.61272615", "0.61257184", "0.6124175", "0.61233044" ]
0.6867202
6
= Hot chick sidebar display =
function qll_module_hotchicks_sidebar() { if(!qll_GMSupport) { return; } object = document.createElement("div"); object.setAttribute('class', 'QLLBoxModHotChicks'); object.setAttribute('id', 'QLLBoxModHotChicks'); object.innerHTML="<img class='QLLIMGLoading' src='" + qll_loadingImg + "'>"; adv=document.getElementById('eads'); adv.parentNode.insertBefore(object,adv); GM_xmlhttpRequest( { method: 'GET', url: qll_serverURI + '/modules/hotchicks/request.php', onload:function(responseDetails) { var responseText = responseDetails.responseText; uri=responseText.substring(responseText.lastIndexOf("http")); obj=document.getElementById('QLLBoxModHotChicks'); obj.innerHTML = "<img alt='" + uri + "' src='" + uri + "' border='0'>"; $("#QLLBoxModHotChicks").click(function(){qll_fun_showDisplayBox(qll_lang[19], "<a href='" + uri + "' target='_blank'><img alt='" + uri + "' src='" + uri + "' border='0'></a>");}); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sidebar() {\n\tif (!hasClass(document.getElementById('main'), 'nosidebar')) {\n\t\tvar c = document.getElementById('content').getElementsByTagName('div')[0];\n\t\tif (!hasClass(c, 'contextual')) {\n\t\t\t$(document.getElementById('content')).insert({top: '<div class=\"contextual\"></div>'});\n\t\t\tc = document.getElementById('content').getElementsByTagName('div')[0];\n\t\t}\n\t\tvar m = $(document.createElement('a'));\n\t\tm.href = '#sidebar';\n\t\tm.className = 'icon icon-meta';\n\t\tm.innerText = 'Meta';\n\t\tc.appendChild(m);\n\t\tmoveNode('sidebar', 'main');\n\t}\n}", "function showSidebar1() {\n showSidebar('Brand', 'New Brand');\n }", "function defaultsideBarView(){\n\tvar sidebar = document.getElementById('template5');\n\tvar aside = getSideBar();\n\thtml = sidebar.innerHTML;\n\taside.innerHTML = html;\n}", "function redraw_sidebar(){\n\n}", "function hideOrShowMenus(){\n\tresizeSidebar(\"menu\");\n}", "function HB_Element_Sidebar() {\n\t \t$( '.hb-sidebar .icon-sidebar' ).click( function() {\n\t\t\t// Add class active\n\t\t\t$(this).closest( '.hb-sidebar' ).addClass( 'active' );\n\t\t\t$( 'html' ).addClass( 'no-scroll' );\n\t\t} );\n\n\t \t$( '.hb-sidebar .content-sidebar > .overlay' ).click( function() {\n\t\t\t// Remove class active\n\t\t\t$(this).closest( '.hb-sidebar' ).removeClass( 'active' );\n\t\t\t$( 'html' ).removeClass( 'no-scroll' );\n\t\t} );\n\t }", "function SideBarRight() { return (\r\n <div class=\"container-fluid1\">\r\n <ul class=\"list-sidebar bg-defoult\">\r\n <h3 class=\"activity\"><b>Friends Activity</b></h3>\r\n\r\n <h6 class=\"connect\">Connect with Facebook to see what your friends are playing.</h6>\r\n <div class=\"btn\">\r\n <button type=\"button\" class=\"btn btn-primary\" href=\"https://www.facebook.com/\">📱 Connect With Facebook.</button>\r\n </div>\r\n <p class=\"paragraph\">We'll never post anything without your permission. Show and hide Friend Activity from Settings.</p>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n <div class=\"strain\"></div>\r\n</ul>\r\n </div>\r\n )\r\n }", "w3_open() {\n var x = document.getElementById(\"mySidebar\");\n \n\n x.style.width = \"300px\";\n x.style.paddingTop = \"10%\";\n x.style.display = \"block\";\n \n }", "function showSidebar() {\n var ui = HtmlService.createHtmlOutputFromFile('index')\n .setTitle('UNC MTC Simplifier');\n DocumentApp.getUi().showSidebar(ui);\n}", "function w3_open() {\r\n document.getElementById(\"mySidebar\").style.display = \"block\";\r\n}", "function showSidebar() {\n\t\tif (body.className.match(/show-sidebar/g)) {\n\t\t\tbody.classList.remove('show-sidebar');\n\t\t} else {\n\t\t\tbody.classList.add('show-sidebar');\n\t\t}\n\t}", "function showSidebar() {\n $('body').removeClass('sidebar-hidden');\n $.cookie('sidebar-pref', null, {\n expires: 30\n });\n }", "function Sidebar() {\n return _structureBuilder.default.list().title(\"Slick's Slices\").items([// create new sub item\n _structureBuilder.default.listItem().title('Home Page').icon(() => /*#__PURE__*/_react.default.createElement(\"strong\", null, \"\\uD83D\\uDD25\")).child(_structureBuilder.default.editor().schemaType('storeSettings') // make a new document ID, so we don't have a random string of numbers\n .documentId('downtown')), // add in the rest of our document items\n ..._structureBuilder.default.documentTypeListItems().filter(item => item.getId() !== 'storeSettings')]);\n}", "function w3_open() \n{\n \n if (document.getElementById(\"mySidebar\").style.display === 'block')\n {\n document.getElementById(\"mySidebar\").style.display = 'none';\n } \n else\n {\n\t\tdocument.getElementById(\"mySidebar\").style.display = 'block';\n }\n}", "function w3_open() {\n var x = document.getElementById(\"mySidebar\");\n x.style.width = \"300px\";\n x.style.paddingTop = \"10%\";\n x.style.display = \"block\";\n }", "function w3_open() {\n document.getElementById('portSidebar').style.display = 'block';\n}", "function toggleSidebar() {\n $('.ui.sidebar').sidebar('setting','dimPage',false)\n .sidebar('toggle');\n;\n}", "function showSidebar() {\n var github = getGithub();\n if (!github.hasAccess()) {\n showGithubAuthFlow(github);\n } else {\n var page = HtmlService.createTemplateFromFile(\"Sidebar\")\n .evaluate()\n .setTitle(c.title)\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n DocumentApp.getUi().showSidebar(page);\n }\n}", "function showGaugeSidebar() {\n \n var htmlOutput = HtmlService.createHtmlOutputFromFile('GaugeSidebar.html')\n\n htmlOutput.setTitle('Cells Used'); \n\n SpreadsheetApp.getUi().showSidebar(htmlOutput);\n}", "function Sidebar() {\n return (\n\n <div className=\"sidebar\">\n <h5>IMPEKABLE</h5>\n <ul className=\"side-contents\">\n <li><a className=\"side-text\" ><i className=\"fa fa-home\"></i> Home</a></li>\n <li className=\"active\"><a className=\"side-text\" ><i className=\"fa fa-bar-chart\"></i> Dashboard</a></li>\n <li><a className=\"side-text\"><i className=\"fa fa-envelope\"></i> Inbox</a></li>\n <li><a className=\"side-text\"><i className=\"fa fa-barcode\"></i> Products</a></li>\n </ul>\n\n </div>\n\n )\n}", "function initServerviewSidebar(id) {\n document.getElementsByClassName('main-title')[0].innerHTML = ``;\n document.getElementsByClassName('title')[0].innerHTML = `Server ${id}`;\n document.getElementsByClassName('info')[0].remove();\n document.getElementsByClassName('preview')[0].remove();\n\n var info = document.createElement('div');\n info.className = 'info';\n info.style.overflowY = 'scroll';\n info.style.height = '85vh';\n info.style.marginBottom = '2vh';\n\n document.getElementsByClassName('sidebar')[0].appendChild(info);\n\n servers.transition() \n .duration(1000)\n .style('opacity', 0)\n .remove()\n .call(endAll, initPlayerList, id);\n}", "function Sidebar() {\n let sidebar = document.getElementById('sidenavbar');\n sidebar.classList.toggle('isOpen');\n let grid = document.getElementById('grid-container');\n grid.classList.toggle('no_sidenavbar');\n}", "function showSidebar() {\n Plugins.init();\n \n var template = HtmlService.createTemplateFromFile('sidebar/index');\n \n // Print list of icons\n template['iconList'] = JSON.stringify(IconLists);\n \n // Apply config to template\n for (var key in app.sidebarConfig) {\n template[key] = app.sidebarConfig[key];\n }\n \n // Display sidebar\n var sidebarUi = template.evaluate().setTitle('Insert icons');\n app.getUi().showSidebar(sidebarUi);\n}", "function showSidebar() {\n var ui = HtmlService.createTemplateFromFile('Explorer')\n .evaluate()\n .setTitle(SIDEBAR_TITLE)\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function simulationSideBarView(){\n\tvar sidebar = document.getElementById('template9');\n\tvar aside = getSideBar();\n\taside.innerHTML = sidebar.innerHTML;\n}", "function doIt() {\n\n\n\n\t//// Feature #1 : Hide the sidebar. Fullsize the content.\n\n\t// Toggle the sidebar by clicking the \"page background\" (empty space outside\n\t// the main content). Sometimes clicking the content background is enough.\n\n\tif (toggleSidebar) {\n\n\t\tvar content = document.getElementById(\"content\")\n\t\t\t|| document.getElementById(\"column-content\");\n\t\tvar sideBar = document.getElementById(\"column-one\")\n\t\t\t|| document.getElementById(\"panel\")\n\t\t\t|| /* WikiMedia: */ document.getElementById(\"mw-panel\")\n\t\t\t|| /* forgot: */ document.getElementById(\"jq-interiorNavigation\")\n\t\t\t|| /* pmwiki: */ document.getElementById('wikileft');\n\t\tvar toToggle = [ document.getElementById(\"page-base\"), document.getElementById(\"siteNotice\"), document.getElementById(\"head\") ];\n\t\tvar cac = document.getElementById(\"p-cactions\");\n\t\tvar cacOldHome = ( cac ? cac.parentNode : null );\n\n\t\tfunction toggleWikipediaSidebar(evt) {\n\n\t\t\t// We don't want to act on all clicked body elements (notably not the WP\n\t\t\t// image). I detected two types of tag we wanted to click.\n\t\t\t/*if (!evt || evt.target.tagName == \"UL\" || evt.target.tagName == \"DIV\") {*/\n\n\t\t\t// That was still activating on divs in the content! (Gaps between paragraphs.)\n\t\t\t// This only acts on the header area.\n\t\t\tvar thisElementTogglesSidebar;\n\t\t\tvar inStartup = (evt == null);\n\t\t\tif (inStartup) {\n\t\t\t\tthisElementTogglesSidebar = true;\n\t\t\t} else {\n\t\t\t\tvar elem = evt.target;\n\t\t\t\tvar clickedHeader = (elem.id == 'mw-head');\n\t\t\t\t// For wikia.com:\n\t\t\t\tclickedHeader |= (elem.id==\"WikiHeader\");\n\t\t\t\t// For Wikimedia:\n\t\t\t\tvar clickedPanelBackground = elem.id == 'mw-panel' || elem.className.indexOf('portal')>=0;\n\t\t\t\tclickedPanelBackground |= elem.id == 'column-content'; // for beebwiki (old mediawiki?)\n\t\t\t\t// Hopefully for sites in general. Allow one level below body. Needed for Wikia's UL.\n\t\t\t\tvar clickedAreaBelowSidebar = (elem.tagName == 'HTML' || elem.tagName == 'BODY');\n\t\t\t\tvar clickedBackground = (elem.parentNode && elem.parentNode.tagName == \"BODY\");\n\t\t\t\tthisElementTogglesSidebar = clickedHeader || clickedPanelBackground || clickedAreaBelowSidebar || clickedBackground;\n\t\t\t}\n\t\t\tif (thisElementTogglesSidebar) {\n\n\t\t\t\tif (evt)\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\tif (debug) { GM_log(\"evt=\",evt); }\n\t\t\t\t// if (evt) GM_log(\"evt.target.tagName=\"+evt.target.tagName);\n\t\t\t\t/* We put the GM_setValue calls on timers, so they won't slow down the rendering. */\n\t\t\t\t// Make the change animate smoothly:\n\t\t\t\tcontent.style.transition = 'all 150ms ease-in-out';\n\t\t\t\tif (sideBar) {\n\t\t\t\t\tif (sideBar.style.display == '') {\n\t\t\t\t\t\t// Wikipedia's column-one contains a lot of things we want to hide\n\t\t\t\t\t\tsideBar.style.display = 'none';\n\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\tcontent.oldMarginLeft = content.style.marginLeft;\n\t\t\t\t\t\t\tcontent.style.marginLeft = minimisedSidebarSize+'px';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (var i in toToggle) {\n\t\t\t\t\t\t\tif (toToggle[i]) { toToggle[i].style.display = 'none'; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// but one of them we want to preserve\n\t\t\t\t\t\t// (the row of tools across the top):\n\t\t\t\t\t\tif (cac)\n\t\t\t\t\t\t\tsideBar.parentNode.insertBefore(cac,sideBar.nextSibling);\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\tGM_setValue(\"sidebarVisible\",false);\n\t\t\t\t\t\t},200);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfunction unhide() {\n\t\t\t\t\t\t\tsideBar.style.display = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetTimeout(unhide,delayUnhide);\n\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\tcontent.style.marginLeft = content.oldMarginLeft;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (var i in toToggle) {\n\t\t\t\t\t\t\tif (toToggle[i]) { toToggle[i].style.display = ''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (cac && cacOldHome)\n\t\t\t\t\t\t\tcacOldHome.appendChild(cac); // almost back where it was :P\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\tGM_setValue(\"sidebarVisible\",true);\n\t\t\t\t\t\t},200);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\t// log(\"sideBar=\"+sideBar+\" and content=\"+content);\n\t\tif (sideBar) {\n\t\t\t// We need to watch window for clicks below sidebar (Chrome).\n\t\t\tdocument.documentElement.addEventListener('click',toggleWikipediaSidebar,false);\n\t\t} else {\n\t\t\tlog(\"Did not have sideBar \"+sideBar+\" or content \"+content); // @todo Better to warn or error?\n\t\t}\n\n\t\tif (!GM_getValue(\"sidebarVisible\",true)) {\n\t\t\ttoggleWikipediaSidebar();\n\t\t}\n\n\t\t// TODO: Make a toggle button for it!\n\n\t\t// Fix for docs.jquery.com:\n\t\t/*\n\t\tvar j = document.getElementById(\"jq-primaryContent\");\n\t\tif (j) {\n\t\t\tj.style.setAttribute('display', 'block');\n\t\t\tj.style.setAttribute('float', 'none');\n\t\t\tj.style.setAttribute('width', '100%');\n\t\t}\n\t\t*/\n\t\tGM_addStyle(\"#jq-primaryContent { display: block; float: none; width: 100%; }\");\n\n\t}\n\n\n\n\t//// Feature #2: Make Table of Contents float\n\n\tif (makeTableOfContentsFloat) {\n\n\t\t/* @consider If the TOC has a \"Hide/Show\" link (\"button\") then we could\n\t\t * fire that instead of changing opacity.\n\t\t */\n\n\t\t// document.getElementById('column-one').appendChild(document.getElementById('toc'));\n\n\t\t// createFader basically worked but was a little bit buggy. (Unless the bugs were caused by conflict with other TOC script.)\n\t\t// Anyway createFader() has now been deprecated in favour of CSS :hover.\n\n\t\tfunction createFader(toc) {\n\n\t\t\tvar timer = null;\n\n\t\t\t// BUG: this didn't stop the two fades from conflicting when the user wiggles the mouse to start both!\n\t\t\tfunction resetTimeout(fn,ms) {\n\t\t\t\tif (timer) {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t}\n\t\t\t\tsetTimeout(fn,ms);\n\t\t\t}\n\n\t\t\tfunction fadeElement(elem,start,stop,speed,current) {\n\t\t\t\tif (current == null)\n\t\t\t\t\tcurrent = start;\n\t\t\t\tif (speed == null)\n\t\t\t\t\tspeed = (stop - start) / 8;\n\t\t\t\tif (Math.abs(current+speed-stop) > Math.abs(current-stop))\n\t\t\t\t\tcurrent = stop;\n\t\t\t\telse\n\t\t\t\t\tcurrent = current + speed;\n\t\t\t\telem.style.opacity = current;\n\t\t\t\tif (current != stop)\n\t\t\t\t\tresetTimeout(function(){fadeElement(elem,start,stop,speed,current);},50);\n\t\t\t}\n\n\t\t\ttoc.style.opacity = 0.3;\n\t\t\tvar listenElement = toc;\n\t\t\t// var listenElement = toc.getElementsByTagName('TD')[0];\n\t\t\tvar focused = false;\n\t\t\tvar visible = false;\n\t\t\tlistenElement.addEventListener('mouseover',function(){\n\t\t\t\tif (!visible)\n\t\t\t\t\tsetTimeout(function(){ if (focused) { visible=true; fadeElement(toc,0.4,1.0,0.2); } },10);\n\t\t\t\tfocused = true;\n\t\t\t},false);\n\t\t\tlistenElement.addEventListener('mouseout',function(){\n\t\t\t\tif (visible)\n\t\t\t\t\tsetTimeout(function(){ if (!focused) { visible=false; fadeElement(toc,1.0,0.2,-0.1); } },10);\n\t\t\t\tfocused = false;\n\t\t\t},false);\n\n\t\t}\n\n\n\t\tfunction tryTOC() {\n\n\t\t\t// Find the table of contents element:\n\t\t\tvar toc = document.getElementById(\"toc\") /* MediaWiki */\n\t\t\t\t\t || document.getElementsByClassName(\"table-of-contents\")[0] /* BashFAQ */\n\t\t\t\t\t || document.getElementsByClassName(\"toc\")[0] /* LeakyTap */\n\t\t\t\t\t || document.getElementsByClassName(\"wt-toc\")[0]; /* Wikitravel */\n\n\t\t\tif (toc) {\n\n\t\t\t\taddButtonsConditionally(toc);\n\n\t\t\t\t// toc.style.backgroundColor = '#eeeeee';\n\t\t\t\t// alert(\"doing it!\");\n\t\t\t\ttoc.style.position = 'fixed';\n\t\t\t\ttoc.style.right = '16px';\n\t\t\t\t// toc.style.top = '16px';\n\t\t\t\t// A healthy gap from the top allows the user to access things fixed in the top right of the page, if they can scroll finely enough.\n\t\t\t\t// toc.style.top = '24px';\n\t\t\t\t//toc.style.right = '4%';\n\t\t\t\t//toc.style.top = '10%';\n\t\t\t\ttoc.style.right = '4px';\n\t\t\t\ttoc.style.top = '84px'; // We want to be below the search box!\n\t\t\t\t// toc.style.left = '';\n\t\t\t\t// toc.style.bottom = '';\n\t\t\t\ttoc.style.zIndex = '5000';\n\t\t\t\t// fadeElement(toc,1.0,0.4);\n\t\t\t\t// This might work for a simple toc div\n\t\t\t\ttoc.style.maxHeight = \"80%\";\n\t\t\t\ttoc.style.maxWidth = \"32%\";\n\n\t\t\t\t/* \n\t\t\t\t * Sometimes specifying max-height: 80% does not work, the toc won't shrink.\n\t\t\t\t * This may be when it's a table and not a div. Then we must set max-height on the content. (Maybe we don't actually need to set pixels if we find the right element.)\n\t\t\t\t */\n\t\t\t\ttoc.id = \"toc\";\n\t\t\t\tvar maxHeight = window.innerHeight * 0.8 | 0;\n\t\t\t\tvar maxWidth = window.innerWidth * 0.4 | 0;\n\n\t\t\t\t/*\n\t\t\t\t * WikiMedia tree looks like this: <table id=\"toc\" class=\"toc\"><tbody><tr><td><div id=\"toctitle\"><h2>Contents</h2>...</div> <ul> <li class=\"toclevel-1 tocsection-1\">\n\t\t\t\t Here is a long TOC: http://mewiki.project357.com/wiki/X264_Settings#Input.2FOutput\n\t\t\t\t */\n\t\t\t\t// GM_addStyle(\"#toc ul { overflow: auto; max-width: \"+maxWidth+\"px; max-height: \"+maxHeight+\"px; }\");\n\t\t\t\tvar rootUL = toc.getElementsByTagName(\"UL\")[0];\n\t\t\t\tif (!rootUL)\n\t\t\t\t\trootUL = toc;\n\t\t\t\t// DONE: If we can cleanly separate them, we might want to put a scrollbar on the content element, leaving the title outside it.\n\t\t\t\trootUL.style.overflow = \"auto\";\n\t\t\t\trootUL.style.maxWidth = maxWidth+'px';\n\t\t\t\trootUL.style.maxHeight = maxHeight+'px';\n\n\t\t\t\t// But if calc and vh are available, then we can make it adaptive\n\t\t\t\t// Of this 132px, 84px comes from the 'top', and the rest comes from the toc title and padding.\n\t\t\t\trootUL.style.maxHeight = \"calc(100vh - 128px)\";\n\n\t\t\t\t// Slide up into the corner as the page scrolls\n\t\t\t\twindow.addEventListener('scroll', checkSize);\n\t\t\t\twindow.addEventListener('resize', checkSize);\n\t\t\t\t\n\t\t\t\tfunction checkSize () {\n\t\t\t\t\tvar top = Math.min(84, Math.max(4, 84 - document.body.scrollTop));\n\t\t\t\t\tdocument.getElementById('toc').style.top = top + 'px';\n\t\t\t\t\trootUL.style.maxHeight = (window.innerHeight - top - 44) + 'px';\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\tcreateFader(toc);\n\t\t\t\t*/\n\t\t\t\t//// Alternative rules from table_of_contents_everywhere script:\n\t\t\t\ttoc.id = \"toc\";\n\t\t\t\t// GM_addStyle(\"#toc { position: fixed; top: 10%; right: 4%; background-color: white; color: black; font-weight: normal; padding: 5px; border: 1px solid grey; z-index: 5555; max-height: 80%; overflow: auto; }\");\n\t\t\t\tGM_addStyle(\"#toc { opacity: 0.2; }\");\n\t\t\t\tGM_addStyle(\"#toc:hover { opacity: 1.0; }\");\n\n\t\t\t\tvar tocID = \"toc\";\n\t\t\t\tvar resetProps = \"\";\n\t\t\t\t// This is a clone of the code in table_of_contents_everyw.user.js\n\t\t\t\tGM_addStyle(\n\t\t\t\t\t \"#\"+tocID+\" {\"\n\t\t\t\t\t+ \" position: fixed;\"\n\t\t\t\t\t+ \" top: 84px;\"\n\t\t\t\t\t+ \" right: 4px;\"\n\t\t\t\t\t+ \" background-color: #f4f4f4;\"\n\t\t\t\t\t+ \" color: black;\"\n\t\t\t\t\t+ \" font-weight: normal;\"\n\t\t\t\t\t+ \" padding: 5px;\"\n\t\t\t\t\t//+ \" border: 1px solid grey;\"\n\t\t\t\t\t+ \" z-index: 9999999;\"\n\t\t\t\t\t+ \" \"+resetProps\n\t\t\t\t\t+ \"}\"\n\t\t\t\t\t+ \"#\"+tocID+\" { opacity: 0.3; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" { border: 1px solid #0003; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" { border-radius: 3px; }\"\n\t\t\t\t\t+ \"#\"+tocID+\":hover { box-shadow: 0px 2px 12px 0px rgba(0,0,0,0.1); }\"\n\t\t\t\t\t+ \"#\"+tocID+\":hover { -webkit-box-shadow: 0px 2px 12px 0px rgba(0,0,0,0.1); }\"\n\t\t\t\t\t+ \"#\"+tocID+\":hover { opacity: 1.0; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" > * > * { opacity: 0.0; }\"\n\t\t\t\t\t+ \"#\"+tocID+\":hover > * > * { opacity: 1.0; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" , #\"+tocID+\" > * > * { transition: opacity; transition-duration: 400ms; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" , #\"+tocID+\" > * > * { -webkit-transition: opacity; -webkit-transition-duration: 400ms; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" { padding: 0; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" > div { padding: 4px 12px; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" > ul { padding: 0px 12px 2px 12px; margin-top: 0; }\"\n\t\t\t\t);\n\n\t\t\t\t// For Wikia (tested in Chrome):\n\t\t\t\tif (getComputedStyle(toc)[\"background-color\"] == \"rgba(0, 0, 0, 0)\") {\n\t\t\t\t\ttoc.style.backgroundColor = 'white';\n\t\t\t\t}\n\n\t\t\t\tcheckSize();\n\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// Ideally we want to act before # anchor position occurs, but we may\n\t\t// need to wait for the toc if it is not added to the DOM until later.\n\t\tif (!tryTOC()) {\n\t\t\tsetTimeout(tryTOC,400);\n\t\t}\n\n\t}\n\n\n\n\t// In case you have * in your includes, only continue for pages which have\n\t// \"wiki\" before \"?\" in the URL, or who have both toc and content elements.\n\tvar isWikiPage = document.location.href.split(\"?\")[0].match(\"wiki\")\n\t\t|| ( document.getElementById(\"toc\") && document.getElementById(\"content\") );\n\n\tif (!isWikiPage)\n\t\treturn;\n\n\n\n\t// Delay. Feature 3 and 4 can run a bit later, without *too* much page\n\t// change, but with significant processor saving!\n\tsetTimeout(function(){\n\n\n\n\t//// Feature #3 : Indent the blocks so their tree-like structure is visible\n\n\t// Oct 2012: Disabled - was making a right mess of the header/nav on Wikia\n\tif (document.location.host.match(/wikia.com/)) {\n\t\tindentSubBlocks = false;\n\t}\n\n\tif (indentSubBlocks) {\n\n\t\tfunction indent(tag) {\n\t\t\t// By targetting search we avoid indenting any blocks in left-hand-column (sidebar).\n\t\t\tvar whereToSearch = document.getElementById('bodyContent') || document.getElementById('content') || document.getElementById('WikiaMainContent') || document.body;\n\t\t\tvar elems = whereToSearch.getElementsByTagName(tag);\n\t\t\tif (elems.length == 1)\n\t\t\t\treturn;\n\t\t\t// for (var i=0;i<elems.length;i++) {\n\t\t\tfor (var i=elems.length;i-->0;) {\n\t\t\t\tvar elem = elems[i];\n\t\t\t\t/* Don't fiddle with main heading, siteSub, or TOC. */\n\t\t\t\tif (elem.className == 'firstHeading')\n\t\t\t\t\tcontinue;\n\t\t\t\tif (elem.id == 'siteSub')\n\t\t\t\t\tcontinue;\n\t\t\t\tif (elem.textContent == 'Contents')\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// We have found a \"heading\" element. Every sibling after this\n\t\t\t\t// element should be indented a bit.\n\n\t\t\t\t//// Current method of indenting: Create a UL and put everything\n\t\t\t\t//// inside that.\n\t\t\t\t// var newChild = document.createElement('blockquote');\n\t\t\t\t//// Unfortunately blockquotes tend to indent too much!\n\t\t\t\t// var newChild = document.createElement('DIV');\n\t\t\t\t//var newChild = document.createElement('UL'); // UL works better with my Folding script, but we must not do this to the TOC!\n\t\t\t\tvar newChild = document.createElement('div'); // <ul>s look wrong on bitbucket wikis (indent too much). And since I haven't used my folding script recently, I am switching back to a nice <div>.\n\t\t\t\tnewChild.style.marginLeft = '1.0em';\n\t\t\t\tvar toAdd = elem.nextSibling;\n\t\t\t\twhile (toAdd && toAdd.tagName != tag) {\n\t\t\t\t\t// That last condition means a h3 might swallow an h2 if they\n\t\t\t\t\t// are on the same level! But it *should* swallow an h4.\n\t\t\t\t\t// TODO: We should break if we encounter any marker with level\n\t\t\t\t\t// above or equal to our own, otherwise continue to swallow.\n\t\t\t\t\tvar next = toAdd.nextSibling;\n\t\t\t\t\tnewChild.appendChild(toAdd);\n\t\t\t\t\ttoAdd = next;\n\t\t\t\t}\n\t\t\t\telem.parentNode.insertBefore(newChild,elem.nextSibling);\n\n\t\t\t\t// CONSIDER: Alternative: Do not swallow at all, do not create\n\t\t\t\t// newChild and change the page's tree. Just modify\n\t\t\t\t// style.marginLeft, resetting it if an incompatible element style\n\t\t\t\t// already exists there, updating it if we have already indented\n\t\t\t\t// this element!\n\n\t\t\t\t// GM_log(\"Placed \"+newChild+\" after \"+elem);\n\t\t\t}\n\t\t}\n\n\t\tindent(\"H1\"); indent(\"H2\"); indent(\"H3\"); indent(\"H4\"); indent(\"H5\"); indent(\"H6\");\n\n\t}\n\n\n\n\t//// Feature #4: Change underlined headings to overlined headings.\n\n\tif (fixUnderlinesToOverlines) {\n\n\t\t// Hide any existing underlines\n\t\t// I made this !important to defeat the more specific `.markdown-body h*` rules on GitHub wikis.\n\t\tGM_addStyle(\"h1, h2, h3, h4, h5, h6 { border-bottom: 0 !important; }\");\n\n\t\t// Add our own overlines instead\n\t\tGM_addStyle(\"h1, h2, h3, h4, h5, h6 { border-top: 1px solid #AAAAAA; }\");\n\n\t\t// Do not use `text-decoration: underline;`. It will only appear as wide as the text (not filling the page width) and will make the text look like a hyperlink!\n\n\t}\n\n\n\n\t},1000);\n\n\n\n\n} // end doIt", "function w3_open() {\n var mySidebar = document.getElementById(\"mySidebar\");\n if (mySidebar.style.display === 'block') {\n mySidebar.style.display = 'none';\n } else {\n mySidebar.style.display = 'block';\n }\n}", "function w3_open() {\n\tvar mySidebar = document.getElementById(\"mySidebar\");\n if (mySidebar.style.display === 'block') {\n\t\tmySidebar.style.display = 'none';\n\t} else {\n\t\tmySidebar.style.display = 'block';\n\t}\n}", "function showSidebar() {\n var ui = HtmlService.createTemplateFromFile('Sidebar')\n .evaluate()\n .setTitle(SIDEBAR_TITLE);\n DocumentApp.getUi().showSidebar(ui);\n}", "function showSidebar() {\n var ui = HtmlService.createTemplateFromFile('Sidebar')\n .evaluate()\n .setTitle(SIDEBAR_TITLE)\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function showSidebar() {\n var ui = HtmlService.createTemplateFromFile('Sidebar')\n .evaluate()\n .setTitle(SIDEBAR_TITLE)\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function displaySidebar(){\n var w = document.documentElement.clientWidth;\n\n var toggleButton = document.getElementById(\"openNav\");\n var main = document.getElementById(\"main\");\n var sidebar = document.getElementById(\"mySidebar\");\n var navbar = document.getElementById(\"navbar\");\n\n if(w >= 993) {\n\n main.style.marginLeft = \"300px\";\n sidebar.style.width = \"300px\";\n sidebar.style.display = \"block\";\n navbar.classList.add('w3-hide-large');\n }\n \n}", "function render(evt) {\n var currentPage = typeof evt !== 'undefined' ? evt.detail.page : phonon.navigator().currentPage;\n var pageEl = document.querySelector(currentPage);\n var tabs = pageEl.querySelector('[data-tab-contents=\"true\"]');\n var i = sidePanels.length - 1;\n\n for (; i >= 0; i--) {\n var sb = sidePanels[i];\n var exposeAside = sb.el.getAttribute('data-expose-aside');\n\n if (sb.pages.indexOf(currentPage) === -1) {\n sb.el.style.display = 'none';\n sb.el.style.visibility = 'hidden';\n } else {\n // Is this page drag disabled\n var dragDisabled = sb.nodrag.indexOf(currentPage) >= 0; // #90: update the snapper according to the page\n\n sb.snapper.settings({\n element: pageEl\n });\n sb.el.style.display = 'block';\n sb.el.style.visibility = 'visible'; // If tabs are present, disable drag, then setup\n\n if (tabs) {\n sidePanels[i].snapper.disable();\n } // Expose side bar\n\n\n if (exposeAside === 'left' || exposeAside === 'right') {\n if (!pageEl.classList.contains(\"expose-aside-\".concat(exposeAside))) {\n pageEl.classList.add(\"expose-aside-\".concat(exposeAside));\n }\n } // On tablet, the sidebar is draggable only if it is not exposed on a side\n\n\n if (!isPhone) {\n if (!tabs && exposeAside !== 'left' && exposeAside !== 'right') {\n sb.snapper.settings({\n touchToDrag: !dragDisabled\n });\n sb.snapper.enable();\n } else {\n sb.snapper.settings({\n touchToDrag: false\n });\n sb.snapper.disable();\n }\n } // On phone, the sidebar is draggable only if tabs are not present\n\n\n if (!tabs && isPhone) {\n sb.snapper.settings({\n touchToDrag: !dragDisabled\n });\n sb.snapper.enable();\n }\n }\n }\n }", "function showSidebar() {\n var ui = HtmlService.createHtmlOutputFromFile('sidebar')\n .setTitle('Explain Formula');\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function sidebar(){\r\n\t\tvar sidebar = document.getElementById(\"side-bar\");\r\n\t\tsidebar.style.display=\"block\";\r\n\t\tsidebar.style.animation = \"sidebar 0.2s\";\r\n\t\tsidebar.style.animationFillMode = \"forwards\";\r\n\t}", "function loadCourseStatusSidebar() {\n var html = HtmlService.createHtmlOutputFromFile('courseStatusSidebar').setTitle('U3A Tools')\n SpreadsheetApp.getUi().showSidebar(html)\n}", "function showSidebar() {\n var ui = HtmlService.createHtmlOutputFromFile('sidebar')\n .setTitle('Workbook.open');\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function showSidebar() {\n var ui = HtmlService.createHtmlOutputFromFile('sidebar').setTitle(ADDON_TITLE);\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function toggleSidebar() {\n // Note: The remove and add classes are important to make sure this works when you change from small to large\n // screen and vice versa after clicking the sidebar.\n if ($(window).width() < 1024) {\n // Mobile view\n $sidebar\n .removeClass(sidebarClosedState)\n .addClass('lg:sp-w-72')\n .toggleClass('sp-w-72 sm:sp-w-72 sm:sp-w-8 ' + sidebarOpenState);\n\n $sidebar.find('.sp-toggle-sidebar')\n .addClass('lg:sp-ml-72')\n .toggleClass('sp-ml-72 sm:sp-ml-72 sm:sp-ml-8');\n } else {\n // Desktop view\n $sidebar\n .removeClass('sp-w-72 sm:sp-w-72 ' + sidebarOpenState)\n .toggleClass('lg:sp-w-72 ' + sidebarClosedState);\n\n $sidebar.find('.sp-toggle-sidebar')\n .removeClass('sp-ml-72 sm:sp-ml-72')\n .toggleClass('lg:sp-ml-72');\n }\n }", "function showTopicInSideBar(topicId, dontUpdateHistoryState) {\n // sideBar related stuff\n //\n var handler = jQuery(\"#sideBarCategories\");\n handler.empty();\n jQuery(\"#progContainer\").show(\"fast\");\n // do ajax topicbean GET and render results into the given container\n // Topic ID, jQuery (DOM) Element, Browser History\n getGeoObjectInfo(topicId, handler, dontUpdateHistoryState);\n //\n /** var topicFeature = checkDrawnFeaturesForTopicId(topicId);\n if ( topicFeature != null ) {\n topicFeature.renderIntent = \"select\";\n myNewLayer.redraw();\n // topi undrawn but infowMarker is still there, which is OK\n showInfoWindowForMarker(topicFeature.data);\n } */\n }", "function sidebarToggleVisibility() {\n this.hideSidebar();\n this.hideSidebarByCookieValue();\n}", "function w3_open() {\n document.getElementById(\"mySidebar\").style.width = \"100%\";\n document.getElementById(\"mySidebar\").style.display = \"block\";\n}", "function showMediaInfoSidebar() {\n $rightSideBar.removeClass('d-none');\n }", "function showSidebar() {\n var ui = HtmlService.createHtmlOutputFromFile('Sidebar')\n .setTitle('Kirby Export')\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n DocumentApp.getUi().showSidebar(ui);\n}", "function showCatInSideBar(catId, catName) {\n reSetMarkers(); // clean up the category and map state\n showDialog(false); // hide our info-dialog, if necessary\n //\n var topicsToShow = getAllTopicsInCat(catId);\n topicsToShow.sort(topicSort); // alphabetical ascending\n var topicIdsToShow = new Array();\n //\n var sideBarCategories = jQuery(\"#sideBarCategories\");\n sideBarCategories.empty();\n sideBarCategories.append('&nbsp;<b class=\"redTitle\"><a href=\"javascript:renderCritCatListing('+ crtCritIndex+')\" title=\"Zur&uuml;ck\">' +catName + '</a></b><br/>&nbsp;&nbsp;');\n sideBarCategories.append('<small>('+topicsToShow.length+ ' Objekte)</small><p/>');\n sideBarCategories.append('<table width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" id=\"sideBarCategoriesTable\"></table>');\n for (var i = 0; i < topicsToShow.length; i++) {\n jQuery(\"#sideBarCategoriesTable\").append('<tr width=\"100%\" class=\"topicRowDeselected\">'\n + '<td width=\"20px\" class=\"iconCell\" valign=\"center\" align=\"center\">'\n + '<img src=\"http://www.berlin.de/imperia/md/images/system/icon_punkt_rot.gif\"/></td>'\n +' <td><a href=\"#\" id=\"topicRowHref-'+topicsToShow[i].id+'\">'+topicsToShow[i].name+'</a></td></tr>');\n jQuery(\"#topicRow-\"+topicsToShow[i].id).attr('onclick', 'javascript:showTopicInMap(\"'+topicsToShow[i].id+'\");');\n jQuery(\"#topicRowHref-\"+topicsToShow[i].id).attr('href', 'javascript:showTopicInMap(\"'+topicsToShow[i].id+'\");');\n topicIdsToShow.push(topicsToShow[i].id);\n }\n // mark category as currently selected, visible\n markerGroupIds.push(catId);\n // showTopicsInMap(topicsToShow);\n showTopicFeatures(topicIdsToShow, catId);\n // calculateNewBounds if its a \"District\" criteria\n if (onBerlinDe) { // ### fixed hack\n for (i = 0; i < districtNames.length; i++) {\n if (districtNames[i].catName == catName) {\n var districtBounds = getBoundsOfCurrentVisibleFeatures(); // out features inside\n updateVisibleBounds(districtBounds, false, LEVEL_OF_DISTRICT_ZOOM);\n }\n }\n }\n }", "function showRevHistorySidebar() {\n var ui = HtmlService.createHtmlOutputFromFile('RevisionsSidebar')\n .setTitle('Revision history');\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function w3_open() {\n document.getElementById(\"mySidebar\").style.width = \"100%\";\n document.getElementById(\"mySidebar\").style.display = \"block\";\n}", "toggleSidebar() {\n let sidebar = Ember.$('.ui.sidebar.main.menu');\n sidebar.sidebar('toggle');\n\n if (Ember.$('.inverted.vertical.main.menu').hasClass('visible')) {\n Ember.$('.sidebar.icon.text-menu-show').removeClass('hidden');\n Ember.$('.sidebar.icon.text-menu-hide').addClass('hidden');\n Ember.$('.bgw-opacity').addClass('hidden');\n Ember.$('.full.height').css({ transition: 'width 0.45s ease-in-out 0s', width: '100%' });\n } else {\n Ember.$('.sidebar.icon.text-menu-show').addClass('hidden');\n Ember.$('.sidebar.icon.text-menu-hide').removeClass('hidden');\n Ember.$('.bgw-opacity').removeClass('hidden');\n Ember.$('.full.height').css({ transition: 'width 0.3s ease-in-out 0s', width: 'calc(100% - ' + sidebar.width() + 'px)' });\n }\n }", "function loadHelpSidebar() {\n var html = HtmlService.createHtmlOutputFromFile('HelpSidebar').setTitle('U3A Tools Help')\n SpreadsheetApp.getUi().showSidebar(html)\n}", "function openAside() {\n document.getElementById(\"toc_aside\").style.right = \"0\";\n }", "function toggle_sidebar () {\n\t\t$(\"#sidebar-overlay\").toggleClass( \"hidden\" );\n\t\t$(\".sidebar\").toggleClass(\"sidebar-active\");\n\t\t$(\".container-sidebar\").toggleClass(\"container-sidebar-active\");\n\t}", "function mSidebarToggle(state) {\n var w;\n var d = \"inline-block\";\n var l = \"\";\n var icon = \"fa-bars\";\n if (state == \"wide\") {\n w = \"0\";\n setState(\"hidden\");\n } else {\n w = \"200px\";\n setState(\"wide\");\n }\n sidebarAnimate(w, d, l, icon, false);\n }", "function showSidebar() {\n $(\"#sidebar\").toggleClass(\"active\");\n}", "function showConfigurationSidebar() {\n var ui = HtmlService.createHtmlOutputFromFile('ConfigurationSidebar')\n .setTitle('Add-on configuration');\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function toggleDashboardSidebar(){\r\n // $(\"#sidebar\").toggleClass('sidebar-options-hidden sidebar-options-visible');\r\n}", "function Sidebar() {\n return (\n <div className=\"Sidebar_App tess\">\n <div className=\"Sidebar_row row\"> \n <div className=\"Sidebar_col-4\">\n <div className=\"list-group\">\n <a className=\"list-group-item list-group-item-mine Sidebar_heading\" href=\"/\"><ChevronLeftIcon className=\"Sidebar_size\"/> Notifications</a>\n </div>\n <div className=\"list-group\">\n <a className=\"list-group-item list-group-item-mine Sidebar_items\" href=\"/gereral\">General<ChevronRightIcon className=\"Sidebar_icon\"/></a>\n <a className=\"list-group-item list-group-item-mine Sidebar_items\" href=\"/appointments\">Upcoming Appointments <ChevronRightIcon className=\"Sidebar_icon\"/></a> \n <a className=\"list-group-item list-group-item-mine Sidebar_items\" href=\"/confirmed\">Confirmed <ChevronRightIcon className=\"Sidebar_icon\"/></a> \n <a className=\"list-group-item list-group-item-mine Sidebar_items\" href=\"/failed\">Failed <ChevronRightIcon className=\"Sidebar_icon\"/></a> \n <a className=\"list-group-item list-group-item-mine Sidebar_items\" href=\"/feedback\">Feedback <ChevronRightIcon className=\"Sidebar_icon\"/></a> \n <a className=\"list-group-item list-group-item-mine Sidebar_items\" href=\"/pushed\">Pushed <ChevronRightIcon className=\"Sidebar_icon\"/></a> \n </div>\n </div>\n </div>\n </div> \n );\n}", "function openListContent() {\n $(\"#sidebar2\").css(\"display\",\"block\");\n}", "function set_sidebar() {\n\n\tset_sidebar_pos(\".main .outer .row01 .navi_outer\");\n\tif ($(window).width() > 767) {\n\t\tset_sidebar_pos(\".main .outer .row02 .countdown_div .countdown_outer\");\n\t}\n\t$(window).resize(function () {\n\t\tset_sidebar_pos(\".main .outer .row01 .navi_outer\");\n\t\tif ($(window).width() > 767) {\n\t\t\tset_sidebar_pos(\".main .outer .row02 .countdown_div .countdown_outer\");\n\t\t}\n\t});\n}", "function createSidebar() {\n\n // Barra lateral\n this.sidebar = L.control.sidebar({ container: 'sidebar', closeButton: true })\n .addTo(this.g.map)\n .open(\"selector\");\n\n // Botón que sustituye a la barra lateral.\n const Despliegue = L.Control.extend({\n onAdd: function(map) {\n const button = L.DomUtil.create(\"button\"),\n icon = L.DomUtil.create(\"i\", \"fa fa-arrow-down\");\n\n button.id = \"view-sidebar\";\n button.setAttribute(\"type\", \"button\");\n button.appendChild(icon);\n button.addEventListener(\"click\", e => {\n this.remove(map);\n });\n\n return button;\n },\n onRemove: map => {\n this.sidebar.addTo(map);\n // Por alguna extraña razón (que parece un bug del plugin)\n // hay que volver a eliminar y añadir la barra para que funcione\n // el despliegue de los paneles.\n this.sidebar.remove();\n this.sidebar.addTo(map);\n }\n });\n\n // Botón de enrollado.\n document.querySelector(\"#sidebar i.fa-arrow-up\").parentNode\n .addEventListener(\"click\", e => {\n this.sidebar.remove();\n this.sidebar.despliegue = new Despliegue({position: \"topleft\"}).addTo(this.g.map);\n });\n\n // Botón para pantalla completa.\n document.querySelector(\"#sidebar i.fa-arrows-alt\").parentNode\n .addEventListener(\"click\", e => {\n this.g.map.toggleFullscreen();\n });\n\n // Ocultar los paneles implica también, quitar la barra lateral.\n document.querySelectorAll(\"#sidebar .leaflet-sidebar-pane .leaflet-sidebar-close\")\n .forEach(e => e.addEventListener(\"click\", e => {\n document.querySelector(\"#sidebar i.fa-arrow-up\").parentNode\n .dispatchEvent(new Event(\"click\"));\n }));\n\n // Al seleccionar un centro, muestra automáticamente su información y\n // habilita el botón correspndiente de la barra.\n this.g.on(\"markerselect\", e => {\n const boton = this.sidebar._container\n .querySelector(\"#sidebar .leaflet-sidebar-tabs a[href='#centro']\").parentNode;\n\n if(!e.newval) { // Deshabilitamos botón.\n const activa = this.sidebar._container\n .querySelector(\"#sidebar .leaflet-sidebar-tabs li.active\");\n // Si el panel activo, es el de información de centro, lo cerramos.\n if(activa && activa.querySelector(\"a[href='#centro']\")) {\n this.sidebar.close();\n }\n boton.classList.add(\"disabled\");\n return;\n }\n\n boton.classList.remove(\"disabled\");\n if(!this.sidebar._map) { // La barra no está desplegada.\n document.getElementById(\"view-sidebar\").dispatchEvent(new Event(\"click\"));\n }\n this.sidebar.open(\"centro\");\n });\n\n // Al cargar datos por primera vez deben habilitarse todos los\n // botones deshabilitados de la barra, excepto el de información de centro.\n this.g.once(\"dataloaded\", e => {\n this.sidebar._container.querySelectorAll(\"#sidebar .leaflet-sidebar-tabs li.disabled\")\n .forEach(e => !e.querySelector(\"a[href='#centro']\") && e.classList.remove(\"disabled\"));\n });\n }", "function w3_close() {\n mySidebar.style.display = \"none\";\n }", "function onOpen() {\n SpreadsheetApp.getUi() // Or DocumentApp or SlidesApp or FormApp.\n .createMenu('Table Topics Sidebar')\n .addItem('Launch Sidebar', 'showSidebar')\n .addToUi();\n}", "function w3_close() {\r\n mySidebar.style.display = \"none\";\r\n}", "function w3_close() {\r\n mySidebar.style.display = \"none\";\r\n}", "function w3_close() {\r\n mySidebar.style.display = \"none\";\r\n}", "function toggleTree() {\n // Do the actual toggling by modifying the class on the body element. That way we can get some nice CSS transitions going.\n if (sidebarVisible) {\n document.body.className = document.body.className.replace(/\\s*sidebar/g, '');\n sidebarVisible = false;\n } else {\n document.body.className += ' sidebar';\n sidebarVisible = true;\n }\n if (window.localStorage) {\n if (sidebarVisible) {\n window.localStorage.docker_showSidebar = 'yes';\n } else {\n window.localStorage.docker_showSidebar = 'no';\n }\n }\n}", "function getSidebarTag(){\n\treturn document.getElementById('vert-sidebar');\n}", "function w3_close() {\n mySidebar.style.display = \"none\";\n}", "function w3_close() {\n mySidebar.style.display = \"none\";\n}", "function w3_close() {\n mySidebar.style.display = \"none\";\n}", "function showSidebar() {\n var html = HtmlService.createTemplateFromFile(\"Librarian\")\n .evaluate()\n .setTitle(\"The BookHound\"); // The title shows in the sidebar\n SpreadsheetApp.getUi().showSidebar(html);\n}", "updateSidebarState(click) {\n // Start with the sidebar hidden on small screens\n if (window.innerWidth < 470) {\n this.setState({sidebar: 'sidenav'})\n // Hide sidebar to display infowindow on small screens\n if (click === true) {\n this.setState({sidebar: 'sidenav'})\n }\n } else {\n this.setState({sidebar: 'sidenav-active'})\n }\n }", "function sidebarToggling() {\n $('.ls-sidebar-toggle').on('click', function(){\n if($('html').hasClass('ls-sidebar-toggled')) {\n maximizeSidebar();\n } else {\n minimizeSidebar();\n }\n });\n }", "function initialize() {\n google.script.run\n .withSuccessHandler(updateDisplay)\n .getSidebarDisplay();\n}", "function update_sidebar() {\n $('#app_type').text(esp8266.type);\n $('#dev-name').text(esp8266.name);\n switch (esp8266.type) {\n case \"ESPBOT\":\n $('#app_home').show();\n $('#th_history').hide();\n $('#th_ctrl_settings').hide();\n $('#st_relay').hide();\n $('#dev_journal').show();\n $('#dev_settings').show();\n $('#dev_gpio').show();\n $('#dev_debug').show();\n $('#dev_list').show();\n $('#app_info').show();\n break;\n case \"THERMOSTAT\":\n $('#app_home').show();\n $('#th_history').show();\n $('#th_ctrl_settings').show();\n $('#st_relay').hide();\n $('#dev_journal').show();\n $('#dev_settings').show();\n $('#dev_gpio').hide();\n $('#dev_debug').show();\n $('#dev_list').show();\n $('#app_info').show();\n break;\n case \"SMART_TIMER\":\n $('#app_home').show();\n $('#th_history').hide();\n $('#th_ctrl_settings').hide();\n $('#st_relay').show();\n $('#dev_journal').show();\n $('#dev_settings').show();\n $('#dev_gpio').show();\n $('#dev_debug').show();\n $('#dev_list').show();\n $('#app_info').show();\n break;\n default:\n $('#app_home').hide();\n $('#th_history').hide();\n $('#th_ctrl_settings').hide();\n $('#st_relay').hide();\n $('#dev_journal').hide();\n $('#dev_settings').hide();\n $('#dev_gpio').hide();\n $('#dev_debug').hide();\n $('#dev_list').show();\n $('#app_info').hide();\n break;\n }\n}", "function w3_close()\n{\n document.getElementById(\"mySidebar\").style.display = \"none\";\n}", "function updateSidebar() {\n $('.sidebar-menu li').removeClass('active');\n $('li[db-page=' + current_parent_page + ']').addClass('active');\n }", "function openSidebar() {\n docBar.style.width = '250px';\n document.getElementById('main').style.marginLeft = '250px';\n}", "function onOpen() {\n SpreadsheetApp.getUi()\n .createAddonMenu() // Add a new option in the Google Docs Add-ons Menu\n .addItem(\"Call the Book Hound\", \"showSidebar\")\n //.showSidebar()\n .addToUi(); // Run the showSidebar function when someone clicks the menu\n}", "function Sidebar() {\r\n return (\r\n <div>\r\n <div id=\"Sidebar_column\">\r\n <div>\r\n <Link to=\"/home\">\r\n <SidebarOption icon_img={<PhoneIcon />} icon_name=\"Calls\" />\r\n </Link>\r\n\r\n <Link to=\"/rooms/Uzt62yRmfjlPfwtHlEvA\">\r\n <SidebarOption icon_img={<ChatIcon />} icon_name=\"Chat\" />\r\n </Link>\r\n\r\n <Link to=\"/drive\">\r\n <SidebarOption\r\n icon_img={<CreateNewFolderIcon />}\r\n icon_name=\"Drive\"\r\n />\r\n </Link>\r\n\r\n <Link to=\"/schedule\">\r\n <SidebarOption icon_img={<TodayIcon />} icon_name=\"Events\" />\r\n </Link>\r\n\r\n <Link to=\"/task\">\r\n <SidebarOption icon_img={<ListAltIcon />} icon_name=\"Task\" />\r\n </Link>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}", "function showPushDataSidebar() {\n var ui = HtmlService.createTemplateFromFile('ConnectionDetailsSidebar')\n .evaluate()\n .setTitle('Send Data To Cluster');\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function initSidebar() {\n // Pick up sidebar components loaded by App.View\n Annotator.Elements.$sidebarContainer = $(\"#side-status-container\");\n Annotator.Elements.$sidebar = $('#side-status');\n\n // 1) Loads the initial HTML template for the sidebar\n Annotator.Elements.$sidebar.html(initSidebarHTML());\n\n // Cache more important DOM elements\n Annotator.Elements.$mainText = App.View.Elements.$mainText;\n Annotator.Elements.$sideStatusNav = $('#side-status-nav');\n Annotator.Elements.$sideStatusEventActive = $('#side-status-event-active');\n Annotator.Elements.$sideStatusEventTotal = $('#side-status-event-total');\n Annotator.Elements.$jumpButton = $('#jump-button');\n Annotator.Elements.$jumpID = $('#jump-id');\n Annotator.Elements.$prevButton = $('#prev-button');\n Annotator.Elements.$scrollButton = $('#scroll-button');\n Annotator.Elements.$nextButton = $('#next-button');\n\n if (App.Config.Annotator.newEvents && Annotator.annotateMode) {\n Annotator.Elements.$sideStatusEvents = $('#side-status-events');\n Annotator.Elements.$newEventButton = $('#new-event-button');\n }\n\n if (App.Config.Annotator.deleteManualEvents && Annotator.annotateMode) {\n Annotator.Elements.$deleteEventButton = $('#delete-event-button');\n }\n\n if (App.Config.Annotator.newContexts && Annotator.annotateMode) {\n Annotator.Elements.$sideStatusContexts = $('#side-status-contexts');\n Annotator.Elements.$newContextStartInterface = $('#new-context-start-interface');\n Annotator.Elements.$newContextStart = $('#new-context-start');\n Annotator.Elements.$newContextInterface = $('#new-context-interface');\n Annotator.Elements.$newContextText = $('#new-context-text');\n Annotator.Elements.$newContextCreate = $('#new-context-create');\n Annotator.Elements.$newContextCancel = $('#new-context-cancel');\n }\n\n if (parseInt(App.Paper.annotation_pass) == 2 && Annotator.annotateMode) {\n // False positive marking for Reach events\n Annotator.Elements.$sideStatusFp = $('#side-status-fp');\n Annotator.Elements.$markFpButton = $('#mark-fp-button');\n }\n\n Annotator.Elements.$sideStatusMain = $('#side-status-main');\n Annotator.Elements.$sideStatusSubmit = $('#side-status-submit');\n Annotator.Elements.$commentsButton = $('#comments-button');\n Annotator.Elements.$returnButton = $('#return-button');\n Annotator.Elements.$sideStatusHR = Annotator.Elements.$sidebar.find('hr').first();\n\n // 2) Refresh the list of contexts on the sidebar\n Annotator.refreshContextList();\n\n // 3) Resize the sidebar to fit the window\n resizeSidebar();\n\n // 4) Refresh the sticky sidebar position (to fix a Foundation bug)\n refreshSticky();\n\n // 5) Context list overflow shadow (to make overflows more obvious on OS X)\n contextOverflowShadow();\n\n // 7) Refresh active elements\n Annotator.refreshActiveElements();\n }", "function w3_open() {\r\n document.getElementById(\"mySidebar\").style.display = \"block\";\r\n document.getElementById(\"myOverlay\").style.display = \"block\";\r\n}", "function showSidebar() {\n var ui = HtmlService\n .createHtmlOutputFromFile('sidebar')\n .setTitle('Create table');\n DocumentApp.getUi().showSidebar(ui);\n}", "function handleSideBar() {\n if($('#tab4').hasClass('active'))\n {\n $('#main.well').hide();\n $('#reports.well').show();\n }\n else{\n $('#main.well').show();\n $('#reports.well').hide();\n }\n }", "sidebarActions() {\n return <div className={'sidebar-actions'}>\n <h3>I don't like these results...</h3>\n <button\n type={'button'}\n onClick={this.props.onBack}\n >\n Change my selection\n </button>\n <h3>Looks good!</h3>\n <button\n type={'button'}\n onClick={this.props.onNextView}\n >\n Show me the mods to move\n </button>\n </div>\n }", "function toggleSidebar(e) {\n e.preventDefault();\n $('.icon-toggle').toggleClass('active');\n if(Modernizr.csstransitions) {\n cons.toggleClass('hide-controls'),\n notepad.toggleClass('controls-hidden'),\n hideCon.toggleClass('conhid-buttons');\n } else {\n if(cons.is(\":visible\")) {\n cons.animate({width: '-=300'}, 700, function() {\n $(this).hide();\n }),\n notepad.animate({'padding-right': 0}, 700);\n hideCon.animate({'right': 10}, 700);\n } else {\n cons.show().animate({width: '+=300'}, 700);\n notepad.animate({'padding-right': 330}, 700);\n hideCon.animate({'right': 340}, 700);\n }\n }\n}", "function w3_close() {\n document.getElementById(\"mySidebar\").style.display = \"none\";\n}", "sidebarVisibility() {\n let elementClass =\n this.state.sidebar === \"sidenav\" ? \"sidenav-active\" : \"sidenav\";\n this.setState({ sidebar: elementClass });\n }", "function w3_open() {\n\t if (mySidebar.style.display === 'block') {\n\t mySidebar.style.display = 'none';\n\t overlayBg.style.display = \"none\";\n\t } else {\n\t mySidebar.style.display = 'block';\n\t overlayBg.style.display = \"block\";\n\t }\n\t}", "function w3_open() {\n\t if (mySidebar.style.display === 'block') {\n\t mySidebar.style.display = 'none';\n\t overlayBg.style.display = \"none\";\n\t } else {\n\t mySidebar.style.display = 'block';\n\t overlayBg.style.display = \"block\";\n\t }\n\t}", "showMenu() {\n this.$('jira-sidebar__menu').removeClass('jira-hidden');\n this.animate('in', width.sidebarSmall);\n }", "handleClick(){\n this.props.sidebar === \"DISPLAY_INFO_SIDEBAR\" ? this.props.hideInfoSidebar() : this.props.displayInfoSidebar();\n }", "function YATAToggleSideBar(left, show) {\n var item = \"YATAIconNav\";\n var side = (left) ? \"-left\" : \"-right\";\n var div = (left) ? \"YATALeftSide\" : \"YATARightSide\";\n \n divBase = item + side;\n if (show) {\n document.getElementById(divBase + \"-on\").style.display = \"none\";\n document.getElementById(divBase + \"-off\").style.display = \"inline-block\"; \n }\n else {\n document.getElementById(divBase + \"-on\").style.display = \"inline-block\"; \n document.getElementById(divBase + \"-off\").style.display = \"none\"; \n }\n var element = document.getElementById(div);\n element.classList.toggle(\"shinyjs-hide\");\n element.classList.toggle(\"shinyjs-show\");\n}", "function closeAside() {\n document.getElementById(\"toc_aside\").style.right = \"-100vw\";\n }", "function showSidebar() {\n var ui = HtmlService.createHtmlOutputFromFile('sidebar')\n .setTitle('Reversible Formulas');\n DocumentApp.getUi().showSidebar(ui);\n}", "function w3_open() {\n document.getElementById(\"mySidebar\").style.display = \"block\";\n document.getElementById(\"myOverlay\").style.display = \"block\";\n}", "function w3_open() {\n document.getElementById(\"mySidebar\").style.display = \"block\";\n document.getElementById(\"myOverlay\").style.display = \"block\";\n}", "function w3_open() {\n document.getElementById(\"mySidebar\").style.display = \"block\";\n document.getElementById(\"myOverlay\").style.display = \"block\";\n}", "function w3_open() {\n document.getElementById(\"mySidebar\").style.display = \"block\";\n document.getElementById(\"myOverlay\").style.display = \"block\";\n}", "function w3_open() {\n document.getElementById(\"mySidebar\").style.display = \"block\";\n document.getElementById(\"myOverlay\").style.display = \"block\";\n}" ]
[ "0.7105575", "0.7068786", "0.6945905", "0.6921002", "0.6905447", "0.6782105", "0.67227286", "0.67168313", "0.6708289", "0.6692463", "0.6682901", "0.6673738", "0.66431123", "0.66412497", "0.6615999", "0.6614985", "0.65898234", "0.65710866", "0.6540344", "0.6538894", "0.65387607", "0.6514696", "0.65027726", "0.64998245", "0.64955884", "0.64815235", "0.6462225", "0.64589316", "0.64577335", "0.644488", "0.644488", "0.644029", "0.64304745", "0.6426983", "0.6416014", "0.6402696", "0.6398073", "0.63940847", "0.63919985", "0.63903224", "0.6383571", "0.6382384", "0.63775086", "0.6375213", "0.6375142", "0.6366338", "0.6362975", "0.63382375", "0.632898", "0.63189507", "0.63090134", "0.630343", "0.6298844", "0.62964606", "0.62820446", "0.6260825", "0.62573695", "0.62466484", "0.6241562", "0.62402934", "0.62342775", "0.6212795", "0.6212795", "0.6212795", "0.62042564", "0.61938095", "0.6193722", "0.6193722", "0.6193722", "0.6182964", "0.6178466", "0.6167265", "0.61658084", "0.6165293", "0.6164932", "0.6158375", "0.61473095", "0.6146307", "0.61454606", "0.61426675", "0.6137818", "0.6136101", "0.6135649", "0.6124534", "0.61060095", "0.61039066", "0.6103803", "0.6098478", "0.60956687", "0.60956687", "0.6094933", "0.6092745", "0.6089154", "0.6085727", "0.6084274", "0.6083219", "0.6083219", "0.6083219", "0.60827076", "0.60827076" ]
0.6411076
35
= Economic module =
function qll_module_economic_monetary() { if(!qll_opt['module:economic']) { return; } selector=document.getElementById('populateSelectors'); object = document.createElement("button"); object.setAttribute('style', 'display:block; width:150px; float:left;'); object.setAttribute('class', 'QLLButton'); object.setAttribute('id','QLLEconomicMonetarySwap'); object.innerHTML="<img src='/images/parts/icon_show-off.gif' />&nbsp;&nbsp;"+qll_lang[76]; selector.appendChild(object); $("#QLLEconomicMonetarySwap").click(function() { sel=document.getElementById('accounts_selector'); hash=sel.href; hash=hash.substr(hash.indexOf('#')+1); hash=hash.split(';'); b=hash[0].split('='); s=hash[1].split('='); window.location.replace("#buy_currencies="+s[1]+";sell_currencies="+b[1]+";page=1"); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Fundamentals() {\n\n }", "function Module(){}", "function Module(){}", "function Module() {\r\n}", "function NbpChartModule() {\n }", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function FurnitureShop() {}", "function AllModule(){Spreadsheet.Inject(Ribbon$$1,FormulaBar,SheetTabs,Selection,Edit,KeyboardNavigation,KeyboardShortcut,Clipboard,DataBind,Open,Save,NumberFormat,CellFormat,Formula,Sort,Resize,CollaborativeEditing,UndoRedo,Filter,SpreadsheetHyperlink,WrapText,Insert,Delete,DataValidation,ProtectSheet,FindAndReplace,Merge,SpreadsheetImage,ConditionalFormatting,SpreadsheetChart);}", "function Comic(){}", "function SolarSystem() {\n\n}", "function Calculation() {\n }", "function fm(){}", "function BasicModule(){Spreadsheet.Inject(Ribbon$$1,FormulaBar,SheetTabs,Selection,Edit,KeyboardNavigation,KeyboardShortcut,Clipboard,DataBind,Open,ContextMenu$1,Save,NumberFormat,CellFormat,Formula,Sort,CollaborativeEditing,UndoRedo,Resize,Filter,SpreadsheetHyperlink,WrapText,Insert,Delete,ProtectSheet,DataValidation,FindAndReplace,Merge,ConditionalFormatting,SpreadsheetImage,SpreadsheetChart);}", "function main(){\r\n\r\n //create all of your stocks\r\n let s1 = new Stock(Google,googl,NASDAQ,104.21,100);\r\n let s2 = new Stock(Yahoo,abba,BAS,70.20,100);\r\n let s3 = new Stock(Potbellys,Pbpb,NASDAQ,11.14,100);\r\n let s4 = new Stock(ActivisionBlizzard,Attvi,NASDAQ,62,100);\r\n\r\n //build your Portfolio\r\n let myport = new Portfolio();\r\n myport.add(stk1);\r\n myport.add(stk2);\r\n myport.add(stk3);\r\n myport.add(stk4);\r\n\r\n\r\nconsole.log(myport.totalValue());\r\nconsole.log(\"------------\");\r\nconsole.log(myport);\r\n\r\n //generate a test forcast\r\n //build prediction\r\n}", "GetModule() {\n\n }", "total(){\n return operations.incomes() + operations.expenses()\n }", "get Prologic() {}", "function Carnivorus(){\n\n}", "function marketSell () {\n}", "stocker_local_trajet() {}", "function oi(){}", "function theImplementation(automata){\n\n}", "function main(){\r\n\r\n //create all of your stocks\r\n let s1 = new Stock(\"Microsoft Corp\",\"MSFT\",\"NASDAQ\",83.94,113);\r\n let s2 = new Stock(\"Ubisoft Entertainment\",\"UBSFF\",\"OTC\",82.40,88);\r\n let s3 = new Stock(\"McDonald's Corp\",\"MCD\",\"NYSE\",168.48,100);\r\n let s4 = new Stock(\"Netflix\",\"NFLX\",\"NASDAQ\",193.11,85);\r\n\r\n //build your Portfolio\r\n let myport = new Portfolio();\r\n myport.add(s1);\r\n myport.add(s2);\r\n myport.add(s3);\r\n myport.add(s4);\r\n\r\n console.log(myport.totalValue());\r\n console.log(\"-----------------------\");\r\n console.log(myport);\r\n\r\n //build prediction\r\n}", "function Expt() {\r\n}", "function marketBuy () {\n\n}", "addExpense(expense) {}", "function fertilizers_nutrient_agricultural_use(){\n a_FAO_i='fertilizers_nutrient_agricultural_use';\n initializing_change();\n change();\n}", "calculateAdvancedCost() {\n var scale = this.isMonthly ? 1 : 1 / 12; // divide by 12 if the user input yearly numbers \n this.cost = parseInt( ( parseInt(this.monthlyRentCost) + parseInt(this.homeInsuranceCost) + parseInt(this.utilitiesCost)) * scale);\n // this.cost = this.cost.toFixed(2);\n\n this.eventAggregator.publish('update', {name: 'Housing', value: this.cost});\n }", "function IndicadorTotal () {}", "function IndividualAttestation() {}", "init() {\n // Import indicator + set the default params\n this.ind1 = dep('SomeIndicator1', [12])\n\n // Import a TA library (nmp package)\n this.ta_lib = dep('@some_ta_lib')\n\n }", "function modular(){\n\tvar object = new Keg (\"12345\",\"800\",\"admin\");\n\tobject.withdraw(300);\n\tobject.deposit(400);\n\t}", "function addCurve ({module}) {\n module.state.push('items', 'Curve')\n\tmodule.state.push('contents', '')\n}", "function main() {\n ObjPortfolioController = new PortfolioController();\n ObjPortfolioController.ocultarElemento(\"formulario\");\n ObjPortfolioController.getTodosTable(divPortfolios);\n ObjPortfolioController.registrarEvento()\n}", "Get_Exchnages_Accepted()\n{\n\n}", "getRate(el, empty, full, input){\n\t\tnew module(el, empty, full, input, this.$public);\n\t}", "function BusinessIntelligenceCheck(){}", "function STXStudies(){\n}", "function OnTimeModule() {\n\t\tthis.name = \"OnTime.Module\";\n\t}", "get EAC_R() {}", "function Core() {}", "function Core() {}", "function Core() {}", "static scientificName() {\n return 'Suricata suricatta';\n }", "function pfKnowledgeEngeneering(){\n\tthis.inheritFrom = pfGenericKnowledge;\n this.inheritFrom();\n this.setName(\"knowledge_engineering\");\n}", "function WorkbookAllModule(){Workbook.Inject(DataBind,WorkbookSave,WorkbookNumberFormat,WorkbookCellFormat,WorkbookEdit,WorkbookFormula,WorkbookOpen,WorkbookSort,WorkbookHyperlink,WorkbookFilter,WorkbookInsert,WorkbookDelete,WorkbookFindAndReplace,WorkbookProtectSheet,WorkbookDataValidation,WorkbookMerge,WorkbookConditionalFormat,WorkbookImage,WorkbookChart);}", "forecastEvent () {\n // Eeeesh :/\n }", "function Oo(){}", "function financialState (accMov, accIntRate) {\n showMovs(accMov);\n showBal(accMov);\n showSummary(accMov, accIntRate);\n}", "function Strategy() {\n}", "function Strategy() {\n}", "function constroiEventos(){}", "function ea(){}", "getFoodStock(){\r\n\r\n }", "function Weather(){\n}", "static get __resourceType() {\n\t\treturn 'ExplanationOfBenefitBenefitBalanceFinancial';\n\t}", "function beeModel() {\n //variables\n this.name = 'Bee';\n this.cost = 0;\n this.gender = 'Female';\n this.canAddHoney = false;\n this.canAddTerritory = false;\n this.canAddHealth = false;\n this.eggRate = 0;\n this.honeyRate = 0;\n this.territoryRate = 0;\n this.healthRate = 0;\n this.domTarget = '';\n //experience value on build\n this.experienceValue = 0;\n //available multiples to purchase\n this.availableAmounts = [1];\n //methods\n}", "function SAT () { }", "efficacitePompes(){\n\n }", "function Fr(){}", "function getFinancials(){\n let propertyValue = getPropertyValue();\n setTotal('overallSummarySoldProperties', formatCurrency(propertyValue));\n\n let goodsValue = getGoodsValue();\n setTotal('overallSummarySoldGoods', formatCurrency(goodsValue));\n\n let soldTotal = propertyValue + goodsValue;\n let formattedSoldTotal = formatCurrency(soldTotal);\n setTotal('overallSummarySoldTotal', formattedSoldTotal);\n\n let expensesValue = getTotalExpenses();\n setTotal('overallSummaryExpensesTotal', formatCurrency(expensesValue));\n\n let balance = (soldTotal - expensesValue);\n setTotal('overallSummaryBalance', formatCurrency(balance));\n}", "function TaxEngine() {\n this.initialized_ = false;\n this.earningsRecords = [];\n this.cutoffIndexedEarnings = 0;\n this.totalIndexedEarnings = 0;\n this.monthlyIndexedEarnings = 0;\n this.futureEarningsYears = 0;\n this.futureEarningsWage = 0;\n\n this.birthDate = {year: 1970, month: 'Jan'};\n this.fullRetirement = FULL_RETIREMENT_AGE[FULL_RETIREMENT_AGE.length - 1];\n}", "function YellOmniture() {\n\tthis.ss = (typeof s === 'undefined') ? s_gi(config.account) : s;\n\t\n\tvar gConf = HAF.config.global;\n\tthis.ss.charSet=gConf.charset;\n\t/* Conversion Config */\n\tthis.ss.currencyCode=gConf.currency;\n\t\n\t/* Throwaway function to copy optional configuration values */\n\tfunction getCopier(source,dest) {\n\t\treturn function copyAttr(name, destName) {\n\t\t\tdestName = destName ? destName : name;\n\t\t\tif(typeof source[name] !== 'undefined')\n\t\t\t\tdest[destName] = source[name];\n\t\t}\n\t}\n\t/* Global non mandatory options copy to s */\n\tvar copier = getCopier(gConf,this.ss);\n\tcopier('trackDownloadLinks');\n\tcopier('trackExternalLinks');\n\tcopier('downloadFileTypes', 'linkDownloadFileTypes');\n\tcopier('internalDomains', 'linkInternalFilters');\n\n\t/* Originally configured like this\n\tthis.ss.trackInlineStats=true;\n\tthis.ss.linkLeaveQueryString=false;\n\t*/\n\n\n\n\t/* Omniture non mandatory options copy to s */\n\tcopier = getCopier(config,this.ss);\n\t/* TimeParting Config */\n\tcopier('dstStart');\n\tcopier('dstEnd');\n\tcopier('currentYear');\n\t\n\tcopier('serverSecure','trackingServerSecure');\n\n\t// These are non-optional\n\tthis.ss.visitorNamespace=config.namespace;\n\tthis.ss.trackingServer=config.server;\n\t\n\tthis.clear();\n}", "function CoolModule() {\r\n\tvar something = \"cool\";\r\n\tvar another = [1, 2, 3];\r\n\r\n\tfunction doSomething() {\r\n\t\tconsole.log( something );\r\n\t}\r\n\r\n\tfunction doAnother() {\r\n\t\tconsole.log( another.join( \" ! \" ) );\r\n\t}\r\n\r\n\treturn { // public API for our module.\t\t\r\n\t\tdoSomething: doSomething,\r\n\t\tdoAnother: doAnother\r\n\t};\r\n}", "function earnings(a, b, c) {}", "function DiscountFactory() {\r\n\t\r\n}", "get financial () {\n\t\treturn this._financial;\n\t}", "static describe (module) {\n\t\tconst description = GetRequest.describe(module);\n\t\tdescription.access = 'User must be a member of the company';\n\t\treturn description;\n\t}", "function simpleFuelCompound(aveFuel, escRate) {\n for (let year = 1; year <= depInt; year++) {\n\n // take this years average for CO, multiply by escRate, add to ave, return sum.\n aveFuel = (aveFuel * escRate) + aveFuel;\n console.log(`Predicted year ${year} ${fuelType}/unit average $${aveFuel.toFixed(2)} with escalation rate of ${escRate}`);\n }\n }", "transient final private internal function m170() {}", "function energy(key, year) {\n energy_yield = parseFloat($('#'+key+'_energy_yield_text').val())/1000.0\n degradation_rate = parseFloat($('#'+key+'_degradation_rate_text').val())/100.0\n\n if(year == 0){\n return 0\n } else {\n var energy_thisyear = energy_yield * (1 - degradation_rate * (year - 0.5)) // linear degradation rate\n\n if(energy_thisyear > 0){\n return energy_thisyear\n } else {\n return 0\n }\n }\n}", "function competitionFeeInit() {\n return {\n type: ApiConstants.API_REG_COMPETITION_FEE_INIT_LOAD,\n };\n}", "function comportement (){\n\t }", "calculateAdvancedMedical() {\n var scale = this.isMonthly ? 1 : 1 / 12; // divide by 12 if the user input yearly numbers \n this.cost = parseInt( ( parseInt(this.dentalCost) + parseInt(this.healthInsuranceCost) + parseInt(this.medicationCost) + parseInt(this.otherMedicalCost) ) * scale);\n // this.cost = this.cost.toFixed(2);\n\n this.eventAggregator.publish('update', {name: 'Medical', value: this.cost});\n }", "function Invoice () {}", "compute(eVals) {\n const v = {}\n\n // Battery Capacity[MWh]\n v['Battery Capacity [MWh]'] =\n eVals['Base Energy Requirement [MW]'] *\n (HOURS_PER_DAY * (1 - eVals['Planned Capacity Factor']))\n\n // Round Trip Efficiency\n v['Round Trip Efficiency'] = this.tech['Efficiency (Thermal or Round Trip)']\n\n // Battery Capacity Needed[MWh]\n v['Battery Capacity Needed [MWh]'] =\n v['Battery Capacity [MWh]'] / v['Round Trip Efficiency']\n\n // Increased[MWh]\n v['Increased [MWh]'] =\n v['Battery Capacity Needed [MWh]'] - v['Battery Capacity [MWh]']\n\n // Increased Solar / Wind Need\n v['Increased Need [MW]'] =\n v['Increased [MWh]'] / (HOURS_PER_DAY * eVals['Planned Capacity Factor'])\n\n // Battery Capital Cost [M$]\n v['Battery Capital Cost [M$]'] =\n this.tech['Base Plant Cost [M$]'] *\n (v['Battery Capacity Needed [MWh]'] /\n this.tech['Battery Capacity [MWhr]']) **\n this.tech['Scaling Factor']\n\n // Battery Fixed O&M [$/tCO2eq]\n v['Battery Fixed O&M [$/tCO2eq]'] =\n (this.tech['Base Plant Annual Fixed O&M [$M]'] *\n (v['Battery Capacity Needed [MWh]'] /\n this.tech['Battery Capacity [MWhr]']) **\n this.tech['Scaling Factor'] *\n MILLION) /\n this.params['Scale [tCO2/year]']\n\n // Battery Variable O&M [$/tCO2eq]\n v['Battery Variable O&M [$/tCO2eq]'] =\n ((this.tech['Variable O&M [$/MWhr]'] * v['Battery Capacity [MWh]']) /\n this.params['Scale [tCO2/year]']) *\n DAYS_PER_YEAR\n\n return v\n }", "function WorkbookBasicModule(){Workbook.Inject(DataBind,WorkbookSave,WorkbookOpen,WorkbookNumberFormat,WorkbookCellFormat,WorkbookEdit,WorkbookFormula,WorkbookSort,WorkbookHyperlink,WorkbookFilter,WorkbookInsert,WorkbookDelete,WorkbookFindAndReplace,WorkbookProtectSheet,WorkbookDataValidation,WorkbookMerge,WorkbookConditionalFormat,WorkbookImage,WorkbookChart);}", "static get __resourceType() {\n\t\treturn 'NutritionOrderEnteralFormula';\n\t}", "function stockGain(basis){\n //let message = \" is how much the stock has increased\";\n function years(yrs) {\n let growth = (basis * 0.05) * yrs;\n return growth;\n }\n let value = years(4);\n //console.log(value + message);\n return value;\n }", "getModuleName() {\n return 'DataMatrixGenerator';\n }", "function Efw() {\n}", "function maintCalc(dataStore){\n\n}", "function marketCalculations() {\r\n\tlet marketChangeProbability = randomNumberGenerator(1, 100);\r\n\r\n\tif (marketChangeProbability >= 51 && marketChangeProbability <= 100) {marketChangePercentage = Math.random() * 7;}\r\n\telse if (marketChangeProbability >= 16 && marketChangeProbability <= 50) {marketChangePercentage = Math.random() * -4 * disasterDecrementMultiplier;}\r\n\telse {marketChangePercentage = 0;}\r\n\t//Initialisation\r\n \tmarketChangePercentage /= 100;\r\n \tcurrentEggPrice = Math.floor((currentEggPrice + currentEggPrice * marketChangePercentage) * demand * inflation);\r\n\r\n \t//Verification\r\n \tcurrentEggPrice = currentEggPrice <= 20 ? 20 : currentEggPrice;\r\n \tmarketChangePercentage = currentEggPrice <= 20 ? 0 : marketChangePercentage;\r\n}", "function Car (brand,factory,year){\n this.brand = brand;\n this.factory = factory;\n this.year = year;\n this.getSummary = () => `${this.brand} is manufactured by ${this.factory}` ;\n \n}", "function noncommercial(){\n calculate(1.25, 1.5)\n \t\n }", "function IndicadorRangoEdad () {}", "function display_module() {\n\tdocument.getElementById('selected_module_elements').style.display = 'inline-block';\n\tdocument.getElementById('module_options').style.display = 'block';\n\tdocument.getElementById('overview_module').style.display = 'none';\n\tdocument.getElementById('add_new_element_grade').style.display = 'inline-block';\n\tdocument.getElementById('save_elements').style.display = 'inline-block';\n\tdocument.getElementById('calculate_elements').style.display = 'inline-block';\n\tdocument.getElementById('header-right').style.display = 'none';\n\tdocument.getElementById('back_button').style.display = 'block';\n\tdocument.getElementById('remove_elements').style.display = 'none';\n\t\n}", "compute() {\n const v = {}\n const ev = this.electric.compute()\n const tv = this.thermal.compute()\n\n let cv\n let tev\n\n if (this.electric.source == this.thermal.source) {\n cv = this.combinedPowerBlockRequirements(this.electric.source, ev, tv)\n tev = this.totalEnergyBlockCosts(ev, tv, cv)\n } else if (this.electric.source == 'NGCC w/ CCS') {\n tev = this.ngUtilitySection(ev, tv)\n } else {\n throw 'TODO: handle case with mismatched energy sources'\n }\n\n const dv = this.dac.compute()\n\n // Total Capital Cost [M$]\n v['Total Capital Cost [M$]'] =\n tev['Total Capital Cost [M$]'] +\n dv['Capital Cost (including Lead Time) [M$]']\n\n // Capital Recovery [$/tCO2eq]\n v['Capital Recovery [$/tCO2eq]'] =\n (v['Total Capital Cost [M$]'] * this.recoveryFactor() * MILLION) /\n this.params['Scale [tCO2/year]']\n\n // Fixed O&M [$/tCO2eq]\n v['Fixed O&M [$/tCO2eq]'] =\n tev['Fixed O&M [$/tCO2eq]'] + dv['Fixed O&M [$/tCO2eq]']\n\n // Variable O&M [$/tCO2eq]\n v['Variable O&M [$/tCO2eq]'] =\n tev['Variable O&M [$/tCO2eq]'] + dv['Variable O&M [$/tCO2eq]']\n\n // Natural Gas Cost [$/tCO2]\n v['Natural Gas Cost [$/tCO2]'] = tev['Natural Gas Cost [$/tCO2eq]']\n\n // Emitted [tCO2eq/tCO2]\n v['Emitted [tCO2/tCO2]'] = tev['Emitted [tCO2/tCO2]']\n\n const emissionsFactor = this.calcEmissionsFactor(\n tev['Natural Gas Use [mmBTU/tCO2eq]'],\n v['Emitted [tCO2/tCO2]']\n )\n\n // Capital Recovery [$/tCO2eq Net Removed]\n v['Capital Recovery [$/tCO2eq Net Removed]'] =\n v['Capital Recovery [$/tCO2eq]'] / emissionsFactor\n\n // Variable O&M [$/tCO2eq Net Removed]\n v['Variable O&M [$/tCO2eq Net Removed]'] =\n v['Variable O&M [$/tCO2eq]'] / emissionsFactor\n\n // Natural Gas Cost [$/tCO2 Net Removed]\n v['Natural Gas Cost [$/tCO2 Net Removed]'] =\n v['Natural Gas Cost [$/tCO2]'] / emissionsFactor\n\n // Fixed O&M [$/tCO2eq Net Removed]\n v['Fixed O&M [$/tCO2eq Net Removed]'] =\n v['Fixed O&M [$/tCO2eq]'] / emissionsFactor\n\n // Total Cost [$/tCO2]\n v['Total Cost [$/tCO2 Net Removed]'] =\n v['Capital Recovery [$/tCO2eq Net Removed]'] +\n v['Fixed O&M [$/tCO2eq Net Removed]'] +\n v['Variable O&M [$/tCO2eq Net Removed]'] +\n v['Natural Gas Cost [$/tCO2 Net Removed]']\n\n return v\n }", "function SubProvider() {\n\n}", "function SubProvider() {\n\n}", "function SubProvider() {\n\n}", "function economic(state){\n //get moves\n //check what current unit count is\n //check money amount if units are low\n //compare player score to ai and goal 500\n \n var possibleMoves = state.getMoves();\n var turn = state.turn;\n if(state.players[turn].units <= 1){\n if(state.players[turn].currency >= 35){\n for(var i = 0; i < possibleMoves.length; i++){\n if(possibleMoves[i]['extra'] == 'recruit')\n return possibleMoves[i];\n }\n }\n }\n \n var scores = state.getScores();\n var maxTerRes = 0;\n var moves = null;\n for(var i = 0; i < possibleMoves.length; i++){\n if((possibleMoves[i]['extra'] == 'move' || possibleMoves[i]['extra'] == 'harvest') && maxTerRes < state.terrList[possibleMoves[i]['territory']].val){\n maxTerRes = state.terrList[possibleMoves[i]['territory']].val;\n moves = possibleMoves[i];\n }\n }\n return moves;\n}", "function economic(state){\n //get moves\n //check what current unit count is\n //check money amount if units are low\n //compare player score to ai and goal 500\n \n var possibleMoves = state.getMoves();\n var turn = state.turn;\n if(state.players[turn].units <= 1){\n if(state.players[turn].currency >= 35){\n for(var i = 0; i < possibleMoves.length; i++){\n if(possibleMoves[i]['extra'] == 'recruit')\n return possibleMoves[i];\n }\n }\n }\n \n var scores = state.getScores();\n var maxTerRes = 0;\n var moves = null;\n for(var i = 0; i < possibleMoves.length; i++){\n if((possibleMoves[i]['extra'] == 'move' || possibleMoves[i]['extra'] == 'harvest') && maxTerRes < state.terrList[possibleMoves[i]['territory']].val){\n maxTerRes = state.terrList[possibleMoves[i]['territory']].val;\n moves = possibleMoves[i];\n }\n }\n return moves;\n}", "setup() {\n this.bank = new Bank()\n this.bank.addExchangeRate('EUR', 'USD', 1.2)\n this.bank.addExchangeRate('USD', 'KRW', 1100)\n }", "function AeUtil() {}" ]
[ "0.6021262", "0.5946292", "0.5946292", "0.59409434", "0.5753946", "0.57302874", "0.57302874", "0.57302874", "0.57302874", "0.57302874", "0.57302874", "0.5551726", "0.5540839", "0.5458252", "0.54341125", "0.54263765", "0.54182214", "0.5408599", "0.5368403", "0.5343326", "0.53340197", "0.5309431", "0.52837604", "0.52811426", "0.52783585", "0.52539337", "0.5251708", "0.5226456", "0.52225274", "0.5217113", "0.5205459", "0.5201064", "0.5187942", "0.51856136", "0.51829606", "0.5181899", "0.5162118", "0.51599383", "0.5152583", "0.51509666", "0.5142287", "0.51357055", "0.5126726", "0.5126192", "0.51257783", "0.5125423", "0.5125423", "0.5125423", "0.5120589", "0.5119729", "0.5115499", "0.51132095", "0.5109559", "0.51076", "0.5104091", "0.5104091", "0.5088568", "0.5087275", "0.50815314", "0.5080657", "0.5078621", "0.5071695", "0.5068483", "0.50662017", "0.5060194", "0.5059939", "0.5055045", "0.5052957", "0.504675", "0.5037505", "0.50371367", "0.5030894", "0.50280005", "0.5020401", "0.5018938", "0.5013511", "0.5011208", "0.500516", "0.5001761", "0.4998915", "0.49882212", "0.49815804", "0.49798343", "0.49790388", "0.4970232", "0.49692532", "0.49666417", "0.49613887", "0.49582818", "0.4951689", "0.49461445", "0.49454775", "0.49439523", "0.49391806", "0.49391806", "0.49391806", "0.49358368", "0.49358368", "0.49318638", "0.49303332" ]
0.51013553
56
= Ajax module =
function qll_module_ajax() { addJS('http://www.erepublik.com/js/jquery-1.3.2.min.js','head'); addJS('http://www.erepublik.com/js/jquery.history.plugin.js','head'); addJS('http://www.erepublik.com/js/exchange/filters.js','head'); addJS('http://www.erepublik.com/js/exchange/historyList.js','head'); addJS('http://www.erepublik.com/js/exchange/currency.js','head'); addJS('http://www.erepublik.com/js/exchange/listOffers.js','head'); addJS('http://economy.erepublik.com/js/uncompressed.jquery.dd.js','head'); addJS('http://economy.erepublik.com/js/jquery.tools.min.js','head'); addJS('http://economy.erepublik.com/js/ui.core.js','head'); addJS('http://economy.erepublik.com/js/ui.slider.js','head'); addJS('http://economy.erepublik.com/js/jquery.blockUI.js','head'); addJS('http://economy.erepublik.com/js/Market/marketplace.js','head'); addJS('http://economy.erepublik.com/js/numberChecks.js','head'); addCSS('http://www.erepublik.com/css/cmp/marketplace.css','head'); //$("#content a").each(function(){ $("a").each(function(){ if($(this).attr("href") == "#") return; $(this).click(function(event){ event.preventDefault() qll_module_ajax_perform($(this).attr("href")) }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IAjaxHttpHook() { }", "useAjax( ajax ) {\n this._ajax = ajax;\n }", "useAjax( ajax ) {\n this._ajax = ajax;\n }", "function ajax2() {\n\n }", "function __ajax(url, data){\nvar ajax= $.ajax({\n \"method\":\"POST\",\n \"url\":url,\n \"data\":data\n })\n return ajax\n}", "onAfterAjax() {\n }", "perform() {\r\n $.ajax(this.REQUEST)\r\n }", "function ajaxCall(url) {\n jQuery.ajax({\n type: 'GET',\n url: 'threddi/ajaxhelper',\n success: displayNewContent, // The js function that will be called upon success request\n error: ajaxTimeout,\n dataType: 'text', //define the type of data that is going to get back from the server\n data: {url: url, spacing: domLevel}, //this data is used by threddi_ajaxhelper function in threddi.module\n timeout: Drupal.settings.threddi.timeout // how long (in milliseconds) until the request times out\n });\n}", "function AjaxRequest (url, opts){\r\n var headers = {\r\n 'X-Requested-With': 'XMLHttpRequest',\r\n 'X-Prototype-Version': '1.6.1',\r\n 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'\r\n };\r\n var ajax = null;\r\n\r\nif (DEBUG_TRACE_AJAX) logit (\"AJAX: \"+ url +\"\\n\" + inspect (opts, 3, 1)); \r\n \r\n if (window.XMLHttpRequest)\r\n ajax=new XMLHttpRequest();\r\n else\r\n ajax=new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n \r\n if (opts.method==null || opts.method=='')\r\n method = 'GET';\r\n else\r\n method = opts.method.toUpperCase(); \r\n \r\n if (method == 'POST'){\r\n headers['Content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\r\n } else if (method == 'GET'){\r\n addUrlArgs (url, opts.parameters);\r\n }\r\n\r\n ajax.onreadystatechange = function(){\r\n// ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; states 0-4\r\n if (ajax.readyState==4) {\r\n if (ajax.status >= 200 && ajax.status < 305)\r\n if (opts.onSuccess) opts.onSuccess(ajax);\r\n else\r\n if (opts.onFailure) opts.onFailure(ajax);\r\n } else {\r\n if (opts.onChange) opts.onChange (ajax);\r\n }\r\n } \r\n \r\n ajax.open(method, url, true); // always async!\r\n\r\n for (var k in headers)\r\n ajax.setRequestHeader (k, headers[k]);\r\n if (matTypeof(opts.requestHeaders)=='object')\r\n for (var k in opts.requestHeaders)\r\n ajax.setRequestHeader (k, opts.requestHeaders[k]);\r\n \r\n if (method == 'POST'){\r\n var a = [];\r\n for (k in opts.parameters){\r\n\t if(matTypeof(opts.parameters[k]) == 'object')\r\n\t\tfor(var h in opts.parameters[k])\r\n\t\t\ta.push (k+'['+h+'] ='+ opts.parameters[k][h] );\r\n\t else\r\n a.push (k +'='+ opts.parameters[k] );\r\n\t}\r\n ajax.send (a.join ('&'));\r\n } else {\r\n ajax.send();\r\n }\r\n}", "function initialize(){\n debugAjax();\n}", "function doAjax(formData, action){\n\t//TODO: doAjax callback function form showList/modifyList\n}", "function teacher_ajaxcall() {\n response = $.ajax({\n url: \"/teacher_refresh/\",\n });\n}", "function ajaxFunction(controller,elementID)\r\n{\r\n\tajaxFunction(controller,elementID,'');\r\n\r\n}", "function object_ajax()\n{\n\tvar dinamic_ajax=false;\n\ttry {\n\t\tdinamic_ajax = new ActiveXObject(\"Msxml2.XMLHTTP\");\n\t} catch (e)\n\t{\n\t\ttry {\n\t\t\tdinamic_ajax = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t} catch (E) {\n\t\t\tdinamic_ajax = false;\n\t\t\t}\n\t\t}\n\t\n\tif (!dinamic_ajax && typeof XMLHttpRequest!='undefined') {\n\t\tdinamic_ajax = new XMLHttpRequest();\n\t}\n\treturn dinamic_ajax;\n}", "function ajaxFunction(controller,errElementID,successElementID,hideElementID,showElementID)\r\n{\r\n\txmlHttp=GetXmlHttpObject()\r\n\tif (xmlHttp==null)\r\n\t{\r\n\t\talert (\"Browser does not support HTTP Request\")\r\n\t\treturn\r\n\t}\r\n\tvar url = controller;\r\n\t\r\n\txmlHttp.onreadystatechange = function() { handleStateChange(xmlHttp,errElementID,successElementID,hideElementID,showElementID);};\r\n\t\r\n\txmlHttp.open(\"GET\",url,true)\r\n\t\r\n\txmlHttp.send(null)\r\n}", "function ajax_action(url, id, context, request_label, submit_label) {\n // send the ajax request\n $.ajax(url, {context: context\n\n }).done(function(data, textStatus, jqXHR) {\n//logger(\"ajax done called for \" + request_label);\n\n // when done attach the respnse html to the lightbox body\n $(this).empty().append(data);\n\n // do anything needed aftr the initial function response is loaded\n after_action_loaded(url)\n\n // bind the form for the update ajax return handling\n ajax_bind(featherlight_selector()+\" form\", \"\", submit_label+\" selected sample\", submit_success, submit_error, {flash_selector: flash_selector});\n\n }).fail(function(jqXHR, textStatus, errorThrown) {\n set_header_flash_messages(jqXHR, flash_selector());\n my_alert(request_label+\" request for \"+ id +\" failed: \"+ textStatus +\" responseText: \"+ jqXHR.responseText);\n });\n}", "function ajaxLinks(){\n $('.ajaxForm').submitWithAjax();\n $('a.get').getWithAjax();\n $('a.post').postWithAjax();\n $('a.put').putWithAjax();\n $('a.delete').deleteWithAjax();\n}", "function __ajax(url, data){\n var ajax = $.ajax({\n \"method\": \"POST\",\n \"url\": url,\n \"data\": data\n })\n return ajax;\n}", "function hookAjaxEvents() {\n\n\t$(document).ajaxSend(function(event, request, settings) {\n\t\t$('#overlay').show();\n\t});\n\t$(document).ajaxComplete(function(event, request, settings) {\n\t\t$('#overlay').hide();\n\t});\n}", "function ajax_note_action() {\n // avoid page reload after ajax call\n event.preventDefault();\n\n $.ajax({\n type: \"POST\",\n crossOrigin: true,\n url: \"/ajax/note_action/\",\n data: $('#note_form').serialize(),\n beforeSend: function() {\n $('.note_dialog').hide();\n $('#cmtlst_loading').show();\n },\n success: function(rsp_data, status) {\n $('#cmtlst_loading').hide();\n buildNoteList(rsp_data);\n },\n error: function(xhr, status, error) {\n $('#cmlst_loading').hide();\n $('#cmlst_loading span').text(error);\n },\n complete: function(xhr, status) {\n ;\n }\n });\n}", "_makeAjax(url, method, postObj) {\n let ajax = this.$.ajax;\n ajax.method = method;\n ajax.url = url;\n ajax.body = postObj ? JSON.stringify(postObj) : undefined;\n ajax.generateRequest();\n }", "_makeAjax(url, method, postObj) {\n let ajax = this.$.ajax;\n ajax.method = method;\n ajax.url = url;\n ajax.body = postObj ? JSON.stringify(postObj) : undefined;\n ajax.generateRequest();\n }", "function getAjax()\n{\n var xmlhttp;\n if(window.XMLHttpRequest)\n {\n xmlhttp = new XMLHttpRequest();\n }\n else\n {\n xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n return xmlhttp;\n}", "function jqueryAjax(method, url, data, callback) {\n\t\treturn $.ajax({\n\t\t\turl: url,\n\t\t\tdata: data,\n\t\t\tmethod: method,\n\t\t\tsuccess: callback\n\t\t});\n\t}", "function ajax_legacy() {\n /* + when */\n jQuery.ajax\n (\n jQuery.extend\n (\n true , {} ,\n settings.ajax ,\n callbacks ,\n {\n url : url ,\n beforeSend : function () {\n XMLHttpRequest = arguments[ 0 ] ;\n \n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader , 'true' ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-Area' , settings.area ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-CSS' , settings.load.css ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-Script' , settings.load.script ) ;\n \n fire( settings.callbacks.ajax.beforeSend , context , [ event , settings.parameter , XMLHttpRequest ] , settings.callbacks.async ) ;\n } ,\n success : function () {\n data = arguments[ 0 ] ;\n dataType = arguments[ 1 ] ;\n XMLHttpRequest = arguments[ 2 ] ;\n \n fire( settings.callbacks.ajax.success , context , [ event , settings.parameter , data , dataType , XMLHttpRequest ] , settings.callbacks.async ) ;\n \n update() ;\n } ,\n error : function () {\n XMLHttpRequest = arguments[ 0 ] ;\n textStatus = arguments[ 1 ] ;\n errorThrown = arguments[ 2 ] ;\n \n /* validate */ var validate = plugin_data[ settings.id ] && plugin_data[ settings.id ].validate ? plugin_data[ settings.id ].validate.clone( { name : 'jquery.pjax.js - drive()' } ) : validate ;\n /* validate */ validate && validate.start() ;\n /* validate */ validate && validate.test( '++', 1, [ url, win.location.href ], 'ajax_legacy()' ) ;\n /* validate */ validate && validate.test( '++', 1, [ XMLHttpRequest, textStatus, errorThrown ], 'ajax error' ) ;\n fire( settings.callbacks.ajax.error , context , [ event , settings.parameter , XMLHttpRequest , textStatus , errorThrown ] , settings.callbacks.async ) ;\n if ( settings.fallback ) { return typeof settings.fallback === 'function' ? settings.fallback( event ) : fallback( event , validate ) ; } ;\n /* validate */ validate && validate.end() ;\n }\n }\n )\n )\n /* - when */\n }", "function Ajax(title1, title2, text1, text2, id, url) {\n\tthis.title1 = title1;\n\tthis.title2 = title2;\n\tthis.text1 = text1;\n\tthis.text2 = text2;\n\tthis.id = id;\n\tthis.url = url;\n}", "function button_click_fn() {\n\t//call ajax\n\tajax_handler.request({\n url: '/query/end_point',\n async: false,\n method: 'GET',\n response_type: 'json',\n data: { id_value = document.getElementById('el_id').value },\n on_success: function (data) { \n\t\t/*Do things with data*/ \n\t },\n\t on_error: function (status, error_msg) {\n\t if(console) console.log('status:' + status + ' || error msg:' + error_msg);\n\t }\n \t});\n}", "onBeforeAjax() {\n return false;\n }", "function myAjax(options){\r\n\r\n var attributes={\r\n logMsg:null,\r\n url:\"\",\r\n success:function(){},\r\n error:function(){},\r\n\t\tdelegateErrorHandling:true,\r\n data:{}\r\n }\r\n\t \r\n $.extend(attributes,options)\r\n\t\r\n\tif(utils.RealTypeOf(attributes.data)==\"array\"){\r\n\t\t\r\n\t\tvar data={};\r\n\t\t$.each(attributes.data,function(i,elem){\r\n\t\t\tdata[elem.name]=elem.value\t\t\t\r\n\t\t})\r\n\t\t\r\n\t\tattributes.data=data;\r\n\t}\r\n\t\r\n\t\r\n\tattributes.data[\"BM\"]=NVision.appStatus.BM\t\r\n\t//adding dummy data to avoid cache issues\r\n\tattributes.data[\"dummyId\"]=(new Date()).getTime();\r\n\t\t\r\n if(attributes.logMsg){\r\n var msgId=myConsole.status(attributes.logMsg); \r\n }\r\n\t\r\n\t//myConsole.alert(\"revert to POST method!\")\r\n\treturn $.ajax({\r\n url:attributes.url,\r\n type:\"GET\",\r\n dataType:\"json\",\r\n data:attributes.data,\r\n success:function(data){\r\n if(attributes.logMsg){\r\n myConsole.status(\"Ok \",msgId);\r\n }\r\n\r\n\t\t\tif(!data || !data._code){\r\n\t\t\t\tmyConsole.alert(\"Wrong data format!\");\r\n\t\t\t\tif(attributes.error){\r\n\t\t\t\t\tattributes.error(\"Wrong data format!\");\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data._code!=\"ok\" && attributes.delegateErrorHandling){\r\n\r\n\t\t\t\tvar lb=NVision.lightBoxes[\"alertBox\"];\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tlb.find(\"h3\").text(data._errObj.id)\r\n\t\t\t\t\tlb.find(\"p.shortDesc\").text(data._errObj.shortDesc)\r\n\t\t\t\t\tlb.find(\".longDesc span\").text(data._errObj.longDesc)\r\n\t\t\t\t\r\n\t\t\t\tif(!lb.is(\":visible\")){\t\r\n\t\t\t\t\tlb.show();\r\n\t\t\t\t}\r\n \r\n NVision.enableUi();\r\n\t\t\t}\r\n\t\t\t\r\n attributes.success(data)\r\n },\r\n error:function(XMLHttpRequest, textStatus, errorThrown){\r\n\t\t\tif((textStatus||errorThrown)==\"abort\"){\r\n\t\t\t\t//console.log(\"error\")\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\tmyConsole.error(textStatus||errorThrown);\r\n\t\t\t}\r\n attributes.error(XMLHttpRequest, textStatus, errorThrown);\t\t\t\r\n }\r\n }) \r\n}", "function LoadViaAjax() {\t\t\r\n\t\t\r\n\t\tFirstLoad();\t\t\r\n\t\tLazyLoad();\t\t\r\n\t\tHeroSection();\r\n\t\tFitThumbScreen();\r\n\t\tPortfolio();\t\t\r\n\t\tBackToTop();\r\n\t\tPageShare();\r\n\t\tSliders();\r\n\t\tJustifiedGrid();\r\n\t\tLightbox();\r\n\t\tAppearIteam();\r\n\t\tContactMap();\r\n\t\tContactForm();\t\t\r\n\t\r\n\t}//End Load Via Ajax\t\t\t\t", "function LoadViaAjax() {\t\t\r\n\t\t\r\n\t\tFirstLoad();\t\t\r\n\t\tLazyLoad();\t\t\r\n\t\tPortfolio();\r\n\t\tShowcase();\r\n\t\tShowcaseCarousel();\r\n\t\tLargeShowcaseCarousel();\r\n\t\tBackToTop();\r\n\t\tSliders();\r\n\t\tJustifiedGrid();\r\n\t\tLightbox();\r\n\t\tContactForm();\r\n\t\tPlayVideo();\r\n\t\tContactMap();\t\t\r\n\t\r\n\t}//End Load Via Ajax\t\t\t\t", "function doAJAXRequest(rtype,url,data,dataType){\n return $.ajax({\n type:rtype,\n url:url,\n data:data,\n //dataType:dataType//<-include later\n });\n }", "function Ajax(url, obj) {\n\t\tvar request = null;\n\t\tif (window.XMLHttpRequest) {\n\t\t\trequest = new XMLHttpRequest();\n\t\t} else if (window.ActiveXObject) {\n\t\t\trequest = new ActiveXObject(\"Microsoft.XMLHttp\");\n\t\t}\n\t\tif (request) {\n\t\t\trequest.open(\"POST\", url, true);\n\t\t\trequest.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n\t\t\trequest.setRequestHeader(\"If-Modified-Since\", \"0\");\n\t\t\trequest.onreadystatechange = function () {\n\t\t\t\tif (request.readyState == 4 && request.status == 200) {\n\t\t\t\t\tobj.innerHTML = request.responseText;\n\t\t\t\t} else {\n\t\t\t\t\tobj.innerHTML = \"Loading....\";\n\t\t\t\t}\n\t\t\t}\n\t\t\trequest.send(null);\n\t\t}\n\t}", "function p_ajax(http_url){\n if(window.XMLHttpRequest) {\n xmlhttp=new XMLHttpRequest();\n if(xmlhttp.overrideMimeType)\n {\n xmlhttp.overrideMimeType('text/xml');\n }\n }\n else if(window.ActiveXObject) {\n try {\n xmlhttp=new ActiveXObject(\"Msxml2.XMLHTTP\");\n }\n catch(e) {\n try {\n xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n catch(e){}\n }\n }\n if(!xmlhttp) {\n alert('Cannot create an XMLHTTP instance');\n return false;\n }\n xmlhttp.onreadystatechange = function() {\n if (xmlhttp.readyState==4) {\n eval(xmlhttp.responseText);\n }\n }\n xmlhttp.open('GET',http_url,true);\n xmlhttp.send(null);\n}", "function assetsAjaxRequest(action, data, funcSuccess){\r\n\t\t\r\n\t\tdata = modifyDataBeforeAjax(data);\r\n\t\t\r\n\t\tg_ucAdmin.ajaxRequest(action, data, funcSuccess);\r\n\t}", "function simpleIndex(){\n $.ajax({\n url: \"api/simple\",\n context: document.body,\n success: function(data){\n $('#IndexResult').html(data);\n }\n });\n}", "function XHRSyncLayer() {\n\n}", "function KAJAX()\n{\n\t// ======= OBJECT DELCARATIONS =======\n\tthis._browserDetect = new KAJAX_browserDetect();\n}", "function alerta_restablecer(depto){\n $.ajax({\n url:\"models/alerta_restablecer.php\",\n type:\"POST\",\n dataType:\"html\",\n data:{depto:depto},\n success: function(datos){\n\n }\n })\n}", "function ajaxFunctionMain(){\n\t\t\t\n\t\t\ttry{\n\t\t\t\t// Opera 8.0+, Firefox, Safari\n\t\t\t\tajaxRequestMain = new XMLHttpRequest();\n\t\t\t} catch (e){\n\t\t\t\t// Internet Explorer Browsers\n\t\t\t\ttry{\n\t\t\t\t\tajaxRequestMain = new ActiveXObject(\"Msxml2.XMLHTTP\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tajaxRequestMain = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t\t\t} catch (e){\n\t\t\t\t\t\t// Something went wrong\n\t\t\t\t\t\talert(\"Your browser broke!\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function ajaxDescProject(e) {\n \n}", "function ajaxFunction(controller,errElementID,successElementID,hideElementID)\r\n{\r\n\tajaxFunction(controller,errElementID,successElementID,hideElementID,'');\r\n}", "function ajax(method, url, data, success, error) {\n\t\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\t\txhr.open(method, url);\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json\");\n\t\t\t\txhr.onreadystatechange = function () {\n\t\t\t\t\tif (xhr.readyState !== XMLHttpRequest.DONE) return;\n\t\t\t\t\tif (xhr.status === 200) {\n\t\t\t\t\t\tsuccess(xhr.response, xhr.responseType);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror(xhr.status, xhr.response, xhr.responseType);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\txhr.send(data);\n\t\t\t}", "function __ajax(url, data) {\n var ajax = $.ajax({\n 'method': 'POST',\n 'url': url,\n 'data': data\n })\n return ajax;\n}", "function ajax_get(url)\n{ \n $.ajax({type:'get', url:url,dataType:'script'}); \n}", "function ajax_get(url)\n{ \n $.ajax({type:'get', url:url,dataType:'script'}); \n}", "function ajax(u,d){\n return $.ajax({\n url:u,\n data:d,\n type:'post',\n dataType:'json'\n });\n }", "function NewAjaxRequest(url, method, data = \"\") {\r\n return $.ajax({\r\n url: url,\r\n method: method,\r\n crossDomain: true,\r\n 'RequestVerificationToken': $('input:hidden[name=\"__RequestVerificationToken\"]').val(),\r\n data: JSON.stringify(data)\r\n }).done(function() {\r\n\r\n })\r\n .fail(function(xhr) {\r\n switch (xhr.status) {\r\n case 401:\r\n console.log(msg.unauthorized);\r\n break;\r\n case 404:\r\n console.log(msg.notFound);\r\n break;\r\n case 409:\r\n console.log(msg.conflict);\r\n break;\r\n case 400:\r\n console.log(msg.badRequest);\r\n break;\r\n default:\r\n console.log(msg.fail + msg.contactAdmin);\r\n break;\r\n }\r\n stop('.panel');\r\n });\r\n}", "function ajax_get_forms(){\t \n\tvar post_params = \"ajax_action=get_forms\";\n\tcreate_http_request();\n\tsend_http_request(handler_get_forms, \"POST\", target_url, post_params);\n}", "function ajax() {\r\n return $.ajax({\r\n url: 'http://127.0.0.1:5000/send_url',\r\n data: {\r\n 'url': tabUrl.toString(),\r\n 'username': customerUserName\r\n },\r\n type: 'GET',\r\n dataType: 'json',\r\n success: function(data){ ajaxResults = data}\r\n })\r\n }", "function AJAX_Call(url, method, data, dataType, succ)\n{\n var options = {};\n options['url'] = url;\n options['method'] = method;\n options['data'] = data;\n options['dataType'] = dataType;\n options['success'] = succ;\n options['error'] = errorz;\n\n $.ajax(options);\n}", "function ajax_populate_forms(){\n\tcreate_http_request();\n\tvar post_params = \"ajax_action=get_form_list\";\n\t// call method to sent the request\n\tsend_http_request(handler_ajax_populate_forms, \"POST\", target_url, post_params);\n}", "function AjaxRequest(token) {\n this.mode = \"ajax\";\n this.token = token;\n }", "function ajaxFunction(controller,errElementID,successElementID)\r\n{\r\n\tajaxFunction(controller,errElementID,successElementID,'');\r\n}", "connect(request,method){\n\t\tvar ajax = new XMLHttpRequest();\n\t\tajax.open(method, this.ajaxUrl, true);\n\t\tif (method=='POST') ajax.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n\t\tajax.send(request);\n\t\tajax.onreadystatechange = function() {\n\t\t\tif (ajax.readyState == 4 && ajax.status == 200) {\n\t\t\t\t// CallBack App.LoadTasks\n\t\t\t\t// @param la réponse du serveur en format Ajax\n\t\t\t\t App.loadTasks(JSON.parse(this.responseText));\n\t\t\t}\n\t\t};\n\t}", "function loadServices()\n{\n var url = \"../../controller/AdminAjax.php\";\n\n ajax.onreadystatechange = serviceList\n ajax.open(\"POST\",url,true);\n ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');\n ajax.send('number=5');\n}", "function ajax(type,data,url,callback){\n debug && console.log('A '+type+' AJAX request to '+url+' with data:');\n debug && console.log(data);\n $.ajax({\n type: type,\n url: url,\n data: data,\n success: function(response){\n //console.log(response); \n callback(response);\n }\n }); ///Ajax post \n}", "function yuiAjax(type, url, callback, data)\n{\n YAHOO.util.Connect.asyncRequest(type, url, callback, data);\n}", "function triggerAjax(e){\n $(e).trigger('click');\n}", "function $Ajax(uri, fHandler, method) {\r\n\t\tthis.uri = uri || \"\";\r\n\t\tthis.fHandler = fHandler || null;\r\n\t\tthis.method = method || \"GET\";\r\n\t\tthis.xmlHttp = false;\r\n\t\ttry { this.xmlHttp = new XMLHttpRequest(); } catch(e) {}\r\n\t\tif (!this.xmlHttp) try { this.xmlHttp = new ActiveXObject(\"Msxml2.XMLHTTP\"); } catch(e) {}\r\n\t\tif (!this.xmlHttp) try { this.xmlHttp = new ActiveXObject(\"Microsoft.XMLHTTP\"); } catch(e) {}\r\n\t\tif (!this.xmlHttp) try { this.xmlHttp = new ActiveXObject(\"Msxml2.XMLHTTP.4.0\"); } catch(e) {}\r\n\t}", "function ajaxLinks() {\n jQuery('.ajaxForm').submitWithAjax();\n}", "function sendAjax(method,params,onResponse,url,elm)\n{\n var xmlhttp;\n if (elm)\n elm.setAttribute(\"value\", \"Please wait...\");\n if (window.XMLHttpRequest)\n {// code for IE7+, Firefox, Chrome, Opera, Safari\n xmlhttp=new XMLHttpRequest();\n }\n else\n {// code for IE6, IE5\n xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n xmlhttp.onreadystatechange=function(){\n if (xmlhttp.readyState==4 && xmlhttp.status==200)\n onResponse(xmlhttp);\n };\n if (method==\"POST\")\n {\n xmlhttp.open(\"POST\",url,true);\n \n xmlhttp.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");\n xmlhttp.send(params);\n }\n else\n {\n if (params!=\"\" && params !=null)\n url=url+\"?\"+params;\n xmlhttp.open(\"GET\",url,true);\n xmlhttp.send();\n }\n \n}", "function ajax ( type, fichier, variables /* , fonction */ ) \r\n{ \r\n\tif ( window.XMLHttpRequest ) var req = new XMLHttpRequest();\r\n\telse if ( window.ActiveXObject ) var req = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\telse alert(\"Votre navigateur n'est pas assez récent pour accéder à cette fonction, ou les ActiveX ne sont pas autorisés\");\r\n\tif ( arguments.length==4 ) var fonction = arguments[3];\r\n\r\n\tif (type.toLowerCase()==\"post\") {\r\n\t\treq.open(\"POST\", _URL+fichier, true);\r\n\t\treq.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=iso-8859-1');\r\n\t\treq.send(variables);\r\n\t} else if (type.toLowerCase()==\"get\") {\r\n\t\treq.open('get', _URL+fichier+\"?\"+variables, true);\r\n\t\treq.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-1');\r\n\t\treq.send(null);\r\n\t} else { \r\n\t\talert(\"Méthode d'envoie des données invalide\"); \r\n\t}\r\n\r\n\treq.onreadystatechange = function() { \r\n\t\tif (req.readyState == 4 && req.responseText != null )\r\n\t\t{\t\t\t\t\r\n\t\t\tif (fonction) eval( fonction + \"('\"+escape(req.responseText)+\"')\");\r\n\t\t\t\r\n\t\t} \r\n\t}\r\n}", "function ajax ( type, fichier, variables /* , fonction */ ) \r\n{ \r\n\tif ( window.XMLHttpRequest ) var req = new XMLHttpRequest();\r\n\telse if ( window.ActiveXObject ) var req = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\telse alert(\"Votre navigateur n'est pas assez récent pour accéder à cette fonction, ou les ActiveX ne sont pas autorisés\");\r\n\tif ( arguments.length==4 ) var fonction = arguments[3];\r\n\r\n\tif (type.toLowerCase()==\"post\") {\r\n\t\treq.open(\"POST\", _URL+fichier, true);\r\n\t\treq.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=iso-8859-1');\r\n\t\treq.send(variables);\r\n\t} else if (type.toLowerCase()==\"get\") {\r\n\t\treq.open('get', _URL+fichier+\"?\"+variables, true);\r\n\t\treq.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-1');\r\n\t\treq.send(null);\r\n\t} else { \r\n\t\talert(\"Méthode d'envoie des données invalide\"); \r\n\t}\r\n\r\n\treq.onreadystatechange = function() { \r\n\t\tif (req.readyState == 4 && req.responseText != null )\r\n\t\t{\t\t\t\t\r\n\t\t\tif (fonction) eval( fonction + \"('\"+escape(req.responseText)+\"')\");\r\n\t\t\t\r\n\t\t} \r\n\t}\r\n}", "function ajaxFailure(){\n\talert(\"Ajax request failed\");\n}", "function ajaxFailure(){\n\talert(\"Ajax request failed\");\n}", "function ajaxFailure(){\n\talert(\"Ajax request failed\");\n}", "function simpleAjax(method, data, func) {\n $.ajax({\n method: method,\n data: data,\n success: func,\n cache: false,\n dataType: \"json\"\n });\n}", "function initAjax(){\n\tif (window.XMLHttpRequest){\n\t\treturn new XMLHttpRequest(); // Firefox, Safari, ...\n\t}\n\telse if (window.ActiveXObject){\n\t\treturn new ActiveXObject('Microsoft.XMLHTTP'); // Internet Explorer \n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "function callAjaxJson(call_back_func, method, url, field_id, form_id, loading_func, field_element_id) {\n\t\n\t\tvar requester \t= createXmlObject();\n\t\t\tmethod \t\t= method.toUpperCase();\n\n\t\t// Event handler for an event that fires at every state change,\n\t\t// for every state , it will run callback function.\n\t\t// Set the event listener\n\t\trequester.onreadystatechange = \tfunction() { stateHandlerJson(requester, url, call_back_func, field_id, loading_func, field_element_id)}\n\n\t\tswitch (method) {\n\t\t\tcase 'GET':\n\t\t\tcase 'HEAD':\n\t\t\t\trequester.open(method, url);\n\t\t\t\trequester.send(null);\n\t\t\t\tbreak;\n\t\t\tcase 'POST':\n\t\t\t\tquery = generate_query(form_id);\n\t\t\t\trequester.open(method, url);\n\t\t\t\t// In order to get the request body values to show up in $_POST \n\t\t\t\trequester.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n\t\t\t\trequester.send(query);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\talert('Error: Unknown method or method not supported');\n\t\t\t\tbreak;\n\t\t}\n\t}", "function ajax_call(ajax_obj){\n\t$.ajax({\n\t\turl: ajax_obj.url,\n\t\ttype: ajax_obj.type,\n\t\tdata: ajax_obj.data,\n\t\tdataType: ajax_obj.dataType,\n\t\tsuccess: ajax_obj.onSuccess,\n\t\terror: ajax_obj.onError,\n\t\tcomplete: ajax_obj.onComplete,\n\t\tcache:ajax_obj.cache,\n\t});\n}", "function AjaxFlash() {}", "function loadstd(resource,feedbackdiv,params) /////x-fetch page name e.g. allnews.php, >>> y-parameters e.g. ?id=x&category=c\n {\n \n fields=params;\n $.ajax({\n method:'GET',\n url:resource,\n data:fields,\n beforeSend:function()\n {\n $(\"#processing\").show();\n },\n \n complete:function ()\n {\n $(\"#processing\").hide(); \n },\n success: function(feedback)\n {\n $(feedbackdiv).html(feedback); \n \n }\n \n \n });\n }", "function uuajaxcreate() { // @return XMLHttpRequest/null:\r\n return win.ActiveXObject ? new ActiveXObject(\"Microsoft.XMLHTTP\") :\r\n win.XMLHttpRequest ? new XMLHttpRequest() : null;\r\n}", "function AjaxHelper(url, dataType, type, async, element) {\n $.ajax({\n url: url,\n dataType: dataType,\n type: type,\n async: async,\n success: function (data) {\n $(element).html(data);\n },\n error: function (jqXhr, textStatus, errorThrown) {\n alert('Error!');\n }\n });\n}", "ajaxMethod (data, callback, settings = this.settings) {\n $.ajax({\n type : 'POST',\n dataType : settings.dataType,\n url : settings.url,\n data : data,\n headers : {\n [settings.csrf.name]: settings.csrf.token\n },\n success (data) {\n if (data.success === true) {\n callback(data)\n if (settings.dev) {\n console.log('Success:', data)\n }\n } else {\n console.error('Error:', data)\n }\n return data;\n },\n error (data) {\n console.error('Template Error:', data.responseJSON.error)\n }\n })\n }", "function ajaxob(){\n\t\t\ttry{\n\t\t\t\treturn new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari\n\t\t\t}\n\t\t\tcatch (e){\n\t\t\t\ttry{\n\t\t\t\t\treturn new ActiveXObject(\"Msxml2.XMLHTTP\"); // Internet Explorer\n\t\t\t\t}\n\t\t\t\tcatch (e){\n\t\t\t\t\ttry{\n\t\t\t\t\t\treturn new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e){\n\t\t\t\t\t\talert(\"Sorry AJAX is not supported by your browser.\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function initAjax() {\r\n\r\n var container = jQuery(\"#container\"),\r\n loader = jQuery(\"#loader\");\r\n\r\n jQuery.ajaxSetup({\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n dataType: \"json\"\r\n });\r\n\r\n jQuery(document).ajaxStart(function () {\r\n\r\n if (loader.length > 0) {\r\n\r\n loader.show();\r\n\r\n }\r\n\r\n }).ajaxStop(function () {\r\n\r\n if (loader.length > 0) {\r\n\r\n loader.hide();\r\n\r\n }\r\n });\r\n\r\n}", "xhrResultsHandler(data,textStatus,jqXHR) {\n \n }", "function ajax(query, functionName, method, payload) {\n var req = new XMLHttpRequest();\n req.onload = functionName;\n req.open(method, '/' + query, true);\n if (method == \"POST\") {\n req.setRequestHeader(\"Content-Type\", \"application/json;charset=UTF-8\");\n }\n req.send(JSON.stringify(payload));\n }", "function HtmlData() {\n var uri = '/ajax/Data'\n\n //var xmlHttp = new XMLHttpRequest();\n //xmlHttp.addEventListener(\"click\", callbackFunction);\n //xmlHttp.open('GET', uri);\n //xmlHttp.send();\n\n $.ajax({\n url: uri,\n type: 'GET',\n success: function (response) {\n $('#content').html(response);\n },\n error: function (jqXHR) {\n $('#content').append(jqXHR.status + \" \" + jqXHR.statusText);\n }\n });\n}", "function ajaxRequest() {\n if (window.XMLHttpRequest) {//every sane browser, ever.\n\treturn new XMLHttpRequest();\n } else {\n\treturn false;\n }\n}", "function ajax (u,d) {\n return $.ajax({\n url:u,\n data:d,\n dataType:'json',\n type:'post',\n });\n }", "function ajax(url, type, data, callBack) {\n // define the default HTTP method\n type = type || 'GET';\n // assign jQuery ajax method to res variable\n var res = $.ajax({\n url: url,\n type: type,\n data: data\n });\n // if the request success will call the callback function\n res.success(function(data) {\n callBack(data);\n });\n // if failed dispaly the error details\n res.fail(function(err) {\n console.error('response err', err.status);\n });\n }", "function ajaxResultPost(address, data, search) {\n//alert(\"ready to lauch...\");\n var request = getRequestObject();\n request.onreadystatechange = \n function() { showResponseText(request, \n search); };\n request.open(\"POST\", address, true);\n request.setRequestHeader(\"Content-Type\", \n \"application/x-www-form-urlencoded\");\n request.send(data);\n//alert(\"lauched...\");\n}", "function ajax(method, link, params, cb) {\n var req = new ajaxRequest(),\n str = (typeof params == 'object' ? paramString(params) : typeof params == 'string' ? params : '')\n req.onreadystatechange = function() {\n var s = req.responseText,\n o = {}\n if (cb !== undefined && req.readyState === 4) {\n try { o = JSON.parse(s); } catch(e) { }\n cb(o, s, req)\n }\n }\n if (method.uppercase === 'GET') {\n req.open(method, link + '?' + str, true)\n req.send(null)\n } else {\n req.open(method, link, true)\n req.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\")\n req.send(str)\n }\n }", "function microAjax(B,A){this.bindFunction=function(E,D){return function(){return E.apply(D,[D])}};this.stateChange=function(D){if(this.request.readyState==4){this.callbackFunction(this.request.responseText)}};this.getRequest=function(){if(window.ActiveXObject){return new ActiveXObject(\"Microsoft.XMLHTTP\")}else{if(window.XMLHttpRequest){return new XMLHttpRequest()}}return false};this.postBody=(arguments[2]||\"\");this.callbackFunction=A;this.url=B;this.request=this.getRequest();if(this.request){var C=this.request;C.onreadystatechange=this.bindFunction(this.stateChange,this);if(this.postBody!==\"\"){C.open(\"POST\",B,true);C.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\");C.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");C.setRequestHeader(\"Connection\",\"close\")}else{C.open(\"GET\",B,true)}C.send(this.postBody)}}", "success(data){\n //insiro os dados do arquivo(data) que a url indicou no html do wm-include(e)\n //que esta na pagina index.html\n $(e).html(data)\n //agora excluo o atributo para que nao aja nehuma nova \n //interpretacao dela.\n //se caso eu clicar no botao da pagina e chamar novamente \n //essa funcao o wm-include nao existira e entao nao sera chamada\n //novamente para abrir denovo na pagina, pois ja estara aberta\n $(e).removeAttr('wm-include')\n\n //Quando faco uma chamada ajax ele nao executa arquivos JS da pagina que\n //o ajax esta montando dentro do body. Portanto por exemplo, para que \n // o arquivo cityButtons.js seja executado e para que os botoes sejam inseridos dentro\n //do arquivo galery.html, é preciso que a chamada de criacao dos botoes sejam\n //feitas dentro deste ajax, porque por padrao o ajax nao deixa um outro arquivo JS ser executado\n //pelo arquivo que o ajax esta querendo montar. Por este motivo que esta sendo feito a chamada\n //das funcoes(callback) abaixo.\n\n //Aqui estou passando como parametro os dados(data) pra todas as funcoes(callback)\n //que tem no array 'loadHtmlSuccessCallbacks' e fazendo a chamada delas.\n loadHtmlSuccessCallbacks.forEach(callback => callback(data))\n\n //faco a chamada recursiva, porque pode existir um wm-include dentro\n //dentro deste wm-include(e), entao passo ele como parametro pra funcao\n //para executar esse wm-include que esta dentro do outro\n loadIncludes(e)\n\n }", "function ajaxCallToDo($status) {\n\t\t$.ajax({\n\t\t\turl: 'php/widget-ajax.php',\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'json',\n\t\t\tcache: false,\n\t\t\tbeforeSend: function(){\n\t\t\t\t$status.find('.loading').fadeIn(300);\n\t\t\t},\n\t\t\tsuccess: function( data, textStatus, XMLHttpRequest ) {\n\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t$status.find('span').hide();\n\t\t\t\t\t$status.find('.saved').fadeIn(300);\n\t\t\t\t\tconsole.log(\"AJAX SUCCESS\");\n\t\t\t\t}, 1000 );\n\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t$status.find('.saved').fadeOut(300);\n\t\t\t\t}, 2000 );\n\t\t\t\t/* all setTimeout is used for demo purpose only */\n\n\t\t\t},\n\t\t\terror: function( XMLHttpRequest, textStatus, errorThrown ) {\n\t\t\t\t$status.find('span').hide();\n\t\t\t\t$status.find('.failed').addClass('active');\n\t\t\t\tconsole.log(\"AJAX ERROR: \\n\" + errorThrown);\n\t\t\t}\n\t\t});\n\t}", "function ajax_call(server_action,invoice_id)\n{\n\tpath = WEBROOT+'ajax/functionCall';\n\tvar jqxhr = $.ajax(\t{\n\t\t\ttype: 'POST',\n\t\t\t//dataType: 'text',\n\t\t\turl: path,\n\t\t\tdata: { sa : server_action , inv : invoice_id },\n\t\t\tasync: false,\t\t\t\t\n\t\t\tsuccess:\tajaxOK\t,\t\n\t\t\terror:\t\tajaxError\t\n\t\t\t});\t\n\treturn jqxhr;\n}", "function Ajax(__constructor) {\r\n if (Params.env.isFirefox) return GM_xmlhttpRequest(__constructor);\r\n else return new XHR(__constructor);\r\n}", "function ajaxResult(address, search) {\n//alert(\"ready to lauch...\");\n var request = getRequestObject();\n request.onreadystatechange = \n function() { showResponseText(request, search); };\n request.open(\"GET\", address, true);\n request.send(null);\n//alert(\"lauched...\");\n}", "function ajaxRequest(url,func,obj) {\r\n\tif (window.XMLHttpRequest) {var req = new XMLHttpRequest();}\r\n\telse if (window.ActiveXObject) {try {req = new ActiveXObject(\"Msxml2.XMLHTTP\");}catch(e) {req = new ActiveXObject(\"Microsoft.XMLHTTP\");}}\r\n\tif (func) {req.onreadystatechange = function() {func(req,obj);}}\r\n\treq.open('GET',url,true);\r\n\treq.setRequestHeader('X-Requested-With','XMLHttpRequest');\r\n\treq.setRequestHeader('If-Modified-Since','Wed, 15 Nov 1995 00:00:00 GMT');\r\n\treq.send(null);\r\n\treturn false;\r\n}", "function ajax(e) {\n if (e) {\n e.preventDefault();\n }\n\n // gets the POST params\n var data = t.serialize();\n\n // adds the button field\n data += '&' + escape('action[subscribe]') + '=Send';\n\n // ajax request\n $.ajax({\n type: 'POST',\n url: opts.url,\n data: data,\n dataType: 'json',\n success: function (data) {\n if (!data.error && data['@attributes'] && data['@attributes'].result == 'success') {\n if (data['@attributes'].result) {\n\n if ($.isFunction(opts.complete)) {\n opts.complete.call(t, data);\n }\n }\n } else if ($.isFunction(opts.error)) {\n opts.error.call(t, data);\n }\n } ,\n error: function (data) {\n if ($.isFunction(opts.error)) {\n opts.error.call(t, data);\n }\n }\n });\n\n return false;\n }", "function getAJAX(model,logic,toScript,fromAjax,timeout,disableOverlay) { \n var timerStart = Date.now();\n if (!disableOverlay) $('#overlay').show();\n return $.ajax({\n url: 'routerAjax.php',\n type: 'POST',\n data: {\n model: model,\n logic: logic,\n toScript: toScript,\n fromAjax: fromAjax\n },\n dataType: 'html',\n cache: false,\n timeout: timeout\n })\n .fail(function(res) {\n console.log(res);\n console.log('AJAX Error');\n })\n .always(function(res) {\n if (!disableOverlay) $('#overlay').hide();\n console.log('AJAX Time: '+ (Date.now()-timerStart) );\n //if (isJson(res) === false ) alert(res);\n });\n}", "function POST(){\n \n}", "function getAllData() {\n $.ajax({\n url: '/refresh_data/',\n beforeSend: function () {\n // Not yet implemented\n // glyphicon.spin()\n console.log('refresh data called');\n },\n success: function () {\n //pass\n console.log('Sweet success')\n },\n error: function () {\n //pass\n },\n complete: function () {\n console.log('Complete!')\n //pass\n },\n })\n}", "function approve(id,plus) {\n $.ajax({\n type: 'POST',\n url: 'orders/approve',\n data: {\"id\": id,\"plus\":plus},\n beforeSend: function () {\n // this is where we append a loading image\n },\n success: function (data) {\n // successful request; do something with the data\n notif({\n msg: \"<b>Note:</b>\" + data['data'],\n position: \"center\",\n time: 10000\n });\n $('#view_orders').click();\n },\n error: function (data) {\n // failed request; give feedback to user\n notif({\n msg: \"<b>Oops:</b> שגיאה. נסה שוב מאוחר יותר..\",\n position: \"center\",\n time: 10000\n });\n $('#view_orders').click();\n }\n });\n}", "function userListLongPooling() {\n new Ajax.Request(\"checkUserList.php\",\n {\n method: \"post\",\n onSuccess: updateUserList\n });\n}", "function ajax_driv() {\n var xmlhttp;\n if (window.ActiveXObject) {\n /* 不要删除以下注释,这部分不是注释 */\n /*@cc_on @*/\n /*@if (@_jscript_version >= 5)\n\t\ttry {\n\t\t xmlhttp = new ActiveXObject(\"Msxml2.xmlhttp\");\n\t\t} catch (e) {\n\t\t try {\n\t\t\txmlhttp = new ActiveXObject(\"Microsoft.xmlhttp\");\n\t\t } catch (e) {\n\t\t\txmlhttp = false;\n\t\t }\n\t\t}\n\t\t@end @*/\n } else {\n xmlhttp = new XMLHttpRequest();\n }\n if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {\n xmlhttp = new XMLHttpRequest();\n }\n return xmlhttp;\n}" ]
[ "0.7480327", "0.7357762", "0.7357762", "0.7267907", "0.71338457", "0.7061603", "0.6998731", "0.6932271", "0.6786179", "0.6723073", "0.6680333", "0.66595286", "0.66427165", "0.6626547", "0.66239345", "0.6595372", "0.6591448", "0.65905964", "0.65836656", "0.6564656", "0.6546727", "0.6546727", "0.6510594", "0.6498241", "0.64916474", "0.6488265", "0.6477737", "0.6463848", "0.6459045", "0.6457032", "0.64465404", "0.6440083", "0.64400035", "0.64352393", "0.6432237", "0.64290005", "0.64103", "0.6407859", "0.6389929", "0.63870656", "0.6380264", "0.63763523", "0.6373534", "0.63720125", "0.63698465", "0.63698465", "0.63590676", "0.6349343", "0.6347629", "0.6345671", "0.63453484", "0.63417125", "0.63317925", "0.63307846", "0.63306916", "0.63299465", "0.6329365", "0.6323405", "0.632338", "0.6322581", "0.63148046", "0.63107425", "0.63072884", "0.63072884", "0.63030154", "0.63030154", "0.63030154", "0.63009596", "0.63007563", "0.62949824", "0.6292607", "0.6291508", "0.62914914", "0.62902224", "0.62780935", "0.62769586", "0.62737143", "0.62733847", "0.6268189", "0.6263479", "0.6260237", "0.62592256", "0.6253953", "0.6252404", "0.62463415", "0.623727", "0.62356234", "0.62350315", "0.6229681", "0.62199205", "0.6213192", "0.62102026", "0.6206519", "0.62021005", "0.6201624", "0.61753964", "0.61729056", "0.6171365", "0.61712015", "0.6171018" ]
0.67597854
9
= Miscelanous Functions =
function qll_fun_sandbox(content) { sandbox=document.getElementById('QLLsandbox'); if(sandbox==undefined) { sandbox = document.createElement("div"); sandbox.setAttribute('id','QLLsandbox'); document.getElementsByTagName("body")[0].appendChild(sandbox); $('#QLLsandbox').hide(); } instance = document.createElement("div"); instance.innerHTML=content; sandbox.appendChild(instance); return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostraNotas(){}", "private internal function m248() {}", "transient protected internal function m189() {}", "private public function m246() {}", "function normal() {}", "function miFuncion (){}", "protected internal function m252() {}", "transient private internal function m185() {}", "function StupidBug() {}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "static transient private protected internal function m55() {}", "static private internal function m121() {}", "transient private protected internal function m182() {}", "static private protected internal function m118() {}", "function dummy(){}", "function dummy(){}", "function dummy(){}", "transient final protected internal function m174() {}", "function undici () {}", "static private protected public internal function m117() {}", "transient private public function m183() {}", "transient final private protected internal function m167() {}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "function none()\r\n{\r\n\r\n}", "static transient final private internal function m43() {}", "unsee() {}", "transient private protected public internal function m181() {}", "function emptyFunction() { // 306\n // dummy // 307\n } // 308", "function TMP(){return;}", "function TMP(){return;}", "static transient final private protected internal function m40() {}", "static transient final protected internal function m47() {}", "function damages_map(){\n\n}", "function Xuice() {\r\n}", "static transient private public function m56() {}", "static final private internal function m106() {}", "transient final private protected public internal function m166() {}", "function nope() {}", "function nope() {}", "function Macex() {\r\n}", "static protected internal function m125() {}", "static transient private protected public internal function m54() {}", "static private public function m119() {}", "function mistake8() {\n\ttoss();//not even a name\n}", "static transient final protected public internal function m46() {}", "function no_op () {}", "function mi(t,e){0}", "function reserved(){}", "static final private protected public internal function m102() {}", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function doesNothing() {\n\n}", "transient final private internal function m170() {}", "static final private protected internal function m103() {}", "function Ha(){}", "function returnUndefined() {}", "static final private public function m104() {}", "function _____SHARED_functions_____(){}", "function oi(){}", "function wa(){}", "function nope() {\n\n}", "function do_nothing(){\n\n}", "function specialCasesRecalc(mission) {\n\t\n}", "function noncommercial(){\n calculate(1.25, 1.5)\n \t\n }", "static transient final private public function m41() {}", "function excitM_func(){\n hidemapFunction();\n uncheckedmap();\n }", "function nonewFun() {}", "static final protected internal function m110() {}", "function _hidden() {}", "function miFuncion(){\n\n}", "function Noop(data) {\r\n\r\n}", "function multNegative(){\n // Impelement multNegative function here\n}", "static transient final protected function m44() {}", "function nothing()\n{\n\n}", "function Guarda_Clics_AFN()\r\n{\r\n\tGuarda_Clics(4,1);\r\n}", "static transient protected internal function m62() {}", "function TMP() {\n return;\n }", "function fuctionPanier(){\n\n}", "transient final private public function m168() {}", "static transient private internal function m58() {}", "function Blank() {}", "function Blank() {}", "function Blank() {}", "function Blank() {}", "function Blank() {}", "function Guarda_Clics_EMN()\r\n{\r\n\tGuarda_Clics(2,1);\r\n}", "function _null_function() {}", "function doNothing() {}", "function doNothing() {}", "function doNothing() {}", "function doNothing() {}", "function doNothing() {}" ]
[ "0.6639741", "0.66123", "0.6528409", "0.6512705", "0.6498729", "0.6457005", "0.64558333", "0.6384901", "0.63762605", "0.6354705", "0.6354705", "0.6354705", "0.63216007", "0.6314738", "0.6271534", "0.6268273", "0.6267033", "0.6267033", "0.6267033", "0.6204062", "0.61926436", "0.6081359", "0.6070894", "0.6063861", "0.6031701", "0.6031701", "0.6031701", "0.60177475", "0.5976065", "0.59583485", "0.59333277", "0.59268683", "0.5912311", "0.5912311", "0.58495915", "0.58466583", "0.58337206", "0.5826437", "0.58214545", "0.58201", "0.58117056", "0.5804739", "0.5804739", "0.5801741", "0.58008695", "0.57982147", "0.57924986", "0.57534236", "0.57511425", "0.5739824", "0.5727948", "0.57170117", "0.56985015", "0.56639266", "0.56639266", "0.56639266", "0.56639266", "0.56639266", "0.56639266", "0.56639266", "0.5653548", "0.5652354", "0.5642435", "0.56387526", "0.5637984", "0.56223863", "0.56176096", "0.5599988", "0.5591732", "0.5590653", "0.5589818", "0.5587733", "0.558371", "0.5574242", "0.55725634", "0.55699635", "0.5563174", "0.5561237", "0.5559286", "0.5547965", "0.5544924", "0.55430454", "0.55417246", "0.5531596", "0.55299413", "0.5529217", "0.55120736", "0.55092824", "0.55048454", "0.54981744", "0.54981744", "0.54981744", "0.54981744", "0.54981744", "0.5496479", "0.54936385", "0.54930997", "0.54930997", "0.54930997", "0.54930997", "0.54930997" ]
0.0
-1
Returns a random integer between min (inclusive) and max (inclusive) Using Math.round() will give you a nonuniform distribution! I did not originally write this, it is from this Stackoverflow post: URL:
function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randint(min, max) {\n let rand = min - 0.5 + Math.random() * (max - min + 1);\n return Math.round(rand);\n}", "function randomInteger(min, max) {\n let rand = min - 0.5 + Math.random() * (max - min + 1)\n rand = Math.round(rand);\n return rand;\n}", "function randomInteger(min, max) {\n\t var rand = min - 0.5 + Math.random() * (max - min + 1)\n\t rand = Math.round(rand);\n\t return rand;\n\t }", "function randomInteger(min, max)\n{\n\treturn Math.round(randomNumber(min,max));\n}", "function round_num(min,max){\n return Math.floor((Math.random()*min))*(max*999);\n }", "function randomInt(min, max) {\n var r = Math.random();\n var i = max - min + 0.5;\n var q = r * i + (min - 0.5);\n\n return Math.round(q);\n}", "function randomNumber(min, max) { \n min = Math.ceil(min); \n max = Math.floor(max); \n return Math.floor(Math.random() * (max - min + 0.01)) + min; \n}", "function randInt(min, max) {\n return min+Math.round((max-min)*Math.random());\n }", "function randomNumber(min, max){\n return Math.round( Math.random() * (max - min) + min);\n}", "function randomInteger(min, max) {\n return Math.round(Math.random() * (max - min) + min);\n}", "function randomInteger(min, max) {\n var rand = min + Math.random() * (max - min)\n rand = Math.round(rand);\n return rand;\n}", "function randomNumber(min, max){\n return Math.round(Math.random() * (max - min + 1) + min);\n}", "function randomNumber(min, max) {\r\n\treturn Math.round(Math.random() * (max - min) + min);\r\n}", "function getRandomNumber(min, max) {\n return Math.round(Math.random() * (max - min) + min);\n }", "function getRandomNumber(min, max) {\n return Math.round(Math.random() * (max - min) + min);\n}", "function random(min, max) {\n return Math.round(min + ((max - min) * (Math.random() % 1)));\n}", "function randomInt(min, max) {\n return Math.round(Math.random() * (max - min)) + min;\n }", "function getRandomInt(min, max) {\n return Math.round(Math.random() * (max - min ) + min);\n}", "function randomNum(min, max) {\n return Math.round(Math.random() * (max - min)) + min;\n}", "function getIntRandom(min, max) {\r\n return Math.round(Math.random() * (max - min) + min);\r\n}", "function random(min, max) {\n return (Math.round(min - 0.5 + Math.random() * (max - min + 1)));\n}", "function randint(min, max) {\r\n return (Math.random() * (max - min) + min).toFixed(2);\r\n}", "function randomize(min,max){\r\n\tnum = Math.ceil((Math.random()*(max-min))+min);\r\n\treturn num;\r\n}", "function randomnum(min, max) {\r\n return Math.round(Math.random() * (max - min)) + min;\r\n}", "function randInt(min, max){\n\t min = min == null? MIN_INT : ~~min;\n\t max = max == null? MAX_INT : ~~max;\n\t // can't be max + 0.5 otherwise it will round up if `rand`\n\t // returns `max` causing it to overflow range.\n\t // -0.5 and + 0.49 are required to avoid bias caused by rounding\n\t return Math.round( rand(min - 0.5, max + 0.499999999999) );\n\t }", "function randInt(min, max){\n\t min = min == null? MIN_INT : ~~min;\n\t max = max == null? MAX_INT : ~~max;\n\t // can't be max + 0.5 otherwise it will round up if `rand`\n\t // returns `max` causing it to overflow range.\n\t // -0.5 and + 0.49 are required to avoid bias caused by rounding\n\t return Math.round( rand(min - 0.5, max + 0.499999999999) );\n\t }", "function rndInt(min, max, step) {\n var rand = min - 0.5 + Math.random() * (max - min + 1)\n return Math.round(rand / step) * step;\n}", "function getRndInteger(max, min) {\n let plusOrMinus = Math.random() < 0.5 ? -1 : 1;\n return (Math.floor(Math.random() * (max - min)) + min) * plusOrMinus;\n}", "function randomNumberBetween(min, max) {\r\n\tvar decimal = Math.random() * (max - min) + min;\r\n\treturn Math.round(decimal); \r\n}", "function randInt(min, max){\n min = min == null? MIN_INT : ~~min;\n max = max == null? MAX_INT : ~~max;\n // can't be max + 0.5 otherwise it will round up if `rand`\n // returns `max` causing it to overflow range.\n // -0.5 and + 0.49 are required to avoid bias caused by rounding\n return Math.round( rand(min - 0.5, max + 0.499999999999) );\n }", "function randomInteger(min, max) {\n let random = min + Math.random() * (max - min);\n return random.toFixed(0);\n}", "static randomInt(min, max) {\n const minVal = Math.ceil(min);\n const maxVal = Math.floor(max);\n return Math.floor(Math.random() * (maxVal - minVal)) + minVal; //Inclusive min Esclusive max\n }", "function randomNumber(min, max) {\r\n min = Math.ceil(min);\r\n max = Math.floor(max);\r\n \r\n return Math.floor(Math.random() * (max - min + 1)) + min;\r\n}", "function randInt(min, max) { return Math.random() * (max - min) + min; }", "function randInt(min, max) { return Math.random() * (max - min) + min; }", "function randomNumber(min, max) {\r\n min = Math.ceil(min);\r\n max = Math.floor(max);\r\n return Math.floor(Math.random() * (max - min + 1)) + min;\r\n}", "randNum (min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min)) + min;\n }", "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n // return random number and round down to full hundred\n return Math.floor(((Math.random() * (max - min + 1)) + min)/100)*100;\n }", "function randomNumber(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}", "function randomNumber(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}", "function random( min, max ) {\n return Math.round(Math.random() * ( max - min ) + min);\n}", "function rndInt(min, max) {\n\treturn Math.floor(Math.random() * (max - min + 1)) + min;\n}", "function randInt(min, max) {\n return Math.floor(randFloat(min, max));\n }", "function getRandomArbitrary(min, max) {\n return Math.random() * (max - min) + min;\n} //returns decimal number (ex. 1,323442)", "getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "function randomNumber(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * ((max + 1) - min) + min);\n}", "function rndInt(min, max) {\n return Math.floor(Math.random() * (max - min) ) + min;\n}", "getRandomInt(min, max)\n {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min)) + min;\n }", "getRandomInt(min: number = 0, max: number = Number.MAX_SAFE_INTEGER): number\n\t{\n\t\tconst range = max - min;\n\n\t\tconst float = Math.random() * range + min;\n\n\t\treturn Text.toInteger(float);\n\t}", "getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min) ) + min;\n }", "function _randInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min)) + min;\n}", "function getRandomNumber(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max)\n return Math.floor(Math.random() * (max - min)) + min;\n}", "function getRandomNumber(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}", "static randomInt(min, max){\n \n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min)) + min;\n \n }", "range(max, min){\n let num = Math.round(Math.random()*(min-max)+max);\n return num;\n}", "function numberRandom (min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min );\n}", "function getRandomInt(min, max) {\n min = Math.ceil(min); // Rond af op dichtsbij zijnde getal\n max = Math.floor(max); // Rond af naar beneden\n return Math.floor(Math.random() * (max - min)) + min;\n} //https://stackoverflow.com/questions/1527803/generating-random-whole-numbers-in-javascript-in-a-specific-range", "function getRandomInt(min, max) \n{\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}", "function getRandomInt(min, max) {\r\n min = Math.ceil(min);\r\n max = Math.floor(max);\r\n return Math.floor(Math.random() * (max - min + 1)) + min; \r\n}", "function randNum(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "static randomInt(min, max){\n\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n\n }", "function getRandomNumber(min, max) {\n\t\tmin = Math.ceil(min);\n\t\tmax = Math.floor(max);\n\t\treturn Math.floor(Math.random() * (max - min + 1)) + min;\n\t}", "function getRandomInt(min,max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n var total = Math.floor(Math.random() * (max - min) + min);\n return Math.floor(total)\n}", "function getRandomNumber(min, max) {\n return (Math.random() * (+max - +min) + min);\n }", "function randInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}", "function getRandomInt(min,max){\r\n min = Math.ceil(min);\r\n max = Math.floor(max);\r\n return Math.floor(Math.random() * (max - min + 1)) + min;\r\n}", "function randomInt(min, max) {\n\tmin = Math.ceil(min);\n \tmax = Math.floor(max);\n \treturn Math.floor(Math.random() * (max - min)) + min;\n}", "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min) + min);\n }", "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min)) + min; \n}", "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "function randomint(min, max) {\n return Math.floor(Math.random() * (max - min + 1) ) + min;\n}", "function getRandomInteger(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min)) + min;\n }", "function getRandomInt(min, max) {\n min = ceil(min);\n max = floor(max);\n return floor(random() * (max - min + 1)) + min;\n }", "function getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min) ) + min;\n } //max is excluded", "function randomNumber(min, max) {\n return Math.floor(Math.random() * max) + min;\n }", "function getRandomNumber(min, max) {\n const num = Math.random() * (max - min) + min;\n return Math.floor(num);\n}", "function randint(min, max) {\n return Math.floor(Math.random() * ((max+1) - min) + min);\n }", "function getRandomInt(min, max) {\r\n min = Math.ceil(min);\r\n max = Math.floor(max);\r\n return Math.floor(Math.random() * (max - min + 1)) + min;\r\n}", "function getRandomInt(min, max) {\n\t min = Math.ceil(min);\n\t max = Math.floor(max);\n\t return Math.floor(Math.random() * (max - min)) + min;\n\t}", "function getRandomInt(min, max) {\n min = Math.ceil(min)\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}", "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min) + min); \n}", "getRandomIntInclusive(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n let number = Math.floor(Math.random() * (max - min + 1)) + min;\n return number;\n }", "function rInt(min, max) {\n return Math.floor(Math.random() * (max - min)) + min;\n}", "function randomInteger(min, max) {\r\n var rand = min + Math.random() * (max + 1 - min);\r\n return Math.floor(rand);\r\n}", "getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min) + min); //The maximum is exclusive and the minimum is inclusive\n }", "function numeriRandom(min,max){\n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function numeriRandom(min, max) {\n return Math.floor(Math.random() * (max - min + 1) ) + min;\n}", "function getRandomInt(min, max) \n{\n\tmin = Math.ceil(min);\n\tmax = Math.floor(max);\n\treturn Math.floor(Math.random() * (max - min)) + min;\n}", "function randomNumber(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n }", "getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min)) + min;\n }", "function randomIntFromInterval(min, max) {\n return Math.floor(Math.random() * (Math.floor(max) - Math.ceil(min))) + min;\n }", "function getRandomInt(min, max)\n{\n min = Math.ceil(min);\n max = Math.floor(max);\n\n return Math.floor(Math.random() * (max - min)) + min;\n}", "function getRandomInt(min, max) {\n\t min = Math.ceil(min);\n\t max = Math.floor(max);\n\t return Math.floor(Math.random() * (max - min)) + min;\n\t}", "function randomNumber(min, max) {\n return Math.floor(Math.random() * (1 + max - min) + min);\n}", "function randomNumber(min, max) {\n return Math.floor(Math.random() * (1 + max - min) + min);\n}", "function randomNum(min, max) {\n return Math.floor(((max - min) / 2) + min)\n}", "function randomNumber(min, max) {\n return Math.floor(Math.random() * (max - min) + min);\n }", "function randInt(min, max){\n return(Math.floor(Math.random() * (+max - +min)) + +min); \n }", "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min) + min); //The maximum is exclusive and the minimum is inclusive\n }" ]
[ "0.87170804", "0.86760473", "0.8647942", "0.8609952", "0.8580101", "0.8565627", "0.849435", "0.84693307", "0.8436083", "0.8430691", "0.8429009", "0.8426568", "0.84103304", "0.84102637", "0.840209", "0.8384952", "0.8355008", "0.8350709", "0.8341065", "0.8328648", "0.83197147", "0.8312694", "0.8308968", "0.8298299", "0.8285034", "0.8285034", "0.828017", "0.8267452", "0.82500076", "0.8246828", "0.8239861", "0.82349503", "0.8233582", "0.82311517", "0.82311517", "0.82309747", "0.8224504", "0.8222878", "0.821401", "0.821401", "0.8208904", "0.82088214", "0.8207311", "0.820535", "0.8197713", "0.81976384", "0.8195377", "0.81853503", "0.8175244", "0.816286", "0.81616515", "0.81545615", "0.8153314", "0.8145039", "0.8144738", "0.81443465", "0.81430066", "0.81402737", "0.8120439", "0.8120328", "0.8118751", "0.81174576", "0.8115243", "0.8112708", "0.81065977", "0.8106319", "0.810465", "0.8103764", "0.81004554", "0.80979085", "0.8096594", "0.8095284", "0.80948025", "0.8091779", "0.8091518", "0.8091092", "0.8090296", "0.80901474", "0.80898345", "0.8089739", "0.8088606", "0.8082876", "0.80825865", "0.8082254", "0.808136", "0.8081221", "0.8080486", "0.80801374", "0.8079782", "0.807958", "0.80785346", "0.8078063", "0.8076783", "0.8074357", "0.80696887", "0.80696344", "0.80645037", "0.8064451", "0.8063882", "0.80637956", "0.8063113" ]
0.0
-1
This function gets the row / col index for given droppableID
function find_table_position(droppableID) { // Figure out the row / col // URL: https://stackoverflow.com/questions/96428/how-do-i-split-a-string-breaking-at-a-particular-character var test = String(droppableID).split('_'); var row = String(test[0]).split('row'); row = row[1]; var col = String(test[1]).split('col'); col = col[1]; var arry = []; // Save the row / col in an array, so that we can return both at once. arry.push(row); arry.push(col); // Return the row / col in an array. return arry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPositionIndex(e){\n\t\t\n\t\tvar totCells = cells.length,\n\t\t\ttotRows = Math.ceil(totCells / args.columns),\n\t\t\tcol = args.columns-1,\n\t\t\trow = totRows-1,\n\t\t\theightMult = (args.cellHeight + (2 * args.rowPadding)),\n\t\t\twidthMult = (args.cellWidth + (2 * args.columnPadding));\n\t\t\n\t\t//get the new row\n\t\tfor(var i = 0; i < totRows; i++){\n\t\t\tif(e.top < (i * heightMult) + (heightMult / 2)){\n\t\t\t\trow = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\t//get the new column\n\t\tfor(var i = 0; i < args.columns; i++){\n\t\t\tif(e.left < (i * widthMult)+(widthMult/2)){\n\t\t\t\tcol = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tvar dPositionIndex = ((1*row)*args.columns)+col;\n\t\t\n\t\t//check to see if the index is out of bounds and just set it to the last cell\n\t\t//probably a better way to handle this\n\t\tif(dPositionIndex >= totCells){\n\t\t\tdPositionIndex = totCells-1;\n\t\t}\n\t\treturn \tdPositionIndex;\t\n\t}", "function getIndexByTdId(cell) // cell: Spot <td> id\r\n{\r\n for(var i = 0; i < boardSize; i++)\r\n {\r\n if(cell == Board[i].dspot)\r\n {\r\n return i;\r\n }\r\n }\r\n alert(\"BUG! Invalid Cell\\n\"+\"Object: \"+cell);\r\n return null;\r\n}", "function getIdx(rei) {return rei.row*elesPerRow + rei.ele}", "function getDivPosition(id){\n let row = id[0].charCodeAt(0) - 'A'.charCodeAt(0);\n let col = parseInt(id[1]);\n\n return [row, col];\n}", "cellIndex(x, y) {\n var indexNumber = x + y*this.width;\n return this.cells[indexNumber];\n }", "function getCellIdx(id) {\r\n var idx = id.substr(id.indexOf(\"_\") + 1).split(\"_\");\r\n return { 'group': idx[0], 'cell': idx[1] };\r\n}", "function getCellIndex(x, y) {\n return y * 10 + x;\n}", "function getRowIndex(target, row){\r\n\t\tvar state = $.data(target, 'datagrid');\r\n\t\tvar opts = state.options;\r\n\t\tvar rows = state.data.rows;\r\n\t\tif (typeof row == 'object'){\r\n\t\t\treturn indexOfArray(rows, row);\r\n\t\t} else {\r\n\t\t\tfor(var i=0; i<rows.length; i++){\r\n\t\t\t\tif (rows[i][opts.idField] == row){\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "function getRowIndexByID(sheet, ID, idCol, firstRow)\n{\n var lastRow = sheet.getLastRow();\n \n var range;\n \n if (lastRow != firstRow)\n {\n range = sheet.getRange(getA1Notation(idCol, firstRow, idCol, lastRow));\n }\n else\n {\n range = sheet.getRange(getA1Notation(idCol, firstRow));\n }\n \n var ids = range.getValues();\n \n for (var i = 0; i < ids.length; i++)\n {\n if (ID == ids[i][0])\n {\n return i + firstRow; \n }\n }\n \n return -1;\n}", "index(i, j) {\n if (i < 0 || i > this.cols - 1 || j < 0 || j > this.rows - 1) return -1;\n else return i + j * this.cols;\n }", "function index(column, row){\n return column + (row * maxColume);\n}", "function getRowIndex(target, row, state) {\n if (!state) state = $.data(target, 'datagrid');\n var opts = state.options;\n var rows = state.data.rows;\n if (typeof row == 'object') {\n return indexOfArray(rows, row);\n } else {\n return indexOfRowId(rows, opts.idField, row);\n }\n }", "function find_board_pos(given_id) {\n for(var i = 0; i < 15; i++){\n if(game_board[i].id == given_id) {\n return i;\n }\n }\n return -1;\n}", "function getRowIndex(target){\n var tr = $(target).closest('tr.datagrid-row');\n return parseInt(tr.attr('datagrid-row-index'));\n}", "function getRowIndex(target) {\n\tvar tr = $(target).closest('tr.datagrid-row');\n\treturn parseInt(tr.attr('datagrid-row-index'));\n}", "function getCell(pos) { return gameField.querySelector(\"table\").rows[pos[1]].cells[pos[0]]; }", "function index(i, j){\n if (i < 0 || j < 0 || i > cols - 1 || j > rows - 1) {\n return -1;\n }\n return i + j * cols; \n}", "function getIndex(cardEl) {\n return (cardEl.attr(\"id\").split(\"-\"))[1];\n }", "function getGridElementsPosition(index) {\n const gridEl = document.getElementById(\"grid\");\n let offset = Number(window.getComputedStyle(gridEl.children[0]).gridColumnStart) - 1;\n if (isNaN(offset)) {\n offset = 0;\n }\n const colCount = window.getComputedStyle(gridEl).gridTemplateColumns.split(\" \").length;\n const rowPosition = Math.floor((index + offset) / colCount);\n const colPosition = (index + offset) % colCount;\n return {\n row: rowPosition,\n column: colPosition\n };\n}", "calcPositionNumber (pieceId) {\n return this.state.arrangement.indexOf(pieceId)\n }", "static calculateIndex(row, col) {\n\t\treturn (row - 1) * 9 + (col - 1)\n\t}", "function appxFindBoxIdx(pos_row, pos_col, size_rows, size_cols, includeScroll) {\r\n var ret = 0;\r\n var boxes = appx_session.current_show.boxes;\r\n for (var boxIdx = 0; boxIdx < boxes.length; boxIdx++) {\r\n var box = boxes[boxIdx];\r\n if (pos_col >= box.begin_column && pos_col <= box.end_column && pos_row >= box.begin_row && pos_row <= box.end_row) {\r\n if (pos_row + size_rows - 1 <= box.end_row && pos_col + size_cols - 1 <= box.end_column) {\r\n if (includeScroll == true || (appxIsScroll(box) == false && appxIsScrollReg(box) == false))\r\n ret = boxIdx;\r\n }\r\n }\r\n }\r\n return ret;\r\n}", "indexToRowCol(index){\n let col = Math.floor(index % this.col);\n let row = Math.floor(index / this.col);\n return [row, col];\n }", "rowColToIndex(row, col) {\n return col + row * this.col;\n }", "function index(i, j){\r\n if(i < 0 || j < 0 || i > cols-1 || j > rows-1){\r\n return -1;\r\n }\r\n return i + j * cols;\r\n}", "getRowPosition(index){\n\t\tvar row = this.rowManager.findRow(index);\n\t\t\n\t\tif(row){\n\t\t\treturn row.getPosition();\n\t\t}else{\n\t\t\tconsole.warn(\"Position Error - No matching row found:\", index);\n\t\t\treturn false;\n\t\t}\n\t}", "function flipGetIdx(rei) {return rei.row*numRows + rei.ele}", "function findRowIndex(item){\n let table = document.getElementById(\"cart\");\n for(let i = 1;i< table.rows.length;i++){\n if(table.rows[i].cells[0].innerHTML === item){\n return i;\n }\n }\n return -1;\n}", "private_getActiveColumnFromPosition()\n\t{\n\t\tif (g_mouse.x < this.coords.x || g_mouse.x > this.coords.x + this.size.x)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\tif (g_mouse.y < this.coords.y || g_mouse.y > this.coords.y + this.size.y)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\t// Mouse is over the board, so return the column it's in\n\t\tlet columnSize = this.size.x / this.columns;\n\t\tlet distance = g_mouse.x - this.coords.x;\n\t\treturn Math.floor(distance / columnSize);\n\t}", "function getGridPosition() {\n\tvar selectedUnit = document.getElementsByClassName(\"selected\");\n\tif (angular.isDefined(selectedUnit[0])) {\n\t\tvar rowIndex = selectedUnit[0]['className'].split(\" \")[2].substring(8);\n\t\tvar gridPos = rowIndex.split('-');\n\t\treturn gridPos;\n\t} else {\n\t\treturn false;\n\t}\n}", "function GetCellIndex(cell) {\n // Safari always returns 0, so in this case the value cannot be trusted\n if (cell.cellIndex) {\n return cell.cellIndex;\n } else if (cell.parentNode) {\n return FindInArray(cell.parentNode.cells, cell);\n } else {\n return null;\n }\n}", "function myFunction(x) {\n console.log(\"col is: \" + x.cellIndex + \", row is \" + x.parentNode.rowIndex);\n }", "function cellId(cell) {\n return coordId(getX(cell), getY(cell));\n }", "sideOfParent(){\n if(this.parent != null){\n var position = '' + (this.parent.row - this.row) + '' + (this.parent.col - this.col);\n \n switch(position){\n case '0-1':\n return 0;\n case '-10':\n return 1;\n case '01':\n return 2;\n case '10':\n return 3;\n default:\n return -1;\n }\n }\n\n return -1;\n }", "_getEntryIndex(event, currentHoveredItem) {\r\n if (this._dropTargetIsEmpty()) return 0;\r\n if (!currentHoveredItem) return this.get('sortableChildViews').length;\r\n\r\n if (this._draggingBelowCentre(event, currentHoveredItem)) {\r\n return currentHoveredItem.get('indexInList') + 1;\r\n }\r\n return currentHoveredItem.get('indexInList');\r\n }", "getPosition(_id) {\n const _elem = this._elements[_id];\n let [x, y] = [0, 0];\n if (this._isSVGElem(_elem)) {\n const _rect = _elem.getBoundingClientRect();\n [x, y] = [_rect.left, _rect.top];\n }\n else if (_elem) {\n [x, y] = [_elem.offsetLeft, _elem.offsetTop];\n }\n else {\n console.warn('ELEM.getPosition(', _id, '): Element not found');\n }\n return [x, y];\n }", "getPosition(_id) {\n const _elem = this._elements[_id];\n let [x, y] = [0, 0];\n if (this._isSVGElem(_elem)) {\n const _rect = _elem.getBoundingClientRect();\n [x, y] = [_rect.left, _rect.top];\n }\n else if (_elem) {\n [x, y] = [_elem.offsetLeft, _elem.offsetTop];\n }\n else {\n console.warn('ELEM.getPosition(', _id, '): Element not found');\n }\n return [x, y];\n }", "function fnGetCellID(cell) {\n return properties.fnGetRowID($(cell.parentNode));\n }", "function getColumnVisiblePostion($firstRow, $cell){\n var tdsFirstRow = $firstRow.children();\n for(var i = 0; i < tdsFirstRow.length; i++){\n if($(tdsFirstRow[i]).data('posx') == $cell.data('posx')){\n return i;\n }\n }\n }", "static getFieldIndex(xPlaceIndex, yPlaceIndex) {\n return xPlaceIndex + 1 + yPlaceIndex * game.numberOfColumns\n }", "getCellPosition(column, row) {\n return {x: column * CELL.WIDTH, y: row * CELL.HEIGHT};\n }", "function getRowCol(index) {\n return [index % colSize, parseInt(index / rowSize)];\n }", "function getCellIndex(cells, cellIdx) {\n for (var i = 0, size = cells.length; i < size; i++) {\n var otherIdx = CellRefUtil.parseCellRefColumn(cells[i].r);\n if (otherIdx == cellIdx) {\n return i;\n }\n }\n return -1;\n }", "getScrollPosition(_id) {\n const _elem = this._elements[_id];\n let [x, y] = [0, 0];\n if (_elem) {\n [x, y] = [_elem.scrollLeft, _elem.scrollTop];\n }\n else {\n console.warn('ELEM.getScrollPosition(', _id, '): Element not found');\n }\n return [x, y];\n }", "getScrollPosition(_id) {\n const _elem = this._elements[_id];\n let [x, y] = [0, 0];\n if (_elem) {\n [x, y] = [_elem.scrollLeft, _elem.scrollTop];\n }\n else {\n console.warn('ELEM.getScrollPosition(', _id, '): Element not found');\n }\n return [x, y];\n }", "function eventToCellNumber ( event /*: JQueryEventObject */, relativeToThisAncestor ) {\n var container = relativeToThisAncestor || event.target;\n var min = { x : 0, y : 0 },\n max = { x : $( container ).outerWidth(), y : $( container ).outerHeight() },\n rect = container.getBoundingClientRect(),\n point = { x : event.pageX - rect.left,\n y : event.pageY - rect.top },\n col = ( point.x < min.x + DEFAULT_RESIZING_MARGIN ) ? 0\n : ( point.x > max.x - DEFAULT_RESIZING_MARGIN ) ? 2 : 1,\n row = ( point.y < min.y + DEFAULT_RESIZING_MARGIN ) ? 0\n : ( point.y > max.y - DEFAULT_RESIZING_MARGIN ) ? 2 : 1;\n return col + 3 * row;\n}", "function getIndex(cell) {\n\t//uses switch to conver move string to index\n\tswitch(cell) {\n\t\tcase 'A1':\n\t\t\treturn 0;\n\t\tcase 'A2':\n\t\t\treturn 1;\n\t\tcase 'A3':\n\t\t\treturn 2;\n\t\tcase 'B1':\n\t\t\treturn 3;\n\t\tcase 'B2':\n\t\t\treturn 4;\n\t\tcase 'B3':\n\t\t\treturn 5;\n\t\tcase 'C1':\n\t\t\treturn 6;\n\t\tcase 'C2':\n\t\t\treturn 7;\n\t\tcase 'C3':\n\t\t\treturn 8;\n\t\tdefault:\n\t\t\treturn -1;\n\t}\n}", "function xy_to_id(cell) {\n return ROW * cell.x + cell.y + 1;\n}", "function getCandyRowColFromCoordinates(x, y){\n\tvar rect = dom.gameBoard.getBoundingClientRect();\n\tvar splits = size + 1;\n\tvar range = rect.width;\n\tvar eachCell = range/splits;\n\tx = x - rect.left;\n\ty = y - rect.top;\n\tvar column = Math.floor(x / eachCell) - 1;\n\tvar row = Math.floor(y / eachCell) - 1;\n\treturn [row, column];\n}", "function calcDropPosition(event, treeNode) {\n var clientY = event.clientY;\n\n var _treeNode$selectHandl = treeNode.selectHandle.getBoundingClientRect(),\n top = _treeNode$selectHandl.top,\n bottom = _treeNode$selectHandl.bottom,\n height = _treeNode$selectHandl.height;\n\n var des = Math.max(height * DRAG_SIDE_RANGE, DRAG_MIN_GAP);\n\n if (clientY <= top + des) {\n return -1;\n } else if (clientY >= bottom - des) {\n return 1;\n }\n\n return 0;\n}", "function calcDropPosition(event, treeNode) {\n var clientY = event.clientY;\n\n var _treeNode$selectHandl = treeNode.selectHandle.getBoundingClientRect(),\n top = _treeNode$selectHandl.top,\n bottom = _treeNode$selectHandl.bottom,\n height = _treeNode$selectHandl.height;\n\n var des = Math.max(height * DRAG_SIDE_RANGE, DRAG_MIN_GAP);\n\n if (clientY <= top + des) {\n return -1;\n } else if (clientY >= bottom - des) {\n return 1;\n }\n\n return 0;\n}", "getGridRowIndex(){return this.__gridRowIndex}", "function getCellPosition(){\r\n\tfor (var i = 0; i < squres.rows.length; i++) {\r\n\t\tfor (var j = 0; j < squres.rows[i].cells.length; j++) {\r\n\t\t\tsqures.rows[i].cells[j].onclick = function(){\r\n\t\t\t\tcurrentRow = this.parentElement.rowIndex;\r\n\t\t\t\tcurrentCol = this.cellIndex;\r\n\t\t\t\tprevCol = colPosition(currentCol);\r\n\t\t\t\tprevRow = rowPosition(currentRow);\r\n\t\t\t};\r\n\t\t\tconsole.log(\"click not working\");\r\n\t\t}\r\n\t}\r\n}", "function getGridCellDev(grid, row, col)\n{\n // IGNORE IF IT'S OUTSIDE THE GRID\n if (!isValidCellDev(row, col))\n {\n return -1;\n }\n var index = (row * gridWidthDev) + col;\n return grid[index];\n}", "hovered_tile() {\n\t\tvar rect = this.canvas.getBoundingClientRect();\n \tvar x = this.cursor_x - rect.left + this.current_x;\n \tvar y = this.cursor_y - rect.top + this.current_y;\n\t\tvar row = Math.floor(y / this.tile_size);\n\t\tvar col = Math.floor(x / this.tile_size);\n\t\treturn row * this.board.width + col\n\t}", "function getRowNumberFromCellId(grid, cellId) {\r\n\tvar gridId = 'grid' + grid.blockId;\r\n\tvar fullPart = cellId.replace(gridId, \"\");\r\n\tfullPart = fullPart.replace(\"_cell_\", \"\");\r\n\tvar split = fullPart.split(\"_\");\r\n\tvar part1 = split[0];\r\n\treturn part1;\r\n}", "function posToIndex(pos) {\n var row = pos[0];\n var col = pos[1];\n return (row * 4) + col;\n}", "function getIndex(theItem){\n for ( var i = 0, length = $outer_container_right_a.length; i < length; i++ ) {\n if ( $outer_container_right_a[i] === theItem ) {\n return i;\n }\n }\n }", "function xIndex(squareDiv) {\n var x = squareDiv.split(\"_\");\n var i = parseInt(x[1]);\n return i;\n}", "function getIndex(cell) {\n var index = 0;\n $(cell).prevAll(\".MainCell\").each(function () {\n if (ifCellEmpty(this) == false) {\n index++;\n }\n });\n return index;\n}", "function ConvertRowColToPos(row,col,sizecols){\r\n\tvar a = ((row-1) * sizecols) + col;\r\n\treturn a;\r\n}", "function getExerciseIndexFromClick(e){\n const target = $(e.currentTarget).closest('.exercise').closest('.col-4');\n \n let index = target.index();\n console.log('Index' + index);\n return index;\n}", "function identifyCell(gridPossibilities) {\n var cellReference = 0;\n return cellReference;\n}", "function findPosition(cell) {\n let x = parseInt(cell.attr(\"value\").substring(0, 1));\n let y = parseInt(cell.attr(\"value\").substring(1));\n\n return {\n x: x, \n y: y\n }\n}", "getColFromTile(id){\n let col;\n if(id.split('_')[2][1] != undefined){\n col = id.split('_')[2][0] + id.split('_')[2][1];\n }else\n {\n col = id.split('_')[2][0];\n }\n return col;\n }", "function cellId(i, j) {\n return 'cell_' + i + '_' + j;\n}", "function getNeighbor(cell_jdom){\n\t var position = cell_jdom.attr('id').substring(1,cell_jdom.attr('id').length).split('_');\n\t//position[0] and position[1] are the matrix location of the element\n\t var row_id = parseInt(position[0]);\n \t var col_id = parseInt(position[1]); \n \t\n \t var up_id = \"b\" + (row_id-1) +\"_\" + col_id;\n \t var down_id = \"b\" + (row_id+1) +\"_\" + col_id;\n \t var left_id = \"b\" + row_id +\"_\" + (col_id-1);\n\t var right_id = \"b\" + row_id +\"_\" + (col_id+1);\n\n\t var neighbor_id = [];\n\t //verify if all the neighbor exists;\n\t if( document.getElementById(up_id)){neighbor_id.push(up_id)}\n\t if( document.getElementById(down_id)){neighbor_id.push(down_id)}\n\t if( document.getElementById(left_id)){neighbor_id.push(left_id)}\n\t if( document.getElementById(right_id)){neighbor_id.push(right_id)}\n\t return neighbor_id;\n}", "getRowColFromIdx(idx) {\n const row = Math.floor(idx / this.boardSize);\n const col = idx % this.boardSize;\n return {\n row,\n col\n };\n }", "function getArrayInd(row) {\n return Math.round(row * _numOfSlots);\n }", "findPlayerIndex(id) {\n for(let i = 0; i < this.playersArray.length; i++) {\n if(this.playersArray[i].id === id\n && this.playersArray[i].removed === false) {\n return i;\n }\n }\n return -1;\n }", "function getNodeIndex(evt) {\n var _evt$nativeEvent = evt.nativeEvent,\n pageX = _evt$nativeEvent.pageX,\n pageY = _evt$nativeEvent.pageY;\n\n var target = document.elementFromPoint(pageX, pageY);\n if (!target) {\n return -1;\n }\n var parentNode = target.parentNode;\n\n return Array.prototype.indexOf.call(parentNode.childNodes, target);\n}", "function getNodeIndex(evt) {\n var _evt$nativeEvent = evt.nativeEvent,\n pageX = _evt$nativeEvent.pageX,\n pageY = _evt$nativeEvent.pageY;\n\n var target = document.elementFromPoint(pageX, pageY);\n if (!target) {\n return -1;\n }\n var parentNode = target.parentNode;\n\n return Array.prototype.indexOf.call(parentNode.childNodes, target);\n}", "function getNodeIndex(evt) {\n var _evt$nativeEvent = evt.nativeEvent,\n pageX = _evt$nativeEvent.pageX,\n pageY = _evt$nativeEvent.pageY;\n\n var target = document.elementFromPoint(pageX, pageY);\n if (!target) {\n return -1;\n }\n var parentNode = target.parentNode;\n\n return Array.prototype.indexOf.call(parentNode.childNodes, target);\n}", "function getCell(i, j) {\n return $(`.col[data-row='${i}'][data-col='${j}']`);\n }", "coordFromTileIndex(index) {\n var [i, j] = index;\n return [j * (this.tileSizeActual + this.tilePadding),\n i * (this.tileSizeActual + this.tilePadding)];\n }", "function getPanelIndex(container, panel, state) {\n if (!state) state = $.data(container, 'accordion');\n var panels = state.panels, p = $(panel)[0];\n for (var i = 0, len = panels.length; i < len; i++) {\n if (panels[i][0] == p) {\n return i;\n }\n }\n return -1;\n }", "getRow() {\n return INDEX2ROW(this.cellIndex);\n }", "function getPosition() {\n let position = document.getElementById(getyx(y,x));\n\treturn position;\n}", "function getItemPosition(userID, item) {\n var tables = document.getElementsByTagName(\"table\");\n for (let i = 0; i < tables.length; i++) {\n var tableRows = tables[i].getElementsByTagName(\"tr\");\n //Indexes of the table rows\n for (let j = 1; j < tableRows.length; j++) {\n if (tableRows[j].id == item.id) {\n return j - 1;\n }\n }\n }\n}", "getTileIndexFromTileCoords(x, y) {\n return x + y * this.width.tiles;\n }", "function getInsertionIndicatorPositionTabItem(event, target, dragData, dropData) {\n var clientRect = target.getBoundingClientRect(),\n clientX = event.originalEvent.clientX,\n width = clientRect.width,\n sectionEnum,\n x = clientX - clientRect.left;\n\n var sections = canTargetContainSource(dropData, dragData) ? 3 : 2;\n\n var sectionWidth = width / sections;\n var section = Math.floor(x / sectionWidth);\n\n if (section === 0) {\n sectionEnum = insertionIndicatorPosition.before;\n } else if (section === sections - 1) {\n sectionEnum = insertionIndicatorPosition.after;\n } else {\n sectionEnum = insertionIndicatorPosition.inside;\n }\n\n return sectionEnum;\n }", "function index(row, col) {\n return row * 8 + col;\n }", "getRowFromTile(id){\n let row;\n if(id.split('_')[1][1] != undefined){\n row = id.split('_')[1][0] + id.split('_')[1][1];\n }else\n {\n row = id.split('_')[1][0];\n }\n return row;\n }", "function getRowIndex(rows, rowNumber) {\n for (var i = 0, size = rows.length; i < size; i++) {\n var row = rows[i];\n if (row.r == rowNumber) {\n return i;\n }\n }\n return -1;\n }", "function getRowID(idx){\n return 'row' + idx;\n}", "function getId(cell) {\r\n\t\treturn parseInt(cell.attr('id'), 10);\r\n\t}", "function rowcol(idx) {\n return {\n row: Math.floor(idx / 8),\n col: idx % 8\n }\n }", "getDraggablePosition() {\n const { x, y } = this.draggable.state;\n return { x, y };\n }", "function card_index(cards, id)\n{\n for (i in cards) {\n var card = cards[i];\n if (card.id == id) {\n return (i);\n }\n }\n return (-1);\n}", "function rowColToArrayIndex(col, row) {\n return col + BRICK_COLUMNS * row;\n}", "function calcIconId(posX, posY) {\n\n return posX + posY * BOARD_COLS;\n\n}", "function findNodeID(list, id) {\n\t\tvar len = list.length;\n\t\tfor (var i=len-1; i > -1; i--) {\n\t\t\tif (list[i].index == id)\n\t\t\t\treturn i;\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "function getChildIndexOf(child){\n\treturn [].indexOf.call(child.parentNode.children, child);\n}", "function getColIdx($tr, $td) {\n\tvar colspan,\n\t\ttd = $td.get(0),\n\t\tidx = 0;\n\n\t$tr.children().each(function () {\n\t\tif( this === td ) {\n\t\t\treturn false;\n\t\t}\n\t\tcolspan = $(this).prop(\"colspan\");\n\t\tidx += colspan ? colspan : 1;\n\t});\n\treturn idx;\n}", "function redips_row(std){\n\treturn std.hall_position.substring(1) - 1;//Horizontal offset -1\n}", "static _FindShapeInRowInBound(ix,iy, shapeSize, mat, bound)\n {\n var maxCount = 30;\n while(maxCount-- > 0)\n {\n // construct shape\n var shape = TriGridUtils.CreateShapePoints(ix,iy, shapeSize, mat);\n // console.log(\"shape \" + shape);\n if(PathUtils.IsInBound(shape, bound))\n {\n return ix;\n }\n else{\n ix++;\n }\n }\n return ix;\n }", "function getColRow(index) {\n if (currentView === views.first) return [0, 0];\n if (currentView === views.second) {\n }\n const row = Math.floor(index / rows);\n const col = index % rows;\n return [col, row];\n }", "function down (x, y)\r\n{\r\n\r\n\tvar cordX = parseInt(x);\r\n\tvar cordY = parseInt(y);\r\n\r\n\tif (cordY < 300)\r\n\r\n\t{\r\n\r\n\t\tfor (var i=0; i<gamePiece.length; i++)\r\n\t\t{\r\n\t\t\tif (parseInt(gamePiece[i].style.top) - 100 == cordY && parseInt(gamePiece[i].style.left) == cordX) \r\n\r\n\t\t\t{\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\telse\r\n\r\n\t{\r\n\t\treturn -1;\r\n\t} \r\n\r\n}", "function whichCell (row,col) {\n\t// checks that we are within the non-header rows of the table\n\t// rows are 1-3 (excludes header=0); cols are 0-3\n\tif(row<1 || row>3 || col<0 || col>3) {\n\t\treturn undefined;\n\t}\n\n\t// pick the row (header = 0 so we can do this direct)\n\tvar thisRow = table44.childNodes[row];\n\n\t// initialize the cell (must do col-1 as there is a col 0)\n\tvar thisCell = thisRow.childNodes[col];\n\n\t// returns desired cell\n\treturn thisCell;\n}", "get_col() {\n var col = null;\n game_controller.ajax_move_request(function (output) {\n col = output;\n });\n\n game_controller.drop_in_column(col);\n }" ]
[ "0.6464066", "0.6453165", "0.63811576", "0.6318323", "0.6226967", "0.6105529", "0.60800177", "0.60456836", "0.6007988", "0.5978512", "0.5971972", "0.595708", "0.5955449", "0.5954452", "0.58874637", "0.5864064", "0.5844629", "0.58310777", "0.5829451", "0.58056474", "0.5803191", "0.5796789", "0.57964766", "0.5773908", "0.577122", "0.57527083", "0.5752636", "0.5721067", "0.57092994", "0.5707851", "0.570311", "0.569456", "0.56828564", "0.56749225", "0.56712985", "0.5670067", "0.5670067", "0.56593484", "0.5642796", "0.56390613", "0.56299186", "0.56245035", "0.5620799", "0.5608314", "0.5608314", "0.56026036", "0.5601607", "0.560057", "0.556238", "0.55571985", "0.55571985", "0.5554712", "0.5553308", "0.55529785", "0.55511856", "0.5550727", "0.5542995", "0.5537862", "0.5535284", "0.55342925", "0.5524456", "0.5523625", "0.5514462", "0.5511637", "0.54915345", "0.5491367", "0.54898465", "0.5487551", "0.54850584", "0.5478246", "0.54781115", "0.54781115", "0.54781115", "0.5472289", "0.54518485", "0.54483765", "0.54483145", "0.54407346", "0.5432045", "0.54282784", "0.541849", "0.5415111", "0.5412814", "0.54126066", "0.54028916", "0.5397351", "0.539445", "0.538484", "0.5383484", "0.53830266", "0.5379569", "0.5363543", "0.535802", "0.5357727", "0.53550035", "0.53530973", "0.534528", "0.5331433", "0.53274125", "0.5325374" ]
0.7785699
0
This function, given a piece ID will return which letter it represents. parameters: an ID of a tile returns: the letter that tile represents. On error, returns "1".
function find_letter(given_id) { // Go through the 7 pieces, for(var i = 0; i < 7; i++) { // If we found the piece we're looking for, awesome! if(game_tiles[i].id == given_id) { // Just return its letter! return game_tiles[i].letter; } } // Or try looking in the completed word array for(var i = 0; i < complete_words.length; i++) { for(var x = 0; x < complete_words[i].length; x++) { if(given_id == complete_words[i][x].id) { return complete_words[i][x].letter; } } } // If we get here, we weren't given a nice draggable ID like "piece1", so return -1 return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPieceName(pieceCode) {\n switch (parseInt(pieceCode)) {\n case 1:\n return \"pawn\";\n case 2:\n return \"knight\";\n case 3:\n return \"bishop\";\n case 4:\n return \"rook\";\n case 5:\n return \"queen\";\n case 6:\n return \"king\";\n case 7:\n return \"othello\";\n default:\n return null;\n }\n }", "function getTile(number) {\r\n return document.getElementById(number).innerText;\r\n}", "function switchPiece(piece){\n var e = piece.slice(1)\n var s = piece.charAt(0)\n if (s == \"S\"){\n var s = \"G\"+ e\n return s\n } else if (s == \"G\"){\n var s = \"S\"+ e\n return s\n } else if (piece == \"E\"){\n return \"E\"\n }\n}", "function getPieceCode(pieceName) {\n switch (pieceName) {\n case \"pawn\":\n return 1;\n case \"knight\":\n return 2;\n case \"bishop\":\n return 3;\n case \"rook\":\n return 4;\n case \"queen\":\n return 5;\n case \"king\":\n return 6;\n case \"othello\":\n return 7;\n default:\n return -1;\n }\n }", "function getLetter(index) {\n return String.fromCharCode(64 + index);\n}", "function findLetter(note){\n\n letter = '';\n\n if(note.substring(0,2) == 'C5'){\n letter = 'h';\n } else if(note.substring(0,1) == 'C'){\n letter = 'a';\n } else if(note.substring(0,1) == 'D'){\n letter = 'b';\n } else if(note.substring(0,1) == 'E'){\n letter = 'c';\n } else if(note.substring(0,1) == 'F'){\n letter = 'd';\n } else if(note.substring(0,1) == 'G'){\n letter = 'e';\n } else if(note.substring(0,1) == 'A'){\n letter = 'f';\n } else if(note.substring(0,1) == 'B'){\n letter = 'g';\n }\n\n return letter;\n\n}", "function getTileCodeName(tile) {\n if(tile == T_NONE) return 'none';\n if(tile == T_DUMMY) return 'dummy';\n if(tile == T_BON_SPADE_2C) return 'BONspade';\n if(tile == T_BON_CULT_4C) return 'BONcult';\n if(tile == T_BON_6C) return 'BON6c';\n if(tile == T_BON_3PW_SHIP) return 'BONship';\n if(tile == T_BON_3PW_1W) return 'BON3pw1w';\n if(tile == T_BON_PASSDVP_2C) return 'BONdvp';\n if(tile == T_BON_PASSTPVP_1W) return 'BONtpvp';\n if(tile == T_BON_PASSSHSAVP_2W) return 'BONsvp';\n if(tile == T_BON_1P) return 'BON1p';\n if(tile == T_BON_PASSSHIPVP_3PW) return 'BONshipvp';\n if(tile == T_FAV_3F) return 'FAV3F';\n if(tile == T_FAV_3W) return 'FAV3W';\n if(tile == T_FAV_3E) return 'FAV3E';\n if(tile == T_FAV_3A) return 'FAV3A';\n if(tile == T_FAV_2F_6TW) return 'FAV6tw';\n if(tile == T_FAV_2W_CULT) return 'FAVcult';\n if(tile == T_FAV_2E_1PW1W) return 'FAV1pw1w';\n if(tile == T_FAV_2A_4PW) return 'FAV4pw';\n if(tile == T_FAV_1F_3C) return 'FAV3c';\n if(tile == T_FAV_1W_TPVP) return 'FAVtpvp';\n if(tile == T_FAV_1E_DVP) return 'FAVdvp';\n if(tile == T_FAV_1A_PASSTPVP) return 'FAVptpvp';\n if(tile == T_TW_2VP_2CULT) return 'TW2';\n if(tile == T_TW_4VP_SHIP) return 'TW4';\n if(tile == T_TW_5VP_6C) return 'TW5';\n if(tile == T_TW_6VP_8PW) return 'TW6';\n if(tile == T_TW_7VP_2W) return 'TW7';\n if(tile == T_TW_8VP_CULT) return 'TW8';\n if(tile == T_TW_9VP_P) return 'TW9';\n if(tile == T_TW_11VP) return 'TW11';\n if(tile == T_ROUND_DIG2VP_1E1C) return 'RNDdigEc';\n if(tile == T_ROUND_TW5VP_4E1DIG) return 'RNDtwEspade';\n if(tile == T_ROUND_D2VP_4W1P) return 'RNDdWp';\n if(tile == T_ROUND_SHSA5VP_2F1W) return 'RNDsFw';\n if(tile == T_ROUND_D2VP_4F4PW) return 'RNDdFpw';\n if(tile == T_ROUND_TP3VP_4W1DIG) return 'RNDtpWspade';\n if(tile == T_ROUND_SHSA5VP_2A1W) return 'RNDsAw';\n if(tile == T_ROUND_TP3VP_4A1DIG) return 'RNDtpAspade';\n if(tile == T_ROUND_TE4VP_P2C) return 'RNDtePc';\n return 'unk';\n}", "getCharFromID(idStr) {\n for (let i=0; i<this.characters.length; ++i) {\n if (this.characters[i].id === idStr) return this.characters[i];\n }\n }", "function characterId(name) {\n return name + \"-character\";\n}", "function get_random_tile() {\n // Need take into account that there are 100 tiles total, not just 26 options.\n // Going to create an array of all the possible letters then - 100 to start.\n var all_letters = [];\n var total_letters = 0;\n\n for (var i = 0; i < 26; i++) {\n var current_letter = pieces[i].letter; // Get current letter, \"A\" to start\n var remaining = pieces[i].remaining; // Remaining letters, \"9\" for A at the start.\n total_letters += remaining; // Keep track of ALL the letters for the random call.\n\n for (var x = 0; x < remaining; x++) {\n all_letters.push(current_letter); // Add \"remaining\" number of the current letter to the array.\n }\n }\n\n // Now all_letters should have 100 letters at the start (less while playing the game)\n // Pick a random number and return that letter.\n var random_num = getRandomInt(0, total_letters - 1); // Off by one error if we don't subtract. 0 to 100 is bad. Want 0 to 99.\n var letter = all_letters[random_num]; // Save the letter.\n\n // Find the letter to decrement.\n for (var i = 0; i < 26; i++) {\n if (pieces[i].letter == letter) {\n pieces[i].remaining--; // Decrement letter remaining for this letter.\n return letter; // Return the letter's index.\n }\n }\n\n // Error if we get here.\n return -1;\n}", "function getletter() {\r\n\t\tletter = \"abcdefghijklmnopqrstuvwxyz\".charAt(Math.floor(Math.random() * 26));\r\n\t\treturn letter;\r\n\t}", "getColFromTile(id){\n let col;\n if(id.split('_')[2][1] != undefined){\n col = id.split('_')[2][0] + id.split('_')[2][1];\n }else\n {\n col = id.split('_')[2][0];\n }\n return col;\n }", "function convertToWord(letter){\n if(letter === \"r\")\n return \"Rock\";\n else if(letter === \"p\")\n return \"Paper\";\n else \n return \"Scissor\"; \n}", "function getCharacter(id) {\n var _a;\n // Returning a promise just to illustrate that GraphQL.js supports it.\n return Promise.resolve((_a = Data_1.humanData[id]) !== null && _a !== void 0 ? _a : Data_1.droidData[id]);\n}", "function letters() {\r\n let random = Math.floor(Math.random() * 26);\r\n let randomLetter = characters.letter[random];\r\n return randomLetter;\r\n}", "function getLetter(s) {\n let letter;\n // Write your code here\n switch(s[0]){\n case 'a':\n case 'e':\n case 'o':\n case 'i':\n case 'u':\n letter='A';\n break;\n case 'b':\n case 'c':\n case 'd':\n case 'f':\n case 'g':\n letter=\"B\";\n break;\n case 'h':\n case 'j':\n case 'k':\n case 'l':\n case 'm':\n letter =\"C\";\n break;\n case 'n':\n case 'p':\n case 'q':\n case 'r':\n case 's':\n case 'v':\n case 't':\n case 'w':\n case 'x': \n case 'y':\n case 'z' :\n letter=\"D\";\n break;\n\n\n\n }\n \n return letter;\n}", "function getname() {\r\n //getting the 'order'\r\n //than making it bigger by 1\r\n //convert it to string\r\n //than add 'piece' to it for avoiding confusion between pieces and pins\r\n return ((order++).toString() + \"piece\")\r\n}", "function GetPiece(value) {\r\n //console.log(\"in GetPiece\");\r\n switch (value.toLowerCase().trim()) {\r\n case \"king\":\r\n return \"king\";\r\n case \"queen\":\r\n return \"queen\";\r\n case \"rook\":\r\n case \"rooks\":\r\n case \"tower\":\r\n case \"towers\":\r\n case \"castle\":\r\n case \"castles\":\r\n return \"rook\";\r\n case \"bishop\":\r\n case \"bishops\":\r\n return \"bishop\";\r\n case \"horse\":\r\n case \"horses\":\r\n case \"knight\":\r\n case \"knights\":\r\n return \"knight\";\r\n default:\r\n return \"pawn\";\r\n }\r\n}", "function selectLetter(usedLetters) {\r\n\tvar i=Math.floor(Math.random()*NUMBER_PICES);\r\n\twhile(usedLetters[i]!=0) //generate untile pieces not used\r\n\t{\t\t\r\n\t i=Math.floor(Math.random()*NUMBER_PICES);\r\n\t}\r\n return i;\r\n}", "function fenToPieceCode(piece) {\n // black piece\n if (piece.toLowerCase() === piece) {\n return 'b' + piece.toUpperCase();\n }\n\n // white piece\n return 'w' + piece.toUpperCase();\n}", "function getLongName(charName) {\n switch (charName) {\n case \"p\": return \"pawn\";\n case \"k\": return \"king\";\n case \"q\": return \"queen\";\n case \"r\": return \"rook\";\n case \"b\": return \"bishop\";\n case \"n\": return \"knight\";\n default:\n throw \"ah nah bruv couldn't work out the piece name\";\n return \"oh dear\";\n }\n }", "function getLetter(word,letter,display){\r\n var newdisp = '';\r\n \r\n for (var i=0; i<word.length; i++){\r\n if (word[i] == letter) {\r\n newdisp += letter;\r\n } \r\n else {\r\n newdisp += display[i];\r\n }\r\n }\r\n \r\n return newdisp;\r\n}", "function obtainPiecePosition(i) {\n const { x, y } = retrieveXandYposition(i);\n /* Declaring an array to contain all of the letters on the X axis of the chess board so that I can return the \n position of the chess piece on the X axis. */\n const chessLetters = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\"][x];\n /* Adding 1 to y as I do not want the index to be set to 0. */\n return `${chessLetters}${y + 1}`;\n }", "function getCharacterImg(id){\n if (id < 10){\n id = \"0\" + id.toString()\n } \n return `../../asset/Yang_Walk_LR/Yang_Walk_LR_000${id}.png`\n }", "function getLetter(word) {\n if (word.charAt(0) === 'a') {\n return word.charAt(1);\n } else if (word.charAt(0) === 'b') {\n return word.charAt(2);\n } else if (word.charAt(0) === 'c') {\n return word.charAt(3);\n } else if (word.charAt(0) === 'd') {\n return word.charAt(4);\n } else {\n return ' ';\n }\n}", "getRowFromTile(id){\n let row;\n if(id.split('_')[1][1] != undefined){\n row = id.split('_')[1][0] + id.split('_')[1][1];\n }else\n {\n row = id.split('_')[1][0];\n }\n return row;\n }", "function getCharacter(id) {\n // Returning a promise just to illustrate GraphQL.js's support.\n return Promise.resolve(humanData[id] || droidData[id]);\n}", "function convertToWord(letter)\n{\n if (letter===\"r\") return \"Rock\";\n if (letter===\"p\") return \"Paper\";\n return \"Scissor\";\n\n\n}", "function pieceToKeyOfHand(piece) {\n return piece;\n}", "function getIconCharacter(icon) {\n switch(icon) {\n case 'nt_chanceflurries' :\n return 'V';\n\n case 'nt_chancerain' :\n return 'Q';\n\n case 'nt_chancesleet' :\n return 'T';\n\n case 'nt_chancesnow' :\n return 'V';\n\n case 'nt_chancetstorms' :\n return '0';\n\n case 'nt_clear' :\n return 'C';\n\n case 'nt_cloudy' :\n return 'Y';\n\n case 'nt_flurries' :\n return 'W';\n\n case 'nt_fog' :\n return 'K';\n\n case 'nt_hazy' :\n return 'E';\n\n case 'nt_mostlycloudy' :\n return 'N';\n\n case 'nt_mostlysunny' :\n return 'I';\n\n case 'nt_partlycloudy' :\n return 'I';\n\n case 'nt_partlysunny' :\n return 'N';\n\n case 'nt_rain' :\n return 'R';\n\n case 'nt_sleet' :\n return 'T';\n\n case 'nt_snow' :\n return 'X';\n\n case 'nt_sunny' :\n return 'C';\n\n case 'nt_tstorms' :\n return 'O';\n\n case 'nt_unknown' :\n return ')';\n\n case 'chanceflurries' :\n return 'V';\n\n case 'chancerain' :\n return 'Q';\n\n case 'chancesleet' :\n return 'T';\n\n case 'chancesnow' :\n return 'V';\n\n case 'chancetstorms' :\n return '0';\n\n case 'clear' :\n return 'B';\n\n case 'cloudy' :\n return 'Y';\n\n case 'flurries' :\n return 'W';\n\n case 'fog' :\n return 'M';\n\n case 'hazy' :\n return 'J';\n\n case 'mostlycloudy' :\n return 'N';\n\n case 'mostlysunny' :\n return 'H';\n\n case 'partlycloudy' :\n return 'H';\n\n case 'partlysunny' :\n return 'N';\n\n case 'rain' :\n return 'R';\n\n case 'sleet' :\n return 'U';\n\n case 'snow' :\n return 'X';\n\n case 'sunny' :\n return 'B';\n\n case 'tstorms' :\n return 'Z';\n\n case 'unknown' :\n return ')';\n\n default:\n return \")\";\n\n }\n}", "function fenToPieceCode(piece) {\n // black piece\n if (piece.toLowerCase() === piece) {\n return 'b' + piece.toUpperCase();\n }\n\n // white piece\n return 'w' + piece.toUpperCase();\n}", "function checkLetter(row, column) {\n return grid[row][column]\n }", "function pColor(piece){ return piece.charCodeAt(0) }", "function convertToWord(letter) {\n if(letter === \"r\") return \"Rock\";\n if(letter === \"p\") return \"Paper\";\n if(letter === \"s\") return \"Scissor\";\n if(letter === \"l\") return \"Lizard\";\n return \"Spock\";\n}", "function convertToWord(letter) {\r\n if (letter === \"r\") return \"Rock\";\r\n if (letter === \"p\") return \"Paper\";\r\n if (letter === \"s\") return \"Scissors\";\r\n}", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function tile_name(x, y) {\n x -= size[3];\n y -= size[0];\n return (y >= 0 ? y + 1 + \"s\" : -y + \"n\") + (x >= 0 ? x + 1 + \"e\" : -x + \"w\");\n }", "function pieceCodeToFen(piece) {\n let pieceCodeLetters = piece.split('');\n\n // white piece\n if (pieceCodeLetters[0] === 'w') {\n return pieceCodeLetters[1].toUpperCase();\n }\n\n // black piece\n return pieceCodeLetters[1].toLowerCase();\n}", "getPieceTile(piece) {\n for(var key in this.tiles) {\n if(this.tiles[key].getPiece() == piece)\n return this.tiles[key];\n }\n }", "function getLetterScore (letter) {\n return 1; // For testing purposes\n return config.pointValues[letter.toUpperCase()];\n}", "function indexToLetter(index) {\n \n\tvar letter = \"a\";\n\tswitch(index) {\n\t\tcase 0:\n\t\t\tletter = \"a\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tletter = \"b\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tletter = \"c\";\n\t\t\tbreak;\n\t\tcase 3: \n\t\t\tletter = \"d\";\n\t\t\tbreak;\n\t}\n\treturn letter;\n}", "function lookup_table(letter) {\n return board_col_labels.slice(0,size).indexOf(letter);\n}", "function convert(letter){\n var letters=['A','B','C', 'D','E','F','G','H'];\n return letters.indexOf(letter) + 1;\n }", "function convertToWord(letter) {\n if (letter === \"r\") return \"Rock\";\n if (letter === \"p\") return \"Paper\";\n if (letter === \"s\") return \"Scissors\";\n return \"Sponge\"\n\n }", "function getPiece(which){\n\treturn pieceArr[parseInt(which.substr((which.search(/\\_/)+1),1))][parseInt(which.substring((which.search(/\\|/)+1),which.length))];\n}", "function generatePiece() {\n switch(Math.floor(7 * Math.random() + 1)) {\n case 1:\n return Piece.I;\n case 2:\n return Piece.T;\n case 3:\n return Piece.L;\n case 4:\n return Piece.J;\n case 5:\n return Piece.S;\n case 6:\n return Piece.Z;\n default:\n return Piece.O;\n }\n}", "characterMapping(d) {\n switch (d) {\n case \"percentagea\":\n return \"A\"\n case \"percentaget\":\n return \"U\"\n case \"percentageg\":\n return \"G\"\n default:\n return \"C\"\n }\n }", "function getPiece(player){\n\n\tif(player=='x' || player == 'X'){\n\t\tplayer='X';\n\t}\n\telse if(player == 'o' || player == 'O'){\n\t\tplayer = 'O';\n\t}\n\telse{\n\t\tplayer = 'X';\n\t}\n\n\treturn player;\n}", "function numberToLetterDataProvider(num){\n const index = JSON.parse('{\"1\": \"A\", \"2\": \"B\", \"3\": \"C\", \"4\": \"D\", \"5\": \"E\", \"6\": \"F\", \"7\": \"G\", \"8\": \"H\", \"9\": \"I\", \"10\": \"J\"}');\n return index[num];\n}", "function genLetter() {\n return letters[Math.floor(Math.random() * letters.length)];\n }", "function getCharacterImg(dir, id){\n if (id < 10){\n id = \"0\" + id.toString()\n } \n if (dir === \"UP\"){\n return `../../asset/Yang_Walk_UP/Yang_Walk_UP_000${id}.png`\n } else if (dir === \"DOWN\"){\n return `../../asset/Yang_Walk_DN/Yang_Walk_DN_000${id}.png`\n } else if (dir === \"LEFT\" || dir === \"RIGHT\"){\n return `../../asset/Yang_Walk_LR/Yang_Walk_LR_000${id}.png`\n } \n}", "getAsLetter(number) {\n // if (number <= 0) {\n // return '';\n // }\n let quotient = number / 26;\n let remainder = number % 26;\n if (remainder === 0) {\n //If number denotes the factor of 26, then reduce quotient by 1 and set remainder as 26.\n remainder = 26;\n quotient--;\n }\n //Index of A char in the ASCII table. \n let letter = String.fromCharCode(65 - 1 + remainder);\n let listValue = '';\n while (quotient >= 0) {\n listValue = listValue + letter.toString();\n quotient--;\n }\n return listValue;\n }", "function GiveACharacter(str, num) {\n if (num >=0) {\n return str[num];\n }\n}", "function convertToWord(letter) {\r\n if (letter === 'r') {\r\n return 'Rock';\r\n }\r\n if (letter === 'p') {\r\n return 'Paper';\r\n }\r\n if (letter === 's') {\r\n return 'Scissors';\r\n }\r\n if (letter === 'l') {\r\n return 'Lizard';\r\n }\r\n if (letter === 'sp') {\r\n return 'Spock';\r\n }\r\n}", "function idToHeroName (heroes, heroId) {\n for (let i = 0; i < heroes.length; i++) {\n if (heroes[i].id == heroId) {\n return heroes[i].localized_name;\n }\n }\n return 'Unknown';\n}", "function getNumFromLetter(letter) {\n return letter.charCodeAt();\n}", "function getTileIndex(index){\n if(index < 10) return '0' + index;\n else return index;\n}" ]
[ "0.6445566", "0.631108", "0.6202048", "0.61871296", "0.6179145", "0.6116845", "0.6102789", "0.60724854", "0.6071657", "0.60710955", "0.60508704", "0.6009523", "0.5948256", "0.5930796", "0.5917462", "0.58823216", "0.58622813", "0.58337224", "0.582979", "0.5813873", "0.5795102", "0.57877994", "0.57867855", "0.5774743", "0.57741994", "0.57724625", "0.577045", "0.57651055", "0.5751744", "0.57450765", "0.5736445", "0.57132334", "0.5703705", "0.5672686", "0.56522167", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5651971", "0.5649637", "0.5634078", "0.5612209", "0.5599341", "0.55989146", "0.5594275", "0.55833226", "0.5574587", "0.5573574", "0.5569718", "0.5567854", "0.5562581", "0.5561623", "0.5552411", "0.55510926", "0.5547546", "0.55422693", "0.55138516", "0.55084807", "0.5485477" ]
0.81183976
0
This function generates a random tile for the load_scrabble_pieces() function and for swapping for a new tile. It returns the new letter that was generated.
function get_random_tile() { // Need take into account that there are 100 tiles total, not just 26 options. // Going to create an array of all the possible letters then - 100 to start. var all_letters = []; var total_letters = 0; for (var i = 0; i < 26; i++) { var current_letter = pieces[i].letter; // Get current letter, "A" to start var remaining = pieces[i].remaining; // Remaining letters, "9" for A at the start. total_letters += remaining; // Keep track of ALL the letters for the random call. for (var x = 0; x < remaining; x++) { all_letters.push(current_letter); // Add "remaining" number of the current letter to the array. } } // Now all_letters should have 100 letters at the start (less while playing the game) // Pick a random number and return that letter. var random_num = getRandomInt(0, total_letters - 1); // Off by one error if we don't subtract. 0 to 100 is bad. Want 0 to 99. var letter = all_letters[random_num]; // Save the letter. // Find the letter to decrement. for (var i = 0; i < 26; i++) { if (pieces[i].letter == letter) { pieces[i].remaining--; // Decrement letter remaining for this letter. return letter; // Return the letter's index. } } // Error if we get here. return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "characterShuffle() {\n\t\tthis.loadedPieces.forEach((e, key) => {\n\t\t\tthis.character[`${key}`] = e.object;\n\t\t});\n\n\t\tHelper.shuffleCharacter(this.game, this.character);\n\t}", "function scramble(){\n\tvar i,j,nameImage=0;\n\tvar tiles=new Array();\n\tfor(i=0;i<=numTiles;i++) tiles[i]=i;\n\ttiles[numTiles-1]=-1;tiles[numTiles-2]=-1;\n\tfor(i=0;i<height;i++){\n\t\tfor(j=0;j<wid;j++){\n\t\t\tk=Math.floor(Math.random()*tiles.length);\n\t\t\tposition[nameImage]=tiles[k];\n\t\t\tif(tiles[k]==numTiles) { blankx=j; blanky=i; }\n\t\t\ttiles[k]=tiles[tiles.length-1];\n\t\t\ttiles.length--;\n\t\t\tnameImage++;\n\t\t}\n\t}\n\tmode=1;\n\tfilltwo();\n}", "function GetRandom() {\n var remaining = GetNumTiles();\n //gets the remaining tiles\n\n if (remaining == 0 && $(\"#hand div img\").length == 0) {\n //if there are no more tiles game over\n GameOver();\n }\n\n var tileNumber = Math.floor(Math.random() * remaining) + 1;\n //random num between 1 and remaining number of tiles\n\n for (var letter in ScrabbleTiles) {\n tileNumber = tileNumber - ScrabbleTiles[letter].number_remaining;\n\n if (tileNumber <= 0 && letter != null) {\n ScrabbleTiles[letter].number_remaining -= 1;\n //subtract the tile used from number_remaining\n return letter;\n }\n }\n}", "function shuffleTiles() {\n // return array of shuffled word\n function shuffle(word) {\n let wordArr = word.split(\"\");\n newArr = [];\n let indexSet = new Set();\n for (let i = 0; i < wordArr.length; i++) {\n let index = Math.floor(Math.random() * wordArr.length);\n while (indexSet.has(index)) {\n console.log(\"stuck\");\n index = Math.floor(Math.random() * wordArr.length);\n }\n newArr.push(wordArr[index]);\n indexSet.add(index);\n }\n return newArr;\n }\n tiles = []; // clear tiles\n // clear tiles from board\n while (tileDiv.firstChild) {\n // remove prev children\n tileDiv.removeChild(tileDiv.lastChild);\n }\n shuffle(word).forEach((letter) => createTile(letter));\n\n // add letter to input when tile is clicked\n tiles.forEach((tileObj) => {\n tileObj.tile.addEventListener(\"click\", function () {\n addLetter(tileObj.letter, tileObj);\n });\n });\n }", "function generatePiece() {\n switch(Math.floor(7 * Math.random() + 1)) {\n case 1:\n return Piece.I;\n case 2:\n return Piece.T;\n case 3:\n return Piece.L;\n case 4:\n return Piece.J;\n case 5:\n return Piece.S;\n case 6:\n return Piece.Z;\n default:\n return Piece.O;\n }\n}", "function randomTile() {\n // There's probably a way to get this out of the DOM via jQuery\n var choices = [\"blue\", \"brown\", \"darkgreen\", \"grey\", \"white\", \"lightgreen\"];\n var num = Math.floor(Math.random() * choices.length);\n return choices[num];\n}", "newTile(board) {\n let num = this.getRandom(this.boardSize);\n let r = Math.random();\n do {\n num = this.getRandom(this.boardSize);\n } while (board[num] != 0);\n if (r < 0.9) {\n board[num] = 2;\n } else {\n board[num] = 4;\n }\n }", "function selectLetter(usedLetters) {\r\n\tvar i=Math.floor(Math.random()*NUMBER_PICES);\r\n\twhile(usedLetters[i]!=0) //generate untile pieces not used\r\n\t{\t\t\r\n\t i=Math.floor(Math.random()*NUMBER_PICES);\r\n\t}\r\n return i;\r\n}", "function NewLetter () {\n CompLetter = Letters[Math.floor(Math.random() * Letters.length)];\n GuessesLeft = 9\n GuessesSoFar = \"\";\n}", "function addNewTile() {\r\n var empties = availableCells();\r\n var value = Math.random() < TWO_CHANCE ? 2 : 4;\r\n var newKey = empties[Math.floor(Math.random() * empties.length)];\r\n board[newKey] = value;\r\n\r\n //save game state\r\n localStorage.setItem(\"board\", JSON.stringify(board));\r\n}", "function getScramble() {\n var moves = new Array();\n moves['r'] = new Array(\"R\", \"R'\", \"R2\");\n moves['l'] = new Array(\"L\", \"L'\", \"L2\");\n moves['u'] = new Array(\"U\", \"U'\", \"U2\");\n moves['d'] = new Array(\"D\", \"D'\", \"D2\");\n moves['f'] = new Array(\"F\", \"F'\", \"F2\");\n moves['b'] = new Array(\"B\", \"B'\", \"B2\");\n\n var limit = 25;\n var last = \"\";\n var scramble = \"\";\n var keys = \"\";\n\n for (var i = 1; i <= limit; i++) {\n keys = new Array(\"r\", \"l\", \"u\", \"d\", \"f\", \"b\");\n shuffle(keys);\n while (last == keys[0]) {\n shuffle(keys);\n }\n shuffle(moves[keys[0]]);\n move = moves[keys[0]][0];\n scramble += move + \" \";\n last = keys[0];\n } \n \n $$('.scramble .scramble-text').html( scramble);\n\n}", "function newLetter() {\n theLetter = letters[Math.floor(Math.random() * letters.length)];\n console.log(`Current letter: ${theLetter}`);\n}", "function randomPiece(){\r\n const pieceLetters = 'ILJOSZT'; //list each piece in string and we will refer to them with indexes\r\n piece.matrix = piece.nextMatrix;\r\n\r\n while(initPiece == 0){\r\n piece.matrix = createPiece(pieceLetters[pieceLetters.length * Math.random() | 0]); // \"| 0\" acts as a floor\r\n initPiece++;\r\n }\r\n\r\n piece.nextMatrix = createPiece(pieceLetters[pieceLetters.length * Math.random() | 0]); // \"| 0\" acts as a floor\r\n\r\n }", "function newRandomLetter() {\n randomLetter = letters[Math.floor(Math.random() * letters.length)];\n //console.log(randomLetter);\n}", "function generateTile(game, coord){\n var tile = generateRandomTile(coord);\n game.addTile(tile);\n return tile;\n}", "function createLetter () {\nrandLetter = possibleLetters[Math.floor(Math.random() * possibleLetters.length)];\nconsole.log(randLetter) }", "function buildBoard(){\n\t/* Start to build table*/\n\tvar table = '<table>';\n\t/* Add the only row */\n\ttable += '<tr>';\n\t/* Variable to hold randomizer*/\n\tvar rand= Math.floor(Math.random() * NUM_TILES_IN_ROW);\n\tvar rand_element= Math.floor(Math.random() * 4);\n\n\t/*On the row we are trying to elumate there are 4 special spaces 4/15 */\n\tfor(var i = 0; i < NUM_TILES_IN_ROW; i++){\n\t\tvar rand= Math.floor(Math.random() * NUM_TILES_IN_ROW);\n\t\tvar rand_element= Math.floor(Math.random() * 4);\n\t\tif(rand <= 3) {/*is 0 1 2 or 3 = 4/15 */\n\t\t\tif(rand == 0){\n\t\t\t\ttable += \"<td class='dub_word tileDrop'></td>\"\n\t\t\t}\n\t\t\telse if(rand == 1){\n\t\t\t\ttable += \"<td class='dub_letter tileDrop'></td>\"\n\t\t\t}\n\t\t\telse if(rand == 2){\n\t\t\t\ttable += \"<td class= 'trip_word tileDrop'></td>\"\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttable += \"<td class= 'trip_letter tileDrop'></td>\"\n\t\t\t}\n\n\t\t}\n\t\telse{ /* Add a normal tile */\n\t\ttable += \"<td class='tileDrop'></td>\";\n\t\t}\n\t}\n\ttable += \"</tr></table>\"\n\t$(\"#board\").html(table);\n\n}", "function randomize() {\r\n\r\n\tlet characterPos = Math.floor((Math.random() * characters.length));\r\n\tlet character = characters[characterPos];\r\n\r\n\tlet bgSize = Math.floor((Math.random() * 25) + 25);\r\n\r\n\tlet color = Math.floor((Math.random() * colors.length));\r\n\tlet bgColor = colors[color];\r\n\r\n\tlet fontSize = Math.floor((Math.random() * 15) + 10);\r\n\r\n\tlet speed = Math.floor((Math.random() * 5) + 2);\r\n\r\n\tlet position = Math.floor((Math.random() * 440) + 10);\r\n\r\n\tletters.push(new Letter(character, bgSize, bgColor, fontSize, speed, position));\r\n\r\n\r\n\t\r\n}", "function makeNewBoard(board) {\n var oldBoard = $scope.gameBoard.slice(0);\n\n for (var i = oldBoard.length; i > 0; i--)\n {\n var randChar = oldBoard[Math.floor(Math.random() * oldBoard.length)];\n board.push(randChar);\n var index = oldBoard.indexOf(randChar);\n\n if (index > -1)\n oldBoard.splice(index, 1);\n }\n }", "function mixTiles (item) {\n if (item.length == 0) { // if tiles are all gone, return 0, End of game\n return 0;\n }\n var i = Math.floor(Math.random() * item.length); // taking the modulus of a radmoized number so it does not go over the array\n var pickedLetter = item.charAt(i); // selects the letter\n allTiles = item.slice(0,i) + item.slice(i+1, item.length); // removes the chosen letter so distribution makes sense\n return pickedLetter;\n}", "placeNewTile(board) {\n const emptyTiles = this.getEmptyTiles(board)\n const indices = emptyTiles[Math.floor(Math.random() * emptyTiles.length)]\n\n board[indices[0]][indices[1]] = Math.random() < 0.5 ? 2 : 4\n\n return board\n }", "function newPiece() {\n var choice = Math.floor(Math.random()*tetromino.length);\n return {pieceName: tetromino[choice], colour: colours[choice], xPos: 3, yPos: -2, rotation: 0, type: choice};\n}", "scramble (scramble) {\n scramble = Scramble.parse(scramble)\n if (scramble.indexOf(' ') >= 0) {\n var moves = scramble.split(' ').filter((m) => m.length > 0)\n for (var i in moves) this.scramble(moves[i])\n } else {\n var moveInfo = Cube.moves()[scramble]\n var pieceInfo\n\n if (moveInfo == undefined) return\n\n // === Sequence ===\n if (moveInfo.hasOwnProperty('sequence')) {\n this.scramble(moveInfo.sequence)\n }\n\n // === Corners ===\n if (moveInfo.hasOwnProperty('corners')) {\n var t = moveInfo.corners[0][0]\n pieceInfo = [this.cp[t], this.co[t]]\n for (var i = 3; i > 0; i--) {\n this.cp[moveInfo.corners[0][(i + 1) % 4]] = this.cp[moveInfo.corners[0][i]]\n this.co[moveInfo.corners[0][(i + 1) % 4]] = (this.co[moveInfo.corners[0][i]] + moveInfo.corners[1][i]) % 3\n }\n this.cp[moveInfo.corners[0][1]] = pieceInfo[0]\n this.co[moveInfo.corners[0][1]] = (pieceInfo[1] + moveInfo.corners[1][0]) % 3\n }\n\n // === Edges ===\n if (moveInfo.hasOwnProperty('edges')) {\n var t = moveInfo.edges[0][0]\n pieceInfo = [this.ep[t], this.eo[t]]\n for (var i = 3; i > 0; i--) {\n this.ep[moveInfo.edges[0][(i + 1) % 4]] = this.ep[moveInfo.edges[0][i]]\n this.eo[moveInfo.edges[0][(i + 1) % 4]] = (this.eo[moveInfo.edges[0][i]] + moveInfo.edges[1][i]) % 2\n }\n this.ep[moveInfo.edges[0][1]] = pieceInfo[0]\n this.eo[moveInfo.edges[0][1]] = (pieceInfo[1] + moveInfo.edges[1][0]) % 2\n }\n\n // === Centers ===\n if (moveInfo.hasOwnProperty('centers')) {\n var t = moveInfo.centers[0]\n pieceInfo = this.c[t]\n for (var i = 3; i > 0; i--) {\n this.c[moveInfo.centers[(i + 1) % 4]] = this.c[moveInfo.centers[i]]\n }\n this.c[moveInfo.centers[1]] = pieceInfo\n }\n }\n return this\n }", "function shuffleBoard() {\r\n for (var i = pack.length - 1; i > 0; i--) {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = pack[i];\r\n pack[i] = pack[j];\r\n pack[j] = temp;\r\n }\r\n setBoard(pack);\r\n }", "function Shuffle(){\r\n\t\tfor(var c = 0; c < shuffleTimes; c++){\r\n\t\t\tvar pick = Math.floor (Math.random () * 4);\r\n\t\t\tswitch(pick){\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\t(get_tile_Style((eTop-100)+\"px\", eLeft+\"px\"))|| get_tile_Style((eTop+100)+\"px\", eLeft+\"px\");\r\n\t\t\t\t\toriginalTop = parseInt(shuffleTiles.style.top);\r\n \t\t\t\t\toriginalLeft = parseInt(shuffleTiles.style.left);\r\n \t\t\t\t\tshuffleTiles.style.top = eTop + \"px\";\r\n \t\t\t\t\tshuffleTiles.style.left = eLeft + \"px\";\r\n\t\t\t\t\teTop = originalTop;\r\n \t\t\t\t\teLeft = originalLeft;\r\n \t\t\t\t\tbreak;\r\n \t\t\t\tcase 1:\r\n \t\t\t\t\t(get_tile_Style(eTop+\"px\", (eLeft-100)+\"px\")) || get_tile_Style(eTop+\"px\", (eLeft + 100)+\"px\");\r\n\t\t\t\t\toriginalTop = parseInt(shuffleTiles.style.top);\r\n\t\t\t\t\toriginalLeft = parseInt(shuffleTiles.style.left);\r\n\t\t\t\t\tshuffleTiles.style.top = eTop + \"px\";\r\n\t\t\t\t\tshuffleTiles.style.left = eLeft + \"px\";\r\n\t\t\t\t\teTop = originalTop;\r\n\t\t\t\t\teLeft = originalLeft;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tget_tile_Style((eTop+100)+\"px\", eLeft+\"px\") || (get_tile_Style((eTop-100)+\"px\", eLeft+\"px\"));\r\n\t\t\t\t\toriginalTop = parseInt(shuffleTiles.style.top);\r\n\t\t\t\t\toriginalLeft = parseInt(shuffleTiles.style.left);\r\n\t\t\t\t\tshuffleTiles.style.top = eTop + \"px\";\r\n\t\t\t\t\tshuffleTiles.style.left = eLeft + \"px\";\r\n\t\t\t\t\teTop = originalTop;\r\n\t\t\t\t\teLeft = originalLeft;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tget_tile_Style(eTop+\"px\", (eLeft + 100)+\"px\") || (get_tile_Style(eTop+\"px\", (eLeft-100)+\"px\"));\r\n\t\t\t\t\toriginalTop = parseInt(shuffleTiles.style.top);\r\n\t\t\t\t\toriginalLeft = parseInt(shuffleTiles.style.left);\r\n\t\t\t\t\tshuffleTiles.style.top = eTop + \"px\";\r\n\t\t\t\t\tshuffleTiles.style.left = eLeft + \"px\";\r\n\t\t\t\t\teTop = originalTop;\r\n\t\t\t\t\teLeft = originalLeft;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t}}", "function genLetter() {\n return letters[Math.floor(Math.random() * letters.length)];\n }", "function generateNewTile(){\n\t\tvar openLocations = checkOpenLocations();\n\t\tif(openLocations.length > 0){\n\t\t\t// CN get random location string and format into valid coordinates\n\t\t\tvar randomIndex = Math.floor(Math.random() * openLocations.length);\n\t\t\tvar newCol = parseInt(openLocations[randomIndex].split('(')[1]);\n\t\t\tvar newRow = parseInt(openLocations[randomIndex].split(',')[1]);\n\t\t\tvar newTileValue = Math.random() > 0.33 ? 2 : 4;\n\t\t\tnew Tile(newTileValue, newCol, newRow);\n\t\t}\n\t}", "function randomcharSprite() {\n var randomInt = Math.floor(Math.random() * 5) + 1;\n var sprite;\n switch (randomInt) {\n case 1:\n sprite = 'images/char-boy.png';\n break;\n case 2:\n sprite = 'images/char-cat-girl.png';\n break;\n case 3:\n sprite = 'images/char-horn-girl.png';\n break;\n case 4:\n sprite = 'images/char-pink-girl.png';\n break;\n case 5:\n sprite = 'images/char-princess-girl.png';\n break;\n }\n return sprite;\n}", "function randomMove()\r\n{\r\n // empty indexes of origBoard\r\n var empty = emptySquares(origBoard);\r\n // console.log(\"EMPTY LENGTH IS: \" + empty.length);\r\n // random move choice\r\n var item = empty[Math.floor(Math.random() * empty.length)];\r\n // console.log(item);\r\n if(item !== null)\r\n {\r\n // change board state of the game\r\n origBoard[item] = aiPlayer;\r\n document.getElementById(item).innerText = aiPlayer;\r\n } \r\n}", "function startGame() {\n shuffled = _.shuffle(letters)\n lastCard = shuffled[9]\n for(i = 0; i < letters.length; i++) {\n var tile = $('<div></div>')\n $(tile).addClass('column')\n $(tile).attr('id', i)\n $('#content').append(tile)\n }\n}", "function pickRandomTile(){\n\tvar randomX = Math.floor(( Math.random() * dim_x));\n\tvar randomY = Math.floor(( Math.random() * dim_y));\n\treturn (randomX + '-' + randomY);\n}", "addRandomTile(board) {\n\t\t//open indicies\n\t\tlet open = [];\n\t\tboard.forEach((elt, index) => {\n\t\t\tif (elt === 0) {\n\t\t\t\topen.push(index);\n\t\t\t}\n\t\t});\n\t\tboard[open[Math.floor(Math.random() * open.length)]] =\n\t\t\tMath.floor(Math.random() * 100) < 10 ? 4 : 2;\n\t\treturn board;\n\t}", "function randLetter() {\n var letters = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\n var letter = letters[Math.floor(Math.random() * letters.length)];\n return letter\n}", "function randomise() {\r\n const randomNumber = Math.random();\r\n\r\n const randomTile = randomNumber * 100 * quantityOfTiles;\r\n\r\n const rounding = Math.floor(randomTile);\r\n\r\n const assignedTile = (rounding % quantityOfTiles) + 1;\r\n\r\n return assignedTile;\r\n}", "function randomtile(param){\n\t$(\"div.endgame\").text(\"YOU CAN PLAY !\");\n\tvar y,x;\n\tvar boule=false;\n\tfor(y=0;y<param;y++){\n\t\tvar empty=false;\n\n\t\tfor(x=0;x<16;x++)\n\t\t{\n\t\t\tif(!$(\"div.square-container\").eq(x).text())\n\t\t\t\tboule=true;\n\t\t}\n\n\t\tif(boule)\n\t\t{\n\t\t\twhile(!empty)\n\t\t\t{\n\t\t\t\tvar rando = Math.floor(Math.random()*16);\n\t\t\t\tif(!$(\"div.square-container\").eq(rando).text())\n\t\t\t\t{\n\t\t\t\t\tempty=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar rand = Math.floor(Math.random()*4);\n\t\t\tif(rand<2)\n\t\t\t\trand=2;\n\t\t\telse\n\t\t\t\trand=4;\n\t\t\t$(\"div.square-container\").eq(rando).text(rand);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$(\"div.endgame\").text(\"YOU LOOSE!\");\n\t\t}\n\t\tsetcolors();\n\n\t}\n}", "function getRandomTile() {\n return Math.floor(Math.random() * tilecolors.length);\n }", "function getRandomTile() {\n return Math.floor(Math.random() * tilecolors.length);\n }", "function getRandomTile() {\n return Math.floor(Math.random() * tilecolors.length);\n }", "function getRandTile () {\n return Math.floor(Math.random() * tileTypes);\n }", "function shuffle() {\n var box = 1;\n for ( box = 1; box < 17; box++ ) {\n var boxG = \"S\" + box;\n console.log(boxG);\n var letter = matrix[Math.floor(Math.random() * matrix.length)];\n document.getElementById(boxG).innerHTML= letter;\n }\n}", "function newLetter() {\r\n \t computerGuess = computerLetters[Math.floor(Math.random() * computerLetters.length)];\r\n console.log(computerGuess);\r\n }", "function RandomPieceBag()\n{\n var pieces=[];\n\n this.takePiece = function()\n {\n if(pieces.length==0)\n {\n for(var i=0; i<7; i++)\n {\n pieces.push(i);\n }\n }\n \n var randomIndex=Math.floor(Math.random()*pieces.length);\n var piece = pieces[randomIndex];\n pieces.splice(randomIndex, 1);\n return piece;\n }\n \n}", "function computerWeaponGenerator(){\r\n weapons_array1 = [...weapons_array];\r\n weapons_array1.splice(weapons_array.indexOf(icon),1);\r\n computerNum = Math.trunc(Math.random()*2);\r\n computerIcon.src = `icon-${weapons_array1[computerNum]}.svg`;\r\n computerIcon.style.width = '80px';\r\n\r\n t.removeAttribute('id');\r\n border(weapons_array.indexOf(weapons_array1[computerNum]),t);\r\n\r\n decideWinner(weapons_array1[computerNum],icon);\r\n // console.log(weapons_array1[computerNum],icon);\r\n}", "function tileGenerator (i) {\n var currentTile = document.createElement('div'); // intializeing tile\n var letter = mixTiles(allTiles); // chooses the letter from randomized tiles\n currentTile.className = 'tile tile-' + letter + ' ui-draggable ui-draggable-handle'; // intialize the class name with the selected letters\n currentTile.style = \"position: relative;\"; // letters are position relative\n currentTile.id = totalTileID; // unique ID is created for each tile\n $('.tile-set')[i].append(currentTile); // makes an tile object to keep track.\n var shoveTile = { boardPos: i, tileId : totalTileID, charVal: letter, immobile: false};\n tileObj.push(shoveTile); // pushing into the array\n totalTileID++; // increase the unique ID.\n}", "function updateTiles() {\n\tvar randTile = parseInt(Math.random() * $$(\".movablepiece\").length);\n\tmoveOneTile($$(\".movablepiece\")[randTile]);\n}", "function GenerateBoard(){\n var Random = Math.floor(Math.random()*100),\n randSelect = 0;\n \n for (const key in Alphabets) {\n if (Alphabets.hasOwnProperty(key)) {\n randSelect += parseFloat(Alphabets[key].probability);\n }\n\n if (randSelect >= Random) {\n //? Checks how many vowels there are, and reroll the Board if there are more than 3 vowels\n if (Alphabets[key].type == \"vowel\") {\n vowel += 1;\n \n if (vowel > 3) {\n GenerateBoard();\n return;\n }\n } \n //? Generates an array to populate the Game Board with\n WordArray.push(Alphabets[key].letter);\n PointArray.push(Alphabets[key].point);\n return; \n }\n }\n }", "function jsPsychic() {\n ranLetter = letters[Math.floor(Math.random() * letters.length)];\n console.log(ranLetter);\n\n}", "static getScrambledPuzzle() {\n const board = [\n [0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n ];\n\n // Randomly choose 1 out of 9 squares as the initial blank square.\n // x and y represent the position of this blank square on the board.\n const blank = randInt(9);\n let x = blank % 3;\n let y = Math.floor(blank / 3);\n\n // Starting with the solved image, scramble it by swapping the blank square\n // with one of its neighbors. Each swap is recorded so that the image\n // can be solved later simply by reversing the steps.\n const steps = [];\n let excludedFn;\n\n // Each one of these functions moves the blank square in a direction,\n // swapping it with its neighbor in said direction.\n // HAX: Each function currently returns its opposite to\n // signal the caller not to go back and forth.\n const up = () => {\n board[y][x] = board[--y][x];\n board[y][x] = blank;\n steps.unshift('down');\n return down;\n };\n const down = () => {\n board[y][x] = board[++y][x];\n board[y][x] = blank;\n steps.unshift('up');\n return up;\n };\n const left = () => {\n board[y][x] = board[y][--x];\n board[y][x] = blank;\n steps.unshift('right');\n return right;\n };\n const right = () => {\n board[y][x] = board[y][++x];\n board[y][x] = blank;\n steps.unshift('left');\n return left;\n };\n const execRandFn = (fns) => {\n const i = fns.indexOf(excludedFn);\n if (i !== -1) fns.splice(i, 1);\n const fn = fns[randInt(fns.length)];\n excludedFn = fn();\n };\n\n // Randomly move the blank square around, taking care to not go out of bounds.\n const move = () => {\n switch (x) {\n case 0:\n if (y === 0) execRandFn([right, down]);\n else if (y === 2) execRandFn([right, up]);\n else execRandFn([right, up, down]);\n break;\n case 2:\n if (y === 0) execRandFn([left, down]);\n else if (y === 2) execRandFn([left, up]);\n else execRandFn([left, up, down]);\n break;\n default:\n if (y === 0) execRandFn([left, right, down]);\n else if (y === 2) execRandFn([left, right, up]);\n else execRandFn([left, right, up, down]);\n }\n };\n [...Array(10).keys()].map(move); // Trigger the random move 10 times\n\n return { blank, board, steps };\n }", "function _getRandomLetter() {\n return String.fromCharCode(\n aCharCode + Math.floor(Math.random() * (zCharCode - aCharCode + 1))\n )\n}", "function newBoard() {\n \n tiles_flipped = 0;\n tiles = _.shuffle(tiles);\n var output = '';\n _.forEach(tiles, function(tiles_value, index) {\n output += '<div id=\"tile_'+ index +'\" onclick=\"memoryFlipTile(this,\\''+ tiles_value +'\\')\"></div>';\n });\n\n document.getElementById('memory_board').innerHTML = output;\n \n if(playerturn === 1){\n \n document.getElementById(\"player1\").style.background = \"blue\";\n document.getElementById(\"player2\").style.background =\"none\";\n }\n else{\n\n document.getElementById(\"player2\").style.background = \"red\";\n document.getElementById(\"player1\").style.background =\"none\";\n }\n}", "function createRandomLetter(){\n pcGuess = [Math.floor(Math.random() * (122-97)) + 97];\n pcCharGuess = String.fromCharCode(pcGuess);\n pcCharGuessUC = String.fromCharCode(pcGuess-32);\n guessesLeft = 10;\n //I created a function that also generates a random letter, this function gets called anytime a player wins or loses the game. Its intention is to reset the random letter's value. \n }", "function _createTile(letter) {\n return _.find(letterDistribution, function(tile) {\n return tile.letter === letter;\n });\n }", "addRandomTile() {\n // adds a random tile in an empty spot\n if (!this.gameState.board.includes(0)) { // if there aren't any empty \n return;\n } else {\n while (1) {\n var randomSpot = this.getRandom(0, this.numTiles - 1);\n // if randomSpot is empty, adds a new tile there. else, finds another randomSpot\n if (this.gameState.board[randomSpot] == 0) {\n if (Math.random() < .90) {\n this.gameState.board[randomSpot] = 2;\n } else {\n this.gameState.board[randomSpot] = 4;\n }\n break;\n }\n continue;\n }\n }\n }", "function DisplayRandomCheese() {\n\n var getIndex = GetRandomNumber(7);\n\n //Loop do make sure that the cheese not appear in the same spot \n while (getIndex === lastRandomCheeseIndex) {\n getIndex = GetRandomNumber(7);\n }\n\n //Change the tile to ground when a new cheese is added\n if (lastRandomCheeseIndex != 20) {\n //Remove the last cheese from the board\n gameData[_RANDOM_CHEESE_POS[lastRandomCheeseIndex].y][_RANDOM_CHEESE_POS[lastRandomCheeseIndex].x] = _GROUND;\n }\n\n //Add the cheese to the game data array\n gameData[_RANDOM_CHEESE_POS[getIndex].y][_RANDOM_CHEESE_POS[getIndex].x] = _RANDOM_CHEESE;\n\n //Delets the current map\n DeleteMap();\n\n //Draws the new one with the cheese in its new position in it\n DrawMap();\n\n //Set the last index for comparison the next time the function is running\n lastRandomCheeseIndex = getIndex;\n \n //5sec between replacement of the cheese\n randomCheeseTimer = setTimeout(DisplayRandomCheese, 5000);\n}", "function initGame(){\r\n if(Math.random()<0.5) //use random map:\r\n boardItemCosts=[0,0,KOEF_WORD2,0,0,0,KOEF_LETTER2,0,KOEF_LETTER2,0,0,0,KOEF_WORD2,0,0];\r\n else\r\n\tboardItemCosts=[KOEF_WORD3,0,0,KOEF_LETTER2,0,0,0,KOEF_WORD3,0,0,0,KOEF_LETTER2,0,0,KOEF_WORD3]; \r\n boardLength=boardItemCosts.length;\r\n for(i=0;i<NUMBER_PICES;i++)\r\n\t usedLetters[i]=0;\r\n for(i=0;i<boardLength;i++)\r\n lettersOnBoard[i]=EMPTY;\r\n counterLetters=1;\r\n}", "function getLetter()\n {\n var color = randomColor();\n // Generating a random number between 65-90 A-Z\n var k = Math.floor(Math.random() * ( 90 - 65 + 1 )) + 65;\n // charge the int to char\n var ch = String.fromCharCode(k);\n // get the random site at the screen\n var top = Math.floor(Math.random() * height/6 ),\n left = Math.floor(Math.random() * width/2 ) + width/4,\n html = '<span class=\"bubb bubb'+ k +' \" style=\"left:'+ left +'; top: '+ top +'; background-color: '+ color + '\">'+ ch +'</span>' ;\n\n $body.append(html);\n slowdown(k);\n\n if($time.html() <= 0) {\n return;\n }\n setTimeout(getLetter,gameSpeed);\n }", "function getTiles(numSlots) {\n for (let i = 0; i < numSlots; i++) {\n let randomIndex = Math.floor(Math.random() * remainingTiles.length);\n letter = remainingTiles[randomIndex];\n $(\"#rack\").append(\"<img src=\\\"\" + ScrabbleTiles[letter][\"image\"] +\n \"\\\" class=\\\"draggable\\\"></img>\");\n $(\"#rack > .draggable\").last().attr(\"letter\", letter);\n remainingTiles[randomIndex][\"number-remaining\"]--;\n remainingNum--;\n }\n}", "function generateRandomBlock() {\n arrayOfBlockFunctions = [\n getIBlock,\n getJBlock,\n getLBlock,\n getOBlock,\n getSBlock,\n getTBlock,\n getZBlock,\n ];\n\n nextPiece = Math.floor(Math.random()*arrayOfBlockFunctions.length);\n arrayOfBlockFunctions[nextPiece]();\n nextPieceBoard = pieceArray;\n}", "function findTile(){\n var oneTile = parseInt(Math.random() * 14);\n console.log(oneTile);\n return oneTile;\n }", "function createBoard() {\n shuffledCards = shuffle(cardList);\n shuffledCardsHTML = cardList.map(function(card) {\n return generateCardHTML(card)\n });\n deck.innerHTML = shuffledCardsHTML.join('');\n}", "function getGamePick() {\n var chars = \"abcdefghijklmnopqurstuvwxyz\";\n gPick = chars.substr(Math.floor(Math.random() * 26), 1);\n }", "function letter() {\n randomLetter = alphabet.charAt(Math.floor(Math.random() * alphabet.length));\n}", "function generateTileType()\r\n{\r\n\tvar x = gameTiles.length;\r\n\tgameTiles[x] = new gameTile();\r\n\tgameTiles[x].type = Math.floor((Math.random() * 4) + 0); //Tile type rng\r\n}", "function transferLetterTwo() {\n const index = Math.floor(Math.random() * letterPool.length);\n const letter = letterPool[index];\n setLettersTwo({\n type: 'add',\n value: letter\n })\n setLetterPool({\n type: 'remove',\n value: letter\n })\n }", "chooseCharacter() {\n return Math.floor(Math.random()*(4+1))\n }", "function getRandom() {\n computerRandomLetter =\n lettersToGuess[Math.floor(Math.random() * lettersToGuess.length)];\n console.log(computerRandomLetter);\n}", "function shuffle(){\n for (let i = char.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * i);\n const temp = char[i];\n char[i] = char[j];\n char[j] = temp;\n }\n}", "function start() {\n // change the colour and text of the start button\n var element = document.getElementById(\"start-button\");\n selectStatement(level, element.innerHTML === \"Restart\");\n element.innerHTML = \"Restart\";\n element.style.background = \"white\";\n element.style.border = \"white\";\n element.style.color = \"#f21a1d\";\n\n var output = \"\";\n // scramble the original question array and make the \"tiles\" (divs) for the game and invoke revealTile function\n origArray.scramble();\n for (var i = 0; i < origArray.length; i++) {\n output += `<div class=\"redTile\" id=\"tile_${i}\" onclick=\"revealTile(this, '${origArray[i]}')\"></div>`;\n }\n //displays new game\n document.getElementById(\"memory-game\").innerHTML = output;\n\n // shows the scrambled array for testing the game\n console.log(origArray);\n\n // gives a timed alert to the player of the randomised word order. Time for alert depends on legth of question\n var ansString = origArray.join(\" \");\n setTimeout(function () {\n if (origArray.length <= 6)\n swal({\n text: ansString,\n timer: 3000,\n buttons: false,\n });\n }, 500);\n setTimeout(function () {\n if (origArray.length > 6)\n swal({\n text: ansString,\n timer: 5000,\n buttons: false,\n });\n }, 500);\n}", "function giveTiles(){\n\t/*Constant path to file adding letters will make it find the picture */\n\tvar imagePath = \"images/Tiles/Scrabble_Tile_\";\n\t/*variable to hold code building tiles objects */\n\tvar tiles = \"\";\n\t/*varialbe to hold random variable */\n\tvar rand;\n\t/* Variable to hold letter picked */\n\tvar letter;\n\tvar value;\n\tvar score=0;\n\n\n\tfor(var i=0; i < NUM_TILES; i++){\n\t\t/*Get a random number use length of array to get an index */\n\t\trand = Math.floor(Math.random() * ScrabbleLetters.length);\n\t\t\n\t\t/*if there are no more letters left in the array grab a new letter */\n\t\twhile(ScrabbleCount[rand] == 0){\n\t\t\trand= Math.floor(Math.random() * ScrabbleLetters.length);\n\t\t}\n\t\t/* Get the letter and the value from the tables */\n\t\tletter = ScrabbleLetters[rand];\n\t\tvalue = ScrabbleValues[rand];\n\t\t/*Decrement the count as you \"took\" away a peice */\n\t\tScrabbleCount[rand]--;\n\t\t/*build the code to show the images */\n\t\ttiles += \"<img id='dragable\" + i + \"' class=letter_tile\" + letter + \" limg' src=\"+imagePath+letter+\".jpg>'<ima>\";\n\t\t/* I was trying to emulate a part of code I saw on stack overflow to \"pass\" values to the drop function but it didn't work out */\n\t\t/* So this is left in case I fix it in the future. */\n\t\tvaluesArray.push(value);\n\t\tlettersArray.push(letter);\n\n\t}\n\t$(\"#score\").html(score);\n\t$(\"#tiles\").html(tiles);\n}", "function randomLetter(){\n\t\t\n\t\tif (guessesLeft === 10){\n\t\t\treturn letters[Math.floor(Math.random()*letters.length)];\n\t\t}\n\t\telse{\n\t\t\treturn psychicGuess;\n\t\t}\n\t}// END randomLetter()", "function generateBoard() {\n var array = [], // 1-d array, with LxC, which will be ported to the main board at the end\n i, max = lines*collumns;\n \n // Put all mines in the beginning\n for (i = 0; i < max; i++) {\n if (i < mines) {\n array[i] = 1;\n }\n else {\n array[i] = 0;\n\t\t}\n }\n \n fisherYates(array); // Randomizes mine position\n \n makeBoard(array); // Passes 1-d array to 2-d board\n}", "function getWord() {\n\t//get random word from wordList array\n\tvar randomWord = wordList[Math.floor(Math.random()*wordList.length)];\n\t//console.log(randomWord);\n\tword = randomWord;\n\tscrambleWord(word);\n\tinsertWord(scrambled)\n}", "function setUpRandomGame() {\n let index = Math.floor(Math.random() * wordDictionary.length);\n secretWord = wordDictionary[index];\n setupGame();\n}", "function getRandomTileColumn() {\n return Math.floor((Math.random() * 10) % column);\n}", "function randomChar(){\n return possChars[0][Math.floor(Math.random()*possChars[0].length)] \n}", "buildTile(width, height, shuffled, lastTile) {\n let k = 0;\n var tNo = 0;\n var tWidth = 0;\n var tHeight = 0;\n var tileSet = \"\";\n for (let i = 0; i < this.row; i++) {\n for (let j = 0; j < this.col; j++) {\n tileSet += `<div class=\"tile t${shuffled[k] - 1}\" id=\"${i}${j}\"></div>`;\n k++;\n }\n }\n $(\".puzzle\").html(tileSet);\n this.puzzleTileSize(width, height);\n for (var i = 0; i < this.row; i++) {\n tWidth = 0;\n for (var j = 0; j < this.col; j++) {\n $(`.tile.t${tNo}`).css({\n \"background-position\": `${Math.floor(tWidth)}px ${Math.floor(tHeight)}px`\n });\n $(`.tile.t${tNo}`).attr(\"value\", \"\");\n tWidth -= (width / this.col);\n tNo++;\n }\n tHeight -= (height / this.row);\n }\n if (!lastTile) {\n $(`.tile.t${this.row * this.col - 1}`).css({ \"opacity\": 0 });\n $(`.tile.t${this.row * this.col - 1}`).attr(\"value\", \"gap\");\n }\n }", "static next(): State<TetrisPiece, Random.Generator> {\n return Random.intBetween(0, TYPE.length - 1).map(i => new TetrisPiece(i, 0));\n }", "function getRandomLetter(){\n let letter = alphabet[Math.floor(Math.random()*27)]\n return letter;\n\n}", "function shuffleTiles() {\n var shuffledTiles = shuffle(tileHTMLElements);\n\n console.log('after shuffle:', shuffledTiles);\n\n repopulateTiles(shuffledTiles);\n }", "function getRandomChar() {\n \n return pool[Math.floor(Math.random() * Object.keys(pool).length)] \n \n}", "function randomLetter()\r\n{\r\n return Math.floor(Math.random()*4);\r\n}", "function think() {\n var placables = Array.from(chessboard);\n var id = placables[Math.floor(Math.random() * placables.length)];\n move(id);\n}", "function getNewWord() {\n\n \n var startAt = Math.floor(Math.random() * words.size)\n\n\n //Assign starting word\n var iter = words.keys()\n var newShit = \"\"\n var pos = 0\n for(var w of iter) {\n newShit = w\n if(pos === startAt) break\n pos++\n }\n\n return newShit\n\n}", "function swapTile(row, column) {\r\n\t\r\n\tvar currentTD = tableRowColumn[row][column];\r\n\tvar currentCard = cardsRowColumn[row][column];\r\n\tvar leftCard = column-1;\r\n\tvar rightCard = column+1;\r\n\tvar upCard = row-1;\r\n\tvar downCard = row+1;\r\n\t\r\n\t//Up\r\n\tif (row != 0 && cardsRowColumn[upCard][column] == -1){\r\n\t\tvar nextTD = tableRowColumn[upCard][column];\r\n\t\tvar nextCard = cardsRowColumn[upCard][column];\r\n\t\tconsole.log(\"nextCard: \" + nextCard);\r\n\t\tcurrentTD.innerHTML = \"<div class=\\\"puzzleBlank hoverpiece\\\">\"+\"16\"+\"</div>\";\r\n\t\tnextTD.innerHTML = \"<div class=\\\"\" + chosenPuzzle + \" piece\"+currentCard+\" hoverpiece\\\">\"+currentCard+\"</div>\";\r\n\t\tcardsRowColumn[row][column] = \"-1\";\r\n\t\tcardsRowColumn[upCard][column] = currentCard;\r\n\t\ttotalMoves = totalMoves + 1;\r\n\t\tmoves.innerText = totalMoves;\r\n\t}\r\n\t//Down\r\n\tif (row != 3 && cardsRowColumn[downCard][column] == -1){\r\n\t\tvar nextTD = tableRowColumn[downCard][column];\r\n\t\tvar nextCard = cardsRowColumn[downCard][column];\r\n\t\tconsole.log(\"nextCard: \" + nextCard);\r\n\t\tcurrentTD.innerHTML = \"<div class=\\\"puzzleBlank hoverpiece\\\">\"+\"16\"+\"</div>\";\r\n\t\tnextTD.innerHTML = \"<div class=\\\"\" + chosenPuzzle + \" piece\"+currentCard+\" hoverpiece\\\">\"+currentCard+\"</div>\";\r\n\t\tcardsRowColumn[row][column] = \"-1\";\r\n\t\tcardsRowColumn[downCard][column] = currentCard;\r\n\t\ttotalMoves = totalMoves + 1;\r\n\t\tmoves.innerText = totalMoves;\r\n\t}\r\n\t//Right\r\n\tif (column != 3 && cardsRowColumn[row][rightCard] == -1){\r\n\t\tvar nextTD = tableRowColumn[row][rightCard];\r\n\t\tvar nextCard = cardsRowColumn[row][rightCard];\r\n\t\tconsole.log(\"nextCard: \" + nextCard);\r\n\t\tcurrentTD.innerHTML = \"<div class=\\\"puzzleBlank hoverpiece\\\">\"+\"16\"+\"</div>\";\r\n\t\tnextTD.innerHTML = \"<div class=\\\"\" + chosenPuzzle + \" piece\"+currentCard+\" hoverpiece\\\">\"+currentCard+\"</div>\";\r\n\t\tcardsRowColumn[row][column] = \"-1\";\r\n\t\tcardsRowColumn[row][rightCard] = currentCard;\r\n\t\ttotalMoves = totalMoves + 1;\r\n\t\tmoves.innerText = totalMoves;\r\n\t}\r\n\t//Left\r\n\tif (column != 0 && cardsRowColumn[row][leftCard] == -1){\r\n\t\tvar nextTD = tableRowColumn[row][leftCard];\r\n\t\tvar nextCard = cardsRowColumn[row][leftCard];\r\n\t\tconsole.log(\"nextCard: \" + nextCard);\r\n\t\tcurrentTD.innerHTML = \"<div class=\\\"puzzleBlank hoverpiece\\\">\"+\"16\"+\"</div>\";\r\n\t\tnextTD.innerHTML = \"<div class=\\\"\" + chosenPuzzle + \" piece\"+currentCard+\" hoverpiece\\\">\"+currentCard+\"</div>\";\r\n\t\tcardsRowColumn[row][column] = \"-1\";\r\n\t\tcardsRowColumn[row][leftCard] = currentCard;\r\n\t\ttotalMoves = totalMoves + 1;\r\n\t\tmoves.innerText = totalMoves;\r\n\t}\r\n\t//Check if solved, and if solved, change h1 to display congratulations\r\n\tif (cardsRowColumn[0][0] == \"1\"\r\n\t\t&& cardsRowColumn[0][1] == \"2\"\r\n\t\t&& cardsRowColumn[0][2] == \"3\"\r\n\t\t&& cardsRowColumn[0][3] == \"4\"\r\n\t\t&& cardsRowColumn[1][0] == \"5\"\r\n\t\t&& cardsRowColumn[1][1] == \"6\"\r\n\t\t&& cardsRowColumn[1][2] == \"7\"\r\n\t\t&& cardsRowColumn[1][3] == \"8\"\r\n\t\t&& cardsRowColumn[2][0] == \"9\"\r\n\t\t&& cardsRowColumn[2][1] == \"10\"\r\n\t\t&& cardsRowColumn[2][2] == \"11\"\r\n\t\t&& cardsRowColumn[2][3] == \"12\"\r\n\t\t&& cardsRowColumn[3][0] == \"13\"\r\n\t\t&& cardsRowColumn[3][1] == \"14\"\r\n\t\t&& cardsRowColumn[3][2] == \"15\"\r\n\t\t&& cardsRowColumn[3][3] == \"-1\") {\r\n\t\theader1.innerText = \"Congratulations, you completed the puzzle!\";\r\n\t\tmoves.innerText = totalMoves;\r\n\t\tmoveCounter.innerText = \"Total number of moves used:\";\r\n\t}\r\n}", "function computerguess() {\n randomletter = letterbase[Math.floor(Math.random() * letterbase.length)];\n console.log(randomletter);\n\n}", "function randLetter() {\n compKeyCode = Math.floor(Math.random() * 26 + 65);\n compLetter = String.fromCharCode(compKeyCode);\n console.log(\"Computer picks \" + compLetter);\n}", "function newBoard() {\n var output = '';\n tile_flipped = 0;\n document.getElementById(\"Verify_Test\").disabled = true;\n for(var i=0; i<trial.grid_size; i++) { // do not ever flip here\n output += '<div id=\"tile_'+i+'\" class=\"tile\"></div>';\n }\n document.getElementById('board').innerHTML = output;\n }", "function transferLetterOne() {\n const index = Math.floor(Math.random() * letterPool.length);\n const letter = letterPool[index];\n setLettersOne({\n type: 'add',\n value: letter\n })\n setLetterPool({\n type: 'remove',\n value: letter\n })\n }", "function getRandomLetter() {\n // get random letter key from a-z\n var randomNum = Math.floor(Math.random() * (90 - 65) + 65);\n\n // randomLetter = String.fromCharCode(randomNum).toLowerCase();\n randomLetter = randomNum;\n}", "function newTile() {\n\n // Create a new tile\n createdTile = document.createElement(\"div\");\n\n createdTile.setAttribute(\"position\", \"absolute\");\n createdTile.setAttribute(\"class\", \"tile\");\n\n // Find the empty corners\n var emptyCorners = [];\n if (!tileArray[0][0]) {\n emptyCorners.push(\"tile-1\");\n }\n if (!tileArray[0][3]) {\n emptyCorners.push(\"tile-4\");\n }\n if (!tileArray[3][0]) {\n emptyCorners.push(\"tile-13\");\n }\n if (!tileArray[3][3]) {\n emptyCorners.push(\"tile-16\");\n }\n\n // Of the empty corners, pick a corner for the tile to go into\n var newTileCorner = Math.floor(Math.random() * emptyCorners.length);\n\n if (emptyCorners.length > 0) {\n // Pick a corner to put the tile in\n createdTile.setAttribute(\"id\", emptyCorners[newTileCorner]);\n\n // Insert the tile into the corner\n $(\"#tile-container\").append(createdTile);\n\n // Insert the tile into the array of tiles\n if (emptyCorners[newTileCorner] == \"tile-1\") {\n tileArray[0][0] = createdTile;\n } else if (emptyCorners[newTileCorner] == \"tile-4\") {\n tileArray[0][3] = createdTile;\n } else if (emptyCorners[newTileCorner] == \"tile-13\") {\n tileArray[3][0] = createdTile;\n } else if (emptyCorners[newTileCorner] == \"tile-16\") {\n tileArray[3][3] = createdTile;\n }\n\n // Access the tile with jquery\n var $activeTile = $(\"#\" + createdTile.id);\n $activeTile.hide().fadeIn(100);\n\n // Make the new tile the same color as the old future tile\n createdTile.style.backgroundColor = futureColor;\n }\n }", "function switchPiece(piece){\n var e = piece.slice(1)\n var s = piece.charAt(0)\n if (s == \"S\"){\n var s = \"G\"+ e\n return s\n } else if (s == \"G\"){\n var s = \"S\"+ e\n return s\n } else if (piece == \"E\"){\n return \"E\"\n }\n}", "function chooseWord() {\n // Create random number from 0 to wordBank index max\n let random = getRandInt(0, wordBank.length - 1);\n // Create currentWord object with random word from wordBank\n currentWord = new Word(wordBank[random]);\n\n // Create letter objects and add them to letters in word object\n currentWord.generateLetters();\n // Removes the currentWord from wordBank so that it cannot be\n // selected again in the same game\n wordBank.splice(random, 1);\n}", "randomSuitName(){\n// Pointer to a random suit\nconst randomSuitIdx = Math.floor(Math.random()*this.remainingSuitNames.length);\n// suit key\nconst randomSuitName = this.remainingSuitNames[randomSuitIdx];\n// Preserve randomSuitName for future usage\n// this.randomBldgBlocks.randomSuitName = randomSuitName; \nreturn randomSuitName; //this.randomBldgBlocks.randomSuitName;\n }", "randomSuitName(){\n// Pointer to a random suit\nconst randomSuitIdx = Math.floor(Math.random()*this.remainingSuitNames.length);\n// suit key\nconst randomSuitName = this.remainingSuitNames[randomSuitIdx];\n// Preserve randomSuitName for future usage\n// this.randomBldgBlocks.randomSuitName = randomSuitName; \nreturn randomSuitName; //this.randomBldgBlocks.randomSuitName;\n }", "function getLwr () {\nreturn String.fromCharCode((Math.floor(Math.random() * 26) + 97));\n}", "function shuffleBoard() {\n newGameIdsArr = shuffle(gameIdsArr);\n newMoundsArr = shuffle(moundsArr);\n \n for (var i = 0; i < gameIdsArr.length; i++) {\n gamePieces[i].setAttribute('id', newGameIdsArr[i]);\n gamePieces[i].setAttribute('style', 'background-image: url(' + newMoundsArr[i] + ');');\n }\n }", "function sufflePieces() {\n \n var numerot = [];\n while(numerot.length < 16){\n var satunnainen = Math.floor(Math.random() * 16)+ 1;\n if((numerot.includes(satunnainen))===false){\n numerot.push(satunnainen);\n \n }\n }\n \n \n // set all unmovable\n setUnmovable();\n \n var empty = $(\"#empty\");\n empty.removeAttr(\"id\");\n empty.addClass(\"piece\");\n \n \n for(var i =1; i<=16; i++){\n var laatta = $(\".\"+i);\n if(numerot[i-1] === 16){\n laatta.attr(\"id\",\"empty\");\n laatta.removeClass(\"piece\");\n laatta.text(\"\");\n }else{\n laatta.text(numerot[i-1]);\n }\n \n \n }\n \n setMovablePieces();\n\n // Stop the counter\n clearInterval(counter);\n\n // start new counter from 0\n laskuri();\n \n \n }", "function newBoard(){ \n\t // Reset the counter\n\t for(var i = 0; i < 16; i++)\n\t\t\ttileClickCount[i] = 0;\n\t // Reset the variables\n\t last_flipped_id = -1;\n\n\t tiles_flipped = 0; \n\t tiles_cleared = []; \n\n\t // Shuffle the formulas\n\t var formulasAndXValues = [];\n\t for (var i = 0; i < formulas.length; i++)\n\t\t\tformulasAndXValues.push({\"id\": i, \"formula\": formulas[i], \"xval\": xvalues[i]});\n\n\t // Shuffle the order\n\t //formulasAndXValues = shuffle(formulasAndXValues);\n\n\t var output = ''; \n\t for(var i = 0; i < formulas.length; i++)\n\t {\n\t\t\tvar obj = formulasAndXValues[i];\n\t\t\toutput += '<div id=\"tile_' +obj[\"id\"]+ '\" onclick=\"memoryFlipTile(this,\\''+obj[\"id\"]+'\\')\"></div>'; \n\t }\n\n\t document.getElementById('memory_board').innerHTML = output; \n}", "function generateBoard(board)\n {\n for(var i = 0; i < board.length; i++)\n {\n var newChar = board[i];\n $scope.gameBoard[i] = newChar;\n };\n }", "function shuffleTiles(){\n //SHUFFLE\n console.log(\"Shuffling...\");\n shuffledTiles = shuffle(gameTiles);\n\n //UPDATE BOARD\n for (let i = 0; i <= shuffledTiles.length - 1; i++){ \n let curTile = $(`#${i}`);\n $(curTile).append($(\"<img></img>\")\n .attr('src', `${shuffledTiles[i].value}`)\n .addClass(\"hidden\", \"image\"));\n };\n }" ]
[ "0.69493926", "0.68173194", "0.6799961", "0.6624085", "0.6608978", "0.6590431", "0.65651155", "0.65441746", "0.6535757", "0.6525382", "0.6482125", "0.6455097", "0.6451292", "0.64218223", "0.6412266", "0.6411063", "0.63242096", "0.6317848", "0.6313469", "0.6310228", "0.6274061", "0.62732524", "0.62695235", "0.6267243", "0.6265701", "0.6247358", "0.62441134", "0.6226273", "0.62109756", "0.61853415", "0.61676645", "0.6166362", "0.6152473", "0.61470866", "0.6142167", "0.6135605", "0.6135605", "0.6135605", "0.6123672", "0.612029", "0.6115045", "0.61105734", "0.6110416", "0.60667336", "0.6065222", "0.60602885", "0.6042024", "0.6038416", "0.60332465", "0.60312814", "0.6026855", "0.6020687", "0.6020551", "0.6018548", "0.60162634", "0.60068035", "0.60066044", "0.6002242", "0.6001979", "0.599651", "0.5996291", "0.5986261", "0.5984518", "0.5973211", "0.5968285", "0.5966479", "0.5960043", "0.5959119", "0.5957068", "0.59554297", "0.59516126", "0.5947249", "0.5937997", "0.59274065", "0.59251016", "0.59225786", "0.59156686", "0.5907098", "0.590469", "0.5902034", "0.5901694", "0.58987105", "0.58957684", "0.5892906", "0.58900684", "0.5889105", "0.5885996", "0.588125", "0.5879563", "0.58751094", "0.58748347", "0.58701557", "0.58602595", "0.58602595", "0.58600175", "0.5859753", "0.58529377", "0.5845547", "0.5842168", "0.5837037" ]
0.73350275
0
This function will update the "Letters Remaining" table. The table has 3 rows of 9 cells, but the very last cell (row 3, cell 9) is empty and should remain empty. URL for info on this function:
function update_remaining_table() { var x = 0; var first = true; // Go through every cell in the table and update it. $('#letters_remain tr').each(function() { // DO NOT go over the limit of the array! Currently there is 27 elements in the // array. So we should stop at 27, since we are going 0 to 26. // Make sure to return false for this to work (THANK YOU STACKOVERFLOW) // URL for that amazing tip: https://stackoverflow.com/questions/1784780/how-to-break-out-of-jquery-each-loop if (x > 25) { // hack to make Blank show "2". // Quit before bad things happen. return true; } $(this).find('td').each(function() { // Skip the first row, we don't want to mess with it. if (first == true) { first = false; return false; } // DO NOT go over the limit of the array! Currently there is 27 elements in the // array. So we should stop at 27, since we are going 0 to 26. if (x > 25) { // Quit before bad things happen. return false; } // Easier to use variables for this stuff. var letter = pieces[x].letter; var remaining = pieces[x].remaining; // Using "$(this)" access each cell. $(this).html(letter + ": " + remaining); x++; // Keep looping return true; }); return true; }); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTable() {\n var rowCount = 5;\n if(pageId == 'page-screen')\n rowCount = 8;\n\n // Build the new table contents\n var html = '';\n for(var i = getGuessesCount() - 1; i >= Math.max(0, getGuessesCount() - rowCount); i--) {\n html += \"<tr>\";\n html += \"<td>\" + (i + 1) + \"</td>\\n\";\n html += \"<td>\" + guesses[i].firstName + \"</td>\";\n html += \"<td>\" + guesses[i].weight + \" gram</td>\";\n html += \"</tr>\";\n }\n\n // Set the table contents and update it\n $(\"#guess-table > tbody\").html(html);\n $(\"#guess-table\").table(\"refresh\");\n }", "function updateAttemptsRemaining() {\n\t\tattemptsRemainingElement.innerText = attemptsRemaining;\n\t}", "function newAvailableLetters(){\n var letterBuild = \"\";\n letterBuild += \"<table><tr>\";\n\n for(var i=0; i<26; i++){\n if(i===13){\n letterBuild += \"</tr><tr>\";\n }\n if(LettersSelected.charAt(i)==Alphabet[i]){\n letterBuild+= ('<TD width=\"20\">' +\n '<A HREF=\"javascript:LoadNextPage('+i+',\\''+Alphabet[i]+\n '\\')\">'+Alphabet[i]+'</A></TD>');\n\n\n }else{\n // need this to hold an empty spot in the table\n // holding the displayed letters\n letterBuild += '<TD width=\"20\"> </TD>';\n\n }\n }\n letterBuild += \"</tr></table>\";\n letterArea.innerHTML = letterBuild;\n\n}", "function updateWrongLetters() {\n // Update the Display for Wrong Letters\n wrongLetters.innerHTML = `\n ${incorrectLetters.length > 0 ? `<p>Wrong</p>` : '' }\n ${incorrectLetters.map( letter => `<span>${letter}</span>`)}\n `;\n // Display Hangman Parts on Incorrect Letter Input\n hangmanParts.forEach( (part, index) => {\n const errors = incorrectLetters.length;\n if ( index < errors ) {\n part.style.display = 'block';\n } else {\n part.style.display = 'none';\n }\n });\n // Show Popup if lost\n if(incorrectLetters.length === hangmanParts.length) {\n message.innerText = 'You lost!';\n popup.style.display = 'flex';\n }\n}", "function updateWrongLettersElement() {\n\n //display wrong letters\n wrongLettersElement.innerHTML = `\n ${wrongLetters.length > 0 ? '<p>Wrong !</p>' : ''}\n ${wrongLetters.map(letter => `<span>${letter}</span>`)}\n `;\n\n //display hangman's parts \n hangmanParts.forEach((part, index) => {\n const errors = wrongLetters.length;\n\n if (index < errors) {\n part.style.display = 'block';\n } else {\n part.style.display = 'none';\n }\n });\n\n //check if lost\n if (wrongLetters.length === hangmanParts.length) {\n finalMessage.innerText = 'Game Over!'\n popUp.style.display = 'flex';\n }\n}", "function updatePlayerMostKillsTable() {\n var tableRef = document.getElementById('playerMostKillsTable').getElementsByTagName('tbody')[0];\n var x;\n // Removing previous entries \n for(x = tableRef.rows.length - 1 ; x > 0; x--) {\n tableRef.deleteRow(x); \n }\n var i; \n var j; \n // For every player in the list \n for(j = 0; j < listOfPlayers.length; j++) {\n var data = listOfPlayers[j]\n var newRow = tableRef.insertRow();\n // We only want to add the first and the last element, which is the username and the amount of kills\n var newCell = newRow.insertCell(0);\n var newText = document.createTextNode(data[0]);\n newCell.appendChild(newText); \n var newCell = newRow.insertCell(1);\n var newText = document.createTextNode(data[4]);\n newCell.appendChild(newText); \n }\n\n}", "function createTables() {\r\n\t\r\n\tvar cardCount = document.getElementById('cardCount').value;\r\n\t//document.createElement('thead');\r\n\r\n\tvar gameBoard = document.getElementById('gameBoard');\r\n\t\r\n\tfor(var i = 0; i < cardCount; i+=1) {\r\n\t\tvar table = document.createElement('table');\r\n\t\tgameBoard.appendChild(table);\r\n\r\n\t\ttable.innerHTML = '<thead>\t\\\r\n\t\t\t\t\t\t<th>B</th>\t\\\r\n\t\t\t\t\t\t<th>I</th>\t\\\r\n\t\t\t\t\t\t<th>N</th>\t\\\r\n\t\t\t\t\t\t<th>G</th>\t\\\r\n\t\t\t\t\t\t<th>O</th>\t\\\r\n\t\t\t\t\t</thead>\t\\\r\n\t\t\t\t\t<tbody>\t\\\r\n\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterB\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterI\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterN\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterG\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterO\"></td>\t\\\r\n\t\t\t\t\t\t</tr>\t\\\r\n\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterB\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterI\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterN\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterG\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterO\"></td>\t\\\r\n\t\t\t\t\t\t</tr>\t\\\r\n\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterB\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterI\"></td>\t\\\r\n\t\t\t\t\t\t\t<td id=\"freeSpace\">FREE SPACE</td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterG\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterO\"></td>\t\\\r\n\t\t\t\t\t\t</tr>\t\\\r\n\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterB\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterI\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterN\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterG\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterO\"></td>\t\\\r\n\t\t\t\t\t\t</tr>\t\\\r\n\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterB\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterI\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterN\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterG\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterO\"></td>\t\\\r\n\t\t\t\t\t\t</tr>\t\\\r\n\t\t\t\t\t</tbody>'\r\n\t}\r\n}", "function updatePlayerStatTable() {\n var tableRef = document.getElementById('playerStatTable').getElementsByTagName('tbody')[0];\n var x;\n // Removing previous entries\n for(x = tableRef.rows.length - 1 ; x > 0; x--) {\n tableRef.deleteRow(x); \n }\n var i; \n var j; \n for(j = 0; j < listOfPlayers.length; j++) {\n var data = listOfPlayers[j]\n var newRow = tableRef.insertRow();\n for(i = 0; i < 4; i++) {\n var newCell = newRow.insertCell(i);\n var newText = document.createTextNode(data[i]);\n newCell.appendChild(newText); \n }\n }\n}", "function resetHtmlBoard() {\n const tableBody = document.getElementById('table-body')\n \n for (let i = 0; i < tableBody.children.length; i++) {\n for (let j = 0; j < tableBody.children[i].children.length; j++) {\n tableBody.children[i].children[j].innerHTML = \"$\"+ (i+1) + '00';\n }\n }\n}", "function table_fill_empty() {\n pagination_reset();\n $('.crash-table tbody').html(`\n <tr>\n <th>-</th>\n <td>-</td>\n <td>-</td>\n <td>-</td>\n </tr>`);\n}", "function remainingGuesses() {\n remainingGuess = 10 - guessedLetters.length;\n}", "function insertPlayer(table, count, player){\n var row = table.insertRow(count);\n row.id = player.player.ID;\n\n // I need 10 cells here to Complete the table\n var cell1 = row.insertCell(0);\n var cell2 = row.insertCell(1);\n var cell3 = row.insertCell(2);\n var cell4 = row.insertCell(3);\n var cell5 = row.insertCell(4);\n var cell6 = row.insertCell(5);\n var cell7 = row.insertCell(6);\n var cell8 = row.insertCell(7);\n var cell9 = row.insertCell(8);\n var cell10 = row.insertCell(9);\n\n // Modify the Player Name so that it can be linked to\n var firstName = player.player.FirstName;\n var lastName = player.player.LastName;\n while(firstName.includes(\".\") || firstName.includes(\"-\") || firstName.includes(\" \")){\n firstName = firstName.replace(\".\", \"\");\n firstName = firstName.replace(\"-\", \"\");\n firstName = firstName.replace(\" \", \"\");\n }\n while(lastName.includes(\".\") || lastName.includes(\"-\") || lastName.includes(\" \")){\n lastName = lastName.replace(\".\", \"\");\n lastName = lastName.replace(\"-\", \"\");\n lastName = lastName.replace(\" \", \"\");\n }\n\n cell1.innerHTML = \"<a href='/playerStats/\" + firstName + \"-\" + lastName +\"'>\" + firstName + \" \" + lastName + \"</a>\";\n cell2.innerHTML = player.stats.Pts['#text'];\n cell3.innerHTML = player.stats.Reb['#text'];\n cell4.innerHTML = player.stats.Ast['#text'];\n cell5.innerHTML = player.stats.Blk['#text'];\n cell6.innerHTML = player.stats.Stl['#text'];\n cell7.innerHTML = player.stats.Tov['#text'];\n cell8.innerHTML = player.stats.Fouls['#text'];\n cell9.innerHTML = player.stats.PlusMinus['#text'];\n cell10.innerHTML = Math.floor(player.stats.MinSeconds['#text']/60);\n\n}", "function updateGuessTables()\n{\n\tconsole.log(\"update guess tables\");\n\tvar i, j, p, table, d, guessIndex;\n\t// update suspect guess table\n\ttable = document.getElementById(\"suspectGuessTable\").rows;\t// get player suspect guess table, collection of rows\n\tfor(i = 2; i < 8; i++)\t// iterate through rows, row header at row 0, suspect names at row 1\n\t{\n\t\td = table[i].cells;\t// d is the collection of cells in row i\n\t\tp = players[i-2];\t// get player corresponding to row i\n\t\t\n\t\tfor(j = 0; j < p.guesses.length; j++)\t// iterate through player guesses array\n\t\t{\n\t\t\t// get the suspect of the guess, search for it in the suspect names array and return its index in that array\n\t\t\tguessIndex = suspectNames.indexOf(p.guesses[j].suspect);\t// eg green = 0\n\t\t\t// because both the suspectNames array and the list of suspects in the table are both alphabetical\n\t\t\t// we can use guessIndex to input data into the cell that corresponds with the same suspect\n\t\t\t// put \"!\" in cell that the player has guessed\n\t\t\td[guessIndex + 1].innerHTML = \"#\";\t// increment guessIndex as column 0 contains player numbers\n\t\t}\n\t}\n\t// update weapon guess table\n\ttable = document.getElementById(\"weaponGuessTable\").rows;\t// get player weapon guess table, collection of rows\n\tfor(i = 2; i < 8; i++)\t// iterate through rows, row header at row 0, suspect names at row 1\n\t{\n\t\td = table[i].cells;\t// d is the collection of cells in row i\n\t\tp = players[i-2];\t// get player corresponding to row i\n\t\t\n\t\tfor(j = 0; j < p.guesses.length; j++)\t// iterate through player guesses array\n\t\t{\n\t\t\t// get the weapon of the guess, search for it in the weapon names array and return its index in that array\n\t\t\tguessIndex = weaponNames.indexOf(p.guesses[j].weapon);\t// eg candlestick = 0\n\t\t\t// because both the weaponNames array and the list of weapons in the table are both alphabetical\n\t\t\t// we can use guessIndex to input data into the cell that corresponds with the same weapon\n\t\t\t// put \"!\" in cell that the player has guessed\n\t\t\td[guessIndex + 1].innerHTML = \"#\";\t// increment guessIndex as column 0 contains player numbers\n\t\t}\n\t}\n\t// update room guess table\n\ttable = document.getElementById(\"roomGuessTable\").rows;\t// get player room guess table, collection of rows\n\tfor(i = 2; i < 8; i++)\t// iterate through rows, row header at row 0, suspect names at row 1\n\t{\n\t\td = table[i].cells;\t// d is the collection of cells in row i\n\t\tp = players[i-2];\t// get player corresponding to row i\n\t\t\n\t\tfor(j = 0; j < p.guesses.length; j++)\t// iterate through player guesses array\n\t\t{\n\t\t\t// get the room of the guess, search for it in the room names array and return its index in that array\n\t\t\tguessIndex = roomNames.indexOf(p.guesses[j].room);\t// eg ballroom = 0\n\t\t\t// because both the roomNames array and the list of rooms in the table are both alphabetical\n\t\t\t// we can use guessIndex to input data into the cell that corresponds with the same room\n\t\t\t// put \"!\" in cell that the player has guessed\n\t\t\td[guessIndex + 1].innerHTML = \"#\";\t// increment guessIndex as column 0 contains player numbers\n\t\t}\n\t}\n}", "function updateLetters () {\n\t// begin html string\n\tvar html =\t\"<p>WINS : \" + wins + \"</p>\" +\n\t\t\t\t\t\"<p>CURRENT WORD<br>\";\t\t\t\t\t\n\t// Loop through letters array and see if letters have been guessed\n\tfor (i = 0; i < letters.length; i++){\n\t// if letter isn't undefined, it's a match\n\t\tif (lettersMatched[i]!== undefined){\n\t\t\t// add match to html string and add space after letter\n\t\t\thtml += lettersMatched[i] + \" \";\n\t\t}\n\t\t\telse {\n\t\t\t\t// if it's not a match, add the dash instead\n\t\t\t\thtml += \"_ \";\n\t\t\t}\t\t\n\t\t}\t\n\t\t\n\t// Close paragraph tag\n\thtml += \"</p>\";\n\t// add html, remaining guesses\n\thtml += \"<p>GUESSES REMAINING : \" + guessesRemaining + \"</p>\" +\n\t\t\t\"<p>LETTERS GUESSED :<br>\";\n\t\t\t\n\t// loop through letters guessed array\n\tfor (i = 0; i < lettersGuessed.length; i++){\n\t\tif (i > 0){\n\t\t//list out letters guessed, with comma\n\t\thtml += \",\" + lettersGuessed[i];\n\t\t\t} else {\n\t\t\t// list out letters guessed, separated by a space\n\t\t\thtml += lettersGuessed[i];\n\t\t}\n\t}\n\t// close paragraph tag\n\thtml += \"</p>\";\n\n\t// find game div and update the innerHTML\n\tdocument.querySelector(\"#game\").innerHTML = html;\n}", "function updateCardTables()\n{\n\tconsole.log(\"update card tables\");\n\tvar i, j, playerNum, table, d;\n\t// update suspect table\n\ttable = document.getElementById(\"suspectTable\").rows;\t// get player suspect card table, collection of rows\n\tfor(i = 2; i < 8; i++)\t// iterate through rows, row header at row 0, suspect names at row 1\n\t{\n\t\td = table[i].cells;\t// d is the collection of cells in row i\n\t\tplayerNum = players[i-2];\t// get player corresponding to row i\n\t\tfor(j = 1; j < 7; j++)\t// iterate through columns, player numbers at row 0\n\t\t{\n\t\t\t// find what cards this player has in their yes array\n\t\t\t// find the index of suspect in yes array, returns -1 if suspect name not present\n\t\t\tif(playerNum.suspects.yes.indexOf(suspectNames[j-1]) != -1)\t// if suspect card is present in player yes array\n\t\t\t{\n\t\t\t\td[j].innerHTML = \"✔\";\n\t\t\t}\n\t\t\telse if(playerNum.suspects.no.indexOf(suspectNames[j-1]) != -1)\t// else if suspect card is present in player no array\n\t\t\t{\n\t\t\t\td[j].innerHTML = \"✘\";\n\t\t\t}\n\t\t}\n\t}\n\t// update weapon table\n\ttable = document.getElementById(\"weaponTable\").rows;\t// get player weapon card table, collection of rows\n\tfor(i = 2; i < 8; i++)\t// iterate through rows, row header at row 0, weapon names at row 1\n\t{\n\t\td = table[i].cells;\t// d is the collection of cells in row i\n\t\tplayerNum = players[i-2];\t// get player corresponding to row i\n\t\tfor(j = 1; j < 7; j++)\t// iterate through columns, player numbers at row 0\n\t\t{\n\t\t\t// find what cards this player has in their yes array\n\t\t\t// find the index of weapon in yes array, returns -1 if weapon name not present\n\t\t\tif(playerNum.weapons.yes.indexOf(weaponNames[j-1]) != -1)\t// if weapon card is present in player yes array\n\t\t\t{\n\t\t\t\td[j].innerHTML = \"✔\";\n\t\t\t}\n\t\t\telse if(playerNum.weapons.no.indexOf(weaponNames[j-1]) != -1)\t// else if weapon card is present in player no array\n\t\t\t{\n\t\t\t\td[j].innerHTML = \"✘\";\n\t\t\t}\n\t\t}\n\t}\n\t// update room table\n\ttable = document.getElementById(\"roomTable\").rows;\t// get player room card table, collection of rows\n\tfor(i = 2; i < 8; i++)\t// iterate through rows, row header at row 0, room names at row 1\n\t{\n\t\td = table[i].cells;\t// d is the collection of cells in row i\n\t\tplayerNum = players[i-2];\t// get player corresponding to row i\n\t\tfor(j = 1; j < 10; j++)\t// iterate through columns, player numbers at row 0\n\t\t{\n\t\t\t// find what cards this player has in their yes array\n\t\t\t// find the index of room in yes array, returns -1 if room name not present\n\t\t\tif(playerNum.rooms.yes.indexOf(roomNames[j-1]) != -1)\t// if room card is present in player yes array\n\t\t\t{\n\t\t\t\td[j].innerHTML = \"✔\";\n\t\t\t}\n\t\t\telse if(playerNum.rooms.no.indexOf(roomNames[j-1]) != -1)\t// else if room card is present in player no array\n\t\t\t{\n\t\t\t\td[j].innerHTML = \"✘\";\n\t\t\t}\n\t\t}\n\t}\n}", "function UpdateTable(){\r\ndocument.getElementById(\"minute\").innerHTML = data[currency][\"15m\"];\r\n\tdocument.getElementById(\"last\").innerHTML = data[currency][\"last\"];\r\n\tdocument.getElementById(\"buy\").innerHTML = data[currency][\"buy\"];\r\n}", "function ReInitiate() {\n RemainingTrys = 9;\n WrongLetters = [];\n FilledAndEmpty = [];\n Initiate()\n}", "function updateTable(start, end, length, rate, totalpay)\r\n{\r\n var table = document.getElementById(\"shiftTable\");\r\n var row = table.insertRow(1);\r\n var startcell = row.insertCell(0);\r\n var endcell = row.insertCell(1);\r\n var lengthcell = row.insertCell(2);\r\n var ratecell = row.insertCell(3);\r\n var totalpaycell = row.insertCell(4);\r\n\r\n // Set cells to display relevant information\r\n startcell.innerHTML = start;\r\n endcell.innerHTML = end;\r\n lengthcell.innerHTML = length;\r\n ratecell.innerHTML = rate;\r\n totalpaycell.innerHTML = totalpay;\r\n\r\n}", "function updateProbTable()\n{\n\tconsole.log(\"update probability table\");\n\tvar table = document.getElementById(\"probabilityTable\").rows;\t// get probability table, collection of all rows\n\t// update suspect probabilities\n\tvar i, d;\n\tfor(i = 1; i < 7; i++)\t// iterate through rows, row header at 0, 6 suspects\n\t{ \n\t\td = table[i].cells;\t// d is the collection of cells in row i\n\t\td[1].innerHTML = suspectList[i-1].prob;\t// suspect probabilities in column 1\n\t}\n\t// update weapon probabilities\n\tfor(i = 1; i < 7; i++)\t// iterate through rows, row header at 0, 6 weapons\n\t{ \n\t\td = table[i].cells;\t// d is the collection of cells in row i\n\t\td[3].innerHTML = weaponList[i-1].prob;\t// weapon probabilities in column 3\n\t}\n\t// update room probabilities\n\tfor(i = 1; i < 10; i++)\t// iterate through rows, row header at 0, 6 weapons\n\t{ \n\t\td = table[i].cells;\t// d is the collection of cells in row i\n\t\td[5].innerHTML = roomList[i-1].prob;\t// weapon probabilities in column 3\n\t}\n}", "function updateTable(pick) {\n var teamArray = [];\n teamArray.length = 0;\n\n queryTeams.once(\"value\")\n .then(function(snapshot) {\n snapshot.forEach(function(childSnapshot) {\n var teamKey = childSnapshot.val().selTeam;\n teamArray.push(teamKey);\n });\n\n\n for (var i = 1; i < pick+1; i++) {\n if(pick > 0){\n var tableCell = 'pick'+ i;\n document.getElementById(tableCell).textContent = teamArray[i-1];\n }\n else{\n }\n };\n });\n}", "function addPreviousPlay(turnNumber,playerNumber,locationNumber,cardNumber) {\n\n\tvar table = document.getElementById('drawBody');\n\tvar row = table.insertRow(0);\n\tvar cellTurnNumber = row.insertCell(0);\n\tvar cellPlayerNumber = row.insertCell(1);\n\tvar cellLocationNumber = row.insertCell(2);\n\tvar cellCardNumber = row.insertCell(3);\n\tif (locationNumber == -1) {\n\t\tcellTurnNumber.innerHTML = (turnNumber+1);\n\t\tcellPlayerNumber.innerHTML = playerNumber;\n\t\tcellLocationNumber.innerHTML = \"Draw\";\n\t\tcellCardNumber.innerHTML = \"Draw\";\n\t} else {\n\t\tcellTurnNumber.innerHTML = (turnNumber+1);\n\t\tcellPlayerNumber.innerHTML = playerNumber;\n\t\tcellLocationNumber.innerHTML = cardNumber;\n\t\tcellCardNumber.innerHTML = locationNumber;\n\t}\n\tvar numberOfCells = document.getElementById(\"drawBody\").rows.length;\n\tif (numberOfCells >= 6){\n\t\tdocument.getElementById(\"drawBody\").deleteRow(5);\n\t}\n}", "function reset() {\n tableCells.forEach(cell => {\n cell.innerText = '';\n });\n errorMsg.style.display = 'none';\n}", "function checkForNewMembers() {\n var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(\"Form Responses 1\");\n var lastRow = getFirstEmptyRow(ss);\n \n var sMsgs = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(\"msgs\");\n var lastTotal = sMsgs.getRange(\"B25\").getValue();\n \n if (lastRow > lastTotal) {\n sMsgs.getRange(\"B25\").setValue(lastRow);\n MailApp.sendEmail(\"TODO-fill-your-email\", \"New Members sign up\",\n \"Yo! We got \" + (lastRow - lastTotal) + \" new members. Please add them.\");\n }\n else {\n Logger.log(\"It's all good. We still standing on \" + lastRow + \" members\");\n }\n}", "function updateTriesCounter() {\n document.getElementById('tries').innerText = ' ' + totalMatchAttempts.length;\n}", "function updatePageFileds() {\r\n $('#attempts').html(gameModel.attempts);\r\n $('#errors').html(gameModel.errors);\r\n $('#hiddenWord').html(gameModel.hiddenWord.join(\" \"));\r\n $('#misses').html(gameModel.misses);\r\n\r\n $('#guessLetter').val('');\r\n}", "function resetTable() {\n // get table element for displaying items\n var table = getElement('item-list');\n \n // get the # of existing rows in the table except the column header row\n var len = table.rows.length - 1;\n \n // Refresh table by cleaning up the table rows\n for(var i = len; i > 0; i--)\n {\n table.deleteRow(i);\n }\n \n if (role == 'admin') {\n getElement('heading1').innerHTML = 'Action';\n }\n else {\n getElement('heading1').innerHTML = 'Item ID';\n }\n}", "function postIt() {\n\tupdateButton('Putting together your list..', true);\n\tvar willPay = 0.0;\n\tvar totalm3 = 0.0;\n\tvar m3final = 0.0;\n\tvar finalText = \"<h4>What I'll buy (\" + Object.keys(willTake).length + \"/\" + totalPasted + \")</h4><br><br><table style=\\\"width:100%>\\\" <tr> <th>Item name</th><th>Quantity</th><th>Price per unit</th><th>Total</th></tr>\";\n\temailBody = \"Someone wants to sell you shit, bruh! \\n\\n\";\n\t\n\tfor (var key in willTake) {\n\t\tvar k = willTake[key];\n\t\tvar p = (k.will_pay * k.quantity);\n\t\tvar perm3 = Math.round(((k.buy_max-k.will_pay)/k.m3)*100)/100;\n\t\t\n\t\tif (p)\n\t\t\twillPay += p;\n\t\tm3final += k.m3;\n\t\ttotalm3 += perm3;\n\t\n\t\temailBody += k.item_name + fuckingTabs(k.item_name, 70) + \"x\" + k.quantity.toLocaleString() + fuckingTabs(k.quantity.toString() + \" \", 15) + \"@ \" + k.will_pay.toLocaleString(undefined, { minimumFractionDigits:2}) + \" isk/unit\" + fuckingTabs(k.will_pay.toString(), 40) + \"Total: \" + p.toLocaleString(undefined, { minimumFractionDigits:2}) + \" isk\" + fuckingTabs(p.toString(), 40) + perm3.toLocaleString(undefined, { minimumFractionDigits:2}) + \" isk per m3, at buy prices - \" + (k.m3*k.quantity).toLocaleString(undefined, { minimumFractionDigits:2}) + \" m3 total\\n\";\n\t\tfinalText += \"<tr><td>\" + k.item_name + \"</td><td>\" + k.quantity.toLocaleString() + \"</td><td>\" + k.will_pay.toLocaleString(undefined, { minimumFractionDigits:2 }) + \" isk</td><td>\" + p.toLocaleString(undefined, { minimumFractionDigits:2 }) + \" isk</td></tr>\"\n\t}\n\t\n\temailBody += \"\\nTotal paying: \" + willPay.toLocaleString(undefined, { minimumFractionDigits:2}) + \" isk\\nTotal Profit per m3: \" + totalm3.toLocaleString(undefined, { minimumFractionDigits:2}) + \"isk\\nTotal profit: \" + (totalm3.toLocaleString(undefined, { minimumFractionDigits:2}) * m3final.toLocaleString(undefined, { minimumFractionDigits:2})) + \" isk\\nTotal size: \" + m3final.toLocaleString(undefined, { minimumFractionDigits:2}) + \" m3\";\n\temailBody += \"\\n\\t\\n\\t\\n\\t\";\n\tfinalText += \"<tr height=30px></tr><tr><td>Grand total</td><td><td></td></td><td>\" + willPay.toLocaleString(undefined, { minimumFractionDigits:2}) + \" isk</td></tr></table><br><u><h4>Add the code \\\"\" + uuid + \"\\\" in the contract description.</h4></u>\";\n\tfinalText += \"<input type=\\\"submit\\\" id=\\\"send_email\\\" class=\\\"btn btn-warning btn-block\\\" value=\\\"Looks good!\\\" onclick=\\\"send_email()\\\" />\";\n\tupdateButton('Get a new quote', false);\n\t$('#results').text(\"\");\n\t$('#results').append(finalText);\n}", "function popTable(){\n\tfor( var i=0; i < alphabet.length; i++){\t\t//For L rows in table\n\t\tvar html = \"<tr>\";\t\t\t\t\t\t\t\t\t\t\t\t//New row in table\n\t\tfor( var j=0; j < alphabet.length; j++ ){\t//For L cols in row\n\t\t\thtml += '<td x=\"' + i + '\" y=\"' + \t\t\t//<td x=\"i\" y=\"j\">_</td>\n\t\t\t\t\t\t\tj + '\">' + \t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\talphabet[(i+j) % alphabet.length] + //Char of the shifted alphabet\n\t\t\t\t\t\t\t'</td>';\n\t\t}\n\t\thtml += \"</tr>\";\t\t\t\t\t\t\t\t\t\t\t\t\t//Close row tag\n\t\t$(\"#perm_table\").append( html );\t\t\t\t\t//Add the rows & cols to the table\n\t}\n}", "function updateWrongLettersEl() {\n wrongLettersEl.innerHTML = `\n ${wrongLetters.length > 0 ? \"<p>Wrong</p>\" : \"\"}\n ${wrongLetters.map((letter) => `<span>${letter}</span>`)}\n `;\n\n // Display figure parts via forEach loop\n figureParts.forEach((part, index) => {\n const errors = wrongLetters.length;\n\n if (index < errors) {\n part.style.display = \"block\";\n } else {\n part.style.display = \"none\";\n }\n });\n\n // Loss Check\n if (wrongLetters.length === figureParts.length) {\n finalMessage.innerText = \"You lost but GG\";\n popup.style.display = \"flex\";\n }\n}", "function ResetLetters(){\n document.getElementById('lettersGuessed').textContent = (\"\");\n }", "function updateTable(){\n let p = currentTableDiv.getElementsByTagName(\"p\")[0];\n let span1 = p.getElementsByTagName(\"span\")[0];\n let span2 = p.getElementsByTagName(\"span\")[1];\n span2.innerHTML = \" Total item count : \" + tableItems[currentTableId - 1].itemCount;\n span1.innerHTML = \"Rs \" + tableItems[currentTableId - 1].totalBill + \" |\";\n\n}", "function reset_board(){\r\n //numTreasureLeft = 20;\r\n //location.reload();\r\n let cells = document.querySelectorAll(\"td\");\r\n for(let i =0; i < cells.length; i++){\r\n cells[i].remove();\r\n }\r\n\r\n numTreasureLeft = 20;\r\n totalMoves = 0;\r\n generateBoard();\r\n}", "function updateReadyQueue () {\n var table = document.getElementById(\"readyQueueTable\");\n\n // remove all current entries in the table\n while(table.hasChildNodes()) {\n table.removeChild(table.lastChild);\n }\n\n // go through and generate each row and cell\n for(var i = 0; i < 4; i++) {\n\n var row = table.insertRow(i);\n\n for(var j = 0; j < 10; j++) {\n var cell = row.insertCell(j);\n \n // if we are in the first column, pad the number and display it in bold\n if(i === 0 && j === 0) {\n cell.innerHTML = \"PID\";\n }\n else if (i === 0 && j === 1) {\n cell.innerHTML = \"Loc.\";\n }\n else if (i === 0 && j === 2) {\n cell.innerHTML = \"Pr\";\n }\n else if (i === 0 && j === 3) {\n cell.innerHTML = \"Base\";\n }\n else if (i === 0 && j === 4) {\n cell.innerHTML = \"Limit\";\n }\n else if (i === 0 && j === 5) {\n cell.innerHTML = \"PC\";\n }\n else if (i === 0 && j === 6) {\n cell.innerHTML = \"AC\";\n }\n else if (i === 0 && j === 7) {\n cell.innerHTML = \"X\";\n }\n else if (i === 0 && j === 8) {\n cell.innerHTML = \"Y\";\n }\n else if (i === 0 && j === 9) {\n cell.innerHTML = \"Z\";\n }\n // display the item in ready queue (if applicable)\n else if (j === 0) {\n // if we don't have at least 1 item in the ready\n // queue then don't display anything\n if(_ReadyQueue === null || _ReadyQueue.getSize() < i)\n {\n row.insertCell(1);\n row.insertCell(2);\n row.insertCell(3);\n row.insertCell(4);\n row.insertCell(5);\n row.insertCell(6);\n row.insertCell(7);\n row.insertCell(8);\n row.insertCell(9);\n j = 10;\n }\n else\n cell.innerHTML = _ReadyQueue.getItem(i-1).pid;\n }\n else if (j === 1) {\n cell.innerHTML = _ReadyQueue.getItem(i-1).location;\n }\n else if (j === 2) {\n cell.innerHTML = _ReadyQueue.getItem(i-1).priority;\n }\n else if (j === 3) {\n cell.innerHTML = _ReadyQueue.getItem(i-1).base;\n }\n else if (j === 4) {\n cell.innerHTML = _ReadyQueue.getItem(i-1).limit;\n }\n else if (j === 5) {\n cell.innerHTML = _ReadyQueue.getItem(i-1).PC;\n }\n else if (j === 6) {\n cell.innerHTML = _ReadyQueue.getItem(i-1).AC;\n }\n else if (j === 7) {\n cell.innerHTML = _ReadyQueue.getItem(i-1).Xreg;\n }\n else if (j === 8) {\n cell.innerHTML = _ReadyQueue.getItem(i-1).Yreg;\n }\n else if (j === 9) {\n cell.innerHTML = _ReadyQueue.getItem(i-1).Zflag;\n }\n } // end for each column in this row\n\n } // end for each row in the table\n}", "function updateLeaderboard(){\r\n\t/*leaderArray[leadernumber].snails = hatcherySnail(leaderArray[leadernumber].address);\r\n\tvar leaderprevious = leadernumber - 1;\r\n\tif(leaderprevious < 0) { leaderprevious = 0; }\r\n\taddtext += leaderArray[leaderprevious].address + \" has \" + leaderArray[leadernumber].snails + \" snails <br>\";\r\n\tbasictestdoc.innerHTML = addtext;*/\r\n\t/*\r\n\ta2.snails = hatcherySnail(a2.address);\r\n\taddtext += a2.address + \" has \" + a2.snails + \" snails <br>\"\r\n\ta3.snails = hatcherySnail(a3.address);\r\n\taddtext += a3.address + \" has \" + a3.snails + \" snails <br>\"\r\n\ta4.snails = hatcherySnail(a4.address);\r\n\taddtext += a4.address + \" has \" + a4.snails + \" snails <br>\"\r\n\tbasictestdoc.innerHTML = addtext;*/\r\n\r\n\tfor (i = 0; i < leaderArray.length; i++) {\r\n\t\thatcherySnail(leaderArray[i].address);\r\n\t\t//ComputeEggsSinceLastHatch(leaderArray[i].address);\r\n\t\t//addtext += leaderArray[i].address + \" has \" + leaderArray[i].snails + \" snails <br>\";\r\n\t\tbasictestdoc.innerHTML = addtext;\r\n\t}\r\n\taddtext = \"\";\r\n}", "function updateDisplay() {\n // PLAY BALL Display\n // dollars in the cup\n dollars.textContent = '$' + cup.amount;\n\n // SCOREBOARD display\n // loop through all scoretable rows to update values\n for(let i = 0 ; i < scoretable.rows.length ; i++) {\n // make ID blank\n scoretable.rows[i].id = '';\n // make CUP column blank\n scoretable.rows[i].cells[0].textContent = '';\n // update budget\n scoretable.rows[i].cells[2].textContent = playersObject[i + 1].budget;\n // update net\n scoretable.rows[i].cells[3].textContent = playersObject[i + 1].budget - playersObject[i + 1].startingBudget;\n }\n\n // give cup icon to person holding cup & highlight that row\n scoretable.rows[cup.index - 1].id = 'hascup';\n scoretable.rows[cup.index - 1].cells[0].textContent = '🥤';\n}", "function click_updateTable() {\n offset = Number(\"0\");\n updateTable();\n}", "function UpdateDatabase() {\n // This function is used to update the database's values, and runs frequently on small sets of data\n const props = PropertiesService.getScriptProperties();\n var LastRan = parseInt(props.getProperty('LastRan'), 10); // Determine the last successfully processed record\n const BatchSize = 127; // Number of records to process on each execution\n const db = getMyDb_(1); // Get the alphabetized db.\n const nMembers = db.length; // Database records count.\n const SS = wb.getSheetByName('Members');\n // Read in the tiers as a 21x3 array (If the tiers are moved, this getRange MUST be updated!)\n const aRankTitle = wb.getSheetByName('Ranks').getRange(2, 1, 21, 3).getValues();\n\n if (nMembers < SS.getLastRow() - 1) {\n // Add new members.\n return AddMemberToDB_(db);\n } else if (LastRan >= nMembers) {\n // Perform scoreboard update.\n UpdateScoreboard();\n props.setProperty(\"LastRan\", \"0\");\n return true;\n }\n\n const lock = LockService.getScriptLock();\n if (lock.tryLock(30000)) {\n const start = new Date().getTime();\n do {\n var batch = db.slice(LastRan, LastRan + BatchSize);\n var idString = batch.map(function (member) { return member[1]; }).filter(function (id) { return !!id; }).join(\",\");\n var response = UrlFetchApp.fetch(\"http://horntracker.com/backend/mostmice.php?function=hunters&hunters=\" + idString).getContentText();\n if (response.indexOf(\"maintenance\") !== -1 || response.indexOf(\"Unexpected\") === 0)\n return false;\n var mmData = JSON.parse(response).hunters;\n batch.forEach(function (member) {\n var htId = \"ht_\" + member[1];\n var data = mmData[htId];\n if (!data) {\n // Hunter was queried for, but not found -> Lost\n member[11] = \"Lost\";\n } else {\n var whelps = data.mice[\"Whelpling\"] || 0;\n var wardens = data.mice[\"Draconic Warden\"] || 0;\n var dragons = data.mice[\"Dragon\"] || 0;\n // Update the LastSeen timestamp.\n member[3] = Date.parse(data.lst.replace(/-/g, \"/\"));\n // Update the LastChange if needed.\n if (member[4] === 0 || (whelps !== member[6] || wardens !== member[7] || dragons !== member[8])) {\n member[4] = member[3];\n }\n member[5] = new Date().getTime();\n member[6] = whelps;\n member[7] = wardens;\n member[8] = dragons;\n // Determine the member's title.\n for (var k = 0; k < aRankTitle.length; ++k) {\n if (dragons <= aRankTitle[k][2]) {\n member[9] = aRankTitle[k][0];\n break;\n }\n }\n member[11] = (member[3] < new Date().getTime() - 20 * 86400 * 1000) ? \"Old\" : \"Current\";\n }\n });\n\n saveMyDb_(batch, [2 + LastRan, 1, batch.length, batch[0].length]);\n LastRan += BatchSize;\n props.setProperty(\"LastRan\", LastRan.toString());\n } while (LastRan < nMembers && (new Date().getTime() - start) < 140000);\n }\n lock.releaseLock();\n}", "function remaining() {\n\tdocument.querySelector(\"#guessesRemaining\").innerHTML = \"Guesses Remaining: \" + guessesRem;\n}", "function updateTable() {\n $(\"#table-body\") .empty();\n for (i = 0; i < trainNames.length; i++) {\n trainName = trainNames [i];\n showTrains();\n };\n \n }", "function updatePointsAvailable() {\n if (pointsAvailable == 1) {\n plural = \"point\";\n } else {\n plural = \"points\";\n }\n document.getElementById(\"game-points-cell\").innerHTML = `<strong>${pointsAvailable} ${plural}</strong> available`;\n}", "function updateScreen() \n\n{\n document.getElementById(\"numWins\").innerText = numWins;\n document.getElementById(\"numLosses\").innerText = numLosses;\n document.getElementById(\"numGuesses\").innerText = numGuessesRemaining;\n document.getElementById(\"answerWord\").innerText = ansWordArr.join(\"\");\n document.getElementById(\"guessedLetters\").innerText = guessedLetters;\n\n}", "function slotFiller() {\n\t//set the innerHTML of each slot to its letter1\n\tletter1.innerHTML = levelArray[currentLevel][0];\n\tletter2.innerHTML = levelArray[currentLevel][1];\n\tletter3.innerHTML = levelArray[currentLevel][2];\n\tletter4.innerHTML = levelArray[currentLevel][3];\n\tletter5.innerHTML = levelArray[currentLevel][4];\n\tletter6.innerHTML = levelArray[currentLevel][5];\n\tletter7.innerHTML = levelArray[currentLevel][6];\n\tletter8.innerHTML = levelArray[currentLevel][7];\n\t//this is static, it doesn't change until level up\n\t//set current char - this will change\n}", "function playAgain() {\r\n\r\n copyToNewTable(gameTable, userTable);\r\n printSudokuTableToPage();\r\n}", "updateSize() {\n\t\tvar t = this;\n\t\tvar len = t.getLength();\n\t\tif (len == 0) {\n\t\t\tt.setLength(1);\n\t\t} if (len > 0) {\n\t\t\tvar needsNew = !t.isRowBlank(t.getRow(len - 1));\n\t\t\tif (needsNew)\n\t\t\t\tt.setLength(len + 1);\n\t\t\telse if (len > 1) {\n\t\t\t\tvar needsRem = t.isRowBlank(t.getRow(len - 1));\n\t\t\t\tif (needsRem) {\n\t\t\t\t\tt.setLength(len - 1);\n\t\t\t\t\tt.updateSize();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function updatetable(task,copyid){\n\n\tvar ele=document.getElementById(''+ copyid + '');\n\tvar nameofveg=ele.getAttribute('alt');\n\tvar vegTable = document.getElementById('listtable');\n\t//rowcount of table\n\tvar rowCnt = vegTable.rows.length;\n\tvar spacingperveg = spacingforvegatable(nameofveg);\n\tvar seedspersqft = Math.ceil((12*12)/(spacingperveg*spacingperveg));\n var searchflag = 'notfound';\n\t\t//alert (nameofveg);\n\tif (task == 'add'){\n\t \n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var r = 1; r <= rowCnt; r++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//search through first column to see if the vegatable is there and if it is update the correct fields\n\t\t\t\t\t\t\t\t\tfor (var se = 1; se < rowCnt; se++){\n\t\t\t\t\t\t\t\t\t//var x = vegTable.rows[s].cells;\n\t\t\t\t\t\t\t\t\t\t\tvar x = vegTable.rows[se].cells;\n\t\t\t\t\t\t\t\t\t\t\t//alert (se);\n\t\t\t\t\t\t\t\t\t\t\tif (x[0].innerHTML == nameofveg && searchflag == 'notfound')\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\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tx[1].innerHTML = parseInt(x[1].innerHTML) + 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\tx[4].innerHTML = x[1].innerHTML * seedspersqft;\n\t\t\t\t\t\t\t\t\t\t\t\t\tse = se + rowCnt \n\t\t\t\t\t\t\t\t\t\t\t\t\tr = rowCnt +2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tsearchflag = 'found';\n\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}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//if vegetable is not there add it to the table\n\t\t\t\t\t\t\t\t\tif (searchflag == 'notfound')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tvar row = vegTable.insertRow(se);\n\t\t\t\t\t\t\t\t\t\t\tvar cell0 = row.insertCell(0);\n\t\t\t\t\t\t\t\t\t\t\tcell0.innerHTML = nameofveg;\n\t\t\t\t\t\t\t\t\t\t\tvar cell1 = row.insertCell(1);\n\t\t\t\t\t\t\t\t\t\t\tcell1.innerHTML = 1;\n\t\t\t\t\t\t\t\t\t\t\tvar cell2 = row.insertCell(2) ;\n\t\t\t\t\t\t\t\t\t\t\tcell2.innerHTML = spacingperveg + ' inch';\n\t\t\t\t\t\t\t\t\t\t\tvar cell3 = row.insertCell(3);\n\t\t\t\t\t\t\t\t\t\t\tcell3.innerHTML = seedspersqft;\n\t\t\t\t\t\t\t\t\t\t\tvar cell4 = row.insertCell(4);\n\t\t\t\t\t\t\t\t\t\t\tcell4.innerHTML = seedspersqft;\n\t\t\t\t\t\t\t\t\t\t\tr = rowCnt +1;\n\t\t\t\t\t\t\t\t\t\t\tcol = arrHead.length + 1;\n\t\t\t\t\t\t\t\t\t\t\tse = rowCnt +1;\n\t\t\t\t\t\t\t\t\t\t\trowCnt = rowCnt +1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t\t}\n\t\t//\n\t\telse{\n\t\t\t//delete vegatable from the table\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var r = 1; r <= rowCnt; r++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//search the first field to delete the vegatable or until there are no more left in the table grid\n\t\t\t\t\t\t\t\tfor (var se = 1; se < rowCnt; se++){\n\t\t\t\t\t\t\t\t\t//var x = vegTable.rows[s].cells;\n\t\t\t\t\t\t\t\t\t\t\tvar x = vegTable.rows[se].cells;\n\t\t\t\t\t\t\t\t\t\t\t//alert (se);\n\t\t\t\t\t\t\t\t\t\t\tif (x[0].innerHTML == nameofveg && searchflag == 'notfound')\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\t\t//alert(\"vegname found\" + \" \" + se + \" \" + rowCnt)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tx[1].innerHTML = parseInt(x[1].innerHTML) - 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\tx[4].innerHTML = x[1].innerHTML * seedspersqft;\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\tsearchflag = 'found';\n\t\t\t\t\t\t\t\t\t\t\t\t\t//alert(x[4].innerHTML);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (x[4].innerHTML == 0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//alert(\"vegetable will be deleted from table\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById(\"listtable\").deleteRow(se); \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\tse = se + rowCnt \n\t\t\t\t\t\t\t\t\t\t\t\t\tr = rowCnt +2;\n\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}\n\t\t\t\t\t\t\t\t}\n\t //alert (task + \"delete \" + copyid);\n\t\t}\n\n\t}", "function populateTable() {\n cell1.innerHTML = '<img class=\"image\" src=\"\" />';\n cell2.innerHTML = item.name;\n cell3.innerHTML = item.price;\n cell4.innerHTML =\n '<div class=\"item-quantity-container\"><div class=\"item-quantity-box\"><div class=\"item-down-box\"><img class=\"item-down-image\" src=\"img/icons-2x.png\" /></div><p class=\"quantity\"></p><div class=\"item-up-box\"><img class=\"item-up-image\" src=\"img/icons-2x.png\" /></div></div><div class=\"item-update-container\"><button class=\"item-update-button\" type=\"button\">Update</button></div></div>';\n cell5.innerHTML =\n '<span class=\"item-subtotal-text\">Subtotal: </span><span class=\"item-subtotal-number\">' +\n item.price * item.numItems +\n \"</span>\";\n cell6.innerHTML =\n '<div class=\"item-remove-box remove-text-box\"><p class=\"remove-text\">Remove</p><img class=\"item-remove-image\" src=\"img/icons-2x.png\" /></div>';\n }", "function GenerateBoard() {\r\n var table = \"\"; // create variable with empty string\r\n $(\"#game_board\").html(table); // update the board with empty string\r\n table += '<table id=\"tbBoard\">';\r\n table += '<tr><td class=\"TxWord NWord 1\"></td>'; // TxWord = x3 word and NWord = normal\r\n table += '<td class=\"NWord 2\"></td>';\r\n table += '<td class=\"DxLetter NWord 3\"></td>'; // DxLetter = x2 letter\r\n table += '<td class=\"NWord 4\"></td>';\r\n table += '<td class=\"DxWord NWord 5\"></td>'; // DxWord = x2 word\r\n table += '<td class=\"NWord 6\"></td>';\r\n table += '<td class=\"TxLetter NWord 7\"></td>'; // TxLetter = x3 letter\r\n table += '<td class=\"NWord 8\"></td>';\r\n table += '<td class=\"NWord 9\"></td>';\r\n table += '<td class=\"DxLetter NWord 10\"></td>';\r\n table += '<td class=\"NWord 11\"></td>';\r\n table += '<td class=\"DxLetter NWord 12\"></td>'; // DxLetter = x2 letter\r\n table += '<td class=\"NWord 13\"></td>';\r\n table += '<td class=\"NWord 14\"></td>';\r\n table += '<td class=\"TxWord NWord 15\"></td><tr>'; // TxWord = x3 word\r\n table += '</table>';\r\n $(\"#game_board\").html(table); // update the board with updated string\r\n table = \"\"; // reset the table variable\r\n}", "function dispUpdate(){\n\tclearTimeout(pgUpdate);\n\tvar table = $(\"table tbody\");\n table.find('tr').each(function () {\n var td = $(this).find('td');\n\t\tvar ftim = td.eq(2).text();\n\t\tvar freq = td.eq(3).text();\n\t\tvar mins = tschedule.calcMinutesTillTrn(ftim, freq);\n\t\tif(isNaN(mins)){\n\t\t\ttd.eq(5).text(' ');\n\t\t}\n\t\telse{\n\t\t\ttd.eq(5).text(mins);\n\t\t}\n\t\tvar nextTrain = tschedule.calcNextArrival(mins);\n\t\ttd.eq(4).text(nextTrain);\n });\n\n\tpgUpdate=setTimeout(dispUpdate, 10000);\n}", "function resetTiles(){\n//\tprint(tilesChanged);\n\tchecking = false;\n\ttempScore = 0;\n\tfor(let i = 0;i < tilesChanged.length; i++){\n//\t\tprint(tiles[tilesChanged[i]].letter);\n\t\ttiles[tilesChanged[i]].letter = null;\n\t}\t\n\ttilesChanged = [];\n\tlettersUsed = [];\n\tendTurnButton.show();\n\t//print(tilesChanged);\n}", "function writeLetterboxIncorrect () {\n letterCount = lettersGuessed.length -1;\n document.querySelector(\"#letters\").innerHTML += ('<div class = \"marginIncorrect\">'+lettersGuessed[letterCount]+'</div>');\n}", "function populateTableOld(existingUsers) {\r\n\tif(existingUsers.length > 0) {\t\r\n\t\tdocument.getElementById(\"existingList\").style.display=\"block\";\r\n\t\tvar userList = document.getElementById(\"existingUsersTableId\");\r\n\t\tvar tableStr = \"<table width='94%' border='1' bordercolor='#78C0D3' id='myTable' align='center'><thead class='tab_header'><tr><th>SL. No.</th><th>User Name</th><th>User Group Name</th><th>Expiration Date</th><th width='22%'>Action</th></tr></thead><tbody>\";\r\n\t\tvar counter = 1;\r\n\t\tfor (var index=0; index<existingUsers.length; index++) {\r\n\t\t\tvar trColor = \"\";\r\n\t\t\tif(index % 2 == 0) {\r\n\t\t\t\ttrColor = \"#D2EAF0\";\r\n\t\t\t} else {\r\n\t\t\t\ttrColor = \"#F1F1F1\";\r\n\t\t\t}\r\n\t\t\tvar expiryDate = new Date(existingUsers[index].jctAccountExpirationDate).toDateString();\r\n\t\t\tvar userExpryDate = dateformat(new Date (expiryDate));\t\t\t\r\n\t\t\t\r\n\t\t\ttableStr = tableStr + \"<tr class='user_list_row_width' bgcolor='\"+trColor+\"'><td align='center'>\"+counter+\".</td><td align='center'>\"+existingUsers[index].email+\"</td><td align='center'>\"+existingUsers[index].userGroup+\"</td><td align='center'>\"+userExpryDate+\"</td>\";\r\n\t\t\ttableStr = tableStr + \"<td class='table_col_txt_style' ><table width='100%' border='0'><tr>\";\r\n\t\t\tif(parseInt(existingUsers[index].softDelete) == 0) {\r\n\t\t\t\ttableStr = tableStr + \"<td align='center'><a href='#' onclick='updateStatus(\\\"\"+existingUsers[index].email+\"\\\", \\\"\"+existingUsers[index].softDelete+\"\\\")'> Deactivate</a></td>\";\r\n\t\t\t} else {\r\n\t\t\t\ttableStr = tableStr + \"<td align='center'><a class='inactivate_style' href='#' onclick='updateStatus(\\\"\"+existingUsers[index].email+\"\\\", \\\"\"+existingUsers[index].softDelete+\"\\\")'> Activate</a></td>\";\r\n\t\t\t}\r\n\t\t\tif (parseInt(existingUsers[index].activeInactiveStatus) == 1) {\r\n\t\t\t\ttableStr = tableStr + \"<td align='center'><a href='#' onclick='resetPassword(\\\"\"+existingUsers[index].email+\"\\\")'>Reset Password</a></td></td></tr></table></td></tr>\";\r\n\t\t\t} else {\r\n\t\t\t\ttableStr = tableStr + \"<td align='center'><span class='non_clickable'>Reset Password</span></td></td></tr></table></td></tr>\";\r\n\t\t\t}\t\t\t\r\n\t\t\tcounter = counter + 1;\r\n\t\t}\r\n\t\ttableStr = tableStr + \"</tbody></table>\";\r\n\t\tuserList.innerHTML = tableStr;\r\n\t\tnew SortableTable(document.getElementById('myTable'), 1);\r\n\t} else {\r\n\t\tdocument.getElementById(\"existingList\").style.display=\"none\";\r\n\t\tdocument.getElementById(\"existingUsersTableId\").innerHTML = \"<div align='center'><br /><br /><br /><img src='../img/no-record.png'><br /><div class='textStyleNoExist'>No Existing Users</div></div>\";\r\n\t}\r\n\t\r\n}", "function updateLeaderBoard() {\n let board = (document.getElementById('LeaderBoardTable')).lastElementChild;\n let newRow = document.createElement('tr');\n let name_ = document.createElement('td');\n let time_ = document.createElement('td');\n name_.appendChild(document.createTextNode(`User${playerID}`));\n time_.appendChild(document.createTextNode(`${playingMinutes}:${playingSeconds}`));\n newRow.appendChild(name_);\n newRow.appendChild(time_);\n board.appendChild(newRow);\n playerID += 1;\n document.getElementById(`userName`).innerHTML = `User${playerID}`;\n return null;\n}", "function fn_UpdateSlNo() {\n var xtbody = $('#tbl_WallGeo').children('tbody');\n var xtrs = xtbody.children('tr');\n xtrs.each(function () {\n var curtr = $(this);\n var curindex = xtrs.index(this) + 1;\n var curtrtd0 = $(this).find(\"td:eq(0)\")[0];\n curtrtd0.innerText = parseInt(curindex);\n var curtrtd1 = $(this).find(\"td:eq(1)\")[0];\n curtrtd1.innerText = \"Wall \" + parseInt(curindex);\n });\n\n xtbody = $('#tbl_LoadCase').children('tbody');\n xtrs = xtbody.children('tr');\n xtrs.each(function () {\n var curtr = $(this);\n var curindex = xtrs.index(this) + 1;\n var curtrtd0 = $(this).find(\"td:eq(0)\")[0];\n curtrtd0.innerText = parseInt(curindex);\n });\n\n\n\n var xtable = $('#div_LoadsinLoadCases').find('table');\n xtable.each(function () {\n var curtable = $(this);\n var xtbody = curtable.children('tbody');\n var xtrs = xtbody.children('tr');\n xtrs.each(function () {\n var curtr = $(this);\n var curindex = xtrs.index(this) + 1;\n var curtrtd0 = $(this).find(\"td:eq(0)\")[0];\n curtrtd0.innerText = parseInt(curindex);\n });\n });\n\n\n\n }", "function update(){\r\n\"use strict\";\r\ntotalCoins.textContent=\"Total Coins: \" + numTotalCoins;\r\ntotalPSB.textContent=\"Total PSB: \" + numTotalPSB;\r\ntotalRML.textContent=\"Total RML: \" + numTotalRML;\r\nratePSB.textContent=\"PSB per Run: \" + numRatePSB.toFixed(2);\r\nrateRML.textContent=\"RML per Run: \" + numRateRML.toFixed(2);\r\ntotalRuns.textContent=\"Total Runs: \" + numTotalRuns;\r\npFail.textContent= numPFail.toFixed(2)+\"%\";\r\np0.textContent= numP0.toFixed(2)+\"%\";\r\np1.textContent= numP1.toFixed(2)+\"%\";\r\np2.textContent= numP2.toFixed(2)+\"%\";\r\np3.textContent= numP3.toFixed(2)+\"%\";\r\np4.textContent= numP4.toFixed(2)+\"%\";\r\np5.textContent= numP5.toFixed(2)+\"%\";\r\neleNumFail.textContent=numFail;\r\neleNum0.textContent=num0;\r\neleNum1.textContent=num1;\r\neleNum2.textContent=num2;\r\neleNum3.textContent=num3;\r\neleNum4.textContent=num4;\r\neleNum5.textContent=num5;\r\n}", "function updateScoreTable(nombrejugador , posicion){\n\t\n\t\n\t\n\tvar stable = document.getElementById(\"scoretable\")\n\t\n\n\tvar newestScoreRow = stable.insertRow(currentResultsRows)\n\t\t var nombrej = newestScoreRow.insertCell(0);\n\t\t var posicionj = newestScoreRow.insertCell(1);\n\t\t\n\t\t\tnombrej.innerHTML = nombrejugador\n\t\t\tposicionj.innerHTML = posicion\n\t\t\n\t\t\tcurrentResultsRows++\n}", "function doLetterUsedWork() {\n var ltrUsedDisplay = \"\";\n for (var index = 0; index < lettersUsed.length; index++) {\n ltrUsedDisplay += \" \" + lettersUsed[index];\n }\n document.getElementById(\"lettersUsed\").innerHTML = ltrUsedDisplay;\n}", "function fillTable() \n{\n let table = document.getElementById(\"transTable\")\n table.innerHTML = \"\"\n let i = 0\n \n i = document.getElementById(\"pageNum\").value * 25\n\n let limit = i+25\n while (i < limit)\n {\n let row = table.insertRow()\n let cell = row.insertCell()\n dateObj = new Date(list[i]['Time'])\n utcString = dateObj.toLocaleString([], {dateStyle: 'short', timeStyle: 'short'})\n let entry = document.createTextNode(utcString)\n cell.appendChild(entry)\n cell = row.insertCell()\n entry = document.createTextNode(list[i]['Team'] + \" \" + list[i]['Type'] + \" \" + list[i][\"Name\"] + \", \" + list[i][\"proTeam\"]\n + \" \" + list[i][\"Pos\"])\n cell.appendChild(entry)\n i++\n if (i > list.length - 1)\n break\n }\n}", "function updateScreen() {\n document.getElementById(\"numWins\").innerText = numWins;\n document.getElementById(\"numLosses\").innerText = numLosses;\n document.getElementById(\"numGuesses\").innerText = numGuessesRemaining;\n document.getElementById(\"answerWord\").innerText = ansWordArr.join(\"\");\n document.getElementById(\"guessedLetters\").innerText = guessedLetters;\n\n}", "function updateWrongLettersElement() {\n wrongLetterElement.innerHTML = `\n ${wrongLetters.length > 0 ? '<p class=\"instructionsletters\"> Guess again!</p>' : ''}\n ${wrongLetters.map(letter => `<span class=\"wrongLetter\">${letter}</span>`)}\n `;\n\n const errors = wrongLetters.length;\n if(errors === 1){\n document.querySelector('figure').classList.add('scaffold');\n }\n else if (errors === 2){\n document.querySelector('figure').classList.add('head');\n }\n else if (errors === 3){\n document.querySelector('figure').classList.add('body');\n }\n else if (errors === 4){\n document.querySelector('figure').classList.add('arms');\n }\n else if (errors === 5){\n document.querySelector('figure').classList.add('legs');\n result.innerText = 'You lost! You got hanged! \\n The correct word was: \\n' + chosenWord;\n\t\tpopupContainer.style.setProperty(\"display\", \"flex\");\n popup.style.setProperty('display', 'flex');\n }\n else {\n console.log(\"antal fel gissningar: \" + errors);\n }\n\n }", "function RenderParts(parts, total) {\n\n if (parts.length > 0) {\n $('#estimateLabel').val(parts[0].EstimateLabel);\n $('#Name').focus();\n var part = \"\";\n var totalss = \"\";\n var profitLossTblParts = \"\";\n var totalProfit = 0;\n var totalPartsProfit = 0;\n var totalPartCost = 0;\n var profitLossTblLabor = \"\";\n var totalEstimate = 0;\n profitLossTblParts += \"<thead><tr><td colspan='7' style='text-align:left; color:black; background-color:#DDD;'> <h5> Profit And Loss</h5> </td></tr><tr><th> Name </th><th>Purchase Price </th><th>Qty</th><th> Margin </th><th> Discount </th> <th>Total Price </th><th> Profit </th></tr></thead>\";\n for (var i = 0; i < parts.length; i++) {\n var markup = parts[i].MarkupPercentage != null ? parts[i].MarkupPercentage : 0;\n var discount = parts[i].DiscountPercentage != null ? parts[i].DiscountPercentage : 0;\n part += \"<tr id='\" + parts[i].Id + \"'><td>\" + parts[i].Title + \"</td><td>\" + parts[i].Type + \"</td><td>\" +\n parts[i].Quantity + \"</td><td>$ \" +\n parseFloat(parts[i].UnitPrice).toFixed(2) + \"</td><td>$ \" + parseFloat(parts[i].UnitPrice * parts[i].Quantity).toFixed(2) + \"</td><td> [\" +\n parts[i].CreatedOn + \" - \" + parts[i].CreatedByUser + \"]</td><td style='display:none;'>\" + markup + \"</td><td style='display:none;'>\" + discount + \"</td><td style='display:none;'>\" + parseFloat(parts[i].LaborCost).toFixed(2) + \"</td><td style='display:none;'>\" + parseFloat(parts[i].TripCost).toFixed(2) + \"</td><td style='display:none;'>\" + parseFloat(parts[i].OtherCost).toFixed(2) + \"</td><td style='display:none;'>\" + parseFloat(parts[i].APTA).toFixed(2) + \"</td><td style='display:none;'>\" + parseFloat(parts[i].Profit).toFixed(2) + \"</td><td style='display:flex;'>\" +\n \"<button onclick='EditPartOnEstimate(\" + parts[i].Id + \" , \" + parts[i].TripCost + \" , \" + parts[i].OtherCost + \" );return false;' class='btn btn-success'><i class='fa fa-edit'></i></button>\" +\n \"<button onclick='DeletePartFromCallSip(\" + parts[i].Id + \");return false;' class='btn btn-danger'><i class='fa fa-trash'></i></button>\" + \"</td></tr>\";\n totalProfit += parseFloat(parts[i].Profit);\n if (parts[i].Type == \"Parts\") {\n totalEstimate += parts[i].TotalPartCost;\n //profitLossTblParts += \"<tr id='\" + \"profitLoss\" + parts[i].Id + \"'><td>\" + parts[i].Title + \"</td><td>\" + parts[i].MarkupPercentage + \"%</td><td>\" + parts[i].DiscountPercentage + \"%</td><td>\" + parts[i].PurchasePrice + \"</td><td>\" + parts[i].TotalPartCost + \"</td><td>\" + parts[i].Profit + \"</td></tr>\";\n profitLossTblParts += \"<tr id='\" + \"profitLoss\" + parts[i].Id + \"'><td>\" + parts[i].Title + \"</td><td>\" + parseFloat(parts[i].PurchasePrice).toFixed(2) + \"</td><td>\" + parts[i].Quantity + \"</td><td>\" + parts[i].MarkupPercentage.toFixed(2) + \"%</td><td>\" + parseFloat(parts[i].DiscountPercentage).toFixed(2) + \"%</td><td>\" + parseFloat(parts[i].TotalPartCost).toFixed(2) + \"</td><td>\" + parseFloat(parts[i].Profit).toFixed(2) + \"</td></tr>\";\n\n totalPartsProfit += parts[i].Profit;\n totalPartCost += parts[i].TotalPartCost;\n }\n if (parts[i].Type == \"Labor\") {\n //var totalLabor = parseFloat(parts[i].UnitPrice) * parseFloat(parts[i].Quantity);\n totalEstimate += parts[i].TotalPartCost;\n\n var a = parseFloat(parts[i].PurchasePrice);\n\n //profitLossTblLabor += \"<tr id='\" + \"profitLoss\" + parts[i].Id + \"'><td>\" + parts[i].Title + \"</td><td>\" + parts[i].MarkupPercentage + \"</td> <td>\" + parts[i].UnitPrice + \"</td> <td>\" + parts[i].TotalPartCost.toFixed(2) + \"</td><td></td> </tr>\";\n profitLossTblLabor += \"<tr id='\" + \"profitLoss\" + parts[i].Id + \"'><td>\" + parts[i].Title + \"</td><td>\" + parseFloat(parts[i].PurchasePrice).toFixed(2) + \"</td><td>\" + parts[i].Quantity + \"</td><td></td><td></td><td>\" + parseFloat(parts[i].TotalPartCost).toFixed(2) + \"</td><td>\" + parseFloat(parts[i].Profit).toFixed(2) + \"</td> </tr>\";\n\n }\n if (parts[i].Type == \"ServiceCharge\") {\n //var totalLabor = parseFloat(parts[i].UnitPrice) * parseFloat(parts[i].Quantity);\n totalEstimate += parts[i].TotalPartCost;\n\n var a = parseFloat(parts[i].PurchasePrice);\n\n //profitLossTblLabor += \"<tr id='\" + \"profitLoss\" + parts[i].Id + \"'><td>\" + parts[i].Title + \"</td><td>\" + parts[i].MarkupPercentage + \"</td> <td>\" + parts[i].UnitPrice + \"</td> <td>\" + parts[i].TotalPartCost.toFixed(2) + \"</td><td></td> </tr>\";\n profitLossTblLabor += \"<tr id='\" + \"profitLoss\" + parts[i].Id + \"'><td>\" + parts[i].Title + \"</td><td>\" + parseFloat(parts[i].PurchasePrice).toFixed(2) + \"</td><td>\" + parts[i].Quantity + \"</td><td></td><td></td><td>\" + parseFloat(parts[i].TotalPartCost).toFixed(2) + \"</td><td>\" + parseFloat(parts[i].Profit).toFixed(2) + \"</td><td hidden>\" + parts[i].TripCost + \"</td> </tr>\";\n\n }\n\n if (parts[i].Type == \"Other\") {\n //var totalLabor = parseFloat(parts[i].UnitPrice) * parseFloat(parts[i].Quantity);\n totalEstimate += parts[i].TotalPartCost;\n\n var a = parseFloat(parts[i].PurchasePrice);\n\n //profitLossTblLabor += \"<tr id='\" + \"profitLoss\" + parts[i].Id + \"'><td>\" + parts[i].Title + \"</td><td>\" + parts[i].MarkupPercentage + \"</td> <td>\" + parts[i].UnitPrice + \"</td> <td>\" + parts[i].TotalPartCost.toFixed(2) + \"</td><td></td> </tr>\";\n profitLossTblLabor += \"<tr id='\" + \"profitLoss\" + parts[i].Id + \"'><td>\" + parts[i].Title + \"</td><td>\" + parseFloat(parts[i].PurchasePrice).toFixed(2) + \"</td><td>\" + parts[i].Quantity + \"</td><td></td><td></td><td>\" + parseFloat(parts[i].TotalPartCost).toFixed(2) + \"</td><td>\" + parseFloat(parts[i].Profit).toFixed(2) + \"</td><td hidden>\" + parts[i].OtherCost + \"</td> </tr>\";\n\n }\n\n }\n\n if (profitLossTblLabor != \"\") {\n //var profitLossTblLaborHdr = \"<tr><td></td><td></td><td style='font-weight:bold;'>Labor</td><td style='font-weight:bold;'>\" + totalPartCost + \"</td><td style='font-weight:bold;' id='TotalPartsProfit'>\" + totalPartsProfit + \"</td></tr>\";\n //profitLossTblParts += profitLossTblLaborHdr;\n profitLossTblParts += profitLossTblLabor;\n }\n profitLossTblParts += \"<tr><td></td><td></td><td></td><td></td><td></td><td style='font-weight:bold;'> Total Estimate </td><td style='font-weight:bold;'>Total Profit</td></tr>\";\n profitLossTblParts += \"<tr id='profitLossTotalProfit'><td></td><td></td><td></td><td></td><td></td><td>\" + totalEstimate.toFixed(2) + \" </td><td>\" + totalProfit.toFixed(2) + \"</td><tr>\";\n $('#profitAndLostGrid').html(\"\");\n $('#profitAndLostGrid').append(profitLossTblParts);\n $('#profitAndLostGrid').parent('div').show();\n\n totalss += \"<td style='border: none;'></td><td style='border: none;'></td><td style='border: none;'></td><td style='border: none;'></td>\" +\n \"<td colspan='3' style='border: none; text-align:right;padding-right:10px;'><div><strong>Parts Sub Total: $ <label id = 'PartsSubTotal'>\" + parseFloat(total.PartsSubTotal).toFixed(2) +\n \"</label></strong></div>\" + \"<div><strong>Labor: $ \" + (Math.round(parseFloat(total.LaborTotal) * 100) / 100).toFixed(2) + \"</strong></div>\" +\n //\"<div><strong>Service Charge: $ \" + parseFloat(total.ServiceCharge).toFixed(2) +\n \"<div><strong>Trip Charge: $ \" + parseFloat(total.ServiceCharge).toFixed(2) +\n \"</strong></div>\" +\n \"<div><strong>Other Charges: $ \" + parseFloat(total.OtherCharges).toFixed(2) + \"</strong></div>\" +\n \"<div><strong>Tax: $<label id = 'PartsTax'> \" + total.PartsTax + \"</label></input></strong></div>\" +\n \"<div><strong>Parts Total: $ \" + parseFloat(total.PartsTotal).toFixed(2) + \"</strong></div>\"\n + \"<div><strong>Total: $ <label id = 'PartsTotal'>\" + parseFloat(total.Total.replace(/,/g, '')).toFixed(2) + \"</label></strong></div></td>\";\n $('#tblBodyPartsGrid').html(\"\");\n $('#tblBodyPartsGrid').html(part);\n $('#tblBodyPartsTotals').html(\"\");\n $('#tblBodyPartsTotals').html(totalss);\n $('#tabs li:nth-child(2)').attr('style', 'background: green;border: green;');\n $('#tabs li:nth-child(2)').find('a').attr('style', 'color:#fff;');\n } else {\n $('#profitAndLostGrid').html(\"\");\n $('#tblBodyPartsTotals').html(\"\");\n $('#tblBodyPartsGrid').html(\"\");\n $('#tblBodyPartsTotals').html(\"\");\n $('#tblBodyPartsGrid').html(\"<tr><td colspan='100%'><h4 style='color:red;'>Part does not exist .</h4></td></tr>\");\n $('#tabs li:nth-child(2)').removeAttr('style');\n $('#tabs li:nth-child(2)').find('a').removeAttr('style');\n }\n}", "function resetGame() {\n //reset all of the variables except wins\n alpha = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\n remaining = 12;\n guessedLetters = [];\n puzzle = \"\";\n convertedWord = [];\n\n //reset html fields\n currentWord.textContent = convertedWord;\n used.textContent = guessedLetters;\n guesses.textContent = remaining;\n\n //start new game\n newGame();\n}", "function eraseTable(){\n document.getElementById(\"multTable\").textContent = \"\";\n}", "function updateScreen() {\n document.getElementById(\"numWins\").innerText = numWins;\n document.getElementById(\"numLosses\").innerText = numLosses;\n document.getElementById(\"numGuesses\").innerText = numGuessesRemaining;\n document.getElementById(\"answerWord\").innerText = ansWordArr.join(\"\");\n document.getElementById(\"guessedLetters\").innerText = guessedLetters;\n}", "function updateScoresTable() {\n scoreCells = document.getElementsByClassName(\"team-points-cell\");\n for (let i = 0; i < scores.length; i++) {\n scoreToShow = scores[i];\n scoreCell = scoreCells[i];\n if (scoreToShow == 1) {\n pointsWord = \"point\";\n } else {\n pointsWord = \"points\";\n }\n scoreCell.innerHTML = String(scoreToShow)+\" \"+pointsWord;\n postMessageToDisplay({\"message\":\"teamScoreChange\", \"scores\":scores});\n }\n}", "function User_Update_Exercice_Liste_des_exercices_comptables0(Compo_Maitre)\n{\n var Table=\"exercice\";\n var CleMaitre = Compo_Maitre.getCleVal();\n var NomCleMaitre = DePrefixerChamp(Compo_Maitre.getCle());\n var ex_datedebut=GetValAt(35);\n if (!ValiderChampsObligatoire(Table,\"ex_datedebut\",TAB_GLOBAL_COMPO[35],ex_datedebut,false))\n \treturn -1;\n if (!ValiderChampsType(Table,\"ex_datedebut\",TAB_GLOBAL_COMPO[35],ex_datedebut))\n \treturn -1;\n var ex_datefin=GetValAt(36);\n if (!ValiderChampsObligatoire(Table,\"ex_datefin\",TAB_GLOBAL_COMPO[36],ex_datefin,false))\n \treturn -1;\n if (!ValiderChampsType(Table,\"ex_datefin\",TAB_GLOBAL_COMPO[36],ex_datefin))\n \treturn -1;\n var ex_cloture=GetValAt(37);\n if (!ValiderChampsObligatoire(Table,\"ex_cloture\",TAB_GLOBAL_COMPO[37],ex_cloture,false))\n \treturn -1;\n if (!ValiderChampsType(Table,\"ex_cloture\",TAB_GLOBAL_COMPO[37],ex_cloture))\n \treturn -1;\n var ex_compteattente=GetValAt(38);\n if (!ValiderChampsObligatoire(Table,\"ex_compteattente\",TAB_GLOBAL_COMPO[38],ex_compteattente,false))\n \treturn -1;\n if (!ValiderChampsType(Table,\"ex_compteattente\",TAB_GLOBAL_COMPO[38],ex_compteattente))\n \treturn -1;\n var ex_actif=GetValAt(39);\n if (!ValiderChampsObligatoire(Table,\"ex_actif\",TAB_GLOBAL_COMPO[39],ex_actif,false))\n \treturn -1;\n if (!ValiderChampsType(Table,\"ex_actif\",TAB_GLOBAL_COMPO[39],ex_actif))\n \treturn -1;\n var Req=\"update \"+Table+\" set \";\n Req+=\"ex_datedebut=\"+(ex_datedebut==\"\" ? \"null\" : \"'\"+ValiderChaine(ex_datedebut)+\"'\" )+\",ex_datefin=\"+(ex_datefin==\"\" ? \"null\" : \"'\"+ValiderChaine(ex_datefin)+\"'\" )+\",ex_cloture=\"+(ex_cloture==\"true\" ? \"true\" : \"false\")+\",ex_compteattente=\"+(ex_compteattente==\"\" ? \"null\" : \"'\"+ValiderChaine(ex_compteattente)+\"'\" )+\",ex_actif=\"+(ex_actif==\"true\" ? \"true\" : \"false\")+\"\";\n Req+=\" where \"+NomCleMaitre+\"=\"+CleMaitre;\n\n if (pgsql_update(Req)==0)\n\talert(\"Echec lors de la mise à jour\");\nreturn CleMaitre;\n\n}", "function reloadNumbers() {\n\n var counts = 0;\n\n $('tr.active').each(function() {\n if (counts === 0) {\n this.cells[0].innerHTML = '>';\n } else {\n this.cells[0].innerHTML = counts;\n }\n $('#total_columns').text('Total: ' + counts);\n\n counts++;\n });\n\n}", "function newFood() {\n //Sets variables to input values\n var meal = document.getElementById(\"meal\").value;\n var protein = Number(document.getElementById(\"protein\").value);\n var carbs = Number(document.getElementById(\"carbs\").value);\n var fats = Number(document.getElementById(\"fats\").value);\n var calories = Number(document.getElementById(\"calories\").value);\n\n //Checks that user enters a meal before adding to table\n if(meal == \"\"){\n alert(\"You must enter a meal\");\n }\n else{\n //Creates new row in display table\n var displayTable = document.getElementById(\"display\");\n var displayRow = displayTable.insertRow(1);\n var displayCell1 = displayRow.insertCell(0);\n var displayCell2 = displayRow.insertCell(1);\n var displayCell3 = displayRow.insertCell(2);\n var displayCell4 = displayRow.insertCell(3);\n var displayCell5 = displayRow.insertCell(4);\n\n //Inserts new meal info into new row\n displayCell1.innerHTML = meal;\n displayCell2.innerHTML = protein;\n displayCell3.innerHTML = carbs;\n displayCell4.innerHTML = fats;\n displayCell5.innerHTML = calories;\n\n //Calculate total values\n totalProtein = totalProtein + protein;\n totalCarbs = totalCarbs + carbs;\n totalFats = totalFats + fats;\n totalCalories = totalCalories + calories\n\n //Updates total macro breakdown table\n var totalTable = document.getElementById(\"total\");\n totalTable.rows[1].cells[0].innerHTML = totalProtein;\n totalTable.rows[1].cells[1].innerHTML = totalCarbs;\n totalTable.rows[1].cells[2].innerHTML = totalFats;\n totalTable.rows[1].cells[3].innerHTML = totalCalories;\n\n //Empty values inside input fields\n document.getElementById(\"meal\").value = \"\";\n document.getElementById(\"protein\").value = \"\";\n document.getElementById(\"carbs\").value = \"\";\n document.getElementById(\"fats\").value = \"\";\n document.getElementById(\"calories\").value = \"\";\n\n //Goes to tables at bottom of page\n window.scrollTo(0,document.body.scrollHeight);\n }\n}", "function closeAlertEnd() {\r\n moves = 0;\r\n rolls = 0;\r\n document.getElementById(\"result-table-1\").style.pointerEvents = \"auto\";\r\n for (let rows = 1; rows <= 19; rows++) {\r\n let idPlOne = rows + '-pl1-' + rows;\r\n let idPlTwo = rows + '-pl2-' + rows;\r\n if (rows == 7 || rows == 9 || rows == 18 || rows == 19) {\r\n document.getElementById(\"result-table-1\").rows[rows].cells.namedItem(idPlOne).innerHTML = \"0\";\r\n document.getElementById(\"result-table-2\").rows[rows].cells.namedItem(idPlTwo).innerHTML = \"0\";\r\n document.getElementById(\"result-table-1\").rows[rows].cells.namedItem(idPlOne).classList.add(\"lines-table-result\");\r\n document.getElementById(\"result-table-1\").rows[rows].cells.namedItem(idPlOne).classList.remove(\"lines-table-final\");\r\n document.getElementById(\"result-table-2\").rows[rows].cells.namedItem(idPlTwo).classList.add(\"lines-table-result\");\r\n document.getElementById(\"result-table-2\").rows[rows].cells.namedItem(idPlTwo).classList.remove(\"lines-table-final\");\r\n\r\n } else if (rows == 8 || rows == 10) {\r\n continue;\r\n } else {\r\n document.getElementById(\"result-table-1\").rows[rows].cells.namedItem(idPlOne).innerHTML = \"\";\r\n document.getElementById(\"result-table-2\").rows[rows].cells.namedItem(idPlTwo).innerHTML = \"\";\r\n document.getElementById(\"result-table-1\").rows[rows].cells.namedItem(idPlOne).classList.add(\"lines-table-result\");\r\n document.getElementById(\"result-table-1\").rows[rows].cells.namedItem(idPlOne).classList.remove(\"lines-table-final\");\r\n document.getElementById(\"result-table-2\").rows[rows].cells.namedItem(idPlTwo).classList.add(\"lines-table-result\");\r\n document.getElementById(\"result-table-2\").rows[rows].cells.namedItem(idPlTwo).classList.remove(\"lines-table-final\");\r\n }\r\n }\r\n playerTurn();\r\n document.getElementById(\"alert-message-end\").style.display = \"none\";\r\n}", "function populateHints(data) {\n //Populates top cells with data\n for(var i = 1; i <= size; i++) {\n var str = \"\";\n var cnt = 0;\n for(var j = 0; j < size; j++) {\n var index = size*j + i - 1;\n if(data.charAt(index) == \"1\") {\n cnt+=1;\n }\n if(data.charAt(index) == \"0\" && cnt != 0) {\n str += (cnt + \"<br>\");\n cnt = 0;\n }\n }\n if(cnt != 0) {\n str += (cnt);\n }\n table.rows[0].cells[i].innerHTML = str;\n }\n //Populates left-side cells with data\n for(var i = 1; i <= size; i++) {\n var str = \"\";\n var cnt = 0;\n for(var j = 0; j < size; j++) {\n var index = size*(i - 1) + j;\n if(data.charAt(index) == \"1\") {\n cnt+=1;\n }\n if(data.charAt(index) == \"0\" && cnt != 0) {\n str += (cnt + \" \");\n cnt = 0;\n }\n }\n if(cnt != 0) {\n str += (cnt);\n }\n table.rows[i].cells[0].innerHTML = str;\n }\n}", "function fillTable (nameList, data, candidates, group, blank,fungiOverview) {\n // header row:\n addRow(table)\n cell1.innerHTML = 'Species'\n cell1.style.fontWeight = \"bold\"\n // cell1.style = \"border:none\"\n cell2.innerHTML = 'Norwegian name'\n cell2.style.fontWeight = \"bold\"\n // cell2.style=\"font-size:15px\"\n cell2.style.border = \"solid\"\n // cell2.style=\"word-wrap:break-all\"\n cell3.innerHTML = 'Sequenced specimens'\n cell3.style.fontWeight = \"bold\"\n cell4.innerHTML = 'Awaiting sequencing'\n cell4.style.fontWeight = \"bold\"\n cell5.innerHTML = 'Validated sequences'\n cell5.style.fontWeight = 'bold'\n cell6.innerHTML = 'Failed sequences'\n cell6.style.fontWeight = \"bold\"\n if (bcColl != \"sopp\") {\n cell5.style.display = 'none'\n cell6.style.display = 'none'\n }\n let sumSpecimens = 0\n let sumSpecies = 0\n museumURLPath = urlPath + \"/nhm\"\n\n // filling the rest of the rows in the table, AND at the same time sum up numbers for the last row\n\n // all but fungi:\n // render all on first render\n // basidio: render all\n // all phyla and blank search fungi: not all names\n let sumSpecimensAndSpecies\n if (bcColl === \"sopp\" && blank === 'blank') { // blank search for fungi\n sumSpecimensAndSpecies = fillOnlyBarcoded(data, candidates, sumSpecimens,fungiOverview)\n } else if (bcColl === \"sopp\" && group === 'all') { // start fungi-page\n sumSpecimensAndSpecies = fillOnlyBarcoded(data, candidates, sumSpecimens,fungiOverview)\n } else if (group != \"asco\" && group != \"all\" ) { // basidio\n sumSpecimensAndSpecies = fillAllNames(nameList, data, candidates, sumSpecimens,fungiOverview)\n } \n // else if (group === \"asco\") { \n // sumSpecimensAndSpecies = fillAllNames(nameList, data, candidates, sumSpecimens)\n // }\n else if (group === 'all') {\n sumSpecimensAndSpecies = fillAllNames(nameList, data, candidates,sumSpecimens)\n } else {\n sumSpecimensAndSpecies = fillOnlyBarcoded(data, candidates, sumSpecimens)\n }\n addRow(table)\n if (bcColl === \"sopp\" && group != \"Basidio\") {\n cell1.innerHTML = \"\" \n } else {\n cell1.innerHTML = \"<br> # Norwegian species: \" + nameList.length\n cell1.style.fontSize = \"12px\"\n }\n cell3.innerHTML = \"# specimens: \" + sumSpecimensAndSpecies.sumSpecimens + \"<br> # barcoded species: \" + sumSpecimensAndSpecies.sumSpecies\n cell3.style=\"text-align:center\"\n cell3.style.border=\"solid\"\n cell3.style.fontSize = \"12px\" \n cell5.style.display = 'none'\n cell6.style.display = 'none'\n}", "function updateTables(UserData){\r\n $('#pName').html(UserData.CharacterData.Name);\r\n $('#pHealth').html(UserData.CharacterData.Health);\r\n $('#pEnergy').html(UserData.CharacterData.Energy);\r\n $('#pMoney').html(UserData.CharacterData.Money);\r\n $('#pExp').html(UserData.CharacterData.Experience);\r\n $('#wName').html(UserData.WeaponData.Name);\r\n $('#wAtk').html(UserData.WeaponData.Dmg);\r\n $('#wValue').html(UserData.WeaponData.Value);\r\n $('#aName').html(UserData.ArmourData.Name);\r\n $('#aDef').html(UserData.ArmourData.Def);\r\n $('#aValue').html(UserData.ArmourData.Value);\r\n checkIfCanBuy(UserData);\r\n}", "function fcnModifyReportFormTCG(ss, shtConfig, shtPlayers) {\n\n var MatchFormEN = FormApp.openById(shtConfig.getRange(36, 2).getValue());\n var FormItemEN = MatchFormEN.getItems();\n var NbFormItem = FormItemEN.length;\n \n var MatchFormFR = FormApp.openById(shtConfig.getRange(37, 2).getValue());\n var FormItemFR = MatchFormFR.getItems();\n\n // Function Variables\n var ItemTitle;\n var ItemPlayerListEN;\n var ItemPlayerListFR;\n var ItemPlayerChoice;\n \n var NbPlayers = shtPlayers.getRange(2, 6).getValue();\n var Players = shtPlayers.getRange(3, 2, NbPlayers, 1).getValues();\n var ListPlayers = [];\n \n // Loops to Find Players List\n for(var item = 0; item < NbFormItem; item++){\n ItemTitle = FormItemEN[item].getTitle();\n if(ItemTitle == 'Winning Player' || ItemTitle == 'Losing Player'){\n \n // Get the List Item from the Match Report Form\n ItemPlayerListEN = FormItemEN[item].asListItem();\n ItemPlayerListFR = FormItemFR[item].asListItem();\n \n // Build the Player List from the Players Sheet \n for (i = 0; i < NbPlayers; i++){\n ListPlayers[i] = Players[i][0];\n }\n // Set the Player List to the Match Report Forms\n ItemPlayerListEN.setChoiceValues(ListPlayers);\n ItemPlayerListFR.setChoiceValues(ListPlayers);\n \n// ItemPlayerChoice = ItemPlayerListEN.getChoices();\n \n// Logger.log(ItemTitle);\n// for(var choice = 0; choice < ItemPlayerChoice.length; choice++){\n// Logger.log('Player: %s',ItemPlayerChoice[choice].getValue());\n// }\n }\n }\n}", "function updatelettersGuessed() {\ndocument.querySelector(\"guessesLeft\").innerHTML = lettersGuessed.join(\", \");\n}", "function resetGames(weekNum) {\n var gameColumn = document.getElementsByClassName(\"gameColumn\");\n var rows = document.getElementsByClassName(\"Tst-table Table\")[0].rows;\n var playerInfo;\n\n //console.log(teamsString)\n var dateString = \"2019-10-22\";\n var leagueIDString = \"leagueID=\" + getLeagueID();\n //console.log(\"dateString = \" + dateString);\n\n //remove weekNum if retrieving games for today\n if (weekNum == 0) {\n url = url.replace(\"weekNum=\" + weekNum, \"\");\n }\n //console.log(\"weekNum=\" + weekNum);\n chrome.runtime.sendMessage(\n {\n endpoint: \"gamesremaining\",\n date: dateString,\n leagueID: getLeagueID(),\n teams: teamsString,\n pageName: \"yTransactionTrendsWeekSelect\",\n week: weekNum\n },\n function(response) {\n var data = response.data;\n var gameColumn = document.getElementsByClassName(\"gameColumn\");\n //console.log(data)\n for (var i = 0; i < rows.length - 1; i++) {\n gameColumn[i].innerText = data[i];\n gameColumn[i].style.backgroundColor = getColor(data[i]);\n }\n }\n );\n}", "function UpdateNumPTT()\r\n{\r\n try\r\n {\r\n let numPTT = Number(gb_ctrl_input_ptt.elt.value);\r\n let i=0;\r\n gb_cadPTT = '';\r\n for (i=0;i<numPTT;i++)\r\n {\t \r\n gb_cadPTT += 'D';\r\n }\r\n }\r\n catch(err)\r\n { \r\n DebugLog(err.message.toString());\r\n } \r\n}", "function clear_receipt_table() {\n let table = document.getElementById(\"receipt_table\");\n for (let i = table.rows.length - 2; i > 0; i--) {\n table.deleteRow(i);\n }\n}", "function updateGuesses() {\n document.getElementById(\"numGuessesLeft\").innerHTML = guesses;\n document.getElementById(\"playerGuesses\").innerHTML = guessedLetters;\n}", "function appearLetters(indexChecker, userGuess) {\n var donutParam = (donutBite * (-172))\n if (indexChecker.length > 0) {\n for (j = 0; j < indexChecker.length; j++) {\n $($('.letters')[indexChecker[j]]).text(userGuess.toUpperCase());\n }\n } else {\n lives--;\n donutBite++;\n reduceDonut(donutParam);\n $(\"#guessed\").append(\" \" + userGuess.toUpperCase());\n $(\"#lives\").text(lives);\n }\n}", "function resetFunc() {\n\t// vars and innerHTML for guessesRemaining\n\tguessesRemaining = 15;\n\tdocument.querySelector(\"#guessesRemainingId\").innerHTML = \"<p>\" + guessesRemaining + \"</p>\";\n\n\t// vars and innerHTML for letters guessed\n\tlettersGuessed = [];\n\tdocument.querySelector(\"#lettersGuessedId\").innerHTML = \"<p>\" + lettersGuessed + \"</p>\";\n\t\n\t// var, innerHTML, and func to determing # of blankLines based on fighterNumber\n\tfighterNumber = [Math.floor(Math.random() * hangmanMMAFightersArray.length)];\n\n\t// reset remainingCorrectLetters\n\tremainingCorrectLetters = hangmanMMAFightersArray[fighterNumber].length;\n\n\t// reset blankArray\n\tblankLinesArray = [];\n\tfor (i = 0; i < hangmanMMAFightersArray[fighterNumber].length; i++) {\n\t\tblankLinesArray[i]=\"_\";\n\t\tdocument.querySelector(\"#blankLinesId\").innerHTML = blankLinesArray.join(\" \");\n\t}\n\t// reset userGuess so it isn't logged\n\tuserGuess = \"\";\n}", "function goldExperienceRequiem() {\n\tswitch (currentPage) {\n\t\tcase 'bonus': {\n\t\t\tlet w = document.getElementById('worldSelector');\n\t\t\tlet c = document.getElementById('characterSelector');\n\t\t\tlet locationArray = bonusArray[c.value]['All Character Bonuses'][w.value]['World Bonuses'];\n\t\t\tlet rowCount = document.getElementById('bonusTable').rows.length;\n\t\t\tfor (let i = 0; i < rowCount - 1; i++) {\n\t\t\t\tlet checked = document.getElementById('check' + i).checked;\n\t\t\t\tif (checked) {\n\t\t\t\t\tlocationArray[i]['Replacement Reward 1'] = locationArray[i]['Vanilla Reward 1'];\n\t\t\t\t\tlocationArray[i]['Replacement Reward Address 1'] = '';\n\t\t\t\t\t// locationArray[i]['Replacement Reward 2'] = locationArray[i]['Vanilla Reward 2'];\n\t\t\t\t\t// locationArray[i]['Replacement Reward Address 2'] = '';\n\t\t\t\t\tlocationArray[i]['HP Increase'] = locationArray[i]['Vanilla HP Increase'];\n\t\t\t\t\tlocationArray[i]['MP Increase'] = locationArray[i]['Vanilla MP Increase'];\n\t\t\t\t\tlocationArray[i]['Armor Slot Increase'] = locationArray[i]['Vanilla Armor Slot Increase'];\n\t\t\t\t\tlocationArray[i]['Accessory Slot Increase'] = locationArray[i]['Vanilla Accessory Slot Increase'];\n\t\t\t\t\tlocationArray[i]['Item Slot Increase'] = locationArray[i]['Vanilla Item Slot Increase'];\n\t\t\t\t\tlocationArray[i]['Drive Gauge Increase'] = locationArray[i]['Vanilla Drive Gauge Increase'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tpopulateTable(0);\n\t\t\tbreak;\n\t\t}\n\t\tcase 'chests': {\n\t\t\tlet w = document.getElementById('worldSelector');\n\t\t\tlet rowCount = document.getElementById('chestsTable').rows.length;\n\t\t\tlet locationArray = chestArray[w.value].Chests;\n\t\t\tfor (let i = 0; i < rowCount - 1; i++) {\n\t\t\t\tlet checked = document.getElementById('check' + i).checked;\n\t\t\t\tif (checked) {\n\t\t\t\t\tlocationArray[i]['Replacement Reward'] = '';\n\t\t\t\t\tlocationArray[i]['Replacement Address'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tpopulateTable(w.value);\n\t\t\tbreak;\n\t\t}\n\t\tcase 'equipment': {\n\t\t\tlet et = document.getElementById('equipmentTypeSelector');\n\t\t\tlet locationArray = equipmentArray[et.value].Equipments;\n\t\t\tlet rowCount = document.getElementById('equipmentTable').rows.length;\n\t\t\tfor (let i = 0; i < rowCount - 1; i++) {\n\t\t\t\tlet checked = document.getElementById('check' + i).checked;\n\t\t\t\tif (checked) {\n\t\t\t\t\tlocationArray[i]['Ability'] = locationArray[i]['Vanilla Ability'];\n\t\t\t\t\tlocationArray[i]['Replacement Ability Address'] = '';\n\t\t\t\t\tlocationArray[i]['Strength'] = locationArray[i]['Vanilla Strength'];\n\t\t\t\t\tlocationArray[i]['Magic'] = locationArray[i]['Vanilla Magic'];\n\t\t\t\t\tlocationArray[i]['AP'] = locationArray[i]['Vanilla AP'];\n\t\t\t\t\tlocationArray[i]['Defense'] = locationArray[i]['Vanilla Defense'];\n\t\t\t\t\tlocationArray[i]['Physical Resistance'] = 0;\n\t\t\t\t\tlocationArray[i]['Fire Resistance'] = locationArray[i]['Vanilla Fire Resistance'];\n\t\t\t\t\tlocationArray[i]['Blizzard Resistance'] = locationArray[i]['Vanilla Blizzard Resistance'];\n\t\t\t\t\tlocationArray[i]['Thunder Resistance'] = locationArray[i]['Vanilla Thunder Resistance'];\n\t\t\t\t\tlocationArray[i]['Dark Resistance'] = locationArray[i]['Vanilla Dark Resistance'];\n\t\t\t\t\tlocationArray[i]['Light Resistance'] = 0;\n\t\t\t\t\tlocationArray[i]['Universal Resistance'] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpopulateTable(et.value);\n\t\t\tbreak;\n\t\t}\n\t\tcase 'forms': {\n\t\t\tlet f = document.getElementById('formTypeSelector');\n\t\t\tlet rowCount = document.getElementById('formsTable').rows.length;\n\t\t\tlet locationArray = driveFormArray[f.value]['Drive Levels'];\n\t\t\tfor (let i = 0; i < rowCount - 1; i++) {\n\t\t\t\tlet checked = document.getElementById('check' + i).checked;\n\t\t\t\tif (checked) {\n\t\t\t\t\tlocationArray[i]['Replacement Reward'] = '';\n\t\t\t\t\tlocationArray[i]['Replacement Reward Address'] = '';\n\t\t\t\t\tlocationArray[i]['New EXP to Level'] = locationArray[i]['Original EXP to Level'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tpopulateTable(f.value);\n\t\t\tbreak;\n\t\t}\n\t\tcase 'levels': {\n\t\t\tlet locationArray = levelArray;\n\t\t\tlet rowCount = document.getElementById('levelsTable').rows.length;\n\t\t\tfor (let i = 0; i < rowCount - 1; i++) {\n\t\t\t\tlet checked = document.getElementById('check' + i).checked;\n\t\t\t\tif (checked) {\n\t\t\t\t\tlocationArray[i]['EXP to Next Level'] = 0;\n\t\t\t\t\tlocationArray[i]['Standard AP'] = locationArray[i]['Vanilla AP']\n\t\t\t\t\tlocationArray[i]['Critical AP'] = Math.floor(((locationArray[i]['Standard AP'] - 2) * 1.5) + 50);\n\t\t\t\t\tlocationArray[i]['Defense'] = locationArray[i]['Vanilla Defense']\n\t\t\t\t\tlocationArray[i]['Magic'] = locationArray[i]['Vanilla Magic']\n\t\t\t\t\tlocationArray[i]['Strength'] = locationArray[i]['Vanilla Strength']\n\t\t\t\t\tlocationArray[i]['Sword Replacement Address'] = '';\n\t\t\t\t\tlocationArray[i]['Shield Replacement Address'] = '';\n\t\t\t\t\tlocationArray[i]['Staff Replacement Address'] = '';\n\t\t\t\t\tlocationArray[i]['Sword Replacement Reward'] = locationArray[i]['Vanilla Sword Reward'];\n\t\t\t\t\tlocationArray[i]['Shield Replacement Reward'] = locationArray[i]['Vanilla Shield Reward'];\n\t\t\t\t\tlocationArray[i]['Staff Replacement Reward'] = locationArray[i]['Vanilla Staff Reward'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tpopulateTable(0);\n\t\t\tbreak;\n\t\t}\n\t\tcase 'other': {\n\t\t\tlet rowCount = document.getElementById('criticalTable').rows.length;\n\t\t\tfor (let i = 0; i < rowCount - 1; i++) {\n\t\t\t\tlet checked = document.getElementById('check' + i).checked;\n\t\t\t\tif (checked) {\n\t\t\t\t\tcriticalArray[i]['Replacement Reward'] = '';\n\t\t\t\t\tcriticalArray[i]['Replacement Address'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tpopulateTable(0);\n\t\t\tbreak;\n\t\t}\n\t\tcase 'popups': {\n\t\t\tlet w = document.getElementById('worldSelector');\n\t\t\tlet rowCount = document.getElementById('popupsTable').rows.length;\n\t\t\tlet locationArray = popupArray[w.value].Popups;\n\t\t\tfor (let i = 0; i < rowCount - 1; i++) {\n\t\t\t\tlet checked = document.getElementById('check' + i).checked;\n\t\t\t\tif (checked) {\n\t\t\t\t\tlocationArray[i]['Replacement Reward'] = '';\n\t\t\t\t\tlocationArray[i]['Replacement Address'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tpopulateTable(w.value);\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tbreak;\n\t\t}\n\t}\n}", "function setAttemptText() {\n attemptTracker.innerHTML = \"You can select \" + attemptsLeft + \" more tile(s).\";\n}", "function updatePlayerTable() {\n if (players.length > 0) {\n $(\"#playerTable\").empty();\n $(\"#playerTable\").append(\"<th>Name</th><th>Balance</th>\")\n for (let i = 0; i < players.length; i++) {\n $(\"#playerTable\").append(\"<tr>\" +\n \"<td>\" + players[i].name + \"</td>\" +\n \"<td>\" + players[i].balance + \"</td>\");\n }\n }\n}", "function update_table(data) {\n data = JSON.parse(data);\n let row = \"row-\";\n for(let i = 0; i < 10; i++) {\n for(let j = 0; j < 3; j++) {\n if(j === 0) {\n document.getElementById(row+i).getElementsByTagName('div')[j]\n .getElementsByTagName('a')[j].setAttribute(\"href\", \"\");\n document.getElementById(row+i).getElementsByTagName('div')[j]\n .getElementsByTagName('a')[j].textContent = \"\";\n }\n else {\n document.getElementById(row+i).getElementsByTagName('div')[j].textContent = \"\";\n }\n }\n }\n for(let i = 0; i < Math.min(10, ROW_COUNT - current_offset); i++) {\n for(let j = 0; j < 3; j++) {\n if(j === 0) {\n document.getElementById(row+i).getElementsByTagName('div')[j]\n .getElementsByTagName('a')[j].setAttribute(\"href\", \"#/info/\"+data[i][j]);\n document.getElementById(row+i).getElementsByTagName('div')[j]\n .getElementsByTagName('a')[j].textContent = data[i][j];\n }\n else {\n document.getElementById(row+i).getElementsByTagName('div')[j].textContent = data[i][j];\n }\n }\n }\n}", "function eraseOldContent() {\n text = \"\";\n allWords = [];\n uniqueWords = [];\n wordCount = [];\n\n $(\"#occurrenceTable\").html(\"<tr><th>Word</th><th>Frequency</th></tr>\");\n $(\"#longest\").html(\"\");\n $(\"#common\").html(\"\");\n $(\"#word\").html(\"Longest word: \");\n $(\"#letter\").html(\"Most common letter: \");\n}", "function submitTotalTable(total = 0, burnedCalories = 0) {\n\t var goalRow = document.createElement('tr');\n\t goalRow.id = \"goal-calories\";\n\n\t var goalTd = document.createElement('td');\n\t goalTd.innerHTML = \"<strong>Goal Calories</strong>\";\n\n\t var goalTd2 = document.createElement('td');\n\t goalTd2.innerHTML = \"<strong>2000</strong>\";\n\n\t goalRow.appendChild(goalTd);\n\t goalRow.appendChild(goalTd2);\n\n\t var totalsTable = document.getElementById('totals');\n\t totalsTable.appendChild(goalRow);\n\t // calories consumed\n\t var consumedRow = document.createElement('tr');\n\t consumedRow.id = \"consumed-calories\";\n\n\t var consumeTd = document.createElement('td');\n\t consumeTd.innerHTML = \"<span><strong>Calories Consumed</strong>\";\n\n\t var consumeTd2 = document.createElement('td');\n\t consumeTd2.innerHTML = total;\n\t consumeTd2.id = \"cal-consumed\";\n\t consumedRow.appendChild(consumeTd);\n\t consumedRow.appendChild(consumeTd2);\n\n\t totalsTable.appendChild(consumedRow);\n\t // calories burned\n\t var burnedRow = document.createElement('tr');\n\t burnedRow.id = \"burned-calories\";\n\n\t var burnedTd = document.createElement('td');\n\t burnedTd.innerHTML = \"<strong>Calories Burned</strong>\";\n\n\t var burnedTd2 = document.createElement('td');\n\n\t if (burnedCalories > 0) {\n\t burnedTd2.innerHTML = \"<span id='remaining-green'>\" + burnedCalories + \"</span>\";\n\t } else {\n\t burnedTd2.innerHTML = \"<span id='remaining-black'>\" + burnedCalories + \"</span>\";\n\t }\n\n\t // burnedTd2.innerHTML = burnedCalories\n\n\t burnedRow.appendChild(burnedTd);\n\t burnedRow.appendChild(burnedTd2);\n\n\t totalsTable.appendChild(burnedRow);\n\t // remaining calories\n\t var remainingRow = document.createElement('tr');\n\t remainingRow.id = \"remaining-calories\";\n\n\t var remainingTd = document.createElement('td');\n\t remainingTd.innerHTML = \"<strong>Remaining Calories</strong>\";\n\n\t var remainingTd2 = document.createElement('td');\n\n\t var remainingCalories = 2000 - total + burnedCalories;\n\n\t if (remainingCalories < 0) {\n\t remainingTd2.innerHTML = \"<span id='remaining-red'>\" + remainingCalories + \"</span>\";\n\t } else {\n\t remainingTd2.innerHTML = \"<span id='remaining-green'>\" + remainingCalories + \"</span>\";\n\t }\n\n\t remainingRow.appendChild(remainingTd);\n\t remainingRow.appendChild(remainingTd2);\n\n\t totalsTable.appendChild(remainingRow);\n\t}", "function tablesUpdated(isSuccess, entityName, value, isNewPerson, topicsCount){\n hideSections();\n var numPersonsTopicAddedTo = topicsCount ? topicsCount : -1;\n let verbage = \"<br/><br/>\";\n\n if (!isSuccess){\n verbage = \"\";\n } else if ( entityName == \"person\" && isNewPerson){\n verbage += \"was added to the persons table.\";\n } else if (entityName == \"person\" && ! isNewPerson){\n verbage += \"was updated.\";\n } else if (entityName == \"topic\" & topicsCount > 0 ){\n verbage += \"was added to \" + numPersonsTopicAddedTo + \" people.\";\n } else if (entityName == \"topic\" & topicsCount == 0 ){\n verbage += \"is already an option for everyone in the table.\";\n }\n \n let resultsState = isSuccess ? \"Success:<br/><br/>\" : \"Error!<br/><br/>\";\n\n let resultsMessage = resultsState + \"<em>\" + value + \"</em>\" + verbage;\n\n var resultsColor = \"\";\n if (entityName == \"topic\" && topicsCount == 0){\n resultsColor = \"orange\";\n } else if (isSuccess){\n resultsColor = \"seagreen\";\n } else{\n resultsColor = \"red\";\n }\n\n\n atmWindow.document.getElementById(\"addAffilResultsMessage\").style.display = \"block\";\n atmWindow.document.getElementById(\"addAffilResultsMessage\").style.color = resultsColor;\n atmWindow.document.getElementById(\"addAffilResultsMessage\").innerHTML = resultsMessage;\n \n if (isSuccess){\n var rand = Math.floor(Math.random()*reminderImages.length);\n atmWindow.document.getElementById(\"reminderImage\").setAttribute(\"src\", reminderImages[rand].url);\n atmWindow.document.getElementById(\"reminderImage\").setAttribute(\"width\", reminderImages[rand].width);\n atmWindow.document.getElementById(\"reminderImage\").setAttribute(\"height\", reminderImages[rand].height);\n atmWindow.document.getElementById(\"reminderImage\").style.display = \"block\";\n atmWindow.document.getElementById(\"reminderHeader\").style.display = \"block\";\n }\n }", "function populate_table(data, points, totaltimes)\n{\n\tvar rowcount = $(\"#count-data tr\").length;\n\tconsole.log(rowcount);\n\tconsole.log(data);\n\tvar point = find_points(data, points); //find correct point\n\n\tvar table = document.getElementById(\"count-data\");\n\n\ttable.style = \"display: visible;\"; //make the table visible\n //if the table's rows don't exist\n\tif (rowcount <= 1)\n\t{\n\t\ttable = table.getElementsByTagName('tbody')[0];\n\n\t\tvar newrow = table.insertRow(table.rows.length);\n\t\tvar newrow2 = table.insertRow(table.rows.length);\n var newrow3 = table.insertRow(table.rows.length);\n\n\n\t\tvar d1 = newrow.insertCell(0);\n\t\tvar d2 = newrow2.insertCell(0);\n var d3 = newrow3.insertCell(0);\n\n\n\t\tvar timcell1 = newrow.insertCell(1);\n\t\tvar timcell2 = newrow2.insertCell(1);\n var timcell3 = newrow3.insertCell(1);\n\n\n\t\tvar pl1 = newrow.insertCell(2);\n\t\tvar pl2 = newrow2.insertCell(2);\n var pl3 = newrow3.insertCell(2);\n\n\n\t\td1.innerHTML = \"X Dimension\";\n\t\td2.innerHTML = \"Y Dimension\";\n d3.innerHTML = \"Z Dimension\";\n\n\n\t\ttimcell1.innerHTML = point.t_X;\n\t\ttimcell2.innerHTML = point.t_Y;\n timcell3.innerHTML = point.t_Z;\n\n\n\t\tpl1.innerHTML = point.pl_X;\n\t\tpl2.innerHTML = point.pl_Y;\n pl3.innerHTML = point.pl_Z;\n\n\n\n\n \t}\n\telse\n\t{\n\t\ttable.rows[1].cells[1].innerHTML = point.t_X;\n\t\ttable.rows[2].cells[1].innerHTML = point.t_Y;\n table.rows[3].cells[1].innerHTML = point.t_Z;\n\n\n\t\ttable.rows[1].cells[2].innerHTML = point.pl_X;\n\t\ttable.rows[2].cells[2].innerHTML = point.pl_Y;\n table.rows[3].cells[2].innerHTML = point.pl_Z;\n\n\t}\n\n\n}", "function resetResults() {\n seatsLeft = mpsTotal;\n parties.forEach(party => {\n party.votesCalculated = party.votes;\n party.mpsGranted = 0;\n if (resultsTable.rows.length > 1) {\n resultsTable.deleteRow(1);\n }\n });\n}", "function effacerTableau() {\r\n tabIsEmpty = true;\r\n tbody.empty();\r\n }", "function updateScoreBoard(){\n var scoreTable = document.querySelector(\"#score-board-list\");\n scoreTable.innerHTML = \"\";\n data = JSON.parse(localStorage.getItem(\"scores\"));\n if (data !== null) {\n for(i=0;i<data.length;i++){\n var scoreRow = document.createElement('tr');\n scoreRow.setAttribute(\"class\", \"table-primary\");\n scoreTable.appendChild(scoreRow);\n \n var scoreNameCol = document.createElement('td');\n scoreNameCol.setAttribute(\"class\", \"table-primary\");\n scoreNameCol.textContent = data[i].initials;\n scoreRow.appendChild(scoreNameCol);\n \n var scoreCol = document.createElement('td');\n scoreCol.setAttribute(\"class\", \"table-primary\");\n scoreCol.textContent = data[i].score;\n scoreRow.appendChild(scoreCol);\n }\n }\n}", "function populateWeeklyData(responseData, table) {\n var dataArray = responseData.aaData;\n var dayArray = [\"SUN\", \"MON\", \"TUE\", \"WED\", \"THU\", \"FRI\", \"SAT\"];\n var html = \"\";\n var date = new Date();\n var currentDate = new Date().setHours(0, 0, 0, 0);\n $.each(dataArray, function(key, value) {\n date = getFormattedDate(value.date, \"date\");\n if (date.valueOf() == currentDate) {\n html += '<tr><th style=\"color:#8EC657;\">' + dayArray[date.getDay()] + ' ' + date.getDate() + '</th>';\n } else {\n html += '<tr><th>' + dayArray[date.getDay()] + ' ' + date.getDate() + '</th>';\n }\n if (date.valueOf() < currentDate) {\n html += '<td><input type=\"text\" value=\"' + value.slot1 + '\" maxlength=\"3\" disabled></td>' + '<td><input maxlength=\"3\" type=\"text\" value=\"' + value.slot2 + '\" disabled></td>' + '<td><input maxlength=\"3\" type=\"text\" value=\"' + value.slot3 + '\" disabled></td>' + '<td><input maxlength=\"3\" type=\"text\" value=\"' + value.slot4 + '\" disabled></td>' + '<td><input maxlength=\"3\" type=\"text\" value=\"' + value.slot5 + '\" disabled></td></tr>';\n } else {\n html += isZeroSlot(value.slot1) + isZeroSlot(value.slot2) + isZeroSlot(value.slot3) + isZeroSlot(value.slot4) + isZeroSlot(value.slot5) + '</tr>';\n }\n });\n html += addHolday(getNthDate(date, 1), dayArray);\n html += addHolday(getNthDate(date, 2), dayArray);\n $(table + \" tbody\").html(html);\n bindEvents();\n }", "function checkLetters() {\n //If no - add letter to guessed letters array\n if ((remainingGuesses - lettersGuessed.length) > 0 && (lettersGuessed.indexOf(playerGuess) == -1)) {\n lettersGuessed.push(\" \" + playerGuess);\n document.getElementById(\"lettersGuessed\").innerHTML = lettersGuessed.join(\" \");\n\n //Check to see if letter is in word\n //If yes - replace dash with letter in the appropriate position\n for (k = 0; k < currentWord.length; k++) {\n if (currentWord[k] == playerGuess) {\n guessingWord[k] = \" \" + playerGuess + \" \";\n document.getElementById(\"currentWord\").textContent = guessingWord.join(\"\");\n }\n //If no - decrement Number of Guesses by 1\n else {\n document.getElementById(\"remainingGuesses\").innerHTML = remainingGuesses - lettersGuessed.length;\n }\n };\n };\n }", "function update() {\n \n // get the update data from update.php\n $.getJSON(\"update.php\", function(data){\n \n // get the table element we want to update\n var table = document.getElementById(\"betTable\");\n \n // set index for for loop\n var x;\n \n // loop through the data in the JSON array\n for (x in data)\n {\n // update the table\n $('#betTable > tbody > tr:first').before('<tr class = \\'blank_row\\'><td class = \\'blank_cell\\' colspan = \\'4\\'></td></tr>');\n table.insertRow(0).innerHTML = \"<th class = 'color2'>End Date</td><td class='color2'>\"+data[x].end+\"</td>\"; \n table.insertRow(0).innerHTML = \"<th class ='color2'> Description </th><td class = 'color2'>\"+data[x].description+\"</td><td class='color3' rowspan='2'>\\$\"+data[x].amount+\"</td>\";\n table.insertRow(0).innerHTML = \"<td class='color1'> Bet#:\"+data[x].bet+\"</td><th class='color1'>\"+data[x].Title+\"</th><th class = 'color3'>Amount</th><td class = 'color3' rowspan='3'><button type='submit' name='bet' class='btn btn-default' value='\"+data[x].bet+\"'>Take Bet</button></td>\"; \n }\n });\n \n }", "function remainingTiles (tiles) {\n\tvar bag = {\"E\": 12, \"A\": 9, \"I\": 9, \"O\": 8, \"N\": 6, \"R\": 6, \"T\": 6, \"L\": 4,\n\t \"S\": 4, \"U\": 4, \"D\": 4, \"G\": 3, \"_\": 2, \"B\": 2, \"C\": 2, \"M\": 2,\n\t \"P\": 2, \"F\": 2, \"H\": 2, \"V\": 2, \"W\": 2, \"Y\": 2, \"K\": 1, \"J\": 1,\n\t \"X\": 1, \"Q\": 1, \"Z\": 1 },\n\t tileArr = tiles.split(\"\"),\n\t remaining = [],\n\t amount, char;\n\n tileArr.forEach(function (tile) {\n \tbag[tile]--;\n \tif (bag[tile] < 0)\n \t\tremaining = \"Invalid input. More \" + tile + \"'s have been taken from the bag than possible.\";\n });\n\n if (typeof remaining !== \"string\") {\n \t// Add characters to a 2D array at index [amount]\n \tfor (amount = 12; amount >= 0; amount--) {\n \t\tfor (char in bag) {\n \t\t\tif (bag[char] === amount) {\n \t\t\t\tif (!remaining[amount])\n \t\t\t\t\tremaining[amount]= [];\n \t\t\t\tremaining[amount].push(char);\n \t\t }\n \t\t}\n \t}\n \t// Sort and join, converting to array of strings\n \tfor (amount = 12; amount >= 0; amount--) {\n \t\tif (remaining[amount]) {\n \t\t\tremaining[amount].sort();\n \t\t\tremaining[amount] = amount + \": \" + remaining[amount].join(\", \");\n \t\t}\n \t}\n \t// Filter empty array indices, reverse and join, convert to single string\n \tremaining = String(remaining.filter(function (val) {\n \t\treturn val !== undefined;\n \t}).reverse().join(\"\\n\"));\n }\n\n return remaining;\n}", "function createTable(dataArray){\n var tableDiv = document.getElementById(\"completedtable\");\n if(tableDiv.firstChild != null){\n tableDiv.removeChild(tableDiv.firstChild);\n }\n var table = document.createElement(\"table\");\n table.style.border = \"2px solid black\";\n var head = document.createElement(\"tr\");\n head.style.backgroundColor = \"lightblue\";\n var header1 = document.createElement(\"th\");\n header1.innerText = \"Name\";\n head.appendChild(header1);\n var header2 = document.createElement(\"th\");\n header2.innerText = \"Date\";\n head.appendChild(header2);\n var header3 = document.createElement(\"th\");\n header3.innerText = \"Reps\";\n head.appendChild(header3);\n var header4 = document.createElement(\"th\");\n header4.innerText = \"Weight\";\n head.appendChild(header4);\n var header5 = document.createElement(\"th\");\n header5.innerText = \"Unit\";\n head.appendChild(header5);\n var header6 = document.createElement(\"th\");\n header6.innerText = \"Edit\";\n head.appendChild(header6);\n var header7 = document.createElement(\"th\");\n header7.innerText = \"Delete\";\n head.appendChild(header7);\n table.appendChild(head);\n\n // For each exercise in the returned array, add a row and put in the exercise data\n dataArray.forEach(function(row){ \n var addrow = document.createElement(\"tr\");\n var name = document.createElement(\"td\");\n name.innerText = row[\"name\"];\n addrow.appendChild(name);\n var date = document.createElement(\"td\");\n if(row[\"date\"] != null){\n date.innerText = row[\"date\"].substring(0,10);\n }\n addrow.appendChild(date);\n var rep= document.createElement(\"td\");\n rep.innerText = row[\"reps\"];\n addrow.appendChild(rep);\n var weight = document.createElement(\"td\");\n weight.innerText = row[\"weight\"];\n addrow.appendChild(weight);\n var units = document.createElement(\"td\");\n if(row[\"lbs\"] == 1){\n units.innerText = \"lbs\";\n }\n else if(row[\"lbs\"] == 0){\n units.innerText = \"kgs\";\n }\n addrow.appendChild(units);\n\n //Add the edit button with listener to call edit function.\n var editbutton = document.createElement(\"td\");\n var form = document.createElement('form');\n var inputId = document.createElement('input');\n inputId.setAttribute('type',\"hidden\");\n inputId.setAttribute('value',row[\"id\"]);\n var button = document.createElement('input');\n button.setAttribute('type',\"button\");\n button.setAttribute('value', \"Edit\");\n button.setAttribute('class', \"edit\");\n button.addEventListener('click', editFunction, false);\n form.appendChild(inputId);\n form.appendChild(button);\n editbutton.appendChild(form);\n addrow.appendChild(editbutton);\n\n var deletebutton = document.createElement(\"td\");\n var form = document.createElement('form');\n var inputId = document.createElement('input');\n inputId.setAttribute('type',\"hidden\");\n inputId.setAttribute('value',row[\"id\"]);\n var button = document.createElement('input');\n button.setAttribute('type',\"button\");\n button.setAttribute('value', \"Delete\");\n button.setAttribute('class', \"delete\");\n button.addEventListener('click', deleteFunction, false);\n form.appendChild(inputId);\n form.appendChild(button);\n deletebutton.appendChild(form);\n addrow.appendChild(deletebutton);\n table.appendChild(addrow);\n });\n tableDiv.appendChild(table);\n}", "function endOfGame() {\n clearInterval(timerId);\n $('#guessruletable .pheno').prop('disabled', 'disabled');\n $('#guessruletable .allele').prop('disabled', 'disabled'); // false\n $('#bitsandbuttons').show();\n $('#hidepop').hide(); \n $('#makepop').show(); \n var score = $(\"#countdownText\").text();\n if(score>0) {\n\tvar yrname=prompt(translate[lang][\"You scored\"]+score+translate[lang][\"Enter name\"]);\n addToTable(yrname,score);\n\tprintTable();\n\t$(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n } else {\n\talert(translate[lang][\"Out of time\"]);\n\t$(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n }\n}", "function UpdateScoreboard() {\n // Check for stale & lost hunters\n UpdateStale();\n\n // Build the scoreboards.\n const Scoreboard = [];\n const WardenBoard = [];\n const WhelpBoard = [];\n\n // Get the crown-count sorted memberlist\n const orderedHunters = getMyDb_([{ column: 9, ascending: false }, { column: 8, ascending: false }, { column: 7, ascending: false }]);\n orderedHunters.forEach(function (member, i) {\n var name = member[0].toString();\n var rank = i + 1;\n var dragons = parseInt(member[8], 10);\n var wardens = parseInt(member[7], 10);\n var whelps = parseInt(member[6], 10);\n Scoreboard.push([\n name, rank, dragons, member[9],\n Utilities.formatDate(new Date(member[4]), \"EST\", \"yyyy-MM-dd\"), // LastChange\n Utilities.formatDate(new Date(member[3]), \"EST\", \"yyyy-MM-dd\"), // LastSeen\n member[2] // Profile Link\n ]);\n WardenBoard.push([name, wardens]);\n WhelpBoard.push([name, whelps]);\n // Store the member's overall ranking.\n member[10] = rank;\n });\n // Write the new ranks to the database.\n saveMyDb_(orderedHunters);\n\n // Write the new scoreboards\n // Clear out old data\n const rollSheet = wb.getSheetByName('Roll of Honour');\n rollSheet.getRange(2, 1, rollSheet.getLastRow() - 1, Scoreboard[0].length).setValue('');\n // Write new data\n rollSheet.getRange(2, 1, Scoreboard.length, Scoreboard[0].length).setValues(Scoreboard);\n\n const alpha = wb.getSheetByName('Alphabetical');\n alpha.getRange(2, 1, alpha.getLastRow() - 1, Scoreboard[0].length).setValue('');\n alpha.getRange(2, 1, Scoreboard.length, Scoreboard[0].length)\n .setValues(Scoreboard)\n .sort({ column: 1, ascending: true });\n\n const others = wb.getSheetByName('Underlings');\n others.getRange(2, 2, others.getLastRow() - 1, WardenBoard[0].length - 0 + WhelpBoard[0].length - 0).setValue('');\n others.getRange(2, 2, WardenBoard.length, WardenBoard[0].length)\n .setValues(WardenBoard)\n .sort({ column: 3, ascending: false });\n others.getRange(2, 4, WhelpBoard.length, WhelpBoard[0].length)\n .setValues(WhelpBoard)\n .sort({ column: 5, ascending: false });\n\n // Force full write before returning\n SpreadsheetApp.flush();\n wb.getSheetByName('Members').getRange('H1').setValue(new Date());\n}", "function countWrongAttempts() {\n // todo: Move variable declarations to top (the let things :P)\n leftAttempts = attempts - wrongKeys.length;\n let domAttempt = document.querySelector(\"#attempts\");\n let counter = document.createElement(\"p\");\n counter.innerText = leftAttempts;\n counter.classList.add(\"counter\");\n let counterp = document.querySelector(\".counter\");\n if (counterp != null) {\n counterp.remove();\n }\n domAttempt.append(counter);\n gameOver();\n}", "function fix_upgrades(vals) {\n if (vals.current_tab === 'Upgrades') {\n for (let k in vals.upgrades) {\n var purchase_num = k.substr(k.length-1);\n let hasDisplayed = false;\n for (let i in vals.upgrades[k]) {\n if (vals.upgrades[k][i].cost >= vals.upgrades[\"3\"][\"upgrade1\"].cost/3) {\n $(\"#upg_text_\" + purchase_num).text(\"Cannot Purchase\");\n $('#upgrade_cost_' + purchase_num + '_1').text('[ NaN ');\n $('#upgrade_text_' + purchase_num + '_1').text(\"You cannot yet handle this immense power.\");\n $('#upgrade_lbl_' + purchase_num + '_1').text(\"Unavailable\");\n hasDisplayed = true;\n break;\n } else if (i != \"type\") {\n //set up new div for same challenge unlock\n if (vals.upgrades[k][i].unlocked != true) {\n let cost = 1;\n let percentage = vals.upgrades[k][i].mul * 100;\n let usedValue = percentage - 100;\n if (purchase_num === '2') {\n usedValue = (100 - percentage) * -1;\n }\n let nextUpgrade = i;\n $(\"#upgrade_mul_\" + purchase_num + \"_1\").text(Math.floor(usedValue) + '%');\n $('#upgrade_cost_' + purchase_num + '_1').text('[ ' + truncate_bigint(cost * vals.upgrades[k][nextUpgrade].cost) + ' ');\n $('#upgrade_text_' + purchase_num + '_1').text(vals.upgrades[k][nextUpgrade].description);\n $('#upgrade_lbl_' + purchase_num + '_1').text(vals.upgrades[k][nextUpgrade].label);\n hasDisplayed = true;\n break;\n }\n }\n }\n if (hasDisplayed !== true) {\n $(\"#upgrade_mul_\" + purchase_num + \"_1\").text('1337%');\n $('#upgrade_cost_' + purchase_num + '_1').text('[ NaN');\n $('#upgrade_text_' + purchase_num + '_1').text('You cannot progress this any further.');\n $('#upgrade_lbl_' + purchase_num + '_1').text('Power maxed.'); \n }\n }\n }\n}", "function checkTables()\n{\n\ttotalSeats = 0;\n\n\t// Get the list of table inputs\n\ttableSeats = $('INPUT[name^=\"tableseats\"]');\n\t// Step through each table input\n\ttableSeats.each(function() {\n\t\t// Sum the total seats allocated\n\t\ttotalSeats += parseInt($(this).val());\n\t\t// If we have enough already, try to delete any unnecessary tables\n\t\tif (totalSeats >= playerCount)\n\t\t{\n\t\t\t// Get the id of the current table\n\t\t\tid=parseInt($(this).attr('name').substring(11,$(this).attr('name').length-1));\n\t\t\t// Delete all tables with higher numbers\n\t\t\tfor(i = (id+1); i <= tableSeats.length; i++)\n\t\t\t{\n\t\t\t\t$('INPUT[name=\"tableseats['+i+']\"]').parent().remove();\n\t\t\t}\n\t\t\t// Stop the each() loop\n\t\t\treturn false;\n\t\t}\n\t});\n\n\t// If there aren't enough seats yet, add another table\n\tif (totalSeats < playerCount)\n\t{\n\t\t// Set the new table number\n\t\ttNum = tableSeats.length + 1;\n\t\t// Add after last table input\n\t\t$('DIV.table').last().after(\n\t\t\t\t\"\\n\\t\\t\"+'<div class=\"table\">'\n\t\t\t\t+\"\\n\\t\\t\\t\"+'<label for=\"tableseats['+tNum+']\">'\n\t\t\t\t\t+'Table '+tNum+' seats: '\n\t\t\t\t\t+'</label>'\n\t\t\t\t+\"\\n\\t\\t\\t\"+'<input type=\"text\" name=\"tableseats['+tNum+']\" '\n\t\t\t\t\t\t+'size=\"1\" class=\"table\" value=\"7\" />'\n\t\t\t\t+\"\\n\\t\\t\"+'</div>'\n\t\t\t\t);\n\t}\n}" ]
[ "0.6281706", "0.601515", "0.5962762", "0.5871492", "0.5821169", "0.5790783", "0.5748978", "0.5665217", "0.5648849", "0.55729765", "0.5548345", "0.5529779", "0.5472754", "0.54659355", "0.5460105", "0.54563975", "0.5455365", "0.5440394", "0.5434315", "0.5427203", "0.5423976", "0.53938097", "0.53755575", "0.53700453", "0.53555095", "0.5348178", "0.53471893", "0.53356576", "0.533241", "0.53104544", "0.5298364", "0.5283813", "0.52795386", "0.5265977", "0.52639127", "0.52634823", "0.5261776", "0.526141", "0.5253418", "0.52459836", "0.5244919", "0.5244309", "0.5243569", "0.52396375", "0.52126384", "0.5210885", "0.52095604", "0.5203143", "0.51921564", "0.51763356", "0.51741034", "0.51725906", "0.5171715", "0.5164561", "0.516119", "0.5149762", "0.5141202", "0.51390314", "0.5132093", "0.5130587", "0.51214606", "0.51184255", "0.5116669", "0.5113476", "0.5112628", "0.5111181", "0.511", "0.5103473", "0.51015", "0.50983316", "0.5090151", "0.5084576", "0.50814617", "0.5080442", "0.5079848", "0.50776356", "0.5073268", "0.50699484", "0.5064521", "0.5061416", "0.50597286", "0.5057399", "0.50569665", "0.505687", "0.5044067", "0.5043687", "0.5043107", "0.50426525", "0.5039937", "0.5034204", "0.5030036", "0.5029849", "0.50257665", "0.5024774", "0.5023015", "0.50206614", "0.50124615", "0.50075567", "0.50065", "0.5005177" ]
0.79960924
0
This function is an easy way to reset the pieces array / objects.
function load_pieces_array() { pieces = [ {"letter":"A", "value": 1, "amount": 9, "remaining": 9}, {"letter":"B", "value": 3, "amount": 2, "remaining": 2}, {"letter":"C", "value": 3, "amount": 2, "remaining": 2}, {"letter":"D", "value": 2, "amount": 4, "remaining": 4}, {"letter":"E", "value": 1, "amount": 12, "remaining": 12}, {"letter":"F", "value": 4, "amount": 2, "remaining": 2}, {"letter":"G", "value": 2, "amount": 3, "remaining": 3}, {"letter":"H", "value": 4, "amount": 2, "remaining": 2}, {"letter":"I", "value": 1, "amount": 9, "remaining": 9}, {"letter":"J", "value": 8, "amount": 1, "remaining": 1}, {"letter":"K", "value": 5, "amount": 1, "remaining": 1}, {"letter":"L", "value": 1, "amount": 4, "remaining": 4}, {"letter":"M", "value": 3, "amount": 2, "remaining": 2}, {"letter":"N", "value": 1, "amount": 6, "remaining": 6}, {"letter":"O", "value": 1, "amount": 8, "remaining": 8}, {"letter":"P", "value": 3, "amount": 2, "remaining": 2}, {"letter":"Q", "value": 10, "amount": 1, "remaining": 1}, {"letter":"R", "value": 1, "amount": 6, "remaining": 6}, {"letter":"S", "value": 1, "amount": 4, "remaining": 4}, {"letter":"T", "value": 1, "amount": 6, "remaining": 6}, {"letter":"U", "value": 1, "amount": 4, "remaining": 4}, {"letter":"V", "value": 4, "amount": 2, "remaining": 2}, {"letter":"W", "value": 4, "amount": 2, "remaining": 2}, {"letter":"X", "value": 8, "amount": 1, "remaining": 1}, {"letter":"Y", "value": 4, "amount": 2, "remaining": 2}, {"letter":"Z", "value": 10, "amount": 1, "remaining": 1}, {"letter":"_", "value": 0, "amount": 0, "remaining": 0} // Temporary set to 0 until I implement this. ]; // Normally 2 should be in the array. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\n\t\tfor (let i = 0; i < this.tiles.length; i++) {\n\t\t\tthis.tiles[i].unsetPiece();\n\t\t}\n\t\tfor (let i = 0; i < this.whitePieces.length; i++) {\n\t\t\tthis.whitePieces[i].unsetTile();\n\t\t\tthis.whitePieces[i].animation = null;\n\t\t\tthis.blackPieces[i].unsetTile();\n\t\t\tthis.blackPieces[i].animation = null;\n\t\t}\n\t}", "function reset() {\n setPieces(round);\n }", "function resetPuzzlePieces(){\n //empty the thumbnail container\n // debugger;\n \tpiecesBoards.innerHTML = \"\";\n \tcreatePuzzlePieces(this.dataset.puzzleref);\n // foreach has specify a callback function in the array\n // empty the drop zones\n dropZones.forEach(zone => {\n // removeChild\n while (zone.firstChild) zone.removeChild(zone.firstChild);\n // ouputs a message and writes into the console of the browser Chrome\n console.log(\"Ciao, see you later!\");\n });\n }", "function reset() {\n for (var x = 0; x < BOARD_SIZE; x++) {\n board[x][0] = new Piece(START_POSITION.charAt(x), WHITE);\n board[x][1] = new Piece(PAWN, WHITE);\n \n board[x][6] = new Piece(PAWN, BLACK);\n board[x][7] = new Piece(START_POSITION.charAt(x), BLACK);\n }\n }", "reset(trigger = true) {\n this.pendingPieces = this.pieces.concat([]);\n this.wrapperEl.removeClass(this.options.classes.completed);\n this.element.removeClass(this.options.classes.completed);\n let pieces = this.pieces;\n for (let piece of pieces) {\n piece.reset();\n }\n if (trigger) {\n this.element.trigger(SnapPuzzleEvents.reset);\n }\n }", "reset() {\n this._counter++;\n this._size = 0;\n this._colObjects = [];\n this._updateSides();\n }", "reset(){\n\t\tthis.selectedPieces = [];\n\t\tthis.inUseWhitePieces = [];\n\t\tthis.inUseBlackPieces = [];\n\t\tthis.validMoves = []\n\t\t\n\t\t\tfor(let i = 0; i <= 7; i++){\n\t\t\t\tthis.inUseWhitePieces.push(new Piece(\"Pawn\",(i),[2,i+1],\"White\",\"./images/white_pawn.png\"));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tthis.inUseWhitePieces.push(new Piece (\"Knight\",8,[1,7],\"White\",\"./images/white_knight.png\"));\n\t\t\tthis.inUseWhitePieces.push(new Piece (\"Knight\",9,[1,2],\"White\",\"./images/white_knight.png\"));\n\t\t\tthis.inUseWhitePieces.push(new Piece (\"Bishop\",10,[1,6],\"White\",\"./images/white_bishop.png\"));\n\t\t\tthis.inUseWhitePieces.push(new Piece (\"Bishop\",11,[1,3],\"White\",\"./images/white_bishop.png\"));\n\t\t\tthis.inUseWhitePieces.push(new Piece (\"Rook\",12,[1,8],\"White\",\"./images/white_rook.png\"));\n\t\t\tthis.inUseWhitePieces.push(new Piece (\"Rook\",13,[1,1],\"White\",\"./images/white_rook.png\"));\n\t\t\t\n\t\t\t\n\t\t\tthis.inUseWhitePieces.push(new Piece (\"King\",14,[1,5],\"White\",\"./images/white_king.png\"));\n\t\t\tthis.inUseWhitePieces.push(new Piece (\"Queen\",15,[1,4],\"White\",\"./images/white_queen.png\"));\n\t\t\t//Create other type of pieces\n\t\t\tfor(let i = 0; i <= 7; i++){\n\t\t\t\tthis.inUseBlackPieces.push(new Piece(\"Pawn\",(i),[7,i+1],\"Black\",\"./images/black_pawn.png\"));\n\t\t\t}\n\t\t\t\n\t\t\tthis.inUseBlackPieces.push(new Piece (\"Knight\",8,[8,7],\"Black\",\"./images/black_knight.png\"));\n\t\t\tthis.inUseBlackPieces.push(new Piece (\"Knight\",9,[8,2],\"Black\",\"./images/black_knight.png\"));\n\t\t\tthis.inUseBlackPieces.push(new Piece (\"Bishop\",10,[8,6],\"Black\",\"./images/black_bishop.png\"));\n\t\t\tthis.inUseBlackPieces.push(new Piece (\"Bishop\",11,[8,3],\"Black\",\"./images/black_bishop.png\"));\n\t\t\tthis.inUseBlackPieces.push(new Piece (\"Rook\",12,[8,8],\"Black\",\"./images/black_rook.png\"));\n\t\t\tthis.inUseBlackPieces.push(new Piece (\"Rook\",13,[8,1],\"Black\",\"./images/black_rook.png\"));\n\t\t\t\n\n\t\t\tthis.inUseBlackPieces.push(new Piece (\"King\",14,[8,5],\"Black\",\"./images/black_king.png\"));\n\t\t\tthis.inUseBlackPieces.push(new Piece (\"Queen\",15,[8,4],\"Black\",\"./images/black_queen.png\"));\n\t}", "resetPickedPiece() {\n this.pickedPiece = 0;\n this.tmpPiece = 0;\n this.piece2Move = null;\n this.state = STATES.READY_TO_PICK_PIECE;\n }", "reset() {\n\t\tvar notes = this.notetrack.notes;\n\t\tfor (var k = 0; k < notes.length; k++) {\n\t\t\tfor (var n = 0; n < notes[k].length; n++) {\n\t\t\t\tvar note = notes[k][n];\n\t\t\t\t\n\t\t\t\t// reset graphics\n\t\t\t\tnote.gfxObj.resetGfx();\n\t\t\t\t// reset note data\n\t\t\t\tnote.resetState();\n\t\t\t}\n\t\t}\n\t\tvar mines = this.notetrack.mines;\n\t\tfor (var k = 0; k < mines.length; k++) {\n\t\t\tfor (var n = 0; n < mines[k].length; n++) {\n\t\t\t\tvar mine = mines[k][n];\n\t\t\t\t\n\t\t\t\t// reset graphics\n\t\t\t\tmine.gfxObj.visible = true;\n\t\t\t\t// reset note data\n\t\t\t\tmine.resetState();\n\t\t\t}\n\t\t}\n\t}", "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 }", "reset() {\n this._objInfo.forEach(info => {\n info.obj.position.copy(info.pos);\n info.obj.up.copy(info.up);\n\n this._checkChange(info);\n info.last.pos.copy(info.pos);\n });\n }", "function resetSelectedPieceProperties() {\n selectedPiece.pieceId = -1;\n selectedPiece.pieceId = -1;\n selectedPiece.isKing = false;\n selectedPiece.seventhSpace = false;\n selectedPiece.ninthSpace = false;\n selectedPiece.fourteenthSpace = false;\n selectedPiece.eighteenthSpace = false;\n selectedPiece.minusSeventhSpace = false;\n selectedPiece.minusNinthSpace = false;\n selectedPiece.minusFourteenthSpace = false;\n selectedPiece.minusEighteenthSpace = false;\n}", "reset() {\n this.domSquares.forEach(square => {\n this.setSquare(square, '');\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 }", "function resetElements()\n{\n\tvalidMemes = new Array;\n\tgameLogic = gameLogicI;\n\tmemesCoords = new Array;\t\n\n\tmixMemes();\n}", "resetSavedData () {\n this.objects = {}\n\n this.electData = {\n ComponentParts: [],\n ComponentToParts: [],\n PartToPart: [],\n PartToPartNames: [],\n need: {},\n pass: {}\n }\n\n this.gridSize = 100\n this.data.routing_data = []\n this.nets = []\n this.data.assets = []\n this.data.compSize = [20,20]\n }", "function resetColor(pieces) {\n\n\t\tfor (var i = 0; i < pieces.length; i++) {\n\t\t\tpieces[i].color = SNAKE_DEFAULT_COLOR;\n\t\t}\n\t}", "function _reset () {\n _elements = [];\n }", "function resetSelectedPieceProperties() {\n selectedPiece.pieceId = -1;\n selectedPiece.allow = false;\n selectedPiece.allowUp = false;\n selectedPiece.allowDown = false;\n selectedPiece.allowLeft = false;\n selectedPiece.allowRight = false;\n}", "resetObjects()\n {\n //remove rectangles for collidable bodies\n this.buttons.forEach(this.deleteBody, this, true);\n this.spikes.forEach(this.deleteBody, this, true);\n\n this.startdoors.destroy();\n this.enddoors.destroy();\n this.buttons.destroy();\n this.spikes.destroy();\n this.checkpoints.destroy();\n this.doors.destroy();\n }", "HardReset(){\n this.refHolder.getComponent('AudioController').PlayTap();\n\n\n\n for(let i =0 ; i < this.inputButs.length;i++){\n this.inputButs[i].destroy();\n }\n for(let i =0 ; i < this.tmpInputButs.length;i++){\n this.tmpInputButs[i].destroy();\n }\n this.inputButs = [];\n this.tmpInputButs = [];\n this.prevID = 10;\n\n this.refHolder.getComponent(\"GamePlay\").butArray = [];\n this.Reset();\n this.refHolder.getComponent(\"GamePlay\").CreatePuzzle();\n\n\n }", "reset() {\n for (let i = 0; i < this.allNodes.length; i++) { this.allNodes[i].reset(); }\n for (let i = 0; i < this.Splitter.length; i++) {\n this.Splitter[i].reset();\n }\n for (let i = 0; i < this.SubCircuit.length; i++) {\n this.SubCircuit[i].reset();\n }\n }", "reset() {\n this.completed = false;\n this.pieceDropped = null;\n this.pieceDroppedInto = null;\n this.refresh();\n //@ts-ignore\n if (!this.puzzle.options.disabled) {\n this.enable();\n }\n }", "function resetState(){\n Oclasses = {}; // known classes\n arrayOfClassVals = null; // cached array of class values\n arrayOfClassKeys = null; // cached array of class keys\n objectProperties = {}; // known object properties\n arrayOfObjectPropVals = null; // array of object property values\n arrayOfObjectPropKeys = null; // array of object property keys\n dataTypeProperties = {}; // known data properties\n arrayOfDataPropsVals = null; // array of data properties values\n\n classColorGetter = kiv.colorHelper();\n svg = null;\n zoomer = null;\n renderParams = null;\n mainRoot = null;\n panel = null;\n }", "reset() {\n\t\tthis.tilesForTextureUpdate = Array.from( this.tiles );\n\t\tthis.updateNextTile();\n\t}", "function resetMemory(){\n\tRawMemory.set('{}');\n\tMemory.creeps = {};\n\tMemory.rooms = {};\n\tMemory.flags = {};\n\tMemory.spawns = {};\n}", "function reset() {\n gridPoints = []; // resets the gridPoints so that it clears the walls etc. on reset.\n gridPointsByPos = [];\n openSet.clear();\n closedSet.clear();\n gctx.clearRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT);\n grid.createGrid();\n\n}", "function reset() \n{\n for (var i = 0; i < $cell.length; i++) \n {\n \t$cell[i].className = 'cell';\n \t$cell[i].innerHTML = '';\n }\n bombs.posX = [];\n bombs.posY = [];\n}", "function reset() {\n clear();\n initialize(gameData);\n }", "function ResetArray() {\n for (var i = 0; i < listBin.length; i++) {\n listBin[i] = \"_\";\n }\n UpdateView(listBin);\n}", "reset() {\n this._items = [];\n }", "function setPieces() {\r\n that.pieces = Array();\r\n for (var i in board.pieces) {\r\n var piece = board.pieces[i];\r\n updateSelectionState(piece);\r\n if (piece.selected)\r\n that.pieces.push(piece);\r\n }\r\n }", "function resetBoard() {\n\tgame.score = 0;\n\tgame.dot.exists = false;\n\tworms = new Array();\n\n\tfor (var i = 0; i < game.players; i++) {\n\t\tworms.push(new Object());\n\t\tworms[i].direction = \"none\";\n\t\tworms[i].previousCells = new Array();\n\t\tworms[i].length = 1;\n\t\tworms[i].movedThisTurn = false; \n\t\tworms[i].cachedMove = 'none';\n\t\tworms[i].maxSize = 100;\n\n\t\tgame.dots = new Array();\n\t\tgame.foodOut = false;\n\t\t\n\t\tworms[i].position = new Object();\n\t\tworms[i].position.x = 1 + Math.floor(Math.random()*(game.grid.width/game.grid.size - 2));\n\t\tworms[i].position.y = 1 + Math.floor(Math.random()*(game.grid.height/game.grid.size - 2));\n\t}\t\n}", "function reset() {\n if (ref_div_main.children.length != 0) {\n for (let i = 0; i < (cant_bloques); i++) {\n ref_div_main.children[0].remove()\n }\n }\n blocksPositions = {}\n objArray = []\n first_row_index = []\n last_row_index = []\n ref_div_main.style.display = 'none'\n}", "function reset() {\n tickCount = 0;\n hearts = 3;\n multiplier = 1;\n streakCounter = 0;\n heart1x = 9;\n heart2x = 16;\n heart3x = 23;\n\n remove(noteArray, (n) => { //Delete all the old notes before the new game starts\n return true;\n });\n}", "reset() {\n this.grid = this.getEmptyBoard();\n }", "function resetArray()\n{\n while (canvasObjs.length > 0)\n {\n canvasObjs.pop();\n }\n\n Game.counter = 0;\n}", "reset(){\n this.playing = false;\n this.die = 0;\n this.players[0].spot = 0;\n this.players[1].spot = 0;\n this.currentTurn.winner = false;\n this.currentSpot = null;\n this.spot = null;\n this.currentTurn = this.players[0];\n \n }", "function resetPuzzlePieces ()\n {\n let puzzlePlain = document.querySelector(\".puzzle-pieces\");\n for (let zone of dropZones) {\n console.log(zone.firstChild);\n if(zone.firstChild){\n puzzlePlain.appendChild(zone.firstChild);\n }\n audio.pause();\n }\n }", "resetPlays(){\n this.playsValues = [];\n this.playsCoords = [];\n }", "function reset(){\n forStorage = []\n temp = null\n}", "function resetArray(){\n for(let i in ar){\n arORD[i] = ar[i];\n updateCanvas(-1);\n }\n}", "reset() {\n this.tiles = this.shuffle(this.getBase());\n this.deadSize = 16;\n this.dead = false;\n this.remaining = this.tiles.length - this.dead;\n\n // if there's a wall hack active, throw away what\n // we just did and use the hacked wall instead.\n if (config.WALL_HACK) {\n WallHack.set(this, WallHack.hacks[config.WALL_HACK]);\n }\n }", "refresh() {\n this._resolveDimensions();\n const pieces = this.pieces;\n for (let piece of pieces) {\n piece.refresh();\n }\n }", "reset() {\n this.grid = this.getEmptyBoard();\n }", "function resetArray(boxesArray) \t{\n\tboxesArray.length=0;\n}", "function clearArray() {\n openCards.splice(0, 2);\n openClass.splice(0, 2);\n}", "function resetChess() {\n\tdraw_array=[];\n}", "reset() {\n\t\tthis.items.length = 0;\n\t}", "resetGame() {\r\n this.scrollingBG.tilePosition = ({x: 0, y: 0});\r\n this.distance = BOUND_LEFT;\r\n this.completed = 0;\r\n this.gameActive = true;\r\n\r\n // Reset the houses\r\n this.houses.removeChildren();\r\n this.houseArray = [];\r\n this.addHouses(this.goal);\r\n }", "function resetCardHolders() {\n firstCard = null;\n firstCardIndex = null;\n secondCard = null;\n secondCardIndex = null;\n disabled = false;\n}", "function resetAll(){\n\t\t lastNumber = 0;\n\t\t screenNum=\"\";\n\t\t cont = true;\n\t\t numbers = [];\n\t\t symbols = [];\n\t\t mixArray = [];\n\t\t i = 0;\n\t\t tmp = \"\";\n\t\t dotCounter = 0;\n\t}", "reset () {\n this.chessGame.reset()\n this.syncBoard()\n }", "function playerReset(){\n\tfor (i=0; i<allplayers.length; i++){\n\t\tfor (hand in allplayers[i].hands){\n\t\t\tif (hand == 'HC') allplayers[i].hands[hand] = true;\n\t\t\telse allplayers[i].hands[hand] = false;\n\t\t}\n\t\tfor (suit in allplayers[i].suits){\n\t\t\tallplayers[i].suits[suit] = 0;\n\t\t}\n\t\tfor (rank in allplayers[i].ranks){\n\t\t\tallplayers[i].ranks[rank] = 0;\n\t\t}\n\t\tallplayers[i].hand = [];\n\t\tallplayers[i].pacounter = 0;\n\t\tallplayers[i].tkcounter = 0;\n\t\tallplayers[i].straight = [];\n\t\tallplayers[i].flush = \"\";\n\t}\n}", "reset(){\n // console.log(\"Resetting cards..\");\n // for (let i=1, 1 < 53; i++){\n // this.cards.push(i);\n // }\n // console.log(\"done\");\n // return;\n for (const suit of this.suits){\n for (const value of this.values){\n this.cards.push(new Card(suit, value));\n }\n }\n console.log(this.cards);\n }", "_reset_poke() {\n\t\tthis.level = 1\n\t\tthis.moves = []\n\t}", "function resetGame() {\n game.lives = 1;\n game.score = 0;\n game.blockCount = ROWS*COLS;\n \n //remove everything\n scene.remove(baseBlock.mesh);\n scene.remove(ball.mesh);\n for (var i = 0; i < ROWS; i++)\n\t for (var j = 0; j < COLS; j++)\n\t scene.remove(blocks[i][j].object);\n //anddddd then reinitialize it all, i tried to just reinitialize and not remove and had some issues\n initGame();\n}", "_reset() {\n this._res = [];\n this._parents = [{\n type: c.PARENT.ARRAY,\n length: -1,\n ref: this._res,\n values: 0,\n tmpKey: null\n }];\n }", "function reset() {\n allEnemies = [];\n player = null;\n allEnemies = [new Enemy(60), new Enemy(140), new Enemy(230)];\n player = new Player(200, 400);\n playerYValues = [];\n\n }", "reset() {\n document.getElementById(\"block-container\").innerHTML = null;\n this.index = 0;\n this.lookUp = {};\n this.initCellMaps();\n }", "reset() {\n // this.scene = scene;\n this.tmpPiece = 0;\n this.pickedPiece = 0;\n this.colours = ['white', 'black'];\n this.init_board = INITIAL_BOARD;\n this.animationCounter = 0;\n this.board = [];\n this.gameStart = 0;\n this.gameStart2 = 0;\n this.running = true;\n this.gameOver = false;\n this.computer_playing = false;\n this.currentColour = this.colours[0];\n this.otherColour = (this.currentColour == this.colours[0] ? this.colours[1] : this.colours[0]) || this.colours[1];\n this.timeleft = 0;\n this.score1 = SCORE_1;\n this.score2 = SCORE_2;\n this.validReply = false;\n this.winner = null;\n this.gameMode = DEFAULT_MODE;\n this.gameLevel = DEFAULT_LEVEL;;\n this.piece2Move = null;\n this.moveWhere2 = null;\n this.state = STATES.WAITING;\n //this.pieces = Array.from({ length: this.init_board.length }, (v, k) => k + 1);\n this.pieces = []; //use coords from the piece(id) object\n //For undo and Film\n this.Undo = [];\n this.PastTabuleiros = [];\n this.PastScore1 = [];\n this.PastScore2 = [];\n\n this.saveArray = [this.board, this.currentColour];\n // this.movie = false;\n this.movieIndex = 0;\n // this.movieArray = [];\n this.lastMovie = 0;\n this.displayMovie = false;\n this.start(this.gameMode, this.gameLevel);\n }", "function resetTiles(){\n//\tprint(tilesChanged);\n\tchecking = false;\n\ttempScore = 0;\n\tfor(let i = 0;i < tilesChanged.length; i++){\n//\t\tprint(tiles[tilesChanged[i]].letter);\n\t\ttiles[tilesChanged[i]].letter = null;\n\t}\t\n\ttilesChanged = [];\n\tlettersUsed = [];\n\tendTurnButton.show();\n\t//print(tilesChanged);\n}", "_reset () {\n this._res = []\n this._parents = [{\n type: c.PARENT.ARRAY,\n length: -1,\n ref: this._res,\n values: 0,\n tmpKey: null\n }]\n }", "_reset () {\n this._res = []\n this._parents = [{\n type: c.PARENT.ARRAY,\n length: -1,\n ref: this._res,\n values: 0,\n tmpKey: null\n }]\n }", "_reset () {\n this._res = []\n this._parents = [{\n type: c.PARENT.ARRAY,\n length: -1,\n ref: this._res,\n values: 0,\n tmpKey: null\n }]\n }", "function resetScores(){\n scores.redPieceCount = 12;\n scores.blackPieceCount = 12\n scores.blackPiecesTaken = 0;\n scores.redPiecesTaken = 0;\n scores.winner = null;\n}", "function reset() {\n [hasFlipped, lockBoard] = [false, false];\n [firstCard, secondCard] = [null, null];\n}", "function reset(){\n sendObj.Player = null;\n sendObj.Board = [[\"white\", \"white\",\"white\"], [\"white\", \"white\",\"white\"], [\"white\", \"white\",\"white\"]];\n sendObj.info = \"\";\n Players = [];\n turn = 0;\n sendObj.movingString.visible = false;\n sendObj.movingString.word = \"\";\n}", "function resetBalls() {\r\n positionArray = [];\r\n velocityArray = [];\r\n radiusArray = [];\r\n colorArray = [];\r\n}", "function resetGame() {\n boardSquares.forEach((square)=> {\n square.reset()\n });\n}", "function resetCards() {\n\n\t[firstCard, secondCard] = [null, null];\n}", "static resetStepArray() {\n steps.length = 0;\n count = 0;\n }", "function resetGame() {\n newSquares = Array(9).fill(null);\n setSquares(newSquares);\n setXTurn(true);\n }", "reset() {\n this.cards = [];\n //create a deck of cards in ascending order\n for (let i = 0; i < 52; i++) {\n this.cards[i] = new Card(Math.floor(i / 13), i % 13, this.pos.x, this.pos.y, true);\n }\n // use the shuffle function to shuffle the cards.\n // p5.js has an Array.shuffle() function that could replace this.\n this.shuffle();\n console.log(\"Deck reset\");\n }", "function resetGame() {\n boardSquares.forEach((square)=> {\n square.reset();\n });\n}", "function resetBoard() {\n\t\tboard = new Array(9);\n\t}", "function resetRoom() {\n discs = [];\n playerId = undefined;\n turn = undefined;\n winnerId = undefined;\n gamesWon = 0;\n gamesPlayed = 0;\n roomId = undefined;\n}", "function resetDroppableBox() {\r\n for (let i = 0; i < idArray.length; i++) {\r\n wordObjects[idArray[i]].reset();\r\n // the project resets\r\n idArray = [];\r\n outputArray = [];\r\n $droppableBox.empty();\r\n }\r\n}", "reset () {\n if (typeof CKEDITOR != 'undefined') {\n for (let editor in CKEDITOR.instances) {\n CKEDITOR.instances[editor].setData( '', function() { this.updateElement() })\n }\n }\n\n let clone = Object.assign({}, this.originalData)\n\n for (let field in clone) {\n let value = clone[field]\n\n if ((typeof value === \"object\" || typeof value === 'function') && (value !== null)) {\n value = {}\n }\n\n if (Array.isArray(value)) {\n value = []\n }\n\n this[field] = value\n }\n\n this.errors.clear()\n }", "reset(shuffle = true){\n this.cards = [];\n for (var i = 0; i <= 12; i++) {\n for (var j = 0; j <= 3; j++) {\n let card = new Card(values[i], suits[j]);\n this.cards.push(card);\n }\n }\n if (shuffle){ this.shuffle(); }\n this.dealtIndex = 0;\n }", "resetBoard(){\r\n //location pacman is reset to\r\n this.pos = createVector(13*16+8, 23*16+8); \r\n //resets all of the ghosts\r\n this.blinky = new Blinky();\r\n this.clyde = new Clyde();\r\n this.pinky = new Pinky();\r\n this.inky = new Inky();\r\n //resets pacmans velocity\r\n this.vel = createVector(-1, 0);\r\n this.goTo = createVector(-1,0);\r\n }", "reset(event) {\n\n var client = event.data.client\n\n $(client.cardId).empty();\n client.items.board = Array()\n client.items.selected = Array()\n\n // Bingo row, column, and diagonal indexes\n client.items.bingoRow = Array()\n client.items.bingoCol = Array()\n client.items.bingoDiag = Array()\n client.items.all = client.shuffle(client.items.all)\n client.resetCounters()\n client.update()\n\n }", "function resetPage() {\n cards.push(...pickedCards);\n for (let i = 0; i < pickedCards.length; i++) {\n pickedCards.splice(i, pickedCards.length);\n }\n $(\"img\").remove();\n $(\"#hangman\").css(\"display\", \"none\");\n console.log(cards);\n console.log(pickedCards);\n}", "reset() {\n // Initial values\n this._data = new WordArray();\n this._nDataBytes = 0;\n }", "function resetAll() {\n flippedCards = [];\n matchedCards = [];\n timerOff = true;\n stopTime();\n clearTime();\n resetCards();\n resetMoves();\n resetStars();\n}", "function clearPieces(killList) {\n console.log(\"We killed and are clearing pieces\");\n for (i = 0; i < killList.length; i++) {\n var x = killList[i].x;\n var y = killList[i].y;\n \n pieces[x][y] = null;\n context.fillStyle = \"#FFF\";\n context.beginPath();\n context.arc(x*SPACE, y*SPACE, 5, 0, 2 * Math.PI, false);\n context.fill();\n }\n}", "function resetAll() {\n playerMoney = 1000;\n winnings = 0;\n jackpot = 5000;\n turn = 0;\n playerBet = 0;\n winNumber = 0;\n lossNumber = 0;\n winRatio = 0;\n updateBet();\n updateCredits();\n updateJackpot();\n updatePayout();\n for (var index = 0; index < 3; index++) {\n reelContainers[index].removeAllChildren();\n }\n\n}", "function resetGameBoard() {\n for (var id in cars) {\n cars[id].destroy();\n }\n cars = {};\n dests = {};\n locations = {};\n\n var shape_graphics = [];\n\n configAndStart();\n}", "function reset(player) {\n const pieces = 'TJLOSZI';\n player.matrix = createPiece(pieces[pieces.length * Math.random() | 0]);\n player.pos.y = 0;\n player.pos.x = (player.arena[0].length / 2 | 0) - (player.matrix[0].length / 2 | 0);\n\n //when game ends\n if (collide(player)) {\n player.arena.forEach(row => row.fill(0));\n }\n}", "reset() {\n this.items = [];\n }", "function player_reset() {\n const pieces = 'ILJOTSZ';\n player.matrix = create_piece(pieces[pieces.length * Math.random() | 0]);\n player.pos.y = 0;\n player.pos.x = (arena[0].length / 2 | 0) - (player.matrix[0].length / 2 | 0);\n if (collide(arena, player)) {\n arena.forEach(row => row.fill(0));\n player.score = 0;\n update_score();\n }\n}", "reset() {\n\t\t// Keys\n\t\tthis.keys \t\t= {};\n\n\t\t// State\n\t\tthis.state \t\t= \"\";\n\n\t\t// Score\n\t\tthis.score \t\t= 0;\n\n\t\t// Health\n\t\tthis.health \t= 100;\n\t}", "function reset(){\n xGridAmount = 10;\n yGridAmount = 26;\n spawnPos = 0;\n\n playing = true;\n\n if(artAgent == false){\n timeStep = 0.3;\n }\n else{\n timeStep = 0.005;\n }\n previousTime = 0;\n time = 0;\n incrementing = false;\n\n hardPlacement = false;\n\n level = 1;\n score = 0;\n lineCounter = 0;\n\n gridCellX.length = 0;\n gridCellY.length = 0;\n\n gridCellOccupied.length = 0;\n shape.length = 0;\n ghostShape.length = 0;\n nextShape = null;\n BlockShapePosX.length = 0;\n BlockShapePosY.length = 0;\n lowestX = 0;\n highestX = 0;\n lowestY = 0;\n highestY = 0;\n\n BlockGridPosX.length = 0;\n BlockGridPosY.length = 0;\n surfaceBlock.length = 0;\n\n currentX = 0;\n currentY = -2;\n currentChangeX = 0;\n ghostCurrentY = yGridAmount - 1;\n\n particles.length = 0;\n}", "inspectionReset () {\n this.destroyPiles(fgmState.pilesInspection);\n fgmState.pilesInspection = [];\n }", "reset()\n {\n for(var i = 0; i < this.trucks.length; i++)\n {\n gameNs.game.collisionManager.removePolygonCollider(this.trucks[i].collider);\n gameNs.game.collisionManager.removePolygonCollider(this.trucks[i].colliderBigLeft);\n gameNs.game.collisionManager.removePolygonCollider(this.trucks[i].colliderBigRight);\n\n }\n this.trucks = [];\n for(var i = 0; i < this.motorcycles.length; i++)\n {\n gameNs.game.collisionManager.removePolygonCollider(this.motorcycles[i].collider);\n gameNs.game.collisionManager.removePolygonCollider(this.motorcycles[i].colliderBigLeft);\n gameNs.game.collisionManager.removePolygonCollider(this.motorcycles[i].colliderBigRight);\n\n }\n this.motorcycles = [];\n for(var i = 0; i < this.spikeCars.length; i++)\n {\n gameNs.game.collisionManager.removePolygonCollider(this.spikeCars[i].colliderSpikeLeft);\n gameNs.game.collisionManager.removePolygonCollider(this.spikeCars[i].colliderSpikeRight);\n gameNs.game.collisionManager.removePolygonCollider(this.spikeCars[i].collider);\n gameNs.game.collisionManager.removePolygonCollider(this.spikeCars[i].colliderBigRight);\n gameNs.game.collisionManager.removePolygonCollider(this.spikeCars[i].colliderBigLeft);\n\n }\n this.spikeCars = [];\n if(this.helicopter.length === 1)\n {\n gameNs.game.collisionManager.removePolygonCollider(this.helicopter[0].collider);\n this.helicopter = [];\n }\n this.helicopterSpawnTicks = 0;\n for(var i = 0; i < this.powerTrucks.length; i++)\n {\n gameNs.game.collisionManager.removePolygonCollider(this.powerTrucks[i].collider);\n gameNs.game.collisionManager.removePolygonCollider(this.powerTrucks[i].colliderBigLeft);\n gameNs.game.collisionManager.removePolygonCollider(this.powerTrucks[i].colliderBigRight);\n gameNs.game.collisionManager.removePolygonCollider(this.powerTrucks[i].colliderTruck);\n }\n this.powerTrucks = [];\n for(var i = 0; i < this.respawnTrucks.length; i++)\n {\n gameNs.game.collisionManager.removePolygonCollider(this.respawnTrucks[i].collider);\n gameNs.game.collisionManager.removePolygonCollider(this.respawnTrucks[i].truckBig);\n }\n this.respawnTrucks = [];\n this.respawnTrucks.push(new RespawnTruck(400,1000));\n }", "function reset() {\n\t// Generate color palette\n\tcolorPalette = new Array(codeComplexity).fill().map((_, i) => {\n\t\treturn `hsl(${Math.floor(i/codeComplexity*360)}, 90%, 60%)`\n\t})\n\n\t// User slot tracker\n\tselectedSlotIndex = 0\n\tselectedPieceIndex = 0\n\n\t// Code generation\n\tguess = new Array(codeLength).fill(null)\n\tcode = new Array(codeLength).fill(null).map(() => Math.floor(Math.random() * codeComplexity))\n\tconsole.log(code)\n\n\t// Reset the UI\n\tinitUI(codeLength, codeComplexity, slotCount, colorPalette)\n\t\n\t// DOM objects\n\tboard = new Array(slotCount).fill().map((_, i) => {\n\t\tconst slot = document.getElementsByClassName('slot')[slotCount-1-i]\n\t\treturn slot.getElementsByClassName('piece')\n\t})\n\n\tpegs = new Array(slotCount).fill().map((_, i) => {\n\t\tconst pegz = document.getElementsByClassName('pegs')[slotCount-1-i]\n\t\treturn pegz.getElementsByClassName('peg')\n\t})\n\n\tactivatePiece(selectedSlotIndex, selectedPieceIndex)\n}", "function reset()\n {\n _pos = {};\n _first = false;\n _fingers = 0;\n _distance = 0;\n _angle = 0;\n _gesture = null;\n }", "removeAll() {\n\t\tfor (const key of Object.keys(this.cards)) { this.cards[key].df = null; }\n\t\tthis.cards = {}; this.multiple = []; this.ctrlDelete = []; this.tabs = null;\n }", "_reset() {\n\n this.enemiesCurrentlyOnscreen = 0;\n this.enemiesLeftToSpawn = this.enemyList.total;\n this.spawnTimer = this.startWait;\n\n }", "function resetEverything() {\n coords = [];\n cellMap = new Map();\n showMaze = false;\n showSoln = false;\n solnSet = [];\n countMoves = 0;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n user = new User();\n}", "function resetGame(){\n player.reset();\n allEnemies = []; \n fred.delete();\n jill.delete();\n}" ]
[ "0.7658752", "0.76202255", "0.73145896", "0.7215553", "0.7098666", "0.70202386", "0.70109636", "0.6971597", "0.6953982", "0.6937595", "0.69083756", "0.6888775", "0.68325686", "0.6800275", "0.67999375", "0.6798311", "0.67948186", "0.67726445", "0.6764131", "0.6685815", "0.6682264", "0.6657948", "0.66479933", "0.6644774", "0.6642614", "0.6638345", "0.66379595", "0.6625525", "0.66056854", "0.66031384", "0.65969217", "0.65946865", "0.65820104", "0.6578009", "0.6549703", "0.65435094", "0.65405834", "0.6536454", "0.65357524", "0.6529209", "0.6528356", "0.6519895", "0.65185475", "0.65098387", "0.650761", "0.6502007", "0.6500967", "0.6500952", "0.64970046", "0.64887255", "0.64873964", "0.6486506", "0.6480971", "0.6474288", "0.64734435", "0.6471211", "0.64529794", "0.6451327", "0.6451036", "0.64509755", "0.6431299", "0.6430561", "0.64294976", "0.64294976", "0.64294976", "0.6428058", "0.64144033", "0.6406736", "0.6404177", "0.64036924", "0.6400194", "0.6394861", "0.6388029", "0.6386673", "0.6386412", "0.63801193", "0.63737595", "0.6372609", "0.6368814", "0.63673925", "0.63629425", "0.63625973", "0.63552094", "0.6352609", "0.63518554", "0.63475573", "0.6343848", "0.6335864", "0.6335371", "0.633467", "0.6331968", "0.63293374", "0.6327218", "0.63192666", "0.6318563", "0.63048023", "0.6302337", "0.62979716", "0.6295223", "0.62854135", "0.6284518" ]
0.0
-1
Go through the Table with the Scrabble board and fill in special spaces. This Stackoverflow post was handy: URL:
function fill_in_table() { var row = 0; var col = 0; // CURRENTLY USING BACKGROUND IMAGES FOR THE SPECIAL SPACES. $('#scrabble_board tr').each(function() { col = 0; /** * Note, here "$(this)" refers to the given cell we are looking at currently. * This code goes through ALL cells in order, so that we can apply some properties to certain cells. */ $(this).find('td').each(function() { // Add a unique id consisting of row#col# to the cell, where "row#" is the row number // and "col#" is the column number. Ex: row0col0 is the top left most cell in the table. // Helpful link: https://stackoverflow.com/questions/2176986/jquery-add-id-instead-of-class $(this).attr('id', 'row' + row + '_' + 'col' + col); col++; }); row++; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function llenarTablero() {\n\tfillBoard();\n}", "function displayChessboard() {\n var rows = [];\n for (var i = 0; i < 5; i++) {\n var row = [];\n for (var j = 0; j < 5; j++) {\n if ((j + i) % 2 == 0) row.push(new TextCell('##'));\n else row.push(new TextCell(' '));\n }\n rows.push(row);\n }\n console.log(drawTable(rows));\n}", "function GenerateBoard() {\r\n var table = \"\"; // create variable with empty string\r\n $(\"#game_board\").html(table); // update the board with empty string\r\n table += '<table id=\"tbBoard\">';\r\n table += '<tr><td class=\"TxWord NWord 1\"></td>'; // TxWord = x3 word and NWord = normal\r\n table += '<td class=\"NWord 2\"></td>';\r\n table += '<td class=\"DxLetter NWord 3\"></td>'; // DxLetter = x2 letter\r\n table += '<td class=\"NWord 4\"></td>';\r\n table += '<td class=\"DxWord NWord 5\"></td>'; // DxWord = x2 word\r\n table += '<td class=\"NWord 6\"></td>';\r\n table += '<td class=\"TxLetter NWord 7\"></td>'; // TxLetter = x3 letter\r\n table += '<td class=\"NWord 8\"></td>';\r\n table += '<td class=\"NWord 9\"></td>';\r\n table += '<td class=\"DxLetter NWord 10\"></td>';\r\n table += '<td class=\"NWord 11\"></td>';\r\n table += '<td class=\"DxLetter NWord 12\"></td>'; // DxLetter = x2 letter\r\n table += '<td class=\"NWord 13\"></td>';\r\n table += '<td class=\"NWord 14\"></td>';\r\n table += '<td class=\"TxWord NWord 15\"></td><tr>'; // TxWord = x3 word\r\n table += '</table>';\r\n $(\"#game_board\").html(table); // update the board with updated string\r\n table = \"\"; // reset the table variable\r\n}", "function setupBoard() {\n var i = 0;\n while (i < rows) {\n boardTable[i] = [columns];\n boardNextTable[i] = [columns];\n i++;\n }\n}", "function table_fill_empty() {\n pagination_reset();\n $('.crash-table tbody').html(`\n <tr>\n <th>-</th>\n <td>-</td>\n <td>-</td>\n <td>-</td>\n </tr>`);\n}", "function drawBoard() {\n var s = '<table class=\"table\">\\n';\n\n for (var i = 0; i < 9; ++i) {\n s += '<tr>';\n for (var j = 0; j < 9; ++j) {\n var c = 'cell';\n if ((i + 1) % 3 == 0 && j % 3 == 0) {\n c = 'cell3';\n } else if ((i + 1) % 3 == 0) {\n c = 'cell1';\n } else if (j % 3 == 0) {\n c = 'cell2';\n }\n s += '<td class=\"' + c + '\"><input class=\"input\" onkeypress=\"return isNumberKey(event)\" type=\"text\" size=\"1\" maxlength=\"1\" id=\"cell' + (i * 9 + j) + '\"></td>';\n }\n s += '</tr>\\n';\n }\n \n s += '</table>';\n document.getElementById('9x9').innerHTML = s;\n initCells('009600103146039807500108006300251078005300902628900005987060031000812009201003084');\n }", "function fillArrays() {\n for (i=1; i<23; i++) {\n leftCol.push($('td')\n .eq((i*3)).contents().text().trim()\n .replace('\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n \\n\\t\\t\\t\\t\\t\\t\\n ',' // ')\n .replace('\\n\\t\\t\\t\\t\\t\\t',' // ')\n .replace('\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n \\n \\n \\t',' // ')\n .replace('\\n\\t\\t\\t\\t \\t ',' // ')\n .replace('\\n\\t\\t\\t\\t\\t\\t',' // ')\n .replace('\\n \\n \\n\\t\\t\\t\\t\\t\\t\\n ',' // ')\n );\n }\n for (i=1; i<23; i++) {\n address.push($('td').eq((i*3)).contents()\n .filter(function() {\n return this.nodeType == 3;\n })\n .eq(2).text().trim()\n .replace(/\\t/g,'')\n .replace(/\\n/g,'')\n .replace(/,/g,'')\n );\n }\n for (i=1; i<23; i++) {\n details.push($('td')\n .eq((i*3)+1).contents().text().trim()\n .replace('Sober\\n\\t\\t\\t \\t\\t\\t\\n \\t\\n \\t\\n\\t\\t\\t\\t \\t ','Sober \\n\\t\\t\\t \\t\\t\\t\\n \\t\\n \\t\\n\\t\\t\\t\\t \\t ')\n .replace('Bisexual\\n\\t\\t\\t \\t\\t\\t\\n \\t\\n \\t\\n\\t\\t\\t\\t \\t ','Bisexual \\n\\t\\t\\t \\t\\t\\t\\n \\t\\n \\t\\n\\t\\t\\t\\t \\t ')\n .split(' \\n\\t\\t\\t \\t\\t\\t\\n \\t\\n \\t\\n\\t\\t\\t\\t \\t ')\n );\n }\n}", "function fillMappingTable(mappingTable) {\n mappingTable[5] = 'sad'\n}", "function doBattlesList() {\r\n\tvar allElements;\r\n\tallElements = document.getElementById('contentRow').children[1];\r\n\t\r\n\tvar tmp;\r\n\ttmp = allElements.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Battles)/,\"Sava\\u015flar\");\r\n\t\r\n\ttmp = allElements.children[1];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Country)/,\"\\u00dclke\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Sorting:)/,\"S\\u0131ralama:\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Only subsidized Battles:)/,\"Sadece paral\\u0131 sava\\u015flar:\");\r\n\t\r\n\treplaceInputByValue({\"Show battles\":[\"Show battles\",\"Sava\\u015flar\\u0131 g\\u00f6ster\"]});\r\n\t\r\n tmp = allElements.children[4].children[0].children[0]\r\n var loopz = tmp.children.length\r\n for (i = 1; i < loopz; i++) {\r\n obj = tmp.children[i].children[3];\r\n replaceBattleTime(obj);\r\n }\r\n\t\r\n\tallElements = document.getElementById('battlesTable');\r\n\ttmp = allElements.children[0].children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Battle start)/,\"Sava\\u015f ba\\u015flang\\u0131c\\u0131\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Battle)/,\"Sava\\u015f\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(defender vs attacker)/,\"savunan vs sald\\u0131ran\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Score)/,\"Skor\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Total damage done)/,\"Yap\\u0131lan toplam hasar\");\r\n\t\r\n\t\r\n\r\n\treplaceAlliesLink();\r\n\treplaceAlliesLink2();\r\n\treplaceAlliesLinksss();\r\n\t\r\n}", "function updateBoardView() {\n // at first, clean the table\n $(\"td\").empty();\n // then append numbers to their conrespondding positions\n for (var i = 0; i < 4; i++) {\n for (var j = 0; j < 4; j++) {\n if (all_numbers[i][j]) {\n showTile(i, j, all_numbers[i][j]);\n }\n has_merged[i][j] = false;\n }\n }\n}", "function update_table(data) {\n data = JSON.parse(data);\n let row = \"row-\";\n for(let i = 0; i < 10; i++) {\n for(let j = 0; j < 3; j++) {\n if(j === 0) {\n document.getElementById(row+i).getElementsByTagName('div')[j]\n .getElementsByTagName('a')[j].setAttribute(\"href\", \"\");\n document.getElementById(row+i).getElementsByTagName('div')[j]\n .getElementsByTagName('a')[j].textContent = \"\";\n }\n else {\n document.getElementById(row+i).getElementsByTagName('div')[j].textContent = \"\";\n }\n }\n }\n for(let i = 0; i < Math.min(10, ROW_COUNT - current_offset); i++) {\n for(let j = 0; j < 3; j++) {\n if(j === 0) {\n document.getElementById(row+i).getElementsByTagName('div')[j]\n .getElementsByTagName('a')[j].setAttribute(\"href\", \"#/info/\"+data[i][j]);\n document.getElementById(row+i).getElementsByTagName('div')[j]\n .getElementsByTagName('a')[j].textContent = data[i][j];\n }\n else {\n document.getElementById(row+i).getElementsByTagName('div')[j].textContent = data[i][j];\n }\n }\n }\n}", "function printSudokuTableToPage() {\r\n\r\n for (let i = 0; i < gameTable.length; i++) {\r\n for (let j = 0; j < gameTable.length; j++) {\r\n if (gameTable[i][j] != '') {\r\n document.getElementById(`cell${i}${j}`).disabled = true;\r\n }\r\n else {\r\n document.getElementById(`cell${i}${j}`).style.color = 'black'; // for when pressing again button\r\n document.getElementById(`cell${i}${j}`).style.backgroundColor = 'white'; // for when pressing again button\r\n }\r\n\r\n document.getElementById(`cell${i}${j}`).value = gameTable[i][j]; // prints the value to the input cell\r\n }\r\n }\r\n}", "function makeHtmlBoard() {\n \n for(i = 0; i < WIDTH; i++) {\n const row = document.createElement('th');\n row.setAttribute('id', `${i}`)\n topLine.append(row);\n\n }\n \n for (let x = 1; x < 6; x++) {\n const tableRowCell = document.createElement('tr');\n body.append(tableRowCell);\n for (let y = 0; y < HEIGHT; y++) {\n const cell = document.createElement('td');\n cell.innerText = \"$\"+ x + '00';\n cell.setAttribute('id', `${y}-${x}`);\n tableRowCell.append(cell);\n }\n } \n }", "function createTables() {\r\n\t\r\n\tvar cardCount = document.getElementById('cardCount').value;\r\n\t//document.createElement('thead');\r\n\r\n\tvar gameBoard = document.getElementById('gameBoard');\r\n\t\r\n\tfor(var i = 0; i < cardCount; i+=1) {\r\n\t\tvar table = document.createElement('table');\r\n\t\tgameBoard.appendChild(table);\r\n\r\n\t\ttable.innerHTML = '<thead>\t\\\r\n\t\t\t\t\t\t<th>B</th>\t\\\r\n\t\t\t\t\t\t<th>I</th>\t\\\r\n\t\t\t\t\t\t<th>N</th>\t\\\r\n\t\t\t\t\t\t<th>G</th>\t\\\r\n\t\t\t\t\t\t<th>O</th>\t\\\r\n\t\t\t\t\t</thead>\t\\\r\n\t\t\t\t\t<tbody>\t\\\r\n\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterB\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterI\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterN\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterG\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterO\"></td>\t\\\r\n\t\t\t\t\t\t</tr>\t\\\r\n\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterB\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterI\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterN\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterG\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterO\"></td>\t\\\r\n\t\t\t\t\t\t</tr>\t\\\r\n\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterB\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterI\"></td>\t\\\r\n\t\t\t\t\t\t\t<td id=\"freeSpace\">FREE SPACE</td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterG\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterO\"></td>\t\\\r\n\t\t\t\t\t\t</tr>\t\\\r\n\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterB\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterI\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterN\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterG\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterO\"></td>\t\\\r\n\t\t\t\t\t\t</tr>\t\\\r\n\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<tr rowspan=\"4\">\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterB\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterI\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterN\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterG\"></td>\t\\\r\n\t\t\t\t\t\t\t<td class=\"letterO\"></td>\t\\\r\n\t\t\t\t\t\t</tr>\t\\\r\n\t\t\t\t\t</tbody>'\r\n\t}\r\n}", "function fillupSudoku(updatedTable,originalTable)\n{\n\tfor(var r=0;r<9;r++)\n\t{\n\t\tfor(var c=0;c<9;c++)\n\t\t{\n\t\t\tvar n=updatedTable[r][c];\n\t\t\tvar o=originalTable[r][c];\n\t\t\t\n\t\t\tif(n==o)\n\t\t\t{\n\t\t\t\tsetValue(r,c,n,\"black\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsetValue(r,c,n,\"red\");\n\t\t\t}\n\t\t}\n\t}\n}", "function fillClues(){\n if (grid != null){\n var clueNum = 0;\n tbody = grid.getElementsByTagName('tbody')[0];\n var rows = tbody.getElementsByTagName('tr');\n if (clearClues() == false){\n return false;\n }\n var acrossList = document.createElement('ul');\n acrossList.setAttribute('class', 'clueList');\n document.getElementById('across').appendChild(acrossList);\n var downList = document.createElement('ul');\n downList.setAttribute('class', 'clueList');\n document.getElementById('down').appendChild(downList);\n for (var rowNum = 0; rowNum<rows.length; rowNum++){\n var cells = rows[rowNum].getElementsByTagName('td');\n for (var colNum = 0; colNum<cells.length; colNum++){\n while (cells[colNum].firstChild){\n cells[colNum].removeChild(cells[colNum].firstChild);\n }\n cells[colNum].setAttribute('title', '');\n var horLights = numHorizontalLights(rowNum, colNum, rows[rowNum], cells[colNum]);\n var verLights = numVerticalLights(rowNum, colNum, rows[rowNum], cells[colNum]);\n if (horLights > 1 || verLights > 1){\n clueNum++;\n cells[colNum].setAttribute('title', clueNum);\n var n = document.createElement('span');\n n.setAttribute('class', 'clueNum');\n var t = document.createTextNode(clueNum);\n n.appendChild(t);\n cells[colNum].appendChild(n);\n if (horLights > 1){\n createClue(acrossList, clueNum, horLights, 'a');\n }\n if (verLights > 1){\n createClue(downList, clueNum, verLights, 'd');\n }\n }\n }\n }\n }\n document.getElementById('btnGenerateTei').style.visibility = 'visible';\n return false;\n}", "colourBoard() {\n for (let i = 0; i < this.colourMapping.length; i++) {\n var tds = this.tableEl.querySelectorAll('tr')[i].querySelectorAll('td');\n for (let j = 0; j < tds.length; j++) {\n if (this.colourMapping[i][j] == 0) {\n tds[j].className = 'blank';\n }\n }\n }\n }", "function createBoardSV(){\n brdstr = \"\"\n\n brdstr += \"<table id= 'BrdBk'>\";\n\nfor(y = 0; y < 11; y++){\n if(y == 0 || y == 10){\n brdstr += \"<tr class = 'Brdtopbottom'>\";\n }\n else{\n brdstr += \"<tr class = 'Brdspace'>\";\n }\n for(x = 0; x < 11; x++){\n if(x == 0){\n brdstr += \"<td class = 'Brdleftright'></td>\";\n }\n else if (x == 10) {\n brdstr += \"<td class = 'Brdleftright'><center>\"+RightNums[y]+\"</center></td>\";\n }\n else if (y == 0) {\n brdstr += \"<td class = 'Brdtopbottom'><center>\"+TopNums[x]+\"</center></td>\";\n }\n else if (y == 10) {\n brdstr += \"<td class = 'Brdtopbottom'></td>\";\n }\n else{\n var z = 10 - x\n brdstr += \"<td class = 'Brdspace allcell' id = B\"+z+y+\" onclick='clickAns(this.id)'></td>\";\n }\n }\n brdstr += \"</tr>\";\n}\nbrdstr += \"</table>\";\nreturn brdstr\n}", "function resetBoard() {\n var row,col;\n for(row=0; row<9; row++) {\n for(col=0; col<9; col++) {\n spaces[row*9+col].parentNode.innerHTML = '<input maxlength=\"1\">';\n }\n }\n sudoku = document.getElementById('sudoku');\n spaces = document.querySelectorAll(\"#sudoku table input\");\n }", "function doBattlesList() {\r\n\tvar allElements;\r\n\tallElements = document.getElementById('contentRow').children[1];\r\n\t\r\n\tvar tmp;\r\n\ttmp = allElements.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Battles)/,\"Csaták\");\r\n\t\r\n\ttmp = allElements.children[1];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Country)/,\"Ország\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Sorting:)/,\"Szortírozás:\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Only subsidized Battles:)/,\"Csak támogatott csaták:\");\r\n\t\r\n\treplaceInputByValue({\"Show battles\":[\"Show battles\",\"Mutasd a csatákat\"]});\r\n\t\r\n tmp = allElements.children[4].children[0].children[0]\r\n var loopz = tmp.children.length\r\n for (i = 1; i < loopz; i++) {\r\n obj = tmp.children[i].children[3];\r\n replaceBattleTime(obj);\r\n }\r\n\t\r\n\tallElements = document.getElementById('battlesTable');\r\n\ttmp = allElements.children[0].children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Battle start)/,\"Csata kezdés\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Battle)/,\"Csata\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(defender vs attacker)/,\"Védekező vs Támadó\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Score)/,\"Pont\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Total damage done)/,\"Összes sebzés\");\r\n\t\r\n\t\r\n\r\n\treplaceAlliesLink();\r\n\treplaceAlliesLink2();\r\n\treplaceAlliesLinksss();\r\n\t\r\n}", "function AddBlank(table){\n for(i = 0; i < 100; i++){\n AddRow(BLANK, \"\", \"\", table);\n }\n return true;\n}", "function printScoreboard(sb){\n var table = document.getElementById(\"scoreboard_table\");\n while (table.childNodes.length > 0) {\n table.removeChild(table.childNodes[0]);\n }\n \n var headers = [\"Inst\", \"Dest\", \"Src\", \"Trgt\", \"Issue\",\n \"Exec\", \"WB\", \"Commit\"];\n var row = document.createElement(\"tr\");\n for (var h in headers){\n var header = document.createElement(\"th\");\n header.innerHTML=headers[h];\n row.appendChild(header);\n }\n table.appendChild(row);\n for (var inst = 0; inst < sb.length; inst++){\n row = document.createElement(\"tr\");\n headers.forEach(function(header){\n var col = document.createElement(\"td\");\n if (sb[inst][header.toLowerCase()] !== null)\n col.innerHTML=sb[inst][header.toLowerCase()];\n else\n col.innerHTML='N/A';\n row.appendChild(col);\n });\n table.appendChild(row);\n }\n}", "function fillBoard() {\n for (row=0; row < 3; row++) {\n for (column=0; column < 3; column++) {\n if (gameboard[row][column].textContent == \"\") {\n gameboard[row][column].textContent = \" \";\n }\n }\n }\n}", "function fillCells(){\n \n for (var i = 1; i < totalCells+1; i++) {\n \tvar value = randProv[i - 1];\n var currentCell = document.getElementById(i);\n //for an emppty cell\n if (value.length == 0 || value == ' '){\n \tcurrentCell.style.backgroundColor = \"black\";\n if(value== ' ')\n provLength--;\n }\n else {\n if(giveUp==1){\n currentCell.innerHTML =value;\n }\n else{\n currentCell.innerHTML = ' ';\n }\n \n currentCell.style.backgroundColor = \"#0000FF\";\n }\n }\n \n}", "function PopulateBoard() {\n var Tile = document.getElementsByClassName(\"TileValue\"),\n Point = document.getElementsByClassName(\"TilePoint\");\n\n for (let index = 0; index < 16; index++) {\n GenerateBoard();\n Tile[index].innerText = WordArray[index];\n Point[index].innerText = PointArray[index];\n }\n vowel = 0;\n duplicate = 0;\n}", "function populateBoard() {\n let newArr = Array(64).fill(null);\n let len = 64;\n let i = 0;\n for (i = 0; i < len; ++i){\n // White\n if(i == 0 || i == 7){\n newArr[i] = 'white/rook' // Position Rook\n }\n if(i == 1 || i == 6){\n newArr[i] = 'white/knight' // Position Knight(Horse; to avoid confusion)\n }\n if(i == 2 || i == 5){\n newArr[i] = 'white/bishop' // Position Bishop\n }\n if(8 <= i && i <= 15){\n newArr[i] = 'white/pawn' // Position Pawn\n }\n if(i == 4){\n newArr[i] = 'white/queen' // Position Queen\n }\n if(i == 3){\n newArr[i] = 'white/king' // Position King\n }\n\n // Black\n if(i == 56 || i == 63){\n newArr[i] = 'black/rook' // Position Rook\n }\n if(i == 57 || i == 62){\n newArr[i] = 'black/knight' // Position Knight(Horse; to avoid confusion)\n }\n if(i == 58 || i == 61){\n newArr[i] = 'black/bishop' // Position Bishop\n }\n if(48 <= i && i <= 55){\n newArr[i] = 'black/pawn' // Position Pawn\n }\n if(i == 59){\n newArr[i] = 'black/queen' // Position Queen\n }\n if(i == 60){\n newArr[i] = 'black/king' // Position King\n }\n }\n return newArr;\n}", "function createBoardGV(){\n brdstr = \"\"\n\n brdstr += \"<table id= 'BrdBk'>\";\n \n for(y = 0; y < 11; y++){\n if(y == 0 || y == 10){\n brdstr += \"<tr class = 'Brdtopbottom'>\";\n }\n else{\n brdstr += \"<tr class = 'Brdspace'>\";\n }\n for(x = 0; x < 11; x++){\n if(x == 0){\n brdstr += \"<td class = 'Brdleftright'><center>\"+RightNums[10-y]+\"</center></td>\";\n }\n else if (x == 10) {\n brdstr += \"<td class = 'Brdleftright'></td>\";\n }\n else if (y == 0) {\n brdstr += \"<td class = 'Brdtopbottom'></td>\";\n }\n else if (y == 10) {\n brdstr += \"<td class = 'Brdtopbottom'><center>\"+TopNums[10-x]+\"</center></td>\";\n }\n else{\n var z = 10 - y\n brdstr += \"<td class = 'Brdspace allcell' id = B\"+x+z+\" onclick='clickAns(this.id)'></td>\";\n }\n }\n brdstr += \"</tr>\";\n }\n brdstr += \"</table>\";\n return brdstr\n }", "function printScoreboard(sb){\n var table = document.getElementById(\"scoreboard_table\");\n while (table.childNodes.length > 0) {\n table.removeChild(table.childNodes[0]);\n }\n \n var headers = [\"Inst\", \"Dest\", \"Src\", \"Trgt\", \"Issue\",\n \"Read\", \"Exec\", \"WB\"];\n var row = document.createElement(\"tr\");\n for (var h in headers){\n var header = document.createElement(\"th\");\n header.innerHTML=headers[h];\n row.appendChild(header);\n }\n table.appendChild(row);\n for (var inst = 0; inst < sb.length; inst++){\n row = document.createElement(\"tr\");\n for (var element in headers){\n var col = document.createElement(\"td\");\n if (sb[inst][headers[element].toLowerCase()] !== null)\n col.innerHTML=sb[inst][headers[element].toLowerCase()];\n else\n col.innerHTML='N/A';\n row.appendChild(col);\n }\n table.appendChild(row);\n }\n}", "function resetBoard() {\n for (var i = 0; i < rows; i++) {\n for (var j = 0; j < columns; j++) {\n boardTable[i][j] = 0;\n boardNextTable[i][j] = 0;\n }\n }\n}", "function buildBoard(){\n\t/* Start to build table*/\n\tvar table = '<table>';\n\t/* Add the only row */\n\ttable += '<tr>';\n\t/* Variable to hold randomizer*/\n\tvar rand= Math.floor(Math.random() * NUM_TILES_IN_ROW);\n\tvar rand_element= Math.floor(Math.random() * 4);\n\n\t/*On the row we are trying to elumate there are 4 special spaces 4/15 */\n\tfor(var i = 0; i < NUM_TILES_IN_ROW; i++){\n\t\tvar rand= Math.floor(Math.random() * NUM_TILES_IN_ROW);\n\t\tvar rand_element= Math.floor(Math.random() * 4);\n\t\tif(rand <= 3) {/*is 0 1 2 or 3 = 4/15 */\n\t\t\tif(rand == 0){\n\t\t\t\ttable += \"<td class='dub_word tileDrop'></td>\"\n\t\t\t}\n\t\t\telse if(rand == 1){\n\t\t\t\ttable += \"<td class='dub_letter tileDrop'></td>\"\n\t\t\t}\n\t\t\telse if(rand == 2){\n\t\t\t\ttable += \"<td class= 'trip_word tileDrop'></td>\"\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttable += \"<td class= 'trip_letter tileDrop'></td>\"\n\t\t\t}\n\n\t\t}\n\t\telse{ /* Add a normal tile */\n\t\ttable += \"<td class='tileDrop'></td>\";\n\t\t}\n\t}\n\ttable += \"</tr></table>\"\n\t$(\"#board\").html(table);\n\n}", "function updategrid(){\n var count=0;\n var html=\"\";\n turnnumber=0;\n while(count<(9)){\n html += '<tr>'; \n for(var j=0;j<3;j++){\n html+='<td>' + board[count++] + '</td>';\n }\n html += '</tr>';\n };\n document.getElementById('board').innerHTML = html;\n \n var cells = document.getElementsByTagName(\"td\"); \n//generate id for each square\n for (var i = 0; i < cells.length; i++) {\n cells[i].id=i;\n }\n}", "function makeHtmlBoard () {\n // DONE TODO: get \"htmlBoard\" variable from the item in HTML w/ID of \"board\"\n //Using html DOM query selector to select html id of board\n const htmlBoard = document.querySelector ('#board');\n // DONE TODO: add comment for this code\n //creates an HTML table row (tr) element on top of board\n const top = document.createElement ('tr');\n // sets attribute id to column-top\n top.setAttribute ('id', 'column-top');\n // add eventListener & assigns a click event handler to the row when clicked\n top.addEventListener ('click', handleClick);\n // width is set to zero, iterate thru columns (td)\n for (let x = 0; x < WIDTH; x++) {\n //creates a variable called headCell that references table data (td) element\n const headCell = document.createElement ('td');\n //if id exists, update it to x else create an id with the value x\n headCell.setAttribute ('id', x);\n //adds td to board\n top.append (headCell);\n }\n\n //add tr to top of html board\n htmlBoard.append (top);\n\n //DONE TODO: add comment for this code\n //td = table data\n //tr = table row\n //set variable y to initialize 0; if y is less than height; keep iterating until false\n //set height to zero, iterate thru rows, add one until false\n for (let y = 0; y < HEIGHT; y++) {\n //create table row (tr) element for height\n const row = document.createElement ('tr');\n\n //set width to zero, iterate thru columns\n for (let x = 0; x < WIDTH; x++) {\n //create table data for WIDTH and fills it with cell elements/data?\n const cell = document.createElement ('td');\n\n //sets each (cell) td element with an id of y-x\n cell.setAttribute ('id', `${y}-${x}`);\n\n // add cell (td) to row\n row.append (cell);\n }\n\n //add (tr) row to html board\n htmlBoard.append (row);\n }\n}", "function fixTableColors() {\n // return; // temp\n let index = 0;\n $(\"#playerListTable tr\").each(function (index, element) {\n $(element).find('td.emojiContainer').html(emojiSpanByIndex(index));\n index++;\n });\n}", "function makeBoard(size){\n hideMainMenuOptions();\n gameType='compete';\n computerMode();\n $('#levelThree').css({display:'none'});\n $('#levelFour').css({display:'none'});\n$('.TTT_Board').css({\n display:'none'\n});\n$('#TTT_Board1').remove();\nvar table = document.createElement('TABLE');\ntable.border='1';\ntable.id='TTT_Board1';\nvar tableBody = document.createElement('TBODY');\ntable.appendChild(tableBody);\n var cellid=0;\nfor (var i=0; i<size; i++){\n var tr = document.createElement('TR');\n tableBody.appendChild(tr);\n \n for (var j=0; j<size; j++){\n var td = document.createElement('TD');\n //td.appendChild(document.createTextNode(\"Cell \" + i + \",\" + j));\ncellid++;\ntd.setAttribute('id','cell_'+(cellid-1).toString());\ntr.appendChild(td);\n }\n}\nvar myTableDiv = document.getElementById(\"board\");\nmyTableDiv.appendChild(table);\n\n$('#TTT_Board1').css({\n backgroundColor:'white',\n ' border-collapse':'collapse', \n 'margin': 'auto',\n 'table-layout': 'fixed',\n 'width':'350px', \n});\n$('#TTT_Board1 td').css({\n 'border':'5px solid black',\n 'height':'60px',\n 'width':'60px',\n 'font-size':'25px',\n 'color':'brown',\n 'cursor':'pointer'\n});\nvar x = window.matchMedia(\"(max-width: 700px)\");\nif (x.matches){\n $('#TTT_Board1').css({\n 'width':'300px', \n }); \n $(body.keyboard).css({\n height: 'calc(100% + 500px)'\n }); \n}\n\n$('#TTT_Board1 td').addClass('cell');\n$('#TTT_Board1 td').hover(function(){\n $(this).css({\n backgroundColor:'#E0E0E0',\n })},\n function(){$(this).css({\n backgroundColor:'white'\n })\n});\n}", "function makeBoard() {\n const tbody = document.querySelector('#tbody');\n for (let row = 0; row < numRows; row++) {\n tbody.appendChild(makeTr(row));\n }\n}", "function fillTable() \n{\n let table = document.getElementById(\"transTable\")\n table.innerHTML = \"\"\n let i = 0\n \n i = document.getElementById(\"pageNum\").value * 25\n\n let limit = i+25\n while (i < limit)\n {\n let row = table.insertRow()\n let cell = row.insertCell()\n dateObj = new Date(list[i]['Time'])\n utcString = dateObj.toLocaleString([], {dateStyle: 'short', timeStyle: 'short'})\n let entry = document.createTextNode(utcString)\n cell.appendChild(entry)\n cell = row.insertCell()\n entry = document.createTextNode(list[i]['Team'] + \" \" + list[i]['Type'] + \" \" + list[i][\"Name\"] + \", \" + list[i][\"proTeam\"]\n + \" \" + list[i][\"Pos\"])\n cell.appendChild(entry)\n i++\n if (i > list.length - 1)\n break\n }\n}", "function procHaupt() {\n const __TTAGS = document.getElementsByTagName(\"table\");\n const __TABLE = __TTAGS[2];\n const __CELLS = __TABLE.rows[0].cells; // Aktuelle Eintraege\n\n const __SAISON = 10;\n const __LIGASIZE = 10;\n\n const __COLUMNINDEX = {\n 'Art' : 1,\n 'Geg' : 2,\n 'Ber' : 2\n };\n\n const __ZAT = firstZAT(__SAISON, __LIGASIZE);\n const __NEXTZAT = getZATNrFromCell(__TTAGS[0].rows[2].cells[0]); // \"Der nächste ZAT ist ZAT xx und ...\"\n const __CURRZAT = __NEXTZAT - 1;\n\n __ZAT.gegner = __CELLS[__COLUMNINDEX.Geg].textContent;\n __ZAT.gegner = __ZAT.gegner.substr(0, __ZAT.gegner.indexOf(\" (\"));\n\n setSpielArtFromCell(__ZAT, __CELLS[__COLUMNINDEX.Art]);\n\n addBilanzLinkToCell(__CELLS[__COLUMNINDEX.Ber], __ZAT.gameType, \"(Bilanz)\");\n\n incZAT(__ZAT, __CURRZAT);\n\n console.log(__ZAT);\n}", "function insertPlayer(table, count, player){\n var row = table.insertRow(count);\n row.id = player.player.ID;\n\n // I need 10 cells here to Complete the table\n var cell1 = row.insertCell(0);\n var cell2 = row.insertCell(1);\n var cell3 = row.insertCell(2);\n var cell4 = row.insertCell(3);\n var cell5 = row.insertCell(4);\n var cell6 = row.insertCell(5);\n var cell7 = row.insertCell(6);\n var cell8 = row.insertCell(7);\n var cell9 = row.insertCell(8);\n var cell10 = row.insertCell(9);\n\n // Modify the Player Name so that it can be linked to\n var firstName = player.player.FirstName;\n var lastName = player.player.LastName;\n while(firstName.includes(\".\") || firstName.includes(\"-\") || firstName.includes(\" \")){\n firstName = firstName.replace(\".\", \"\");\n firstName = firstName.replace(\"-\", \"\");\n firstName = firstName.replace(\" \", \"\");\n }\n while(lastName.includes(\".\") || lastName.includes(\"-\") || lastName.includes(\" \")){\n lastName = lastName.replace(\".\", \"\");\n lastName = lastName.replace(\"-\", \"\");\n lastName = lastName.replace(\" \", \"\");\n }\n\n cell1.innerHTML = \"<a href='/playerStats/\" + firstName + \"-\" + lastName +\"'>\" + firstName + \" \" + lastName + \"</a>\";\n cell2.innerHTML = player.stats.Pts['#text'];\n cell3.innerHTML = player.stats.Reb['#text'];\n cell4.innerHTML = player.stats.Ast['#text'];\n cell5.innerHTML = player.stats.Blk['#text'];\n cell6.innerHTML = player.stats.Stl['#text'];\n cell7.innerHTML = player.stats.Tov['#text'];\n cell8.innerHTML = player.stats.Fouls['#text'];\n cell9.innerHTML = player.stats.PlusMinus['#text'];\n cell10.innerHTML = Math.floor(player.stats.MinSeconds['#text']/60);\n\n}", "function create_table ()\n{\n moves = -1;\n finished = false;\n var game_table_element = get_by_id (\"game-table-tbody\");\n for (var row = 0; row < n_rows; row++) {\n var tr = create_node (\"tr\", game_table_element);\n for (var col = 0; col < n_cols; col++) {\n var td = create_node (\"td\", tr);\n var colour = random_colour ();\n td.className = \"piece \" + colour;\n game_table[row][col].colour = colour;\n start_table[row][col] = colour;\n game_table[row][col].element = td;\n game_table[row][col].flooded = false;\n }\n }\n /* Mark the first element of the table as flooded. */\n game_table[0][0].flooded = true;\n /* Initialize the adjacent elements with the same colour to be flooded\n from the outset. */\n flood (game_table[0][0].colour, true);\n append_text (get_by_id(\"max-moves\"), max_moves);\n}", "function jumpbillboard()\n {\n window.location=url[boardnum];\n }", "function createTable() {\n var html = '';\n var defenses = findDefenses();\n var done = false;\n\n // Assume data is an array of arrays,\n // containing strings.\n\n html += '<table class=\"data\">';\n\n // Step through the rows of the data.\n for (var x = 0; x < 15; x++) {\n //var rowData = data[row];\n html += '<tr>'\n\n // Step through the columns in\n // this row.\n for (var i = 0; i < 15; i++) {\n html += '<td class=\"cell\" id=\"' + alpha[x] + i + '\">';\n //here is where we will add the code to import the Cyberdeck Programs\n if (i < defenses.length && done == false) {\n //id will resemble a0-c for row[a] col[0]. The -c is to differentiate\n //between table cell and content.\n html += '<img id=\"' + alpha[x] + i + '-c' + '\" alt=\"' + defenses[i] + '\" src=\"token.png\" draggable=\"true\" ondragstart=\"drag(event)\">';\n } else {\n //html += '<img id=\"'+alpha[x]+i+'\" src=\"dataWall.png\">'; //fills with walls\n done = true;\n }\n\n html += '</td>';\n }\n\n html += '</tr>';\n }\n\n html += '</table>';\n\n return html;\n}", "function makeHtmlBoard() {\n // TODO: get \"htmlBoard\" variable from the item in HTML w/ID of \"board\"\n const htmlBoard = document.getElementById('board');\n // TODO: add comment for this code\n //Student Comment: Here, a table row element is created. A tr extends horizontally across a table. It is populuated with table data (td).\n var top = document.createElement(\"tr\");\n //Student Comment: Here, the above created element receives a new attribute of \"id\" with a value of column-top. Column-top corresponds with a pre-written CSS id selector that gives any element with this attribute a dashed, gray border\n top.setAttribute(\"id\", \"column-top\");\n //Student Comment: Here, the top element is given an Event Listener activated by user event, click.\n top.addEventListener(\"click\", handleClick);\n\n //Student Comment: Here, top is appended with the aforementioned table data. It recieves an attribute of id set equal to the index of the loop. So the third headCell will have an ID of 2. After the loop, the whole of the tr is appended to the board HTML element. At this point in the loop, there is only the one row. Below, the remaining cells of the gameboard are appended.\n for (var x = 0; x < WIDTH; x++) {\n var headCell = document.createElement(\"td\");\n headCell.setAttribute(\"id\", x);\n top.append(headCell);\n }\n htmlBoard.append(top);\n\n // TODO: add comment for this code\n //Student Comment: First, a loop is initialized. It will run until index reaches value of height - 1 (which equals the actual height of the game board when factoring in 0 idx).\n for (var y = 0; y < HEIGHT; y++) {\n //Student Comment: Each time the above loop runs, a table row element is created. Looking ahead, after the nested loop, we can see, each time a tr is created, it is appended to our htmlBoard.\n const row = document.createElement(\"tr\");\n //Student Comment: Here, we run a nested loop, this time stopping when index is equal to the width of the game board. Each time, this loop runs, a table data element is created and stored in variable \"cell\". This next part is really cool. Cell is given an ID of y (the index from the outside loop) and x (the index from the nested loop). So a cell in the 4th row, 6th column will have an attribute of id=\"3-5\". Then this cell is appended to the row element created in the outside loop.\n for (var x = 0; x < WIDTH; x++) {\n const cell = document.createElement(\"td\");\n cell.setAttribute(\"id\", `${y}-${x}`);\n row.append(cell);\n }\n htmlBoard.append(row);\n }\n}", "function LoadBoardData(board)\n{\n var table = document.getElementById('table');\n table.innerHTML = \"\";\n for (let i = 0; i < 8; i++) {\n var row = document.createElement(\"tr\");\n\n for (let j = 0; j < 8; j++) {\n var cell = document.createElement(\"td\");\n\n var cellNumber = i*8+j\n var cellData = board[cellNumber];\n if (cellData == null) {\n if ((cellNumber % 2== 0 && i % 2 == 0) || (cellNumber % 2 == 1 && i % 2 == 1)) {\n cell.className = \"noPieceHere\";\n \n }\n \n \n } else{\n if (cellData >= 0 && cellData < 12) {\n var span = document.createElement(\"span\");\n span.className = \"red-piece\";\n span.id = cellData;\n cell.appendChild(span);\n \n }else{\n var span = document.createElement(\"span\");\n span.className = \"blue-piece\";\n span.id = cellData;\n cell.appendChild(span);\n \n }\n }\n \n row.appendChild(cell);\n \n }\n table.appendChild(row);\n \n }\n \n \n}", "function duplicateBoard() {\n for (var i = 0; i < rows; i++) {\n for (var j = 0; j < columns; j++) {\n boardTable[i][j] = boardNextTable[i][j];\n boardNextTable[i][j] = 0;\n }\n }\n}", "function resetHtmlBoard() {\n const tableBody = document.getElementById('table-body')\n \n for (let i = 0; i < tableBody.children.length; i++) {\n for (let j = 0; j < tableBody.children[i].children.length; j++) {\n tableBody.children[i].children[j].innerHTML = \"$\"+ (i+1) + '00';\n }\n }\n}", "function createGrid(board){\n if (board === 'board1') {\n var prefix = 'P1'\n } else {\n var prefix = 'P2'\n }\n board = document.getElementById(board)\n var letters = ['A', 'B', 'C','D','E','F','G','H','I','J']\n var tbl = document.createElement('table');\n var tblBody = document.createElement('tbody');\n\n for(var i = 0; i < 10; i++){\n var row = document.createElement('tr');\n for(var j = 0; j < 10; j++){\n var id = prefix + letters[j] + (i + 1);\n var col = document.createElement('td');\n col.setAttribute('id', id);\n col.setAttribute('class', 'box');\n row.appendChild(col);\n }\n tblBody.appendChild(row);\n }\n tbl.appendChild(tblBody);\n board.appendChild(tbl);\n\n\n}", "function fillAllUncoloredCells() {\r\n let uncoloredCells = document.querySelectorAll(\"td.NoColor\");\r\n for(let i = 0; i < uncoloredCells.length; i++){\r\n uncoloredCells[i].style.backgroundColor = color;\r\n uncoloredCells[i].classList.toggle(\"NoColor\");\r\n }\r\n}", "function renderBoard(board) {\n var elGameInfoStr = getInitalTableElStr();\n var strHtml = elGameInfoStr\n for (var i = 0; i < board.length; i++) {\n strHtml += '<tr>\\n'\n for (var j = 0; j < board[i].length; j++) {\n var cell = board[i][j];\n var cellDisplay = '';\n if (cell.isShown) var cellClass = 'floor';\n if (cell.isUsedLife) cellDisplay = MINE;\n if (cell.isMarked) cellDisplay = MARKED;\n if (cell.isShown && cell.isMine) cellDisplay = MINE;\n if (cell.minesAroundCount && !cell.isMine && cell.isShown) {\n cellDisplay = cell.minesAroundCount\n // sets the color of the numbers:\n for (let x = 1; x <= 6; x++) {\n if (cell.minesAroundCount === x) cellClass = `num${x} floor`\n }\n }\n strHtml += `\\t<td class=\"${cellClass} clickable cell cell-${i}-${j}\" \n oncontextmenu=\"cellMarked(this);return false;\"\n onclick=\"cellClicked(this, event)\">${cellDisplay}</td>\\n`\n cellClass = '';\n }\n strHtml += '</tr>'\n }\n var elTbody = document.querySelector('tbody');\n elTbody.innerHTML = strHtml\n}", "function shiftDown(){\r\n for(let r = 4; r < 24; r++){\r\n for(let c = 0; c < 10; c++){\r\n if (board[r][c] !== \"#ffffff\" && (r+1<24)){\r\n if(board[r+1][c] === \"#ffffff\"){\r\n board[r+1][c] = board[r][c];\r\n board[r][c] = \"#ffffff\";\r\n }\r\n }\r\n }\r\n }\r\n checkForSpace();\r\n}", "function fillTable (nameList, data, candidates, group, blank,fungiOverview) {\n // header row:\n addRow(table)\n cell1.innerHTML = 'Species'\n cell1.style.fontWeight = \"bold\"\n // cell1.style = \"border:none\"\n cell2.innerHTML = 'Norwegian name'\n cell2.style.fontWeight = \"bold\"\n // cell2.style=\"font-size:15px\"\n cell2.style.border = \"solid\"\n // cell2.style=\"word-wrap:break-all\"\n cell3.innerHTML = 'Sequenced specimens'\n cell3.style.fontWeight = \"bold\"\n cell4.innerHTML = 'Awaiting sequencing'\n cell4.style.fontWeight = \"bold\"\n cell5.innerHTML = 'Validated sequences'\n cell5.style.fontWeight = 'bold'\n cell6.innerHTML = 'Failed sequences'\n cell6.style.fontWeight = \"bold\"\n if (bcColl != \"sopp\") {\n cell5.style.display = 'none'\n cell6.style.display = 'none'\n }\n let sumSpecimens = 0\n let sumSpecies = 0\n museumURLPath = urlPath + \"/nhm\"\n\n // filling the rest of the rows in the table, AND at the same time sum up numbers for the last row\n\n // all but fungi:\n // render all on first render\n // basidio: render all\n // all phyla and blank search fungi: not all names\n let sumSpecimensAndSpecies\n if (bcColl === \"sopp\" && blank === 'blank') { // blank search for fungi\n sumSpecimensAndSpecies = fillOnlyBarcoded(data, candidates, sumSpecimens,fungiOverview)\n } else if (bcColl === \"sopp\" && group === 'all') { // start fungi-page\n sumSpecimensAndSpecies = fillOnlyBarcoded(data, candidates, sumSpecimens,fungiOverview)\n } else if (group != \"asco\" && group != \"all\" ) { // basidio\n sumSpecimensAndSpecies = fillAllNames(nameList, data, candidates, sumSpecimens,fungiOverview)\n } \n // else if (group === \"asco\") { \n // sumSpecimensAndSpecies = fillAllNames(nameList, data, candidates, sumSpecimens)\n // }\n else if (group === 'all') {\n sumSpecimensAndSpecies = fillAllNames(nameList, data, candidates,sumSpecimens)\n } else {\n sumSpecimensAndSpecies = fillOnlyBarcoded(data, candidates, sumSpecimens)\n }\n addRow(table)\n if (bcColl === \"sopp\" && group != \"Basidio\") {\n cell1.innerHTML = \"\" \n } else {\n cell1.innerHTML = \"<br> # Norwegian species: \" + nameList.length\n cell1.style.fontSize = \"12px\"\n }\n cell3.innerHTML = \"# specimens: \" + sumSpecimensAndSpecies.sumSpecimens + \"<br> # barcoded species: \" + sumSpecimensAndSpecies.sumSpecies\n cell3.style=\"text-align:center\"\n cell3.style.border=\"solid\"\n cell3.style.fontSize = \"12px\" \n cell5.style.display = 'none'\n cell6.style.display = 'none'\n}", "function singleSpace() {\n let spaces = document.querySelectorAll('td');\n \n for (i=0;i<spaces.length;i++) {\n gameBoard.push(spaces[i]);\n }\n}", "function initializeVisualBoard() {\n\tSNAKE_BOARD_VISUAL.innerHTML = \"\";\n\tfor (let r=0; r<NUM_ROWS; r++) {\n\t\tlet row = document.createElement(\"tr\");\n\t\tfor (let c=0; c<NUM_COLS; c++) {\n\t\t\tlet col = document.createElement(\"td\");\n\t\t\trow.appendChild(col);\n\t\t}\n\t\tSNAKE_BOARD_VISUAL.appendChild(row);\n\t}\n}", "function establecer(casillas, board) {\n //console.log(board)\n casillas[0][0].innerText = board[0][0];\n casillas[0][1].innerText = board[0][1];\n casillas[0][2].innerText = board[0][2];\n casillas[1][0].innerText = board[1][0];\n casillas[1][1].innerText = board[1][1];\n casillas[1][2].innerText = board[1][2];\n casillas[2][0].innerText = board[2][0];\n casillas[2][1].innerText = board[2][1];\n casillas[2][2].innerText = board[2][2];\n}", "function resetBoard() {\n document.querySelector('#tbody').remove();\n const newTbody = document.createElement('tbody');\n newTbody.id = 'tbody';\n document.querySelector('#table').appendChild(newTbody);\n board = makeDeepCopy();\n makeBoard();\n}", "function drawBoard() {\n\tvar tableHTML = '';\n\tvar position = 0;\n\n\tfor(var i = 0; i < 10; i++){\n\t\ttableHTML += '<tr>';\n\t\tfor(var j = 0; j < 10; j++){\n\t\t\tcurrentPosition = positionOrder[position];\n\t\t\ttableHTML += '<td id=\"' + currentPosition + '\" class=\"\" onclick=\"sendLocationPlayed(this)\">' + currentPosition + '</td>';\n\t\t\tposition++;\n\t\t}\n\t\ttableHTML += '</tr>';\n\t}\n\tdocument.getElementById(\"board\").innerHTML = tableHTML;\n}", "function insertPuzzle (puzzle) {\n puzzle = puzzle.replace(/\\./g, \"\");\n if (!/^\\d{81}$/.test(puzzle)) {\n throw new Error(\"Invalid Puzzle!\");\n }\n\n $(\"#btnClean\").click();\n var row = 1, col = 1;\n for (var i = 0; i < 81; i++) {\n var d = parseInt(puzzle.charAt(i), 10);\n if (d) {\n notifyCellValue(row, col, d);\n }\n if (col == 9) {\n row++;\n col = 1;\n } else {\n col++;\n }\n }\n}", "function renderBoard(board) {\n var strHTML = '';\n for (var i = 0; i < board.length; i++) {\n strHTML += '<tr>';\n for (var j = 0; j < board.length; j++) {\n var cell = board[i][j];\n var idName = `class=\"hide\" id=\"cell${i}-${j}\"`;\n if (cell.isBomb) idName = `class=\"hide bomb\" id=\"cell${i}-${j}\"`;\n strHTML += `<td onmouseup=\"handleKey(event, ${i}, ${j})\" onclick=\"cellClicked(this, ${i}, ${j})\" \n ${idName}> </td>`\n }\n strHTML += '</tr>'\n }\n strHTML += '';\n var elBoard = document.querySelector('.board');\n elBoard.innerHTML = strHTML;\n}", "function jumpAndTab(nb){\n return formatedRow + \"\\n\" + \" \".repeat(nb);\n }", "function write_table(saved_table) {\n for (let i=0; i < height_2048; i++) {\n for (let j=0; j < width_2048; j++) {\n helper.set_cell(j,i,saved_table[i][j]);\n }\n }\n}", "function loadSnake() {\r\n for (let i = 1; i <= 9; i++) {\r\n $('#table').append(`\r\n <tr></tr>\r\n `);\r\n for (let j = 1; j <= 9; j++) {\r\n $('#table').append(`\r\n <td><button type=\"button\" class=\"btn btn-secondary btn-lg\" id = \"` + i + \" \" + j +`\"><i class=\"las la-stop\"></i></button></td>\r\n `);\r\n }\r\n }\r\n let i = 1;\r\n for (let j = 1; j <= 3; j++) {\r\n const id = i + \" \" + String(j);\r\n lengthenSnake(id);\r\n snakeRow.push(i);\r\n snakeColumn.push(j);\r\n table[i][j] = 1;\r\n }\r\n generateFood();\r\n}", "function playAgain() {\r\n\r\n copyToNewTable(gameTable, userTable);\r\n printSudokuTableToPage();\r\n}", "function tabelizer() {\n\n var row = tbody.append(\"tr\");\n all_dict.forEach((entry) => { \n var cell = row.append(\"td\");\n cell.text(entry);\n });\n\n all_dict = []\n}", "function setPuzzle() \n\t\t {\n\t\tvar puzzleTable = document.getElementById(\"puzzleCells\");\n\t\n\t\tallCells = puzzleCells.getElementsByTagName(\"td\");\n\n\t\t\tfor(i=0; i < allCells.length; i++) {\n\t\t\t\tallCells[i].style.backgroundColor = \"white\";\n\t\t\t\tallCells[i].onclick = changeColor;\n\t\t\t\t}\n\n\t\t\tsolution.onclick = showSolution;\n\t\t\thide.onclick = hideSolution;\n\t\t\tcheck.onclick = checkSolution;\n\t\t\tuncheck.onclick = uncheckSolution;\n\t\t}", "function clearBoard(){\n for(let i=5; i>=0; i--){\n table.deleteRow(i);\n }\n\n connectFour();\n}", "function displayBoard () {\n document.getElementById('setBoard').innerHTML = '';\n let cardTableRow = document.createElement('TR');\n for (let j = 0; j < board.length; j++) {\n const cardTableEntry = document.createElement('TD');\n cardTableEntry.className = 'cardTableEntry';\n const card = board[j];\n const cardPic = document.createElement('img');\n cardTableEntry.onclick = () => userClickEvent(cardPic);\n cardPic.src = '../pictures/SET/' + card.number + '-' + card.fill + '-' + card.color + '-' + card.shape + '.png';\n cardPic.alt = card.number + ' ' + card.fill + ' ' + card.color + ' ' + card.shape;\n cardPic.className = 'card';\n cardPic.style.display = 'block';\n cardTableEntry.appendChild(cardPic);\n cardTableRow.appendChild(cardTableEntry);\n\n // Start a new row after 6 cards have been placed\n if ((j + 1) % 6 === 0) {\n document.getElementById('setBoard').appendChild(cardTableRow);\n cardTableRow = document.createElement('TR');\n }\n }\n document.getElementById('setBoard').appendChild(cardTableRow);\n}", "populateBoard() {\n for (let col = 0; col < this.board.getSize(); col++) {\n for (let row = 0; row < this.board.getSize(); row++) {\n // Check the empty candy position (hole), fill with new candy\n if (this.board.getCandyAt(row, col) == null) {\n this.board.addRandomCandy(row, col);\n }\n }\n }\n }", "function getGameTableToDisplay(sudokuTable) {\r\n\r\n let row, column;\r\n let length = sudokuTable.length;\r\n\r\n for (row = 0; row < length; row++) {\r\n for (let k = 0; k < amountToRemoveMin; k++) {\r\n column = Math.floor(Math.random() * (8 - 0 + 1)) + 0;\r\n if (sudokuTable[row][column] != '') {\r\n sudokuTable[row][column] = '';\r\n }\r\n else {\r\n k--;\r\n }\r\n }\r\n }\r\n\r\n // removing only from the last row, more cells\r\n amountToRemoveMax = amountToRemoveMax - amountToRemoveMin;\r\n row = length - 1;\r\n for (let k = 0; k < amountToRemoveMax; k++) {\r\n column = Math.floor(Math.random() * (8 - 0 + 1)) + 0;\r\n if (sudokuTable[row][column] != '') {\r\n sudokuTable[row][column] = '';\r\n }\r\n else {\r\n k--;\r\n }\r\n }\r\n}", "function checkForSpace(){\r\n for(let i = 4; i < 24; i++){\r\n for(let j = 0; j < 10; j++){\r\n if (board[i][j] !== \"#ffffff\" && (i+1<24)){\r\n if(board[i+1][j] === \"#ffffff\"){\r\n shiftDown();\r\n }\r\n }\r\n }\r\n }\r\n}", "function createNewPuzzle(rows, cols) {\n xw[\"clues\"] = {};\n xw[\"title\"] = DEFAULT_TITLE;\n xw[\"author\"] = DEFAULT_AUTHOR;\n xw[\"rows\"] = rows || DEFAULT_SIZE;\n xw[\"cols\"] = cols || xw.rows;\n xw[\"fill\"] = [];\n for (let i = 0; i < xw.rows; i++) {\n xw.fill.push(\"\");\n for (let j = 0; j < xw.cols; j++) {\n xw.fill[i] += BLANK;\n }\n }\n console.log(xw.fill);\n updateInfoUI();\n document.getElementById(\"main\").innerHTML = \"\";\n createGrid(xw.rows, xw.cols);\n\n isSymmetrical = true;\n current = {\n \"row\": 0,\n \"col\": 0,\n \"acrossWord\": '',\n \"downWord\": '',\n \"acrossStartIndex\":0,\n \"acrossEndIndex\": DEFAULT_SIZE,\n \"downStartIndex\": 0,\n \"downEndIndex\": DEFAULT_SIZE,\n \"direction\": ACROSS\n };\n\n grid = document.getElementById(\"grid\");\n squares = grid.querySelectorAll('td');\n\n updateActiveWords();\n updateGridHighlights();\n updateSidebarHighlights();\n updateCluesUI();\n\n for (const square of squares) {\n square.addEventListener('click', mouseHandler);\n }\n grid.addEventListener('keydown', keyboardHandler);\n}", "function drawBoard(size) {\n var parent = document.getElementById(\"game\");\n var table = document.createElement('table'); // create table\n table.id='board';\n var counter = 1;\n\n for (let i = 0; i < size; i++)\n {\n var row = document.createElement(\"tr\"); // create rows\n\n for(let x = 0; x < size; x++)\n {\n var col = document.createElement(\"td\"); // create columns\n col.innerHTML = \"\";\n col.id = counter; // the counter will go from 1 to 9, giving each cell its own id\n counter += 1;\n row.appendChild(col); // append columns as children of rows\n }\n table.appendChild(row); // append rows as children of table \n } \n parent.appendChild(table); // append table as child of main div\n var btn = document.createElement('button');\n btn.innerHTML = 'Play Again';\n parent.appendChild(btn); // append Play Again button as child of main div\n var sCode = document.createElement('p');\n sCode.innerHTML = '[ <a href=\"https://github.com/mariobox/tic-tac-toe\">Source Code</a> ]';\n parent.appendChild(sCode); // append link to source code as child of main div\n \n}", "function regenerateBoard() {\n //create new board\n let newBoard = new Board(dimension.value, split.value, vacant.value);\n newBoard.randomlyPopulateBoard();\n let newTable = newBoard.toHTML();\n //replace\n let oldTable = document.getElementById(\"table\");\n oldTable.replaceWith(newTable);\n //update references\n gameBoard = newBoard;\n}", "function setupBoard(listOfWords) {\n listOfWords.forEach((target) => {\n // for each target word, create a row on the board\n let wordOnBoard = document.createElement(\"div\");\n wordOnBoard.classList.add(\"wordOnBoard\", \"row\");\n target.split(\"\").forEach((letter) => {\n // for each letter in word, create a board tile\n let boardTile = document.createElement(\"div\");\n boardTile.classList.add(\"boardTile\");\n wordOnBoard.appendChild(boardTile);\n let letterSpan = document.createElement(\"span\");\n letterSpan.classList.add(\"boardLetter\", \"invisible\");\n letterSpan.innerText = letter.toUpperCase();\n boardTile.appendChild(letterSpan);\n });\n board.appendChild(wordOnBoard);\n });\n }", "function prepareScreen6() {\r\n document.getElementById(\"sequenceLabel2\").innerHTML = sequence;\r\n document.getElementById(\"gapPenaltyLabel\").innerHTML = gapPenalty;\r\n\t//czyszczenie zawartosci\r\n var table = document.getElementById(\"Results\");\r\n while (table.firstChild) {\r\n table.removeChild(table.firstChild);\r\n }\r\n\t\r\n\t//utworzenie tabelki z wynikami\r\n for (var i = 0; i < results.length; ++i) {\r\n var row=table.insertRow(table.rows.length);\r\n var cell0 = row.insertCell(0).appendChild(document.createTextNode(results[i].sequence));\r\n\t\tvar cell1 = row.insertCell(1).appendChild(document.createTextNode(results[i].score));\r\n }\r\n}", "function fillU()\n{\n\tlet original_box= document.getElementById(\"grid\");\t//access the grid\n\tlet trs=original_box.getElementsByTagName(\"tr\");\t//get all the elements of tr\n\t\n\tfor (let i=0; i<numRows; i++)\t\t\t\t\t\t//loop through to go through tows and columns\n\t{\n\t\tlet tds= trs[i].getElementsByTagName(\"td\");\t\t//to access the columns of the boxes in each row\n\t\tfor (let j=0; j<numCols; j++)\n\t\t{\n\t\t\tif (tds[j].style.backgroundColor===\"\" || tds[j].style.backgroundColor===\"white\"){\t\t//if the box is white or undefined(for some reason thats how it is instantiated)\n\t\t\t\ttds[j].style.backgroundColor=colorSelected; //change color to color Selected\n\t\t\t}\n\t\t}\n\t}\n}", "function printKey() {\n\t\tvar tableHtml = \"<table class='table table-condensed'>\";\n\t\tfor (var i = 0; i < 25; i = i + 5) {\n\t\t\ttableHtml += \"<tr>\";\n\t\t\tvar row = keyPhrase.substring(i, i + 5);\n\t\t\tvar chars = row.split(\"\");\n\t\t\tfor (var x = 0; x < 5; x++) {\n\t\t\t\ttableHtml += \"<td>\" + chars[x] + \"</td>\";\n\t\t\t}\n\t\t\ttableHtml += \"</tr>\";\n\t\t}\n\t\ttableHtml += \"</table>\";\n\t\t$(\"#keyTable\").html(tableHtml);\n\t}", "function fillBoard() {\n \"use strict\";\n // width/height = 16/15\n var fw = $('#fieldwhite'), rowW, scrollW;\n var fb = $('#fieldblack'), rowB, scrollB;\n var y, x;\n var width = fw.width(), height = fw.height();\n width = Math.min(width, 16 * height / 15);\n height = Math.min(height, 15 * width / 16);\n var isBackRow;\n for (y = 0; y < 5; y += 1) {\n isBackRow = y % 2 === 1;\n for (x = 0; x < 3; x += 1) {\n scrollW = $('<img class=\"fieldscroll\" src=\"http://www.scrollsguide.com/app/low_res/810.png\">');\n scrollW.width(width / 4).css('top', y * height / 5).css('left', (isBackRow ? width / 8 : width / 4) + x * width / 4);\n fw.append(scrollW);\n\n scrollB = $('<img class=\"fieldscroll\" src=\"http://www.scrollsguide.com/app/low_res/719.png\">');\n scrollB.width(width / 4).css('top', y * height / 5).css('right', (isBackRow ? width / 8 : width / 4) + x * width / 4);\n fb.append(scrollB);\n }\n }\n}", "function UFOsighting(data) {\n tbody.text(\"\")\n data.forEach((sighting)=>{\n var row = tbody.append(\"tr\");\n Object.entries(sighting).forEach(function([key, value]) {\n var cell = row.append(\"td\");\n cell.text(value);\n \n });\n})}", "function fillAgain(){\r\n for(let row = 97; row <= 105 ; row++){\r\n for(let col = 1; col <= len; col++){\r\n if(gameSudokuMat[row-97][col-1] != 0){\r\n document.getElementById(String.fromCharCode(row) + col).value = gameSudokuMat[row-97][col-1];\r\n document.getElementById(String.fromCharCode(row) + col).readOnly = true;\r\n document.getElementById(String.fromCharCode(row) + col).style.backgroundColor = '#E8F1BF';\r\n }\r\n else{\r\n document.getElementById(String.fromCharCode(row) + col).value = '';\r\n }\r\n }\r\n }\r\n}", "function GenerateBoardView()\r\n{\r\n\tvar board=\"\";\r\n\tfor(i=0;i<boardLength;i++)\r\n\t{\r\n\t\tif(boardItemCosts[i]==KOEF_WORD2)\r\n\t\t board+='<img class=\"cell\" src=\"board/word2.png\" id=\"cell'+(i+1)+'\">';\t\r\n\t else\r\n\t\t if(boardItemCosts[i]==KOEF_WORD3)\r\n\t\t board+='<img class=\"cell\" src=\"board/word3.png\" id=\"cell'+(i+1)+'\">';\t\t\r\n\t\t else\r\n\t\t if(boardItemCosts[i]==KOEF_LETTER2)\r\n\t\t board+='<img class=\"cell\" src=\"board/letter2.png\" id=\"cell'+(i+1)+'\">';\t\t\r\n\t\t else\r\n\t\t if(boardItemCosts[i]==KOEF_LETTER3)\r\n\t\t board+='<img class=\"cell\" src=\"board/letter3.png\" id=\"cell'+(i+1)+'\">';\t\t\r\n else\t\t\t \r\n\t\t board+='<img class=\"cell\" src=\"board/empty.png\" id=\"cell'+(i+1)+'\">';\t\t\t\t\t\t \r\n\t}\r\n\treturn board;\t\r\n}", "function print() {\n let s = \"<table id='mscontainer'>\";\n for (let i = 0; i < board.height; i++) {\n s += \"<tr>\";\n for (let j = 0; j < board.width; j++) {\n s += \"<td class='mstile' id='\" + i + \"-\" + j + \"'>\" + \n getImg(board.tiles[i][j]) + \"</td>\";\n }\n s += \"</tr>\";\n }\n s += \"</table>\";\n document.getElementById(\"mscontainer\").innerHTML = s;\n} // end print", "function prepareScreen3() {\r\n var div = document.getElementById(\"TokensAndSeeds\");\r\n //czyszczenie zawartości\r\n while (div.firstChild) {\r\n div.removeChild(div.firstChild);\r\n }\r\n\t//utworzenie tabelek ze slowami ziarnami dla danego podslowa\r\n for (var i = 0; i < seeds.length ; ++i) {\r\n var panel = document.createElement(\"div\");\r\n panel.className = \"panel panel-default\";\r\n var panelTitle = document.createElement(\"div\");\r\n panelTitle.className = \"panel-heading\";\r\n var heading = document.createElement(\"h4\");\r\n heading.innerHTML = tokens[i];\r\n panelTitle.appendChild(heading);\r\n var table = document.createElement('table');\r\n table.className = \"table table-striped\";\r\n for (var j = 0; j < seeds[i].length; j++) {\r\n table.insertRow(table.rows.length).insertCell(0).appendChild(document.createTextNode(seeds[i][j].sequence));\r\n }\r\n panel.appendChild(panelTitle);\r\n panel.appendChild(table);\r\n div.appendChild(panel);\r\n }\r\n}", "function updateBoard() {\n let updatedBoard = gameBoard.toHTML();\n //replace\n let oldBoard = document.getElementById(\"table\");\n oldBoard.replaceWith(updatedBoard);\n}", "function updateTable() {\n var rowCount = 5;\n if(pageId == 'page-screen')\n rowCount = 8;\n\n // Build the new table contents\n var html = '';\n for(var i = getGuessesCount() - 1; i >= Math.max(0, getGuessesCount() - rowCount); i--) {\n html += \"<tr>\";\n html += \"<td>\" + (i + 1) + \"</td>\\n\";\n html += \"<td>\" + guesses[i].firstName + \"</td>\";\n html += \"<td>\" + guesses[i].weight + \" gram</td>\";\n html += \"</tr>\";\n }\n\n // Set the table contents and update it\n $(\"#guess-table > tbody\").html(html);\n $(\"#guess-table\").table(\"refresh\");\n }", "function updateBoneProducer() {\r\n for (var i = 3; i <= 4; i++)\r\n for (var j = 3; j <= 4; j++) {\r\n var ele = $(\"#board>tr\").eq(i).children(\"td\").eq(j);\r\n if (numBone == 0) ele.css(\"background\", \"#aaa\");\r\n else ele.css(\"background\", \"url(img/bone.png)\");\r\n if (numBone > 1) ele.html(numBone);\r\n else ele.html(\"\");\r\n }\r\n}", "async function fillTable() {\n // Create and append the header row to the grid\n $(\"#jeopardy\").find(\"thead\").empty();\n let $tr = $(\"<tr>\");\n for (let catIndex = 0; catIndex < Num_Cats; catIndex++) {\n $tr.append($(\"<th>\").text(categories[catIndex].title));\n };\n $(\"#jeopardy\").find(\"thead\").append($tr);\n\n // Create and append the clue boxes\n for (let clueIndex = 0; clueIndex < Num_Clues_Per_Cat; clueIndex++) {\n let $tr = $(\"<tr>\");\n for (let catIndex = 0; catIndex < Num_Cats; catIndex++) {\n $tr.append($(\"<td>\").attr(\"id\", `${catIndex}-${clueIndex}`).text(\"?\"));\n };\n $(\"#jeopardy\").find(\"tbody\").append($tr);\n };\n}", "function ibdof_tweaks() {\r\n \r\n // tweak the formatting for the forum listing on Index.php\r\n if (/index/i.test(window.location.pathname))\r\n formatIndexPage();\r\n \r\n // set a class-name for the genre description cell\r\n if (/IBDOF-genrelist/i.test(window.location.pathname)) {\r\n dev = document.evaluate(\r\n \"//table[2]/tbody/tr/td[3]\", \r\n document, \r\n null, \r\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n \r\n for (i = 0; i < dev.snapshotLength; i++)\r\n dev.snapshotItem(i).className += ' genre';\r\n }\r\n\r\n // alphabetic letter links in author/series table header - remove the font color override from the html code\r\n if (/IBDOF-authorlist|IBDOF-serieslist/i.test(window.location.pathname)) {\r\n dev = document.evaluate(\r\n \"//table[2]/tbody/tr[1]/th//font\", \r\n document, \r\n null, \r\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n \r\n for (i = 0; i < dev.snapshotLength; i++)\r\n dev.snapshotItem(i).color = '';\r\n }\r\n}", "function backUpCursorIfAfterNonBreakingSpaceInTableCell()\n{\n var dom = dw.getDocumentDOM();\n var selNode = dom.getSelectedNode();\n if (selNode.tagName && selNode.tagName == \"TD\" && selNode.outerHTML.indexOf(\"&nbsp\") != -1 \n && selNode.innerHTML == \"&nbsp;\") \n {\n var selArr = dom.nodeToOffsets(selNode);\n var cellOuterHTML = selNode.outerHTML;\n var nbspInd = cellOuterHTML.indexOf(\"&nbsp\");\n var newIP = selArr[0] + nbspInd - 1;\n dom.setSelection(newIP,newIP);\n }\n\n}", "function buildTable(numRows, numCols) {\n let board = document.getElementById(\"game-board\");\n \n // Make a table node\n let table = document.createElement(\"table\");\n board.appendChild(table);\n \n // Add a tbody with numRows-1 additional rows, each with numCols td elements\n let tableBody = document.createElement(\"tbody\");\n table.appendChild(tableBody);\n \n // Append each row and append the td for each row\n let cellId = 0;\n for (let row = 1; row <= numRows; row++) {\n let thisRow = document.createElement(\"tr\");\n tableBody.appendChild(thisRow);\n\n for (let col = 1; col <= numCols; col++) {\n let thisCell = document.createElement(\"td\");\n thisCell.setAttribute(\"isRevealed\", \"false\");\n thisCell.style.border = \"1px solid black\";\n thisCell.style.backgroundColor = hiddenColor;\n thisCell.setAttribute(\"id\", String(cellId));\n thisCell.setAttribute(\"bomb-neighbors-cnt\", \"0\");\n thisRow.appendChild(thisCell);\n cellId++;\n }\n }\n}", "function startGame() {\n\n let table = document.getElementById(\"guess-table\");\n generateTable(table, PLACES);\n\n}", "function resetBoard() {\n // reset any colored cells\n $(\"#chessboard td\").removeClass(\"start\");\n $(\"#chessboard td\").removeClass(\"end\");\n $(\"#chessboard td\").removeClass(\"path\");\n\n // remove any path counters on the board\n $(\".counter\").remove();\n\n // reset start and end points\n start = null;\n end = null;\n\n // reset displayed cell number\n $(\"#output\").html('Please select a source and destination cell.');\n}", "function blankBoard() {\n var display = [];\n var evenRow = [\" \",\"___\",\" \",\"___\",\" \",\"___\",\" \",\"___\"];\n var oddRow = [\"___\",\" \",\"___\",\" \",\"___\",\" \",\"___\",\" \"];\n for (var row=0; row<8; row++) {\n if (row % 2 == 0) {display[row] = evenRow.slice(0);}\n else {display[row] = oddRow.slice(0);}\n };\n return display;\n}", "function printBoard() {\n // Loop through the board, and add classes to each cell for the\n // appropriate colors.\n for (var y = 0; y <= 5; y++) {\n for (var x = 0; x <= 6; x++) {\n if (board[y][x] !== 0) {\n var cell = $(\"tr:eq(\" + y + \")\").find('td').eq(x);\n cell.children('button').addClass(board[y][x]);\n }\n }\n }\n}", "function makeHtmlBoard() {\n // TODO: get \"htmlBoard\" variable from the item in HTML w/ID of \"board\"\n let htmlBoard = document.getElementById(\"board\");\n // TODO: add comment for this code\n // create table row in HTML with ID of \"column-top\" and adding event listener of \"click\"\n let top = document.createElement(\"tr\");\n top.setAttribute(\"id\", \"column-top\");\n top.addEventListener(\"click\", handleClick);\n // adding divs to row at top of board with an id of the x-coordinate\n for (let x = 0; x < WIDTH; x++) {\n let headCell = document.createElement(\"td\");\n\n headCell.setAttribute(\"id\", x);\n top.append(headCell);\n }\n // adding top row to board\n htmlBoard.append(top);\n\n // TODO: add comment for this code\n // creating playable space with coodinate IDs (y-x) for each cell... (0,0) in top left\n for (let y = 0; y < HEIGHT; y++) {\n let row = document.createElement(\"tr\");\n \n for (let x = 0; x < WIDTH; x++) {\n let cell = document.createElement(\"td\");\n \n cell.setAttribute(\"id\", `${y}-${x}`);\n row.append(cell);\n }\n htmlBoard.append(row);\n }\n}", "function populateHints(data) {\n //Populates top cells with data\n for(var i = 1; i <= size; i++) {\n var str = \"\";\n var cnt = 0;\n for(var j = 0; j < size; j++) {\n var index = size*j + i - 1;\n if(data.charAt(index) == \"1\") {\n cnt+=1;\n }\n if(data.charAt(index) == \"0\" && cnt != 0) {\n str += (cnt + \"<br>\");\n cnt = 0;\n }\n }\n if(cnt != 0) {\n str += (cnt);\n }\n table.rows[0].cells[i].innerHTML = str;\n }\n //Populates left-side cells with data\n for(var i = 1; i <= size; i++) {\n var str = \"\";\n var cnt = 0;\n for(var j = 0; j < size; j++) {\n var index = size*(i - 1) + j;\n if(data.charAt(index) == \"1\") {\n cnt+=1;\n }\n if(data.charAt(index) == \"0\" && cnt != 0) {\n str += (cnt + \" \");\n cnt = 0;\n }\n }\n if(cnt != 0) {\n str += (cnt);\n }\n table.rows[i].cells[0].innerHTML = str;\n }\n}", "function renderBoard(board) {\n let colors = ['','blue','green','red','darkblue','brown','cyan','black'];\n let htmlStr = '';\n for (let i = 0; i < board.length; i++) {\n htmlStr += '<tr>';\n for (let j = 0; j < board[i].length; j++) {\n let cell = gBoard[i][j];\n let cellContent;\n if (cell.isMine) cellContent = MINE;\n else if (cell.peripheryMines) cellContent = `<span style=\"color: ${colors[cell.peripheryMines]};\">${cell.peripheryMines}</span>`;\n else cellContent = EMPTY;\n let flaggedCell = '';\n if (cell.isFlagged) flaggedCell = `<div class=\"flag\">${FLAG}</div>`;\n\n htmlStr += `<td class=\"cell cell-${i}-${j}\" oncontextmenu=\"flagCell(${i}, ${j}, event)\" \n onclick=\"updateBoard(${i}, ${j})\">\n <div class=\"surface\">${cellContent}</div>\n <div class=\"cover\">${flaggedCell}</div>\n </td>`;\n }\n htmlStr += '</tr>';\n }\n document.querySelector('.game-board').innerHTML = htmlStr;\n}", "function setUpRed() {\n for(j = 0 ; j < 3; j += 1){\n if( j === 1){\n for(i = 1; i < 8; i += 2){\n checkerboard[j][i] = 'R';\n }\n } else {\n for(i =0 ; i < 8; i += 2){\n checkerboard[j][i] ='R';\n }\n }\n }\n}", "function syncBoard() {\n for (var i = 0; i < board.length; i++) {\n if (cells[i].innerHTML !== \"\") {\n board[i] = cells[i].innerHTML;\n }\n }\n}", "function reset_board(){\r\n //numTreasureLeft = 20;\r\n //location.reload();\r\n let cells = document.querySelectorAll(\"td\");\r\n for(let i =0; i < cells.length; i++){\r\n cells[i].remove();\r\n }\r\n\r\n numTreasureLeft = 20;\r\n totalMoves = 0;\r\n generateBoard();\r\n}", "function setBoard() {\n checkForWin(); //check if player has won\n // for (col = 0; col <= 6; col++) {\n // for (row = 0; row <= 5; row++) {\n // //set inner HTML of cell (a td) to span with class of 'cell' and 'player' + value of that gameBoard cell\n // document.getElementById('cell_' + row + '_' + col).innerHTML = \"<span class='cell player\" + gameBoard[row][col] + \"'> </span>\";\n // }\t\n // }\n}", "function generateBoard() {\r\n //main board\r\n let board = document.querySelector('#board')\r\n for (let i = 4; i < 24; i++) {\r\n //create row\r\n board.innerHTML += `<div id=\"row${i - 4}\" class=\"row\"></div>`\r\n let curRow = board.querySelector(`#row${i - 4}`);\r\n for (let j = 0; j < 10; j++) {\r\n //populate row with cells\r\n curRow.innerHTML += `<div id=\"r${i-4}c${j}\" class=\"cell\" style=\"background-color: rgb(255, 255, 255);\"></div>`\r\n }\r\n }\r\n //next piece display\r\n let next = document.querySelector('#next')\r\n for (let i = 0; i < 4; i++) {\r\n //create row\r\n next.innerHTML += `<div id=\"nrow${i}\" class=\"row\"></div>`\r\n let curRow = next.querySelector(`#nrow${i}`);\r\n for (let j = 0; j < 4; j++) {\r\n //populate row with cells\r\n curRow.innerHTML += `<div id=\"nr${i}c${j}\" class=\"cell\" style=\"background-color: rgb(255, 255, 255);\"></div>`\r\n }\r\n }\r\n //held piece display\r\n let held = document.querySelector('#held')\r\n for (let i = 0; i < 4; i++) {\r\n //create row\r\n held.innerHTML += `<div id=\"hrow${i}\" class=\"row\"></div>`\r\n let curRow = held.querySelector(`#hrow${i}`);\r\n for (let j = 0; j < 4; j++) {\r\n //populate row with cells\r\n curRow.innerHTML += `<div id=\"hr${i}c${j}\" class=\"cell\" style=\"background-color: rgb(255, 255, 255);\"></div>`\r\n }\r\n }\r\n}" ]
[ "0.6160182", "0.6122663", "0.60799897", "0.6065048", "0.5908557", "0.5891682", "0.5823882", "0.5823199", "0.580899", "0.58000576", "0.5780455", "0.5768882", "0.5755294", "0.57485616", "0.5745775", "0.57105374", "0.57097495", "0.5706609", "0.57012886", "0.56989646", "0.5667393", "0.56629777", "0.5660254", "0.5640902", "0.56378573", "0.56266797", "0.56245285", "0.56180626", "0.55756444", "0.5553905", "0.55430394", "0.5531099", "0.5523019", "0.551318", "0.55107737", "0.5508043", "0.5502027", "0.5488813", "0.54873395", "0.5486662", "0.5484944", "0.54839987", "0.5481677", "0.54775155", "0.5470132", "0.5467305", "0.5457787", "0.5453513", "0.54418564", "0.54371953", "0.54296386", "0.5425045", "0.5422028", "0.54071504", "0.5398117", "0.53975517", "0.5395266", "0.5393583", "0.53929144", "0.53928405", "0.5390652", "0.5382852", "0.538112", "0.53722006", "0.5371394", "0.53699726", "0.5368914", "0.53667945", "0.5361386", "0.53578025", "0.5357662", "0.5355743", "0.53548557", "0.53524256", "0.5350173", "0.53489316", "0.5336069", "0.5336007", "0.5335983", "0.5335369", "0.53332657", "0.53297883", "0.5318351", "0.5303802", "0.5302895", "0.5300039", "0.52999157", "0.52983826", "0.5295043", "0.5292898", "0.5291281", "0.528964", "0.5287813", "0.52837545", "0.5282314", "0.52775776", "0.52707577", "0.5267008", "0.5262787", "0.52580094" ]
0.74104625
0
NOTE: Never send unencrypted user credentials in production!
function postRequest() { // var formData = new FormData(document.getElementById('myForm')); // 'https://jsonplaceholder.typicode.com/todos' // JSON.stringify({name:name,msg:msg}) // `name=${name}&message=${msg}` let name = document.getElementById('name').value; let msg = document.getElementById('msg').value; axios({ method: 'post', url: 'https://jsonplaceholder.typicode.com/posts', data: `name=${name}&message=${msg}` }).then(logResult).catch(logError); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_parseAuthInfo(){\n if(this.authInfo){\n const authCode = this.authInfo.split(/\\s+/)[1]\n const authDecode = new Buffer(authCode, 'base64').toString()\n const creds = authDecode.split(':')\n this.login = creds[0]\n this.password = creds[1]\n this.user = User.find_by_login(this.login)\n }\n if(!this.user){\n this.login = 'guest'\n this.password = ''\n this.user = User.find_by_login('guest')\n }\n // TODO: maintain log of user and actions\n // console.info(`authenticated as ${this.user.name}`)\n }", "getCredentials () {\r\n var key = window.prompt('')\r\n var decrypted = window.CryptoJS.AES.decrypt(this.cloudantSettings.encryptedUsernamePassword, key).toString(window.CryptoJS.enc.Utf8)\r\n var usernamePassword = decrypted.split(' ')\r\n if (usernamePassword.length !== 2) {\r\n throw new Error('invalid credentials')\r\n }\r\n return {\r\n name: usernamePassword[0],\r\n password: usernamePassword[1]\r\n }\r\n }", "function req_read_user_auth(env) {\n var data = http.req_body(env).user;\n set_user_email(env, data.user_email);\n set_user_password(env, data.user_password);\n}", "function Authenticate(){\n var speakeasy = require('speakeasy');\n var key = speakeasy.generateSeceret();\n}", "async getCredentials() {\n\t\tvar username = await AsyncStorage.getItem('username');\n\t\tvar password = await AsyncStorage.getItem('password');\n\t\tif (username) {\n\t\t\tthis.setState({\n\t\t\t\tsave: true,\n\t\t\t\tusername: username,\n\t\t\t\tpassword: password\n\t\t\t});\n\t\t}\n\t}", "function setUserCredentails(username, password){\n this.username = username;\n this.password = password;\n}", "checkAuth() { }", "function UsernamePasswordCredentials(username, password) {\n this.username = username;\n this.password = password;\n}", "function _user(){\n\t//userconfig = getCredentials();\n\tvar userconfig = cloudfn.users.cli.get();\n\n\tvar schema = {\n\t\tproperties: {\n\t\t\tusername: {\n\t\t\t\tdescription: colors.green(\"Username\"),\n\t\t\t\tvalidator: /^[a-zA-Z]+$/,\n\t\t\t\twarning: 'Username must be only letters',\n\t\t\t\tdefault: userconfig.username,\n\t\t\t\trequired: true,\n\t\t\t\tminLength: 2,\n\t\t\t\ttype: 'string'\n\t\t\t},\n\t\t\temail: {\n\t\t\t\tdescription: colors.green(\"Email\"),\n\t\t\t\tdefault: userconfig.email,\n\t\t\t\trequired: true,\n\t\t\t\tconform: function(value){\n\t\t\t\t\treturn isemail.validate(value);\n\t\t\t\t},\n\t\t\t\t//format: 'email', // too sloppy\n\t\t\t\twarning: 'Email address required, see: http://isemail.info/_system/is_email/test/?all',\n\t\t\t\ttype: 'string'\n\t\t\t},\n\t\t\tpassword: {\n\t\t\t\tdescription: colors.green(\"Password\"),\n\t\t\t\thidden: true,\n\t\t\t\trequired: true,\n\t\t\t\treplace: '*',\n\t\t\t\tminLength: 5,\n\t\t\t\twarning: \"Password must be at least 6 characters\"\n\t\t\t}\n\t\t}\n\t};\n\n\tprompt.start();\n\n\tprompt.get(schema, function (err, result) {\n\t\tif (err) {\n\t\t\tconsole.log(\"\");\n\t\t\treturn 1;\n\t\t}\n\t\tif( debug ) console.log('Command-line input received:');\n\t\tif( debug ) console.log(' Username: ' + result.username);\n\t\tif( debug ) console.log(' Email: ' + result.email);\n\t\tif( debug ) console.log(' Password: ' + result.password);\n\n\t\t//console.log(\"getNearestCredentialsFile():\", getNearestCredentialsFile() );\n\n\t\t// Credentials to store locally: username, email\n\t\tvar local = {\n\t\t\tusername: result.username,\n\t\t\temail: result.email\n\t\t};\n\n\t\t/// Credentials to store on the server: username, email, hash of [username, email, password]\n\t\tvar userdata = {\n\t\t\tusername: result.username,\n\t\t\temail: result.email,\n\t\t\thash: getHash({\n\t\t\t\tusername: result.username,\n\t\t\t\temail: result.email,\n\t\t\t\tpass: result.password\n\t\t\t})\n\t\t};\n\n\t\tvar url = [remote, '@', 'u', result.username, userdata.hash].join('/');\n\t\tif( debug ) console.log('@user url', url); \n\t\trequest.get({url:url, formData: userdata}, (err, httpResponse, body) => {\n\t\t\tparse_net_response(err, httpResponse, body, (body) => {\n\t\t\t\t\n\t\t\t\tif( debug ) console.log(\"@user: http-response:\", body.msg);\n\n\t\t\t\tif( body.msg === 'allow' ){\n\t\t\t\t\tconsole.log(\"Credentials verified. Now using account '\"+ chalk.green(result.username) +\"'\");\n\t\t\t\t\t//fs.writeFileSync( getNearestCredentialsFile(), local);\n\t\t\t\t\tcloudfn.users.cli.set( local );\n\n\t\t\t\t}else if( body.msg === 'deny' ){\n\t\t\t\t\tconsole.log(\"Login failed. (TODO: reset password... contact [email protected] for now... thanks/sorry.\");\n\t\t\t\t\n\t\t\t\t}else if( body.msg === 'new' ){\n\t\t\t\t\tconsole.log(\"Created account for user:\", chalk.green(result.username) );\n\t\t\t\t\t//fs.writeFileSync( getNearestCredentialsFile(), local);\n\t\t\t\t\tcloudfn.users.cli.set( local );\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n}", "constructor(username, password) {\n this.username = username;\n this.password = password;\n }", "performPRTGAPILogin() {\n var username = this.username;\n var passhash = this.passhash;\n var options = {\n method: 'GET',\n url: this.url + \"/getstatus.htm?id=0&username=\" + username + \"&passhash=\" + passhash\n };\n return this.backendSrv.datasourceRequest(options).then(response => {\n this.passhash = response;\n return response;\n });\n }", "function loadUserCredentials() {\n var token = window.localStorage.getItem(LOCAL_TOKEN_KEY);\n if (token) {\n useCredentials(token);\n }\n }", "function loadUserCredentials() {\n var token = window.localStorage.getItem(LOCAL_TOKEN_KEY);\n if (token) {\n useCredentials(token);\n }\n }", "constructor(\n user = config.user,\n password = config.password,\n host = config.host\n ) {\n this.user = user;\n this.password = password;\n this.host = host;\n }", "function loginUserData(){\n var email = localStorage.getItem(\"email\");\n var url = 'https://vig-mini.ddns.net/user/information'\n\n var body = { \n 'e-mail': email,\n }\n\n sendrequestUserData(url, body);\n\n}", "function authenticateUser() {\n return fetch('/authenticateuser', {\n method: 'GET',\n credentials: \"same-origin\"\n });\n}", "function getCredentials() {\n let concatenatedString = twittersecret.Key + \":\" + twittersecret.Secret;\n let base64encodedString =\n Buffer.from(concatenatedString).toString(\"base64\");\n return `Basic ${base64encodedString}`;\n}", "static get NEED_AUTH() { return 5; }", "async function authenticateUser(){\n\temail = getUserEmail();\n\tpassword = getUserPassword();\n\tconst url = `http://localhost:3000/?user=${email}password=${password}`;\n\tconst response = await fetch(url);\n\tconst data = await response.json();\n\tif(data){\n\t\tnoteMenuView();\n\t}\n\telse{\n\t\terrorMessage();\n\t}\t\t\n\t\t\n}", "function req_read_new_user_password(env) {\n var data = http.req_body(env).user;\n set_new_user_password(env, data.new_user_password);\n}", "function hashAuthhttp() {\n\tvar username = process.env.API_USER;\n\tvar password = process.env.API_PASS;\n\tvar auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');\n\treturn auth;\n}", "async setCredentials() {\n\t\tif (this.state.save) {\n\t\t\tawait AsyncStorage.setItem('username', this.state.username);\n\t\t\tawait AsyncStorage.setItem('password', this.state.password);\n\t\t}\n\t\telse {\n\t\t\tawait AsyncStorage.setItem('username', '');\n\t\t\tawait AsyncStorage.setItem('password', '');\n\t\t}\n\t}", "function saveUserCredentialsInLocalStorage() {\n console.debug(\"saveUserCredentialsInLocalStorage\");\n if (currentUser) {\n localStorage.setItem(\"token\", currentUser.loginToken);\n localStorage.setItem(\"username\", currentUser.username);\n }\n}", "credentials(url, userName) {\n return Git.Cred.sshKeyFromAgent(userName);\n }", "function saveUserCredentialsInLocalStorage() {\n console.debug('saveUserCredentialsInLocalStorage');\n if (currentUser) {\n localStorage.setItem('token', currentUser.loginToken);\n localStorage.setItem('username', currentUser.username);\n }\n}", "static async loginViaStoredCredentials(token, username) {\n try {\n const response = await axios({\n url: `${BASE_URL}/users/${username}`,\n method: \"GET\",\n params: { token },\n });\n\n let { user } = response.data;\n\n return new User(\n {\n username: user.username,\n name: user.name,\n createdAt: user.createdAt,\n favorites: user.favorites,\n ownStories: user.stories\n },\n token\n );\n } catch (err) {\n console.error(\"loginViaStoredCredentials failed\", err);\n return null;\n }\n }", "function createUserAuthObj (userName, password)\n{\n var userObj = {};\n userObj['username'] = userName;\n userObj['password'] = password;\n return JSON.stringify(userObj);\n}", "function req_read_client_auth(env) {\n var data = http.req_body(env).client;\n set_client_auth(env, data.id, data.auth_code);\n}", "function doLogin(userName, password){\n\n}", "static async getLogin(ctx) {\n const context = ctx.flash.formdata || {};\n\n // user=email querystring?\n if (ctx.request.query.user) context.username = ctx.request.query.user;\n\n if (context.username) {\n // if username set & user has access to more than one org'n, show list of them\n const [ usr ] = await User.getBy('email', context.username);\n if (usr && usr.databases.length>1) context.databases = usr.databases;\n }\n\n await ctx.render('login', context);\n }", "static async ensureAuthenticated(req, res, next) {\n // Check the user based on API.\n const apiKey = req.get(\"user-api\") || req.body[0]?.user_api;\n const userId = req.get(\"user-id\") || req.body[0]?.user_id;\n if (apiKey && userId) {\n let sqlQuery = \"SELECT * FROM user WHERE id = ?\";\n const ourUser = await db.query(sqlQuery, userId);\n if (ourUser.length > 0) {\n let uncDb = await Utils.decrypt(ourUser[0].api_key);\n if (uncDb == apiKey) {\n let curUser = {\n steam_id: ourUser[0].steam_id,\n name: ourUser[0].name,\n super_admin: ourUser[0].super_admin,\n admin: ourUser[0].admin,\n id: ourUser[0].id,\n small_image: ourUser[0].small_image,\n medium_image: ourUser[0].medium_image,\n large_image: ourUser[0].large_image,\n };\n req.user = curUser;\n return next();\n }\n }\n }\n if (req.isAuthenticated()) {\n return next();\n }\n res.redirect(\"auth/steam\");\n }", "generateCredentials () {\n // Generate the Basic Authentication header for a private instance of SLPDB.\n const username = 'BITBOX'\n const password = SLPDB_PASS\n const combined = `${username}:${password}`\n var base64Credential = Buffer.from(combined).toString('base64')\n var readyCredential = `Basic ${base64Credential}`\n\n const options = {\n headers: {\n authorization: readyCredential\n },\n timeout: 15000\n }\n\n return options\n }", "function biscuit(request, response, username, password) {\n var authenticated = false;\n\n return authenticated;\n}", "authenticate (username, password) {\n // checks if the username is one of the known usernames, and the password is 'password'\n const checkCredentials = () => new Promise((resolve, reject) => {\n var validUsername = this.usernames.indexOf(username) !== -1;\n var validPassword = password === 'password';\n setTimeout(() => {\n if (validUsername && validPassword) resolve(username)\n else reject(\"Invalid username or password\");\n }, 800);\n });\n\n return checkCredentials()\n .then((authenticatedUser) => {\n AppConfig.emailAddress = authenticatedUser;\n AppConfig.save();\n });\n }", "getCredentials() {\r\n let credentials = \"same-origin\";\r\n if (this.credentials) {\r\n credentials = this.credentials;\r\n }\r\n return credentials;\r\n }", "static logUserIn( req, credentials ) {\n return new Promise(\n async (resolve) => {\n try {\n\n let email = credentials.body.username;\n let passwort = credentials.body.password;\n\n if (!(email && passwort)) {\n return resolve(Service.successResponse({Error: \"Please fill in pending fields\"}, 401));\n }\n db.findOne({email: email}, function (err, user) {\n if (user == null) {\n return resolve(Service.successResponse({Error: \"Username or Password not correct.\"}, 401));\n }\n else if(user.passwortHash !== CryptoUtil.hashPwd(passwort)){\n return resolve(Service.successResponse({Error: \"Username or Password not correct.\"}, 401));\n } else {\n req.session.user = credentials.body.username;\n //test\n req.cookies.value ='lol';\n console.log(req.headers);\n\n var examples = {};\n examples['application/json'] = {\n \"id\" : user._id\n };\n if (Object.keys(examples).length > 0) {\n resolve(Service.successResponse(examples[Object.keys(examples)[0]]));\n } else {\n resolve();\n }\n }\n });\n } catch (e) {\n resolve(Service.rejectResponse(\n e.message || 'Invalid input',\n e.status || 405,\n ));\n }\n },\n );\n }", "isUserCredentialValid(name,password){\n\t\treturn true\n\t}", "function storeUserCredentials(token) { \n localStorageService.set(key, token);\n useCredentials(token);\n }", "function Credentials (name, pass) {\n this.name = name\n this.pass = pass\n}", "function Credentials (name, pass) {\n this.name = name\n this.pass = pass\n}", "function Credentials (name, pass) {\n this.name = name\n this.pass = pass\n}", "function Credentials (name, pass) {\n this.name = name\n this.pass = pass\n}", "function Credentials (name, pass) {\n this.name = name\n this.pass = pass\n}", "function authentication (type) {\n \n return type === 'Basic'\n ? 'Basic ' + btoa(appKey + ':' + appSecret)\n : 'Kinvey ' + sessionStorage.getItem('authtoken');\n}", "static async loginViaStoredCredentials(token, username) {\n try {\n const response = await axios({\n url: `${BASE_URL}/users/${username}`,\n method: \"GET\",\n params: { token },\n });\n //take the user out of the response\n let { user } = response.data;\n \n return new User(\n {\n username: user.username,\n name: user.name,\n createdAt: user.createdAt,\n favorites: user.favorites,\n ownStories: user.stories\n },\n token\n );\n } catch (err) {\n console.error(\"loginViaStoredCredentials failed\", err);\n return null;\n }\n }", "handleSubmit(event){\n event.preventDefault();\n axios.post(\n 'http://localhost:3001/api/signup', //1st which route I am hitting in the backend\n this.state, // 2nd , since this is a post riytem U gave ti sebd sinetgubg\n {withCredentials:true} //3rd and optional ===. credentials: true ???\n )\n .then(responseFromServer =>{\n console.log('response is: ', responseFromServer.data)\n const { userDoc } = responseFromServer.data;\n this.props.onUserChange(userDoc) // onUserChange= { userDoc => this.syncCurrentUser(userDoc)}\n })\n .catch(err =>{\n // console.log('error while signup: ', err)\n if(err.response && err.response.data){\n return this.setState({message: err.response.data.message})\n }\n })\n }", "function Credentials(name, pass) {\n this.name = name\n this.pass = pass\n}", "function make_base_auth(user, password) {\r\n var tok = user + ':' + password;\r\n var hash = Base64.encode(tok);\r\n return \"Basic \" + hash;\r\n}", "signIn() {\n const paramsUser = {\n username: this.username,\n password: this.password,\n };\n let formData = [];\n for (let index in paramsUser) {\n let encodedKey = encodeURIComponent(index);\n let encodedValue = encodeURIComponent(paramsUser[index]);\n formData.push(encodedKey + '=' + encodedValue);\n }\n formData = formData.join('&');\n const params = {\n method: 'POST',\n body: formData,\n headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}\n };\n fetch(CONTEXT_URL + '/login', params)\n .then(response => response.json())\n .then(action(user => {\n sessionStorage.setItem('user', JSON.stringify(user));\n this.user = user;\n }))\n .catch(action(error => this.error = 'Invalid username or password'));\n }", "static loginUser(body) {\n return fetch(\"https://salty-lowlands-70665.herokuapp.com/auth/\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(body),\n }).then((response) => response.json());\n }", "loadStoredCredentials() {\n\n let stored = localStorage.getItem(\"__stitch.creds\");\n\n if (stored != null) {\n let obj = JSON.parse(stored);\n this.email = obj.email;\n this.password = obj.password;\n return obj;\n }\n\n // be sure to have clean cache if __stitch.creds are missing\n this.killCachedSessionAndCredentials();\n\n return null;\n }", "static async loginViaStoredCredentials(token, username) {\n try {\n const response = await axios({\n url: `${BASE_URL}/users/${username}`,\n method: \"GET\",\n params: { token },\n });\n\n let { user } = response.data;\n\n return new User(\n {\n username: user.username,\n name: user.name,\n createdAt: user.createdAt,\n favorites: user.favorites,\n ownStories: user.stories,\n },\n token\n );\n } catch (err) {\n console.error(\"loginViaStoredCredentials failed\", err);\n return null;\n }\n }", "static async loginViaStoredCredentials(token, username) {\n try {\n const response = await axios({\n url: `${BASE_URL}/users/${username}`,\n method: \"GET\",\n params: { token },\n });\n\n let { user } = response.data;\n\n return new User(\n {\n username: user.username,\n name: user.name,\n createdAt: user.createdAt,\n favorites: user.favorites,\n ownStories: user.stories\n },\n token\n );\n } catch (err) {\n console.error(\"loginViaStoredCredentials failed\", err);\n return null;\n }\n }", "function YCellular_set_apnAuth(username,password)\n {\n return this.set_apnSecret(\"\"+username+\",\"+password);\n }", "function userGet(data) {\n data = data.split(\"Logged in user name: \").pop();\n data = data.substr(0, data.indexOf('\\n'));\n data = data.substr(0, data.indexOf('\\r'));\n console.log('Got username on startup')\n console.log(data)\n if(data !== undefined){\n encrypt(data);\n messaging(setup,'userSet', true, '')\n } else {\n messaging(setup,'userSet', false, '')\n }\n return\n}", "function saveCredentials() {\n\tvar username = document.getElementById(\"username\").value;\n\tvar password = document.getElementById(\"password\").value;\n\tvar creds = {\n\t\t\tuser: username,\n\t\t\tpass: password\n\t};\n\tvar store = JSON.stringify(creds);\n\tlocalStorage.setItem(\"AtmosphereLogin\", store);\n}", "generateCredentialsGP () {\n // Generate the Basic Authentication header for a private instance of SLPDB.\n const username = 'BITBOX'\n const password = SLPDB_PASS_GP\n const combined = `${username}:${password}`\n // console.log(`combined: ${combined}`)\n var base64Credential = Buffer.from(combined).toString('base64')\n var readyCredential = `Basic ${base64Credential}`\n\n const options = {\n headers: {\n authorization: readyCredential\n },\n timeout: 15000\n }\n\n return options\n }", "login(username, unencrypt_password) {\n return this.authDB.login(username, unencrypt_password, \"patient\");\n }", "function PdkCredentials(config) {\n RED.nodes.createNode(this, config);\n this.user_email = config.user_email;\n this.user_info = JSON.parse(config.user_info);\n }", "function storeUserCredentials(token) {\n window.localStorage.setItem(LOCAL_TOKEN_KEY, token);\n }", "function continueAuthentication() {\n // Collect any user inputs for next authentication stage\n var authnData = {\n \"loginId\": document.getElementById('username').value,\n \"password\": document.getElementById('password').value,\n \"authId\": AUTH_ID,\n \"hint\": \"VAL_CRED\" //dont change this value.\n };\n authenticate(authnData);\n}", "function Encriptado_datos(xuser, xpassword){\n\n var hash_xuser = CryptoJS.Rabbit.encrypt(xuser, passphrase).toString(CryptoJS.enc.hex);\n var hash_xpassword = CryptoJS.Rabbit.encrypt(xpassword, passphrase).toString(CryptoJS.enc.hex);\n\n localStorage.setItem(\"user\", hash_xuser);\n localStorage.setItem(\"password\", hash_xpassword);\n}", "constructor (adminUsername, adminPassword) {\n this.adminUsername = adminUsername;\n this.adminPassword = adminPassword;\n }", "function Credentials(name, pass) {\n this.name = name;\n this.pass = pass;\n}", "function AppCredential(conn) {this.conn = conn;}", "auth_user_data(state, user){\n state.auth_user = user\n }", "function login() {}", "getUser(user) {\n authClient.get(`https://myflix-2388-app.herokuapp.com/users/${user}`)\n .then(response => {\n //console.log('Account was received successfully');\n this.props.setUser(response.data);\n })\n .catch(function (error) {\n console.log(error);\n });\n }", "function main() {\r\n // user.userLogin(\"[email protected]\", \"sporks\");\r\n}", "function make_base_auth(user, password) {\n var tok = user + ':' + password;\n var hash = btoa(tok);\n return 'Basic ' + hash;\n}", "getUserData() {\n return JSON.parse(localStorage.getItem(SIMPLEID_USER_SESSION));\n }", "function returnNewPassword() {\n return awsTestCredentials.password;\n}", "async login() {}", "function toAuth(email, password){\n // Concatenate email and password together\n let credentials = email + \":\" + password;\n\n // Convert to basic string\n return \"Basic \" + Buffer.from(credentials).toString('base64');\n}", "loginWithPassword(email: string, password: string) {\n if (global.__DEV__) console.log('Logging in with email and password.');\n const options = { user: { email }, password };\n return this.login(options);\n }", "static async loginViaStoredCredentials(token, username) {\n // if we don't have user info, can't log them in -- return null\n if (!token || !username) return null;\n\n const response = await axios.get(`${BASE_URL}/users/${username}`, {\n params: {token}\n });\n\n return new User(response.data.user, token);\n }", "function authenticate_user(res, mysql, context, us, pw, complete){\n\tvar sql = 'SELECT user_id, email, member_since FROM users WHERE email=? AND password=?'\n\tvar inserts = [us, pw];\n\tmysql.pool.query(sql, inserts, function(err, results, fields){\n\t\t\tif(err){\n\t\t\t\tres.write(JSON.stringify(err));\n\t\t\t\tres.end();\n\t\t\t}\n\t\t\tcontext.user = results[0];\n\t\t\tif(typeof context.user === \"undefined\")\n\t\t\t{\n\t\t\t\tcontext.error = 1;\n\t\t\t}\n\t\t\tcomplete();\n\t\t});\n\t}", "getCredentialObject(inputString) {\n\t\tvar userLength = inputString.substring(0, 10);\n\t\tvar intUserLength = parseInt(userLength);\n\t\tvar userName = inputString.substring(10, 10 + intUserLength);\n\t\tvar passwordLength = inputString.substring(10 + intUserLength, 20 + intUserLength);\n\t\tvar intPasswordLength = parseInt(passwordLength);\n\t\tvar password = inputString.substring(20 + intUserLength, 20 + intUserLength + passwordLength)\n\t\treturn {\n\t\t\t\"user\": userName,\n\t\t\t\"pass\": password\n\t\t};\n\t}", "function getOBAuth () {\r\n // debugger\r\n\r\n var clientID = 'yourUsername'\r\n var clientSecret = 'yourPassword'\r\n\r\n // Encoding as per Centro API Specification.\r\n var combinedCredential = clientID + ':' + clientSecret\r\n // var base64Credential = window.btoa(combinedCredential);\r\n var base64Credential = Buffer.from(combinedCredential).toString('base64')\r\n var readyCredential = 'Basic ' + base64Credential\r\n\r\n return readyCredential\n}", "orderAccess() {\n loginPage.open();\n loginPage.username.setValue('[email protected]');\n loginPage.password.setValue('pepito');\n loginPage.submit();\n }", "function setCreds(evt) {\n const addressField = document.getElementById(\"address\");\n address = addressField.value;\n\n const userField = document.getElementById(\"username\");\n username = userField.value;\n\n requestUrl = 'http://' + address + '/api/' + username + '/';\n responseDiv.innerHTML = 'address: ' + address\n + '<br>username: ' + username;\n}", "function createUserCredentials(username, password) {\n password = CriptoService.hashValor(password);\n var userCredentials = {\n username: username,\n password: password,\n role: \"cliente\",\n state: true\n };\n return userCredentials;\n}", "function authenticate(){\n if( !authenticating ) {\n authenticating = true;\n show(loadingLayer);\n hide(loginLayer);\n currUser = document.forms[\"loginForm\"][\"username\"].value;\n currPassw = document.forms[\"loginForm\"][\"password\"].value;\n let userData = JSON.stringify({username : currUser, password : currPassw});\n\n apiPost(\"/user/\"+currUser+\"/authenticate\", evaluateResponse, userData);\n }\n}", "function init() {\n checkCredentials();\n}", "login (state, user_info) {\n state.user_info.user_name = user_info.user_name;\n state.user_info.user_id = user_info.user_id.toString();\n }", "static getCredentials () {\n let cookie = Cookies.get('auth_token');\n if (cookie) {\n return Cookies.getJSON('auth_token');\n }\n return {};\n }", "userDetails() {\n return HTTP.get(\"/userDetails\");\n }", "function getCurrentLoggedInUserAccount() {\n\t//access to the db\n\t//confirm they have proper credentials\n\treturn \"Kimberly\";\n}", "function resetAuth() {\n var userProperties = PropertiesService.getUserProperties();\n userProperties.deleteProperty('dscc.username');\n userProperties.deleteProperty('dscc.password');\n}", "function getAuthTv() {\n return axios.post(`${url}/login`, {\"username\": \"teste\",\"password\": \"teste\"});\n }", "function getAuthTv() {\n return axios.post(`${url}/login`, {\"username\": \"teste\",\"password\": \"teste\"});\n }", "createBasicAuthToken(username, password) {\n return 'Basic ' + window.btoa(username + \":\" + password)\n }", "constructor(userId, encryptedPassword, serverLevel) {\n if (typeof(userId) != 'string') {\n throw new Error('Invalid user ID');\n }\n if (!Buffer.isBuffer(encryptedPassword)) {\n throw new Error('Invalid encrypted password');\n }\n if (typeof(serverLevel) != 'number') {\n throw new Error('Invalid server level');\n }\n\n super(37 + encryptedPassword.length + 16 + (serverLevel < 5 ? 0 : 7));\n\n this.passwordLength = encryptedPassword.length;\n\n this.length = this.data.length;\n this.serviceId = SignonService.SERVICE.id;\n this.templateLength = 1;\n this.requestResponseId = SignonInfoRequest.ID;\n\n this.authenticationScheme = 1; // Only support encrypted\n this.clientCCSID = 1200;\n this.password = encryptedPassword;\n this.userId = userId;\n if (serverLevel >= 5) {\n this.returnErrorMessages = 1;\n }\n }", "function getUserSecretKey() {\n return localStorage.getItem('userSecretKey');\n}", "function loadCredentials() {\n\tvar checkbox = document.getElementById(\"rememberInput\"); \n\tvar loadStore = localStorage.getItem(\"AtmosphereLogin\");\n\tif (loadStore !== null) {\n\t\tcheckbox.checked = true;\n\t\tvar creds = JSON.parse(loadStore);\n\t\tdocument.getElementById(\"username\").value = creds.user;\n\t\tdocument.getElementById(\"password\").value = creds.pass;\n\t}\n\telse {\n\t\tcheckbox.checked = false;\n\t}\n}", "checkUserCredentials() {\n let username = sessionStorage.getItem('username');\n if (!username) {\n this.setState({\n loggedIn: false\n })\n }\n else {\n this.setState({\n loggedIn: true,\n username: username\n })\n }\n }", "function login() {\n var userName = document.getElementById(\"username\");\n var password = document.getElementById(\"password\");\n\n var logonForm = document.getElementById(\"logonForm\");\n logonForm.setAttribute(\"class\", \"hiddenPage\");\n\n request.userName = userName.value;\n\n // the password has not been protected / encyrpted - please change if required.\n request.password = password.value;\n\n // retry the call to the Epicor API\n makeServiceRequest();\n }", "sendRequest(username, password) {\n var xhttp = new XMLHttpRequest();\n xhttp.open(\"POST\", \"/action/auth\", true);\n const encoder = new TextEncoder(\"UTF-8\");\n const data = encoder.encode(password);\n window.crypto.subtle.digest('SHA-256', data).then(digestValue => {\n var encrypt = new jsencrypt.JSEncrypt();\n encrypt.setPublicKey(auth.publicKey);\n\n const encodedPassword = encrypt.encrypt(password);\n\n xhttp.onload = function() {\n var text = xhttp.responseText;\n authModal.modal('hide');\n if (text.indexOf('no') !== -1) {\n alertContainer.html(alertContainer.html() +\n `\n <div class=\"alert alert-warning alert-dismissible fade show\" role=\"alert\">\n <strong>Error!</strong> Invalid credentials\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n `\n );\n } else {\n auth.currentCallback(username, encodedPassword);\n }\n };\n xhttp.send(username+\"\\n\"+encodedPassword+\"\\n\");\n });\n }", "constructor(password, user, host, port) {\n\t\tthis.host = host || DEFAULT_HOST;\n\t\tthis.port = port || DEFAULT_PORT;\n\t\tthis.soap_url = `http://${this.host}:${this.port}/soap/server_sa/`;\n\t\tthis.username = user || DEFAULT_USER;\n\t\tthis.password = password || DEFAULT_PASSWORD;\n\t\tthis.sessionId = SESSION_ID;\n\t\tthis.logged_in = false;\n\t}", "function secureRead (buf, opts, cb) {\n process.stdout.write('password: ')\n fs.read(0, buf, 0, buf.byteLength, null, (err, bytesRead, buf) => {\n if (err) throw err\n buf = buf.subarray(0, bytesRead - 1)\n sodium.sodium_mprotect_noaccess(buf)\n cb(opts, buf)\n })\n}", "static async authenticate(username, password) {\n let pw = await db.query(`SELECT password \n FROM users WHERE username=$1`, \n [username]);\n pw = pw.rows[0];\n if (!pw){\n throw new ExpressError(\"Invalid credentials\", 400)\n }\n return bcrypt.compare(password, pw.password);\n }" ]
[ "0.6504549", "0.6473724", "0.6411177", "0.61328", "0.60653245", "0.60166097", "0.6012215", "0.59828675", "0.5980733", "0.5957961", "0.5953004", "0.59459543", "0.59459543", "0.5934666", "0.59340453", "0.5867887", "0.5867657", "0.5866522", "0.5852946", "0.58469975", "0.58348894", "0.58239514", "0.57869476", "0.57772017", "0.57707936", "0.5752959", "0.5751018", "0.574807", "0.5702337", "0.5700779", "0.57000554", "0.5691128", "0.5669128", "0.56661284", "0.5661779", "0.5659978", "0.5655074", "0.5652394", "0.564464", "0.564464", "0.564464", "0.564464", "0.564464", "0.56412333", "0.56345576", "0.5633891", "0.5627602", "0.561986", "0.5617646", "0.55975896", "0.5597063", "0.5596274", "0.5595496", "0.55951965", "0.55880624", "0.5581493", "0.5581339", "0.5578213", "0.55713737", "0.5571185", "0.55688727", "0.5566767", "0.556419", "0.5560648", "0.5555298", "0.5553496", "0.55407023", "0.5530832", "0.5519471", "0.5515966", "0.5506882", "0.5502556", "0.5499009", "0.54976416", "0.5496225", "0.5493472", "0.54889166", "0.54881996", "0.5487144", "0.54820096", "0.547923", "0.54787076", "0.5475583", "0.5469064", "0.5466324", "0.5463703", "0.5461193", "0.54606986", "0.5456942", "0.5452805", "0.5452805", "0.54510456", "0.5450273", "0.5447283", "0.54401475", "0.54369426", "0.5435997", "0.5435503", "0.54333663", "0.54314053", "0.54305446" ]
0.0
-1
Track last data element clicked for shift click
function deselect(e) { $('.pop').slideFadeToggle(function() { e.removeClass('selected'); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_lastButtonClickHandler() {\n const that = this;\n\n that.last();\n }", "function click(d, _, unshift) {\n d3.event.stopPropagation();\n\n if(d3.event.shiftKey && !unshift) {\n //If you shift-click, it'll toggle fold all the children, instead of itself\n d3.event.shiftKey = false;\n d.values && d.values.forEach(function(node){\n if (node.values || node._values) {\n click(node, 0, true);\n }\n });\n return true;\n }\n if(!hasChildren(d)) {\n //download file\n //window.location.href = d.url;\n return true;\n }\n if (d.values) {\n d._values = d.values;\n d.values = null;\n } else {\n d.values = d._values;\n d._values = null;\n }\n chart.update();\n }", "function click(d, _, unshift) {\n d3.event.stopPropagation();\n\n if(d3.event.shiftKey && !unshift) {\n //If you shift-click, it'll toggle fold all the children, instead of itself\n d3.event.shiftKey = false;\n d.values && d.values.forEach(function(node){\n if (node.values || node._values) {\n click(node, 0, true);\n }\n });\n return true;\n }\n if(!hasChildren(d)) {\n //download file\n //window.location.href = d.url;\n return true;\n }\n if (d.values) {\n d._values = d.values;\n d.values = null;\n } else {\n d.values = d._values;\n d._values = null;\n }\n chart.update();\n }", "function click(d, _, unshift) {\n d3.event.stopPropagation();\n\n if(d3.event.shiftKey && !unshift) {\n //If you shift-click, it'll toggle fold all the children, instead of itself\n d3.event.shiftKey = false;\n d.values && d.values.forEach(function(node){\n if (node.values || node._values) {\n click(node, 0, true);\n }\n });\n return true;\n }\n if(!hasChildren(d)) {\n //download file\n //window.location.href = d.url;\n return true;\n }\n if (d.values) {\n d._values = d.values;\n d.values = null;\n } else {\n d.values = d._values;\n d._values = null;\n }\n chart.update();\n }", "function click(d, _, unshift) {\n d3.event.stopPropagation();\n\n if(d3.event.shiftKey && !unshift) {\n //If you shift-click, it'll toggle fold all the children, instead of itself\n d3.event.shiftKey = false;\n d.values && d.values.forEach(function(node){\n if (node.values || node._values) {\n click(node, 0, true);\n }\n });\n return true;\n }\n if(!hasChildren(d)) {\n //download file\n //window.location.href = d.url;\n return true;\n }\n if (d.values) {\n d._values = d.values;\n d.values = null;\n } else {\n d.values = d._values;\n d._values = null;\n }\n chart.update();\n }", "function handleClick(){\n this.isMouseDown = false\n this.lastX = null\n}", "storeShiftData() {\r\n let dragObj = this.dragObj;\r\n let dragedBtn = dragObj.elem.getElementsByClassName(this.options.dragBtnClassName)[0];\r\n let coords = this.getCoords(dragedBtn);\r\n dragObj.shiftX = dragObj.downX - coords.left;\r\n dragObj.shiftY = dragObj.downY - coords.top;\r\n dragObj.avatar.classList.add('dragged');\r\n //It's added Name width to shifX\r\n dragObj.shiftX += dragObj.avatar.firstElementChild.offsetWidth;\r\n }", "function userMarkerClickListener(event) {\n lastLocation = event.latLng;\n return dropClick();\n}", "function auxClicked(ev) {\n clicked(ev, dificuldade, score);\n }", "_onMovedLineClicked(e) {\n e.preventDefault();\n e.stopPropagation();\n\n this.trigger('moveFlagClicked', $(e.target).data('line'));\n }", "_setEvent_previous(){\n $(this._controlSelectors.previous).click(()=>{\n this.previous();\n });\n }", "_onIncrementalClick(event) {\n if (this._model.selectionStart) {\n this._model.selectionEnd = this._getMouseBufferCoords(event);\n }\n }", "_endClick() {\n const that = this;\n\n //Click Handler\n that._resizeHandler();\n\n if (that.disabled || that.readonly) {\n return;\n }\n\n if (that._isInactiveOn('click')) {\n return;\n }\n\n if (that.clickMode !== 'release' && that.clickMode !== 'pressAndRelease') {\n //event.preventDefault();\n //event.stopPropagation();\n }\n else {\n that._updateStateOnClick();\n }\n\n that.indeterminate = false;\n that._updateHidenInputNameAndValue();\n }", "function handleLastAnswerClick() {\r\n if (previousAnswer && previousAnswer !== 'ERROR') {\r\n calculationArr.push(previousAnswer);\r\n }\r\n }", "function logMouseButton(e) {\n if (localStorage.speedMode === \"false\") { return }\n var element = e.target;\n switch (e.button) {\n case 0:\n if (e.target.value) {\n // 'left button clicked ';\n }\n break;\n case 1:\n log.textContent = 'Middle button clicked.';\n break;\n case 2:\n element.focus();\n if (e.target.value) { copyFieldDataToClipBoard(e) }\n if (!e.target.value) { document.execCommand(\"paste\") }\n break;\n default:\n log.textContent = `Unknown button code: ${e.button}`;\n }\n\n\n}", "function btnDown() {\n //dbg(\"mousedown\");\n lastBtn = this.id;\n //add graphical feed back here\n dbg({ keydown: this.id });\n rokupost(\"keydown\", this.id);\n}", "_previousButtonClickHandler() {\n const that = this;\n\n that.prev();\n }", "_previous(event){\t\t\n\t\tif(this.currentContribution > 0){\n\t\t\tthis.currentContribution--;\n\t\t}else{\n\t\t\tthis.currentContribution = this.contributions.length - 1;\n\t\t}\n\n\t\tevent.target.firstClick = false;\n\t\tthis._updateContent(this._diff());\n\t}", "function saveLastAction(event){\n localStorage.setItem( 'last_action', event );\n}", "function tapOrClickEnd(evt) {\n // time elapsed holding the click\n var elapsed = Date.now() - mousedown;\n mousedown = undefined;\n target = evt.target || evt.srcElement;\n\n // if event was right click, pass the information to the general iClickedOnAStation function\n if (evt.which == 3) {\n if (target.className == \"circleSymbol\" || target.className == 'circleSymbolSmall') {\n iClickedOnAStation(target.id, \"right\")\n return;\n }\n }\n // if click event was over 800ms, pass the information to the general iClickedOnAStation function\n if (elapsed >= 800) {\n if (target.className == \"circleSymbol\" || target.className == 'circleSymbolSmall') {\n iClickedOnAStation(target.id, \"right\")\n return;\n }\n }\n // if click event was something else (middle, left), pass the information to the general iClickedOnAStation function\n else {\n if (target.className == \"circleSymbol\" || target.className == 'circleSymbolSmall') {\n iClickedOnAStation(target.id, \"left\")\n return;\n }\n }\n evt.preventDefault();\n return false;\n}", "function handlePrevSighting() {\n $(\".wildlife-results\").on(\"click\", \".left-arrow-button\", (event) => {\n const organismID = $(event.currentTarget)\n .parents(\".wildlife-result\")\n .data(\"organism-id\");\n const currentSighting = $(event.currentTarget)\n .parents(\".wildlife-result\")\n .find(\".sighting.js-current-sighting\");\n\n hideCurrentSighting(organismID);\n\n const prevSightingID = currentSighting.prev(\".sighting\")\n .data(\"sighting-id\");\n showSighting(organismID, prevSightingID);\n\n updateButtonsDisplayed(organismID);\n });\n }", "handleClickSelf(event) {\n if (event.target.classList.contains('clicked')) {\n event.target.classList.remove('clicked');\n this.showBackSide(event.target);\n this.resetClicks();\n return true;\n }\n return false;\n }", "function breadcrumbsBackButtonClickEventHandler() {\n eaUtils.returnToLastSearchOrProduct(historyCursor, $.currentProduct.getId());\n}", "quartHeureOnClick(event) {\n //TODO gerer le double click pour la desaffectation\n console.log(\"quartHeureOnClick\");\n\n //what time did we click on ?\n var $target = $(event.target);\n\n this.filterTaskList($target)\n }", "function lastInteract() {\n var now = new Date().getTime();\n $(\"body\").data(\"lastInteract\", now); \n}", "function _click(d){\n \n }", "function btnDown(){\r\n\tlastBtn = this.id;\r\n\trokupost(\"keydown\",this.id);\r\n}", "onBackClick() {\n const me = this,\n { min } = me;\n\n if (!me.readOnly && me.value) {\n const newValue = DateHelper.add(me.value, -1 * me._step.magnitude, me._step.unit);\n if (!min || min.getTime() <= newValue) {\n me._isUserAction = true;\n me.value = newValue;\n me._isUserAction = false;\n }\n }\n }", "handleChildClick(event){\n\n if(event.detail.trackAll === 'Deselect'){\n this.selectionCount = this.selectionCount + 1;\n }\n else{\n this.selectionCount = this.selectionCount - 1;\n }\n }", "get clickAction() {\n return this._data.click_action;\n }", "function clicked(d,i) {\n\n}", "function clicked(d,i) {\n\n}", "function previous(){\n scope.model.currentIndex--;\n scope.model.data = scope.model.results[scope.model.currentIndex];\n scope.model.currentStart = scope.model.currentStart - scope.model.results[scope.model.currentIndex].length;\n $rootScope.$emit('setMarkers',{data:scope.model.data});\n }", "function onGroupBackClick(){\r\n\t\t\r\n\t\texitEditGroupMode();\r\n\t\tgetSelectedCatAddons();\r\n\t\t\r\n\t}", "function alreadyClicked(evt) {\n return ($(evt.target).parent().attr('clicked'));\n}", "onBackClick() {\n const me = this,\n {\n min\n } = me;\n\n if (!me.readOnly && me.value) {\n const newValue = DateHelper.add(me.value, -1 * me.step.magnitude, me.step.unit);\n\n if (!min || min.getTime() <= newValue) {\n me._isUserAction = true;\n me.value = newValue;\n me._isUserAction = false;\n }\n }\n }", "_addClickHandler($element, that, colIndex){\n $element.on('mouseup', function(e){\n if(!that.model.winner){\n that._insertToken(parseInt(colIndex));\n $(this).remove();\n }\n })\n }", "function onCanvasMouseUp() {\n window.mouseDown = false;\n window.lastCellClicked = null;\n}", "function ansClicked (eventData) {\n\tlet buttonInformation = eventData;\n\tlet ansClicked = buttonInformation.target.textContent;\n\tinsertDisplay(ansClicked);\n\t\n}", "function St(e){return e.tabIndex>-1}", "function goBack(event) {\n $(this).parent('ul').prev('a').removeClass('selected').attr('aria-expanded','false')\n $(this).parent('ul').addClass('is-hidden').attr('aria-hidden', 'true').parent('.has-children').parent('ul').removeClass('moves-out'); \n }", "function handleClick(evt) {\n const marker = evt.target.id;\n if(marker === \"plus\") { add();}\n else if(marker === \"minus\") { subtract(); }\n console.log(marker);\n console.log(x.value)\n}", "function buthandleclick_this() {\n\tbuthandleclick(this);\n}", "function prevEditing() {\n //$(svgRoot).find('.prev-editing').removeClass('prev-editing').click();\n var prev = $(svgRoot).find('.prev-editing');\n if ( prev.length > 0 )\n prev.removeClass('prev-editing').click();\n else\n $(svgRoot).find('.editable').first().click();\n }", "addBeerToList(evt){\n if (evt.type === 'click' && evt.clientX !== 0 && evt.clientY !== 0) {\n this.addToLocalStorage();\n }\n\n }", "function handleClick3(event){\n\t \tvar indexFor=event.index;\n\t\tvar graph=event.graph;\n\t\tvar data=graph.data;\n\t\tvar dataContx=data[indexFor].dataContext;\n\t\tvar dataFor=graph.title;\n\t if(dataFor=='Re-Open'){\n\t \tdataFor='Re-opened';\n\t }\n\t getData(dataContx.deptId,dataFor,'Re','dataFor','Level1');\n\t}", "doubleClick(x, y, _isLeftButton) {}", "handleScanClickDown(e) \n { \n if(this.state.posInLocusArray > 0) \n { \n this.setState({ posInLocusArray: this.state.posInLocusArray-1 }); \n } \n }", "function priorityUp(event) {\n var id = $($(event.target).parents('.mdl-cell').get(0)).attr('id');\n var idPrev = $($(event.target).parents('.mdl-cell').get(0)).prev('.mdl-cell').attr('id');\n if (!idPrev) return;\n console.log(id, idPrev);\n}", "function markerClick(data) {\n let data2;\n $(markers).each(function(i) {\n markers[i].addListener('click', function() {\n if(this.infowindow) return this.infowindow.open(map, this);\n let markerNumber = markers.indexOf(this);\n displayWindow(data[markerNumber], this);\n });\n });\n }", "_handleClick() {\n this._stepper.previous();\n }", "function popupHookListeners() {\n\tdocument.addEventListener(\"click\", function (event) {\n\t\t// saves last clicked element\n\t\t// currently used for shift-click select functionality\n\t\tpop.last_clicked_el = event.target;\n\t});\n}", "function savedStopPointOnClick(ev, row)\n{\n\tlet info = storage.getStopPoints();\n\tsetCurrentStopPointInfo( { name: \"\", info: info } );\n\tresetSavedStopPointFrame();\n\tresetSearchFrame();\n\tdisplayStopPointInfo(info, true);\n\tstopPointOnClick(ev, row);\n}", "function clickedItem(e) {\n\t\tvar $li = $(e.target);\n\t\tvar label = $li.attr('data-label');\n\t\tvar value = $li.attr('data-value');\n\n\t\t// Forward to update function\n\t\tselectUpdateValue(e.data,$li);\n\n\t\tselectClose(e.data);\n\t}", "function bitClick() {\n if (date !== null)\n handleBitClick(bitIndex)\n }", "function releaseClick() {\n if (isMarkerClicked) {\n clickedMarker.setIcon(unselectedIcon);\n linkRowDetailsTrack(clickedMarker, 'unLink');\n isMarkerClicked = false;\n }\n}", "pressEnd () {\n if (this.buttonHasFocus) {\n this.index = this.length - 1;\n this.focus();\n }\n }", "function mouse_clicked(){\n\t\treturn M.mouse_clicked;\n\t}", "function lastItem() {\n\t\tstopSlideshow();\n\t\tchangeItem(anchors.length-1);\n\t}", "'click .minus-button'(event, instance) {\n event.preventDefault();\n if (instance.dataIngs.get().length > 1) {\n const currentIngs = instance.dataIngs.get();\n currentIngs.pop();\n instance.dataIngs.set(currentIngs);\n }\n }", "updateBeer(evt){\n if (evt.type === 'click' && evt.clientX !== 0 && evt.clientY !== 0) {\n this.fetchData()\n }\n\n }", "function $z4uS$export$getPointerData(evt) {\n // if is touch event, return last item in touchList\n // else return original event\n return evt.touches ? evt.touches[evt.touches.length - 1] : evt;\n}", "function prevEntry() {\n selectEntry(g_cur_entry - 1, true);\n}", "clickHandler(data,slf){\n var changed={val:false};\n slf.state.levelCount=1;\n slf.state.colAll=false;\n slf.state.exAll=false;\n slf.__changeData(slf.state.rawData,data.rel.split('/'),changed,slf);\n\n slf.props.updatePWD(data.rel.split('/')[data.rel.split('/').length - 1]);\n\n slf.forceUpdate();\n }", "function recordClick(event) {\n console.log(\"click!\");\n var clickedItem = event.target;\n itemSource = clickedItem.src;\n console.log(clickedItem);\n var linkID = clickedItem.id;\n // var lastSlash = itemSource.lastIndexOf(\"/\") + 1;\n // itemSource = itemSource.substring(lastSlash);\n console.log(linkID + \" was clicked.\");\n\n // resultsArray.push(itemSource);\n // for (var index = 0; index < images.length; index++) {\n // if ((images[index].imageSource) === itemSource) {\n // images[index].y ++;\n // }\n\n localStorage.setItem(\"clickedItem\", linkID);\n}", "function onCanvasTouchEnd() {\n window.mouseDown = false;\n window.lastCellClicked = null;\n event.preventDefault();\n}", "function callback(event) {\n var element = $( event.target );\n if (element.is( \"i\" )) { // click i tag will also trigger button click, here we want the sibling of savebtn not <i>\n element = element.parent();\n }\n var inputEl = element.prev();\n var key = inputEl.attr('id');\n var value = inputEl.val();\n localStorage.setItem(key, value);\n}", "savePrevious(data){\r\n this.previous.push(data.val());\r\n }", "onStopClick(e) {\n const { actions, dispatch } = this.props;\n const key = e.currentTarget.getAttribute('data-key');\n dispatch(actions.updateSelectedStop(parseInt(key, 10)));\n }", "function CALCULATE_TOUCH_DOWN_OR_MOUSE_DOWN() {\r\n \r\nif (GLOBAL_CLICK.CLICK_TYPE == \"right_button\") {\r\n \r\nfor (var x=0;x<HOLDER.length;x++){\r\n \r\n\tif (GET_DISTANCE_FROM_OBJECT.VALUE(x) < HOLDER[x].FI ) {\r\n\t\r\n\tHOLDER[x].FOKUS('R');\r\n HOLDER[x].SHOW_MENU();\r\n GLOBAL_CLICK.CLICK_PRESSED = true;\r\n \r\n E(\"NAME_OF_SELECTED\").value = HOLDER[x].NAME;\r\n E(\"NAME_OF_SELECTED\").dataset.index_ = x;\r\n \r\n VOICE.SPEAK(\"Object \" + HOLDER[x].NAME + \" SELECTED . \");\r\n \r\n }else {\r\n HOLDER[x].HIDE_MENU(x);\r\n }\r\n \r\n}\r\n/////////////\r\n//right\r\n//////////// \r\n}\r\nelse if (GLOBAL_CLICK.CLICK_TYPE == \"left_button\"){\r\n\r\nfor (var x=0;x<HOLDER.length;x++){\r\n if (GET_DISTANCE_FROM_OBJECT.VALUE(x) < HOLDER[x].FI ) {\r\n \r\n\t\r\n\tHOLDER[x].FOKUS('L');\r\n\t HOLDER[x].SHOW_MENU('L');\r\n HOLDER[x].SELECTED = true;\r\n \r\n \r\n \r\n \r\n GLOBAL_CLICK.CLICK_PRESSED = true;\r\n \r\n \r\n \r\n E(\"NAME_OF_SELECTED\").value = HOLDER[x].NAME;\r\n E(\"NAME_OF_SELECTED\").dataset.index_ = x;\r\n \r\n //VOICE.SPEAK(\"Object \" + HOLDER[x].NAME + \" SELECTED . \");\r\n \r\n }else {\r\n \r\n HOLDER[x].HIDE_MENU(x);\r\n \r\n \r\n }\r\n }\r\n}\r\n \r\n\r\n\r\n\r\n\r\n }", "addMouseEvent() {\n const clickEvent = _.debounce((e)=> {\n if (this.prevValue && this.prevValue !== e.clientX) {\n this._socketService.send('addEndPos', this.calculatePercent(e.clientX));\n }\n this.prevValue = e.clientX;\n }, 60);\n this._interactiveDom.bind('mousedown', clickEvent);\n }", "function click(d) {\n ex3_curr_node = d[\"name\"];\n update_all();\n}", "function logClick (e) {\n clickCnt++; \n showClicks();\n}", "get _last(){return this===OverlayElement.__attachedInstances.pop()}", "focusLastElement() {\n this.trapFocus(true);\n }", "shift(_this) {\n _this.array[0] && _this.array[0].dom && _this.alertBoxElement.removeChild(_this.array[0].dom);\n _this.array.length && _this.array.shift();\n }", "function cellRightClick() {\n\tcellClick(pointingAtX,pointingAtY, null);\n}", "function cb_beforeClick(cb, pos) { }", "function ignoreClick() {\n txts.pop();\n}", "function handlePrevButtonClick(){\n count--;\n}", "activeClick() {\n var $_this = this;\n var action = this.options.dblClick ? 'dblclick' : 'click';\n\n this.$selectableUl.on(action, '.SELECT-elem-selectable', function () {\n $_this.select($(this).data('SELECT-value'));\n });\n this.$selectionUl.on(action, '.SELECT-elem-selection', function () {\n $_this.deselect($(this).data('SELECT-value'));\n });\n\n }", "back() {\n const { index, showTooltip } = this.state;\n const { steps } = this.props;\n const previousIndex = index - 1;\n\n const shouldDisplay = Boolean(steps[previousIndex]) && showTooltip;\n\n this.logger('joyride:back', ['new index:', previousIndex]);\n this.toggleTooltip(shouldDisplay, previousIndex, 'next');\n }", "elementSelected(sender, data) {\n this.set('postOverlayData', data);\n }", "function collectData (e){\n upSide()\n if (display.textContent === \" 14\"){\n display.textContent = \"\";\n }\nlet action = '';\nif (e.key >= 0 && e.key <= 9) {console.log(e.key)}\nif (e.key === \".\"){action= 'decimal'; console.log(e.key) }\nif (e.key === \"=\"){action= 'calculate'; console.log(e.key)}\nif (e.key === \"Backspace\"){action= 'back'; console.log(e.key)}\nif (e.key === \"+\"|| e.key === \"/\"|| e.key === \"*\"){action= 'op';\n console.log(e.key);\n data = this.id;\n display.textContent= display.textContent + e.key;}\nif ( e.key === \"-\"){ action= 'minus'; console.log(action)}\n}", "function handleClick(e){\n Product.current = [];\n Product.click++;\n for(let i = 0; i < Product.all.length; i++){\n if(e.target.alt === Product.all[i].name){\n Product.all[i].timesClick++;\n updateChartArrays();\n }\n }\n runSurvey();\n}", "function lastClicked() { \n // end the quiz and show the score\n console.log(\"last clik func active\");\n clearInterval(timeInterval);\n quiz.style.display = \"none\";\n\n //todo//\n }", "onRightClick( event ) {\r\n var cell = event.target.dataMine;\r\n this.flagCell(cell);\r\n event.preventDefault();\r\n }", "function click() {\n d3_eventCancel();\n w.on(\"click.drag\", null);\n }", "function clicked() {\r\n // consists of animations and transitions\r\n resetClickLinks();\r\n // Click node Action and Info\r\n // only if it is defined\r\n click_node = drag_node; // defining here\r\n nodePop(click_node);\r\n loadInfo();\r\n}", "function prevOnClick() {\n index--;\n if (index < 0)\n index = imageArray.length - 1;\n drawItem();\n}", "function updateClickHandlers($base) {\n var data = $base.data('slidingtile'),\n emptyRow = data.emptyTile.row,\n emptyCol = data.emptyTile.col;\n \n $base.children('.tile').each(function () {\n var $tile = $(this),\n data = $tile.data('slidingtile');\n \n $tile.off('click');\n \n// An adjacent tile is either one row *or* one column from the empty tile, so\n// we can identify them by taking the absolute values of the row and column\n// displacements and find the sum of these two values. For adjacent tiles, this\n// value will be equal to 1.\n if (Math.abs(data.cPos.row - emptyRow) + Math.abs(data.cPos.col - emptyCol) === 1) {\n $tile.click(function () {\n moveTile($base, $(this));\n });\n }\n });\n }", "function selectUpTo(div, ctrl) {\n var divs = document.getElementsByClassName(emItem);\n var idxLast = -1;\n var idxNew = -1;\n for (var i = 0; i < divs.length; i++) {\n if (divs[i] == lastSelected) idxLast = i;\n if (divs[i] == div) idxNew = i;\n if (idxLast != -1 && idxNew != -1) break;\n }\n if (idxLast == -1 || idxNew == -1) {\n console.error(\"Something went wrong with shift-click!\");\n return;\n }\n // We're gonna iterate from new to last. If they're in the wrong order, switch their values.\n if (idxNew < idxLast) {\n var temp = idxNew;\n idxNew = idxLast;\n idxLast = temp;\n }\n while (idxLast <= idxNew) {\n if (!ctrl) addToSelected(divs[idxLast]);\n else removeFromSelected(divs[idxLast]);\n idxLast++;\n }\n}", "function mousedown() {\n event_counter++; //To generate id\n var point = d3.mouse(this);\n var snapX = Math.floor(point[0] - (point[0]%(XTicks)) - DRAGBAR_WIDTH/2),\n snapY = Math.floor(point[1]/RECTANGLE_HEIGHT) * RECTANGLE_HEIGHT;\n drawEvents(snapX, snapY, null);\n\n //D3, Exit to Remove Deleted Data\n task_g = timeline_svg.selectAll(\".task_g\").data(task_groups, function(d) {return d.id});\n task_g.exit().remove();\n\n addEventToJSON(snapX, snapY, event_counter, true);\n}", "function mousePressed() {\n $(\"#winner-info\").html(\"\");\n for (var i = 0; i < dataPoints.length; i ++) {\n dataPoints[i].clicked();\n }\n}", "function goBack() {\n id('data').innerHTML = \"\";\n id(\"find-btn\").disabled = false;\n }", "onAuxClick(event) {\n event.stopPropagation();\n event.preventDefault();\n return false;\n }", "function operatorClicked(eventData) {\n\tlet buttonInformation = eventData;\n\tlet operatorClicked = buttonInformation.target.textContent;\n\tinsertDisplay(operatorClicked);\n}", "externalClick() {\n this._strikeClick();\n this._localPointer.x = this.getPointer().x;\n this._localPointer.y = this.getPointer().y;\n }", "function savedOnClick(ev)\n{\n\tsearchInfoFrame.clear();\n\tlet savedStopPoints = storage.getStopPoints();\n\tgenerateSavedStopPointTable(savedStopPoints, false);\n\tresetSearchFrame();\n\tresetArrivalsFrame();\n\tresetStopPointFrame();\n}", "handleMapClick(event) {\n const nextMarkers = [\n ...this.state.markers,\n {\n position: event.latLng,\n defaultAnimation: 2,\n key: Date.now(), // Add a key property for: http://fb.me/react-warning-keys\n },\n ];\n this.setState({\n markers: nextMarkers,\n });\n\n if (nextMarkers.length === 3) {\n alert(\n `Right click on the marker to remove it`,\n `Also check the code!`\n );\n }\n }", "function clickHandler(event){\n\t\t\tif(ignoreClick){\n\t\t\t\tignoreClick = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar offset = overlay.cumulativeOffset();\t\t\t\n\t\t\ttarget.fire('flotr:click', [{\n\t\t\t\tx: xaxis.min + (event.pageX - offset.left - plotOffset.left) / hozScale,\n\t\t\t\ty: yaxis.max - (event.pageY - offset.top - plotOffset.top) / vertScale\n\t\t\t}]);\n\t\t}" ]
[ "0.6382816", "0.5936566", "0.5936566", "0.5936566", "0.5936566", "0.5741679", "0.56731623", "0.5636553", "0.5625179", "0.56077456", "0.55954796", "0.5590035", "0.55803204", "0.5547504", "0.5543896", "0.5472042", "0.54440814", "0.5410817", "0.54104626", "0.5357239", "0.5327217", "0.53155684", "0.5311412", "0.5306613", "0.52781326", "0.52744687", "0.5269044", "0.52674985", "0.526662", "0.5265593", "0.52654135", "0.52654135", "0.52613205", "0.5259942", "0.52548695", "0.5240838", "0.52355725", "0.52337885", "0.52313715", "0.52221054", "0.5217641", "0.52082366", "0.52042747", "0.5203182", "0.519602", "0.5182913", "0.5179053", "0.5178921", "0.5163218", "0.51616776", "0.5160234", "0.51590705", "0.5157856", "0.515548", "0.515356", "0.5147214", "0.51309884", "0.51308787", "0.5118403", "0.51183414", "0.51154035", "0.5115335", "0.511085", "0.51068795", "0.51026124", "0.50991595", "0.5090387", "0.50893724", "0.5084998", "0.50834155", "0.5080754", "0.5073542", "0.50715435", "0.5068567", "0.5063811", "0.50564843", "0.5053273", "0.5052544", "0.5048935", "0.50420713", "0.5041291", "0.5033848", "0.5031", "0.5022741", "0.5016871", "0.50148314", "0.5010764", "0.500892", "0.50015414", "0.5001502", "0.499181", "0.49915135", "0.49904346", "0.4988521", "0.49875656", "0.49872077", "0.49819756", "0.4980466", "0.49701828", "0.49685857", "0.49649358" ]
0.0
-1
Deploys a network app using the admin connection
function upgradeApp(){ // 3. Create a Business Network Definition object from directory var bnaDef = {} BusinessNetworkDefinition.fromDirectory(bnaDirectory).then(function(definition){ bnaDef = definition; console.log("Successfully created the definition!!! ",bnaDef.getName()) // 4.Install the new version of the BNA return adminConnection.install(bnaDef); }).then(()=>{ // 5. start the network // If you do not have the app installed, you will get an error console.log("Install successful") return adminConnection.start(appName, version, { networkAdmins: [ {userName : 'admin', enrollmentSecret:'adminpw'} ] } ) }).then(()=>{ console.log('Network up and runing!!! ', 'Network name: ', bnaDef.getName(),' ', 'Network version: ', bnaDef.getVersion()); //6. connect network admin card adminConnection.connect(cardNameForNetworkAdmin).then(()=>{ // 7. Ping the network adminConnection.ping(appName).then(function(response){ console.log("Ping Response:"); console.log(response); }); }) // 8. Disconnect adminConnection.disconnect(); }).catch(function(error){ console.log(error); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create(appName, callback) {\n commons.post(format('/%s/apps/', deis.version), {\n id: appName\n }, callback);\n }", "async function deployiOSDApp(noDebug, forProd, wipeStorage, localMDNS) {\n var runHelper = new RunHelper()\n var ionicHelper = new IonicHelper()\n\n // Make sure mandatory dependencies are available\n if (!SystemHelper.checkIonicPresence()) {\n console.error(\"Error:\".red, \"Please first install IONIC on your computer.\")\n return\n }\n if (!SystemHelper.checkPythonPresence()) {\n console.error(\"Error:\".red, \"Please first install Python on your computer.\")\n return\n }\n\n //let outputEPKPath = \"/var/folders/d2/nw213ddn1c7g6_zcp5940ckw0000gn/T/temp.epk\"\n runSharedDeploymentPhase(noDebug, forProd).then((sharedInfo)=>{\n runHelper.runDownloadService(sharedInfo.outputEPKPath, sharedInfo.ipAddress, localMDNS, wipeStorage).then(()=>{\n console.log(\"RUN OPERATION COMPLETED\".green)\n\n if (!noDebug) {\n console.log(\"NOW RUNNING THE APP FOR DEVELOPMENT\".green)\n console.log(\"Please wait until the ionic server is started before launching your DApp on your device.\".magenta)\n ionicHelper.runIonicServe()\n }\n else {\n // Manually exit to force close bonjour and express...\n process.exit(0)\n }\n })\n .catch((err)=>{\n console.error(\"Failed to upload your DApp to your device\".red)\n console.error(\"Error:\",err)\n })\n })\n}", "function createBrandNewApp ({template, db, answers, promptsAnswers}) {\n try {\n // call the template commands\n let config = require(`${process.cwd()}/templates/${template}/config.js`)\n let cmd = config.cmd({\n template: template\n , application: answers.application\n , displayName: answers.displayName\n , domain: answers.domain\n , organization: answers.organization\n , region: answers.region\n , promptsAnswers: promptsAnswers\n , db: db\n , mandrakeLocation: __dirname\n , exec: exec\n })\n \n\n let res = exec(cmd)\n\n if(res.code !== 0) { return monet.Either.Left(res.stderr) }\n // creation on Clever Cloud is OK\n // so, get the generated configuration file\n // create a git repository\n // push to Clever-Cloud\n //console.info(res.stdout)\n\n return getCleverCloudApplicationConfiguration({answers}).cata(\n err => monet.Either.Left(err),\n conf => {\n console.log(\"🎩 Application configuration: \", conf)\n let app_id = conf.app_id // Clever application Id\n console.log(\"🎩 Your Clever Application id is: \", app_id)\n console.log(\"🎩 Creating a git repository, then push to 💭 ☁️ ...\")\n\n //---------------------------------------\n // extract environment variables\n // useful to retrieve the uri of a database for example\n let getEnvVars = () => {\n let res = exec([\n `cd ${answers.application}; `\n , `clever env`\n ].join(''))\n \n let raw_envvars = res.code === 0 ? res.stdout.split('\\n') : null\n\n let envvars = raw_envvars !== null \n ? raw_envvars.filter(item => (!item.startsWith(\"#\")) && (!item == \"\")).map(item => {return {name:item.split(\"=\")[0], value:item.split(\"=\")[1]} })\n : null\n return envvars\n }\n\n //---------------------------------------\n // extract services (linked applications and addons)\n // useful to retrieve the uri of an fs-bucket for example\n let getServices = () => {\n let res = exec([\n `cd ${answers.application}; `\n , `clever service`\n ].join(''))\n \n let raw_services = res.code === 0 ? res.stdout.split('\\n').filter(line => line.length > 0) : null\n\n let addons = raw_services !== null \n ? raw_services.filter(item => raw_services.indexOf(item) > raw_services.indexOf(\"Addons:\"))\n .map(item => {\n return {\n name: item.trim().split(\" \")[0],\n id: item.trim().split(\"(\")[1].split(\")\")[0]\n }\n })\n : null\n\n let applications = raw_services !== null \n ? raw_services.filter(item => raw_services.indexOf(item) < raw_services.indexOf(\"Addons:\") && raw_services.indexOf(item) > raw_services.indexOf(\"Applications:\"))\n .map(item => {\n return {\n name: item.trim().split(\" \")[0],\n id: item.trim().split(\"(\")[1].split(\")\")[0]\n }\n })\n : null\n\n\n /*\n services.filter(item => services.indexOf(item) > services.indexOf(\"Addons:\"))\n .map(item => {\n return {\n name: item.trim().split(\" \")[0],\n id: item.trim().split(\"(\")[1].split(\")\")[0]\n }\n })\n services.filter(item => services.indexOf(item) < services.indexOf(\"Addons:\") && services.indexOf(item) > services.indexOf(\"Applications:\") )\n .map(item => {\n return {\n name: item.trim().split(\" \")[0],\n id: item.trim().split(\"(\")[1].split(\")\")[0]\n }\n })\n */\n\n return {addons, applications}\n\n }\n\n let envvars = getEnvVars();\n let services = getServices();\n \n\n if(config.afterCreate) {\n exec(config.afterCreate({\n template: template\n , application: answers.application\n , displayName: answers.displayName\n , domain: answers.domain\n , organization: answers.organization\n , region: answers.region\n , promptsAnswers: promptsAnswers\n , db: db\n , mandrakeLocation: __dirname\n , exec: exec\n , envvars: envvars\n , services: services\n , config: conf // content of `${process.cwd()}/${answers.application}/.clever.json`\n }))\n }\n\n //---------------------------------------\n \n // perhaps to be splitted: creqte git repo, then push to Clever\n return createGitRepositoryAndPushToCleverCloud({app_id, answers}).cata(\n err => monet.Either.Left(err),\n res => {\n \n if(config.afterPush) {\n\n exec(config.afterPush({\n template: template\n , application: answers.application\n , displayName: answers.displayName\n , domain: answers.domain\n , organization: answers.organization\n , region: answers.region\n , promptsAnswers: promptsAnswers\n , db: db\n , mandrakeLocation: __dirname\n , exec: exec\n , envvars: envvars\n , services: services\n , config: conf // content of `${process.cwd()}/${answers.application}/.clever.json`\n }))\n }\n \n return monet.Either.Right(Object.assign({app_id, template}, answers))\n }\n ) // createGitRepositoryAndPushToCleverCloud\n }\n ) // getCleverCloudApplicationConfiguration\n } catch(err) {\n return monet.Either.Left(err.message)\n }\n}", "function createApp(config, cb) {\n\n config.user = config.username; // Management.create expects 'user' parameter in config obj\n\n var management = volos.Management.create(config);\n\n management.deleteDeveloper(info.devRequest.email, function() {\n\n console.log('Creating developer %s', info.devRequest.email);\n\n management.createDeveloper(info.devRequest , function(err, developer) {\n if (err) { throw err; }\n\n console.log('Creating application %s for developer %s', info.appRequest.name, developer.id);\n\n info.appRequest.developerId = developer.id;\n management.createApp(info.appRequest, cb);\n });\n });\n}", "createApplication (app : MinimalAccApplication) : Promise<any> {\n return this.makeRequest(\"applications\", \"POST\", app)\n }", "function do_undeploy(id,username)\n{\n $.ajax({\n url: \"/\"+username+\"/apps/\"+id+\"/undeploys\",\n type: \"POST\",\n cache: false,\n data: \"app_id=\"+id\n });\n}", "async function appCreate(packageName, contractName, admin, data) {\n const appAddress = getAppAddress();\n\n const app = await App.at(appAddress);\n const tx = await app.create(packageName, contractName, admin, data);\n const createdEvent = expectEvent.inLogs(tx.logs, 'ProxyCreated');\n return createdEvent.args.proxy;\n}", "function localMachine(path, projecttype, buildtype, buildarchs) {\n Log('Deploying to local machine ...');\n makeAppStoreUtils(path);\n uninstallApp(path);\n installApp(path, projecttype, buildtype, buildarchs);\n\n var command = \"powershell -ExecutionPolicy RemoteSigned \\\". \" + WINDOWS_STORE_UTILS + \"; Start-Locally '\" + PACKAGE_NAME + \"'\\\"\";\n Log(command);\n exec_verbose(command);\n}", "deployPost(incomingOptions, cb) {\n const Rollbar = require('./dist');\n\n let apiInstance = new Rollbar.DefaultApi(); // String | Use a post server item access token\n /*let xRollbarAccessToken = \"xRollbarAccessToken_example\";*/ let opts = {\n body: new Rollbar.Api1DeployRequest(), // Api1DeployRequest |\n };\n\n if (incomingOptions.opts)\n Object.keys(incomingOptions.opts).forEach(\n (key) =>\n incomingOptions.opts[key] === undefined &&\n delete incomingOptions.opts[key]\n );\n else delete incomingOptions.opts;\n incomingOptions.opts = Object.assign(opts, incomingOptions.opts);\n\n apiInstance.deployPost(\n incomingOptions.xRollbarAccessToken,\n incomingOptions.opts,\n (error, data, response) => {\n if (error) {\n cb(error, null, response);\n } else {\n cb(null, data.result, response);\n }\n }\n );\n }", "async function deployToAllNetworks() {\n await Promise.all(\n networks.map(async network => {\n try {\n await shell(`truffle exec ${deployPath} --network ${network}`);\n } catch (e) {\n console.error(`Error deploying on network ${network}: ${e.stack}`);\n }\n })\n );\n}", "async function deployAndroidDApp(noDebug, forProd, wipeStorage, device) {\n var runHelper = new RunHelper()\n var ionicHelper = new IonicHelper()\n\n // Make sure mandatory dependencies are available\n if (!SystemHelper.checkIonicPresence()) {\n console.error(\"Error:\".red, \"Please first install IONIC on your computer.\")\n return\n }\n if (!SystemHelper.checkADBPresence()) {\n console.error(\"Error:\".red, \"Please first install Android tools (especially ADB) on your computer.\")\n return\n }\n if (!SystemHelper.checkPythonPresence()) {\n console.error(\"Error:\".red, \"Please first install Python on your computer.\")\n return\n }\n\n let devices = await runHelper.androidGetADBDevicesList();\n if (device) {\n // The developer told us which device he wants to use. Let's check that this device actually exists.\n if (devices.indexOf(device) < 0) {\n console.error(\"Error:\".red, \"The specified device ID was not found. Available devices:\", devices);\n return;\n }\n }\n else {\n if (devices.length > 1) {\n // More than one device: prompt user to tell us the device name\n console.error(\"Error:\".red, \"Please specify which device you want to deploy your app to using the --device 'yourdevice' option. Available devices:\", devices);\n return;\n }\n }\n\n //let outputEPKPath = \"/var/folders/d2/nw213ddn1c7g6_zcp5940ckw0000gn/T/temp.epk\"\n runSharedDeploymentPhase(noDebug, forProd).then((sharedInfo)=>{\n runHelper.androidUploadEPK(sharedInfo.outputEPKPath, device).then(()=>{\n runHelper.androidInstallTempEPK(device, wipeStorage).then(()=>{\n console.log(\"RUN OPERATION COMPLETED\".green)\n\n if (!noDebug) {\n console.log(\"NOW RUNNING THE APP FOR DEVELOPMENT\".green)\n console.log(\"Please wait until the ionic server is started before launching your DApp on your device.\".magenta)\n ionicHelper.runIonicServe()\n }\n })\n .catch((err)=>{\n console.error(\"Failed to install your DApp on your device\".red)\n console.error(\"Error:\",err)\n })\n })\n .catch((err)=>{\n console.error(\"Failed to upload your DApp to your device\".red)\n console.error(\"Error:\",err)\n })\n })\n}", "async function transferOwnership() {\n const newOwner = process.env.OWNER_ADDRESS;\n if (!newOwner) {\n return;\n }\n const adminOwner = await upgrades.admin.getInstance().then(c => c.owner());\n if (adminOwner.toLowerCase() === newOwner.toLowerCase()) {\n return;\n }\n\n console.log(`Transferring ownership to ${newOwner}...`);\n await upgrades.admin.transferProxyAdminOwnership(newOwner);\n console.log(` Completed`);\n}", "function vms_deploy() {\n _.each(server_list, function(data, hostname, i) {\n vm_create(hostname);\n });\n //self.reset_server_list();\n }", "async function deployToken(deployer, network) {\n await deployer.deploy(TATOImplementation);\n if (network != \"mainnet\") {\n await deployer.deploy(TATOProxy,\n \"TATO\",\n \"TATO\",\n 18,\n \"1800000000000000000000000\", // 1800k\n TATOImplementation.address,\n \"0x\"\n );\n } else {\n await deployer.deploy(TATOProxy,\n \"TATO\",\n \"TATO\",\n 18,\n \"1800000000000000000000000\", // 1800k\n TATOImplementation.address,\n \"0x\"\n );\n }\n\n}", "async function main() {\n const [deployer] = await ethers.getSigners();\n\n console.log(\"Deploying account:\", await deployer.getAddress());\n console.log(\n \"Deploying account balance:\",\n (await deployer.getBalance()).toString(),\n \"\\n\"\n );\n\n const NFTXV1Buyout = await ethers.getContractFactory(\"NFTXV1Buyout\");\n const v1Buyout = await upgrades.deployProxy(NFTXV1Buyout, [], {\n initializer: \"__NFTXV1Buyout_init\",\n });\n await v1Buyout.deployed();\n\n console.log(\"NFTXV1Buyout:\", v1Buyout.address);\n\n const ProxyController = await ethers.getContractFactory(\n \"ProxyControllerSimple\"\n );\n\n const proxyController = await ProxyController.deploy(v1Buyout.address);\n await proxyController.deployed();\n console.log(\"ProxyController address:\", proxyController.address);\n\n console.log(\"\\nUpdating proxy admin...\");\n\n await upgrades.admin.changeProxyAdmin(\n v1Buyout.address,\n proxyController.address\n );\n\n console.log(\"Fetching implementation addresses...\");\n\n await proxyController.fetchImplAddress({\n gasLimit: \"150000\",\n });\n\n console.log(\"Implementation address:\", await proxyController.impl());\n\n console.log(\"Transfering ownerships...\");\n await v1Buyout.transferOwnership(founderAddress);\n await proxyController.transferOwnership(founderAddress);\n\n console.log(\"\");\n}", "async function main() {\n await tools.loadWallet(await tools.loadFile(process.env.WALLET_LOCATION));\n console.log(\"Wallet loaded\");\n\n console.log(\"Deploying NFT\");\n const deployedTxId = await deployNFT()\n await checkTxConfirmation(deployedTxId);\n\n console.log(\"Burning Koii\");\n const burnTxId = await tools.burnKoi(\n ATTENTION_CONTRACT,\n \"nft\",\n deployedTxId\n );\n await checkTxConfirmation(burnTxId);\n\n console.log(\"Migrating content\");\n const migrateTxId = await tools.migrate(\n ATTENTION_CONTRACT\n );\n await checkTxConfirmation(migrateTxId);\n}", "function updateApp(config) {\n var appType = config.apptype;\n if (appType !== 'native' && appType !== 'hybrid_remote' && appType !== 'hybrid_local') {\n console.log(outputColors.red + 'Unrecognized app type: \\'' + appType + '\\'.' + outputColors.reset + 'App type must be native, hybrid_remote, or hybrid_local.');\n usage();\n process.exit(4);\n }\n\n // Copy dependencies\n copyDependencies(config, function(success, msg) {\n if (success) {\n if (msg) console.log(outputColors.green + msg + outputColors.reset);\n console.log(outputColors.green + 'Congratulations! You have successfully updated your app.' + outputColors.reset);\n } else {\n if (msg) console.log(outputColors.red + msg + outputColors.reset);\n console.log(outputColors.red + 'There was an error updating the app.' + outputColors.reset);\n }\n });\n}", "async function launchApp(msg) {\n // Launch app w data passed from extension local storage\n \n ClientID = msg.client_id;\n APIKey = msg.api_key;\n FBKey = msg.fb_key;\n STRIPE_PUBLISHABLE_KEY = msg.stripe_key;\n Config = msg.Config || {};\n InitialInstall = msg.initial_install;\n UpgradeInstall = msg.upgrade_install; // null or value of 'previousVersion'\n BTFileText = msg.BTFileText;\n processBTFile(); // create table etc\n\n // Get BT sub id => premium \n // BTId in local store and from org data should be the same. local store is primary\n if (msg.bt_id) {\n\t BTId = msg.bt_id;\n\t if (!getMetaProp('BTId')) setMetaProp('BTId', BTId);\n\t else if (BTId != getMetaProp('BTId'))\n\t alert(`Conflicting subscription id's found! This should not happen. I'm using the local value, if there are issue contact BrainTool support.\\nLocal value:${BTId}\\nOrg file value:${getMetaProp('BTId')}`);\n } else {\n\t // get from file if not in local storage and save locally (will allow for recovery if lost)\n\t if (getMetaProp('BTId')) {\n\t BTId = getMetaProp('BTId');\n\t Config.bt_id = BTId;\n\t window.postMessage({'function': 'localStore', 'data': {'BTId': BTId}});\n\t window.postMessage({'function': 'localStore', 'data': {'Config': Config}});\n\t }\n }\n \n gtag('event', 'Launch', {'event_category': 'General', 'event_label': 'NumNodes', 'value': AllNodes.length});\n\n // Update ui for new users\n if (InitialInstall || UpgradeInstall) {\n\t $(\"#tip\").hide();\n\t $(\"#openingTips\").show();\n $(\"#openingTips\").animate({backgroundColor: '#7bb07b'}, 5000).animate({backgroundColor: 'rgba(0,0,0,0)'}, 30000);\n if (UpgradeInstall) {\n // Need to make a one time assumption that an upgrade from before 0.9 is already connected\n if (UpgradeInstall.startsWith('0.8') ||\n UpgradeInstall.startsWith('0.7') ||\n UpgradeInstall.startsWith('0.6'))\n setMetaProp('BTGDriveConnected', 'true');\n gtag('event', 'Upgrade', {'event_category': 'General', 'event_label': UpgradeInstall});\n }\n if (InitialInstall) {\n gtag('event', 'Install', {'event_category': 'General', 'event_label': InitialInstall});\n }\n setTimeout(closeMenu, 5000);\n } else {\n addTip();\n setTimeout(closeMenu, 1500);\n }\n\n // scroll to top\n $('html, body').animate({scrollTop: '0px'}, 300);\n\n // If GDrive connection was previously established, re-set it up on this startup\n if (getMetaProp('BTGDriveConnected') == 'true') {\n GDriveConnected = true;\n authorizeGapi();\n gtag('event', 'GDriveLaunch', {'event_category': 'General'});\n } else {\n gtag('event', 'NonGDriveLaunch', {'event_category': 'General'});\n }\n \n // If bookmarks have been imported remove button from controls screen (its still under options)\n if (!getMetaProp('BTLastBookmarkImport')) {\n\t $(\"#importBookmarkButton\").show();\n\t $(\"#openOptionsButton\").text(\"Other Actions\");\n }\n\n // show Alt or Option appropriately in visible text (Mac v PC)\n $(\".alt_opt\").text(OptionKey);\n\n // If subscription exists and not expired then user is premium\n let sub = null;\n if (BTId) {\n\t sub = await getSub();\n\t if (sub) {\n\t console.log('Premium subscription exists, good til:', new Date(sub.current_period_end.seconds * 1000));\n\t if ((sub.current_period_end.seconds * 1000) > Date.now()) {\n\t\t // valid subscription, toggle from sub buttons to portal link\n\t\t $(\".subscription_buttons\").hide();\n\t\t $(\"#portal_row\").show();\n\t }\n\t }\n }\n\n // show special offer link if not subscribed and not first run\n if (!sub && !(InitialInstall || UpgradeInstall))\n\t $(\"#specialOffer\").show();\n\n // handle currently open tabs\n handleInitialTabs(msg.all_tabs);\n}", "function createApplication(name, success, failure) {\n if (!self.currentOrganization) {\n failure();\n }\n apiRequest(\"POST\", \"/management/organizations/\" + self.currentOrganization + \"/applications\", null, JSON.stringify({\n name: name\n }), success, failure);\n }", "function peer_rest_deploy(host, port, tls, data, peer_id, cb){\n\tvar proto = 'http';\n\tif(tls === true) proto = 'https';\n\tif(tls === 'https') proto = 'https';\n\tvar url = proto + '://' + host.trim() + ':' + Number(port) + '/chaincode';\n\t//console.log('peer_rest_deploy()', parse_4_peer_shortname(peer_id));\n\n\t$.ajax({\n\t\tmethod: 'POST',\n\t\turl: url,\n\t\tdata: JSON.stringify(data),\n\t\tcontentType: 'application/json',\n\t\tsuccess: function(json){\n\t\t\tconsole.log('Success - deployment', json);\n\t\t\tjson.id = peer_id;\n\t\t\tif(cb) cb(null, json);\n\t\t},\n\t\terror: function(e){\n\t\t\tconsole.log('Error - failed to deploy', e);\n\t\t\tif(cb) cb(e, null);\n\t\t}\n\t});\n}", "install() {\n\n let args = {\n tfs: this.tfs,\n pat: this.pat,\n target: this.target,\n appName: this.applicationName,\n azureSub: this.azureSub,\n kubeName: this.kubeName,\n kubeConfig: this.kubeConfig,\n kubeResourceGroup: this.kubeResourceGroup,\n };\n\n app.run(args, this, function(error, generator) {\n if (error) {\n console.log(error);\n }\n else {\n compose.addBuild(generator);\n compose.addRelease(generator);\n }\n });\n }", "async function deployToken(deployer, network) {\n await deployer.deploy(ETH, \"ETH\", \"ETH\", 18, \"100000000000000000000000\", \"0xeca31d9e2a932aa38345e3d35ab9b30cce800144\", \"0xeca31d9e2a932aa38345e3d35ab9b30cce800144\" );\n}", "function deploy(func, args, save_path, cb){\n\tconsole.log(\"[obc-js] Deploying Chaincode - Start\");\n\tconsole.log(\"\\n\\n\\t Waiting...\");\t\t\t\t\t\t\t\t\t\t//this can take awhile\n\tvar options = {path: '/devops/deploy'};\n\tvar body = \t{\n\t\t\t\t\ttype: \"GOLANG\",\n\t\t\t\t\tchaincodeID: {\n\t\t\t\t\t\t\tpath: chaincode.details.git_url\n\t\t\t\t\t\t},\n\t\t\t\t\tctorMsg:{\n\t\t\t\t\t\t\t\"function\": func,\n\t\t\t\t\t\t\t\"args\": args\n\t\t\t\t\t}\n\t\t\t\t};\n\toptions.success = function(statusCode, data){\n\t\tconsole.log(\"\\n\\n\\t deploy success [wait 1 more minute]\");\n\t\tchaincode.details.deployed_name = data.message;\n\t\tobc.prototype.save(tempDirectory);\t\t\t\t\t\t\t\t\t//save it so we remember we have deployed\n\t\tif(save_path != null) obc.prototype.save(save_path);\t\t\t\t//user wants the updated file somewhere\n\t\tif(cb){\n\t\t\tsetTimeout(function(){\n\t\t\t\tconsole.log(\"[obc-js] Deploying Chaincode - Complete\");\n\t\t\t\tcb(null, data);\n\t\t\t}, 60000);\t\t\t\t\t\t\t\t\t\t\t\t\t\t//wait extra long, not always ready yet\n\t\t}\n\t};\n\toptions.failure = function(statusCode, e){\n\t\tconsole.log(\"[obc-js] deploy - failure:\", statusCode);\n\t\tif(cb) cb(eFmt('http error', statusCode, e), null);\n\t};\n\trest.post(options, '', body);\n}", "function on_deploy(details)\n {\n if (details.reason === \"install\") { on_install(); }\n else if (details.reason === \"update\") { on_update(); }\n }", "async function deployToken(deployer, network, accounts) {\n await deployer.deploy(Cash);\n await deployer.deploy(Bond);\n await deployer.deploy(Share);\n}", "async function deployToken(deployer, network) {\n await deployer.deploy(RAMENImplementation);\n await deployer.deploy(RAMENProxy,\n \"Sumo Protocol\",\n \"Ramen\",\n 18,\n \"175000000000000000000000\",\n RAMENImplementation.address,\n \"0x\"\n );\n}", "function emulator(path, projecttype, buildtype, buildarchs) {\n if (projecttype != \"phone\") {\n // TODO: currently we can run application on local machine only\n localMachine(path, projecttype, buildtype, buildarchs);\n } else {\n Log('Deploying to emulator ...');\n var appxFolder = getPackage(path, projecttype, buildtype, buildarchs);\n var appxPath = appxFolder + '\\\\' + fso.GetFolder(appxFolder).Name.split('_Test').join('') + '.appx';\n deployWindowsPhone(appxPath, 'xd');\n }\n}", "async function run() {\n const devsite = await requireInternalDeployScript();\n await devsite('dist', null);\n}", "async function doDeploy() {\n var file_id = await createFile(\"state.data\", [])\n var send_opt = {gas:4700000, from:config.base}\n console.log(send_opt, file_id)\n var init_hash = \"0xc555544c6083b2a311c8999924893ced050615f712e240c7c439a7d8248226dc\"\n var code_address = \"QmdFE8Wcj7q6447q2sZ7ttNkCxK5TcmHLFQe1j714k6jTY\"\n var contract = await new web3.eth.Contract(abi).deploy({data: code, arguments:[config.tasks, config.fs, file_id, code_address, init_hash]}).send(send_opt)\n contract.setProvider(w3provider)\n config.plasma = contract.options.address\n console.log(JSON.stringify(config))\n var tx = await contract.methods.deposit().send({gas:4700000, from:config.base, value: 100000000})\n console.log(\"deposit\", tx)\n var dta = await contract.methods.debugBlock(1).call(send_opt)\n console.log(\"what happened\", dta)\n var tx = await contract.methods.validateDeposit(1).send({gas:4700000, from:config.base})\n console.log(\"submitted task\", tx)\n contract.events.GotFiles(function (err,ev) {\n console.log(\"Files\", ev.returnValues)\n var files = ev.returnValues.files\n files.forEach(outputFile)\n })\n // process.exit(0)\n}", "function installApp(path, projecttype, buildtype, buildarchs) {\n\n Log(\"Attempt to install application...\");\n Log(\"\\tDirectory : \" + path);\n\n var command = \"powershell -ExecutionPolicy RemoteSigned \\\". \" + WINDOWS_STORE_UTILS + \"; Install-App \" + \"'\" + getPackage(path, projecttype, buildtype, buildarchs) + \"\\\\Add-AppDevPackage.ps1\" + \"'\\\"\";\n Log(command);\n exec_verbose(command);\n return;\n}", "function createApp(){\n\tconsole.log('createApp: ')\n\tu.createMetroApp(app.name);\n}", "deploy(skipFeatureDeployment = false) {\r\n return this.clone(App, `Deploy(${skipFeatureDeployment})`).postCore();\r\n }", "async function deployContract(){\n\n let abiPath = path.join(__dirname + '/bin/DataStorageEvent.abi');\n let binPath = path.join(__dirname + '/bin/DataStorageEvent.bin');\n\n console.log(chalk.green(abiPath));\n console.log(chalk.green(binPath));\n\n let abi = fs.readFileSync(abiPath);\n // let bin = '0x' + fs.readFileSync(binPath); updated version of ganache-cli does not need 'Ox' to be added to depict hexadecimal.\n let bin = fs.readFileSync(binPath);\n\n\n let contract = new web3.eth.Contract(JSON.parse(abi));\n\n console.log()\n // Returns an object of abstract contract.\n let status = await contract.deploy({\n data: bin,\n arguments: [100]\n }).send({\n from: '0x96b6E861698DfBA5721a3Ccd9AfBCa808e360bf3',\n gasPrice: 1000,\n gas: 300000\n })\n\n console.log(chalk.red('Address of Contract Deployed : ' + status.options.address));\n}", "function device(path, projecttype, buildtype, buildarchs) {\n if (projecttype != \"phone\") {\n // on windows8 platform we treat this command as running application on local machine\n localMachine(path, projecttype, buildtype, buildarchs);\n } else {\n Log('Deploying to device ...');\n var appxFolder = getPackage(path, projecttype, buildtype, buildarchs);\n var appxPath = appxFolder + '\\\\' + fso.GetFolder(appxFolder).Name.split('_Test').join('') + '.appx';\n deployWindowsPhone(appxPath, 'de');\n }\n}", "function target(path, projecttype, buildtype, buildarchs, buildtarget) {\n if (projecttype != \"phone\"){\n Log('ERROR: not supported yet', true);\n Log('DEPLOY FAILED.', true);\n WScript.Quit(2);\n } else {\n // We're deploying package on phone device/emulator\n // Let's find target specified by script arguments\n var cmd = APP_DEPLOY_UTILS + ' /enumeratedevices';\n var out = wscript_shell.Exec(cmd);\n while(out.Status === 0) {\n WScript.Sleep(100);\n }\n if (!out.StdErr.AtEndOfStream) {\n var error = out.StdErr.ReadAll();\n Log(\"ERROR: Error calling AppDeploy : \", true);\n Log(error, true);\n WScript.Quit(2);\n }\n else {\n if (!out.StdOut.AtEndOfStream) {\n // get output from AppDeployCmd\n var lines = out.StdOut.ReadAll().split('\\r\\n');\n // regular expression, that matches with AppDeploy /enumeratedevices output\n // e.g. ' 1 Emulator 8.1 WVGA 4 inch 512MB'\n var deviceRe = /^\\s?(\\d)+\\s+(.*)$/;\n // iterate over lines\n for (var line in lines){\n var deviceMatch = lines[line].match(deviceRe);\n // check that line contains device id and name\n // and match with 'target' parameter of script\n if (deviceMatch && deviceMatch[1] == buildtarget) {\n // start deploy to target specified\n var appxFolder = getPackage(path, projecttype, buildtype, buildarchs);\n var appxPath = appxFolder + '\\\\' + fso.GetFolder(appxFolder).Name.split('_Test').join('') + '.appx';\n Log('Deploying to target with id: ' + buildtarget);\n deployWindowsPhone(appxPath, deviceMatch[1]);\n return;\n }\n }\n Log('Error : target ' + buildtarget + ' was not found.', true);\n Log('DEPLOY FAILED.', true);\n WScript.Quit(2);\n }\n else {\n Log('Error : CordovaDeploy Failed to find any devices', true);\n Log('DEPLOY FAILED.', true);\n WScript.Quit(2);\n }\n }\n }\n}", "async function deployPool(deployer, network, accounts) {\n\n let gof = new web3.eth.Contract(GOF.abi, '0x488e0369f9bc5c40c002ea7c1fe4fd01a198801c');\n let reward_account = accounts[0];\n let gas_price = 165000000000;\n\n console.log(\"[Golff] 1.Start deploy pool on Network= \" + network);\n\n await deployer.deploy(GOFGXCPool);\n await deployer.deploy(GOFHTPool);\n // await deployer.deploy(GOFLIKPool);\n // await deployer.deploy(GOFUSDTPool);\n // await deployer.deploy(GOFETHPool);\n // await deployer.deploy(GOFYFIIPool);\n \n console.log(\"[Golff] 2.Start add minter acl for pool\");\n gof.methods.addMinter(GOFGXCPool.address).send({ from: reward_account, gasPrice: gas_price, gas: 100000});\n gof.methods.addMinter(GOFHTPool.address).send({ from: reward_account, gasPrice: gas_price, gas: 100000});\n // gof.methods.addMinter(GOFUSDTPool.address).send({ from: reward_account, gasPrice: gas_price, gas: 100000});\n // gof.methods.addMinter(GOFUSDTPool.address).send({ from: reward_account, gasPrice: gas_price, gas: 100000});\n // gof.methods.addMinter(GOFETHPool.address).send({ from: reward_account, gasPrice: gas_price, gas: 100000});\n // gof.methods.addMinter(GOFYFIIPool.address).send({ from: reward_account, gasPrice: gas_price, gas: 100000});\n\n console.log(\"[Golff] 3.Start set reward distributor\");\n\n let gxc_pool = new web3.eth.Contract(GOFGXCPool.abi, GOFGXCPool.address);\n let ht_pool = new web3.eth.Contract(GOFHTPool.abi, GOFHTPool.address);\n // let link_pool = new web3.eth.Contract(GOFLIKPool.abi, GOFLIKPool.address);\n // let usdt_pool = new web3.eth.Contract(GOFUSDTPool.abi, GOFUSDTPool.address);\n // let eth_pool = new web3.eth.Contract(GOFETHPool.abi, GOFETHPool.address);\n // let yfii_pool = new web3.eth.Contract(GOFYFIIPool.abi, GOFYFIIPool.address);\n\n await Promise.all([\n gxc_pool.methods.setRewardDistribution(reward_account).send({ from: reward_account, gasPrice: gas_price, gas: 100000}),\n ht_pool.methods.setRewardDistribution(reward_account).send({ from: reward_account, gasPrice: gas_price, gas: 100000 }),\n // link_pool.methods.setRewardDistribution(reward_account).send({ from: reward_account, gasPrice: gas_price, gas: 100000 }),\n // usdt_pool.methods.setRewardDistribution(reward_account).send({ from: reward_account, gasPrice: gas_price, gas: 100000 }),\n // eth_pool.methods.setRewardDistribution(reward_account).send({ from: reward_account, gasPrice: gas_price, gas: 100000 }),\n // yfii_pool.methods.setRewardDistribution(reward_account).send({ from: reward_account, gasPrice: gas_price, gas: 100000 }),\n ]);\n\n console.log(\"[Golff] 4.Start reward Gof to pool\");\n\n let init_quota = web3.utils.toBN(10 ** 18).mul(web3.utils.toBN(40000));\n\n // await Promise.all([\n // gxc_pool.methods.notifyRewardAmount(init_quota.toString()).send({ from: reward_account, gasPrice: gas_price, gas:150000}),\n // ht_pool.methods.notifyRewardAmount(init_quota.toString()).send({ from: reward_account, gasPrice: gas_price, gas: 150000 }),\n // // link_pool.methods.notifyRewardAmount(init_quota.toString()).send({ from: reward_account, gasPrice: gas_price, gas: 150000 }),\n // // usdt_pool.methods.notifyRewardAmount(init_quota.toString()).send({ from: reward_account, gasPrice: gas_price, gas: 150000 }),\n // // eth_pool.methods.notifyRewardAmount(init_quota.toString()).send({ from: reward_account, gasPrice: gas_price, gas: 150000 }),\n // // yfii_pool.methods.notifyRewardAmount(init_quota.toString()).send({ from: reward_account, gasPrice: gas_price, gas: 150000 }),\n // ]);\n}", "function createNativeApp(config) {\n var createAppExecutable = path.join(__dirname, 'Templates', 'NativeAppTemplate', 'createApp.sh');\n\n // Calling out to the shell, so re-quote the command line arguments.\n var newCommandLineArgs = buildArgsFromArgMap(config);\n var createAppProcess = exec(createAppExecutable + ' ' + newCommandLineArgs, function(error, stdout, stderr) {\n if (stdout) console.log(stdout);\n if (stderr) console.log(stderr);\n if (error) {\n console.log(outputColors.red + 'There was an error creating the app.' + outputColors.reset);\n process.exit(3);\n }\n\n // Copy dependencies\n copyDependencies(config, function(success, msg) {\n if (success) {\n if (msg) console.log(outputColors.green + msg + outputColors.reset);\n console.log(outputColors.green + 'Congratulations! You have successfully created your app.' + outputColors.reset);\n } else {\n if (msg) console.log(outputColors.red + msg + outputColors.reset);\n console.log(outputColors.red + 'There was an error creating the app.' + outputColors.reset);\n }\n });\n });\n}", "async function deployTellorx(_network, _pk, _nodeURL) {\n console.log(\"deploy tellor 3\")\n await run(\"compile\")\n\n var net = _network\n\n\n ///////////////Connect to the network\n let privateKey = _pk;\n var provider = new ethers.providers.JsonRpcProvider(_nodeURL)\n let wallet = new ethers.Wallet(privateKey, provider)\n\n\n ////////////// Deploy Tellor 3\n\n //////////////// Extension\n console.log(\"Starting deployment for extension contract...\")\n const extfac = await ethers.getContractFactory(\"contracts/tellor3/Extension.sol:Extension\", wallet)\n const extfacwithsigner = await extfac.connect(wallet)\n const extension = await extfac.deploy()\n console.log(\"Extension contract deployed to: \", extension.address)\n\n await extension.deployed()\n\n if (net == \"mainnet\") {\n console.log(\"Extension contract deployed to:\", \"https://etherscan.io/address/\" + extension.address);\n console.log(\" Extension transaction hash:\", \"https://etherscan.io/tx/\" + extension.deployTransaction.hash);\n } else if (net == \"rinkeby\") {\n console.log(\"Extension contract deployed to:\", \"https://rinkeby.etherscan.io/address/\" + extension.address);\n console.log(\" Extension transaction hash:\", \"https://rinkeby.etherscan.io/tx/\" + extension.deployTransaction.hash);\n } else {\n console.log(\"Please add network explorer details\")\n }\n\n\n\n\n //////////////// Tellor (Test)\n console.log(\"Starting deployment for tellor contract...\")\n const telfac = await ethers.getContractFactory(\"contracts/tellor3/Mocks/TellorTest.sol:TellorTest\", wallet)\n const telfacwithsigner = await telfac.connect(wallet)\n const tellor = await telfac.deploy(extension.address)\n console.log(\"Tellor contract deployed to: \", tellor.address)\n\n await tellor.deployed()\n\n if (net == \"mainnet\") {\n console.log(\"Tellor contract deployed to:\", \"https://etherscan.io/address/\" + tellor.address);\n console.log(\" Tellor transaction hash:\", \"https://etherscan.io/tx/\" + tellor.deployTransaction.hash);\n } else if (net == \"rinkeby\") {\n console.log(\"Tellor contract deployed to:\", \"https://rinkeby.etherscan.io/address/\" + tellor.address);\n console.log(\" Tellor transaction hash:\", \"https://rinkeby.etherscan.io/tx/\" + tellor.deployTransaction.hash);\n } else {\n console.log(\"Please add network explorer details\")\n }\n\n\n //////////////// Master\n console.log(\"Starting deployment for master contract...\")\n const masfac = await ethers.getContractFactory(\"contracts/tellor3/TellorMaster.sol:TellorMaster\", wallet)\n const masfacwithsigner = await masfac.connect(wallet)\n const master = await masfac.deploy(tellor.address, tellor.address) // use same addr for _OLD_TELLOR and _newTellor?\n console.log(\"Master contract deployed to: \", master.address)\n\n await master.deployed()\n\n if (net == \"mainnet\") {\n console.log(\"Master contract deployed to:\", \"https://etherscan.io/address/\" + master.address);\n console.log(\" Master transaction hash:\", \"https://etherscan.io/tx/\" + master.deployTransaction.hash);\n } else if (net == \"rinkeby\") {\n console.log(\"Master contract deployed to:\", \"https://rinkeby.etherscan.io/address/\" + master.address);\n console.log(\" Master transaction hash:\", \"https://rinkeby.etherscan.io/tx/\" + master.deployTransaction.hash);\n } else {\n console.log(\"Please add network explorer details\")\n }\n\n\n /////////// Deploy Tellor X\n console.log(\"deploy tellor X\")\n\n ////////////////Governance\n console.log(\"Starting deployment for governance contract...\")\n const gfac = await ethers.getContractFactory(\"contracts/testing/TestGovernance.sol:TestGovernance\", wallet)\n const gfacwithsigner = await gfac.connect(wallet)\n const governance = await gfacwithsigner.deploy(master.address)\n console.log(\"Governance contract deployed to: \", governance.address)\n\n await governance.deployed()\n\n if (net == \"mainnet\") {\n console.log(\"Governance contract deployed to:\", \"https://etherscan.io/address/\" + governance.address);\n console.log(\" Governance transaction hash:\", \"https://etherscan.io/tx/\" + governance.deployTransaction.hash);\n } else if (net == \"rinkeby\") {\n console.log(\"Governance contract deployed to:\", \"https://rinkeby.etherscan.io/address/\" + governance.address);\n console.log(\" Governance transaction hash:\", \"https://rinkeby.etherscan.io/tx/\" + governance.deployTransaction.hash);\n } else {\n console.log(\"Please add network explorer details\")\n }\n\n\n /////////////Oracle\n console.log(\"Starting deployment for Oracle contract...\")\n const ofac = await ethers.getContractFactory(\"contracts//testing/TestOracle.sol:TestOracle\", wallet)\n const ofacwithsigner = await ofac.connect(wallet)\n const oracle = await ofacwithsigner.deploy(master.address)\n await oracle.deployed();\n\n\n if (net == \"mainnet\") {\n console.log(\"oracle contract deployed to:\", \"https://etherscan.io/address/\" + oracle.address);\n console.log(\" oracle transaction hash:\", \"https://etherscan.io/tx/\" + oracle.deployTransaction.hash);\n } else if (net == \"rinkeby\") {\n console.log(\"oracle contract deployed to:\", \"https://rinkeby.etherscan.io/address/\" + oracle.address);\n console.log(\" oracle transaction hash:\", \"https://rinkeby.etherscan.io/tx/\" + oracle.deployTransaction.hash);\n } else {\n console.log(\"Please add network explorer details\")\n }\n\n ///////////Treasury\n console.log(\"Starting deployment for Treasury contract...\")\n const tfac = await ethers.getContractFactory(\"contracts/testing/TestTreasury.sol:TestTreasury\", wallet)\n const tfacwithsigner = await tfac.connect(wallet)\n const treasury = await tfacwithsigner.deploy(master.address)\n await treasury.deployed()\n\n if (net == \"mainnet\") {\n console.log(\"treasury contract deployed to:\", \"https://etherscan.io/address/\" + treasury.address);\n console.log(\" treasury transaction hash:\", \"https://etherscan.io/tx/\" + treasury.deployTransaction.hash);\n } else if (net == \"rinkeby\") {\n console.log(\"treasury contract deployed to:\", \"https://rinkeby.etherscan.io/address/\" + treasury.address);\n console.log(\" treasury transaction hash:\", \"https://rinkeby.etherscan.io/tx/\" + treasury.deployTransaction.hash);\n } else {\n console.log(\"Please add network explorer details\")\n }\n\n console.log(\"treasury Contract verified\")\n\n //////////////Controler\n console.log(\"Starting deployment for Controller contract...\")\n const cfac = await ethers.getContractFactory(\"contracts/Controller.sol:Controller\", wallet)\n const cfacwithsigners = await cfac.connect(wallet)\n const controller = await cfacwithsigners.deploy(governance.address, oracle.address, treasury.address)\n await controller.deployed()\n\n if (net == \"mainnet\") {\n console.log(\"The controller contract was deployed to:\", \"https://etherscan.io/address/\" + controller.address);\n console.log(\" transaction hash:\", \"https://etherscan.io/tx/\" + controller.deployTransaction.hash);\n } else if (net == \"rinkeby\") {\n console.log(\"The controller contract was deployed to:\", \"https://rinkeby.etherscan.io/address/\" + controller.address);\n console.log(\" transaction hash:\", \"https://rinkeby.etherscan.io/tx/\" + controller.deployTransaction.hash);\n } else {\n console.log(\"Please add network explorer details\")\n }\n\n tellorTest = await ethers.getContractAt(\"contracts/tellor3/Mocks/TellorTest.sol:TellorTest\", master.address)\n await tellorTest.connect(wallet).setBalanceTest(wallet.address, ethers.BigNumber.from(\"1000000000000000000000000\"))\n await master.connect(wallet).changeTellorContract(controller.address)\n tellorNew = await ethers.getContractAt(\"contracts/Controller.sol:Controller\", master.address)\n await tellorNew.connect(wallet).init()\n\n console.log(\"TellorX deployed! You have 1 million test TRB in your wallet.\")\n\n console.log('submitting extension contract for verification...');\n await run(\"verify:verify\",\n {\n address: extension.address,\n },\n )\n console.log(\"extension contract verified\")\n\n // Wait for few confirmed transactions.\n // Otherwise the etherscan api doesn't find the deployed contract.\n console.log('waiting for tx confirmation...');\n await controller.deployTransaction.wait(7)\n\n console.log('submitting contract for verification...');\n\n await run(\"verify:verify\",\n {\n address: controller.address,\n constructorArguments: [governance.address, oracle.address, treasury.address]\n },\n )\n console.log(\"Controller contract verified\")\n\n\n // Wait for few confirmed transactions.\n // Otherwise the etherscan api doesn't find the deployed contract.\n console.log('waiting for tellor tx confirmation...');\n await tellor.deployTransaction.wait(7)\n\n console.log('submitting tellor contract for verification...');\n await run(\"verify:verify\",\n {\n address: tellor.address,\n constructorArguments: [extension.address]\n },\n )\n console.log(\"tellor contract verified\")\n\n // Wait for few confirmed transactions.\n // Otherwise the etherscan api doesn't find the deployed contract.\n console.log('waiting for master tx confirmation...');\n await master.deployTransaction.wait(7)\n\n console.log('submitting master contract for verification...');\n await run(\"verify:verify\",\n {\n address: master.address,\n constructorArguments: [tellor.address, tellor.address]\n },\n )\n console.log(\"master contract verified\")\n\n // Wait for few confirmed transactions.\n // Otherwise the etherscan api doesn't find the deployed contract.\n console.log('waiting for governance tx confirmation...');\n await governance.deployTransaction.wait(7)\n\n console.log('submitting governance contract for verification...');\n await run(\"verify:verify\",\n {\n address: governance.address,\n constructorArguments: [master.address]\n },\n )\n console.log(\"governance contract verified\")\n\n // Wait for few confirmed transactions.\n // Otherwise the etherscan api doesn't find the deployed contract.\n console.log('waiting for treasury tx confirmation...');\n await treasury.deployTransaction.wait(7)\n\n console.log('submitting Treasury contract for verification...');\n\n await run(\"verify:verify\", {\n contract: \"contracts/testing/TestTreasury.sol:TestTreasury\",\n address: treasury.address,\n constructorArguments: [master.address]\n },\n )\n\n // Wait for few confirmed transactions.\n // Otherwise the etherscan api doesn't find the deployed contract.\n console.log('waiting for Oracle tx confirmation...');\n await oracle.deployTransaction.wait(7)\n\n console.log('submitting Oracle contract for verification...');\n\n await run(\"verify:verify\",\n {\n contract: \"contracts/testing/TestOracle.sol:TestOracle\",\n address: oracle.address,\n constructorArguments: [master.address]\n },\n )\n\n console.log(\"Oracle contract verified\")\n}", "flyAttachConsul(app) {\n if (!app) return\n\n // bail if v1 app\n if (this.flyToml.includes('enable_consul')) return // v1-ism\n\n // see if secret is already set?\n if (this.flySecrets.includes('FLY_CONSUL_URL')) return\n\n console.log(`${chalk.bold.green('execute'.padStart(11))} flyctl consul attach`)\n execSync(\n `${this.flyctl} consul attach --app ${app}`,\n { stdio: 'inherit' }\n )\n }", "async function migration(deployer, network, accounts) {\n const unit = web3.utils.toBN(10 ** 18);\n const totalBalanceForBUSDYSD = unit.muln(INITIAL_YSS_FOR_BUSD_YSD)\n const totalBalanceForBUSDYSS = unit.muln(INITIAL_YSS_FOR_BUSD_YSS)\n const totalBalanceForBUSDY3D = unit.muln(INITIAL_YSS_FOR_BUSD_Y3D)\n const totalBalance = totalBalanceForBUSDYSD.add(totalBalanceForBUSDYSS).add(totalBalanceForBUSDY3D);\n\n const share = await Share.deployed();\n\n const lpPoolBUSDYSD = artifacts.require(basPools.BUSDYSD.contractName);\n const lpPoolBUSDYSS = artifacts.require(basPools.BUSDYSS.contractName);\n // const lpPoolBUSDY3D = artifacts.require(basPools.BUSDY3D.contractName);\n\n await deployer.deploy(\n InitialShareDistributor,\n share.address,\n lpPoolBUSDYSD.address,\n totalBalanceForBUSDYSD.toString(),\n lpPoolBUSDYSS.address,\n totalBalanceForBUSDYSS.toString(),\n // lpPoolBUSDY3D.address,\n // totalBalanceForBUSDY3D.toString(),\n );\n const distributor = await InitialShareDistributor.deployed();\n\n await share.mint(distributor.address, totalBalance.toString());\n console.log(`Deposited ${INITIAL_YSS_FOR_BUSD_YSD} YSS to InitialShareDistributor.`);\n\n console.log(`Setting distributor to InitialShareDistributor (${distributor.address})`);\n await lpPoolBUSDYSD.deployed().then(pool => pool.setRewardDistribution(distributor.address));\n await lpPoolBUSDYSS.deployed().then(pool => pool.setRewardDistribution(distributor.address));\n // await lpPoolBUSDY3D.deployed().then(pool => pool.setRewardDistribution(distributor.address));\n\n await distributor.distribute();\n}", "async function runSharedDeploymentPhase(noDebug, forProd) {\n var dappHelper = new DAppHelper()\n var manifestHelper = new ManifestHelper()\n var ionicHelper = new IonicHelper ()\n\n if (!dappHelper.checkFolderIsDApp()) {\n console.error(\"ERROR\".red + \" - \" + dappHelper.noManifestErrorMessage())\n return\n }\n\n // Retrieve user's computer IP (to be able to ionic serve / hot reload)\n // Update the start_url in the trinity manifest\n //\n // Clone the original manifest into a temporary manifest so that we don't touch user's original manifest.\n var ipAddress = await manifestHelper.promptIpAddressToUse();\n var originalManifestPath = manifestHelper.getManifestPath(ionicHelper.getConfig().assets_path)\n var temporaryManifestPath = manifestHelper.cloneToTemporaryManifest(originalManifestPath)\n if (noDebug)\n manifestHelper.updateManifestForLocalIndex(temporaryManifestPath)\n else\n await manifestHelper.updateManifestForRemoteIndex(temporaryManifestPath, ipAddress)\n\n return new Promise((resolve, reject)=>{\n ionicHelper.updateNpmDependencies().then(() => {\n ionicHelper.runIonicBuild(forProd).then(() => {\n dappHelper.packEPK(temporaryManifestPath).then((outputEPKPath)=>{\n resolve({\n outputEPKPath: outputEPKPath,\n ipAddress: ipAddress\n })\n })\n .catch((err)=>{\n console.error(\"Failed to pack your DApp into a EPK file\".red)\n reject(err)\n })\n })\n .catch((err)=>{\n console.error(\"Failed run ionic build\".red)\n reject(err)\n })\n })\n .catch((err)=>{\n console.error(\"Failed to install ionic dependencies\".red)\n reject(err)\n })\n })\n}", "add(appUrl) {\r\n const postBody = {\r\n \"[email protected]\": appUrl,\r\n };\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(r => {\r\n return {\r\n data: r,\r\n };\r\n });\r\n }", "function main() {\n\tconsole.log(\"Deployment started.\");\n // NOPE! Don't clone anything. Too distructive. Geez...\n // Just jump straight to sshConnect();\n\t// cloneRepo();\n\tsshConnect();\n}", "function onDeploy() {\n \n // Settings\n var ROOT_FOLDER_ID = \"1B0JY0eT7Kc_JSptEAUODIfXNAOFxZdsZ\";\n var FUNCTION_NAME = \"doHouseKeeping\";\n\n // Set root folder id\n PropertiesService.getScriptProperties().setProperty(\"ROOT_FOLDER_ID\", ROOT_FOLDER_ID);\n\n // Delete trigger\n deleteTrigger(FUNCTION_NAME);\n\n // Set trigger\n ScriptApp.newTrigger(FUNCTION_NAME).timeBased().atHour(12).create();\n}", "async function run({ dest }) {\n let deployInfo = { host: void 0, src: projectRoot, dest };\n\n // See if the parameters are available in the local json file\n if (fs.existsSync(path.resolve(\"deployqa.local.json\"))) {\n const local = fs.readJSONSync(path.resolve(\"deployqa.local.json\"));\n deployInfo = {\n ...deployInfo,\n ...local,\n };\n }\n\n const questions = [\n deployInfo.host\n ? Array.isArray(deployInfo.host)\n ? {\n type: \"autocomplete\",\n name: \"host\",\n message: \"What host should be deployed to?\",\n limit: 10,\n choices: deployInfo.host,\n }\n : void 0\n : {\n type: \"input\",\n name: \"host\",\n message: \"What host should be deployed to?\",\n },\n deployInfo.dest\n ? void 0\n : {\n type: \"input\",\n name: \"dest\",\n message: \"What host folder should be deployed to?\",\n },\n ].filter((d) => d !== void 0);\n\n if (questions.length > 0) {\n answers = await prompt(questions);\n deployInfo = {\n ...deployInfo,\n ...answers,\n };\n }\n\n deployInfo.src =\n path.resolve(deployInfo.src) + (deployInfo.src.endsWith(\"/\") ? \"/\" : \"\");\n\n console.log(\"Deploy Target:\\n\", deployInfo);\n\n await sync(deployInfo);\n await updateRemote(deployInfo);\n}", "function deployBorrower(networkName='ganache') {\n return new Promise(async (resolve, reject) => {\n try {\n let accounts = (await getEOAccounts()).data[0]\n let borrowerAddress\n //Unlock account\n await baseLogic.unlockAccount(accounts.acc1)\n if (networkName === 'ganache') {\n borrowerAddress = await exec ('npm run migrateBorrowerGanache')\n console.log('borrower address: ', borrowerAddress)\n resolve({\n status: 'success',\n message: 'Deployed borrower successfully',\n data: [borrowerAddress]\n })\n } else {\n const {stdout, stderr} = await exec('npm run migrateBorrowerGoerli')\n console.log(stdout)\n console.log('stderr: ', stderr)\n resolve({\n status: 'success',\n message: 'Deployed borrower successfully',\n data: []\n })\n }\n } catch (error){\n console.log('error in deployEscrow')\n reject({\n status: 'failure',\n message: error.message,\n data: []\n })\n }\n })\n}", "function createApp(){ console.log(\"create an app\") }", "async function deployQuotaDistribution(deployer, network) {\n \n let bnb = await BNB.deployed();\n\n console.log(\"[Golff] 1.Start deploy QuotaDistribution on Network= \" + network);\n\n await deployer.deploy(QuotaDistribution, 1599904800, 175);\n \n console.log(\"[Golff] 2.Start add minter acl for distribution\");\n\n bnb.addMinter(QuotaDistribution.address);\n\n console.log(\"[Golff] 3.Start set quota distributor\");\n\n let disribution_account = \"0x424abfc7c0Defb02447D621Bf0f6eF80eD5C01fB\";\n\n let quota_distribution = new web3.eth.Contract(QuotaDistribution.abi, QuotaDistribution.address);\n\n await Promise.all([\n quota_distribution.methods.setQuotaDistribution(disribution_account).send({from: disribution_account}),\n ]);\n\n let init_quota = web3.utils.toBN(10 ** 18).mul(web3.utils.toBN(1000000 * 100));//.div(web3.utils.toBN(10 ** 4));\n \n console.log(\"[Golff] 4.Start set quota distributor\");\n\n await Promise.all([\n quota_distribution.methods.addOrgQuota(disribution_account, init_quota.toString()).send({from: disribution_account}),\n ]);\n \n console.log(\"[Golff] 5.Start set quota distributor\");\n\n await Promise.all([\n quota_distribution.methods.distributeQuota().send({from:disribution_account}),\n ]);\n}", "async function main() {\r\n const MyNFT = await ethers.getContractFactory(\"Gear\")\r\n\r\n // Start deployment, returning a promise that resolves to a contract object\r\n const myNFT = await MyNFT.deploy()\r\n console.log(\"Contract deployed to address:\", myNFT.address)\r\n}", "function uploadApp(appPath, appType, apiKeyId, issuerId, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const args = [\n 'altool',\n '--output-format',\n 'xml',\n '--upload-app',\n '--file',\n appPath,\n '--type',\n appType,\n '--apiKey',\n apiKeyId,\n '--apiIssuer',\n issuerId\n ];\n yield exec.exec('xcrun', args, options);\n });\n}", "async function surgeDeploy() {\n await spawn(\n 'surge',\n [configProd.deploy.src, `--domain=https://${configProd.deploy.domain}`],\n { stdio: 'inherit' }\n );\n}", "async function init() {\n program\n .usage('[options]')\n .option('-a, --address <address>', 'Address of Deployer contract')\n .option('-n, --network <network>', 'Name of the network (e.g. ropsten, mainnet, etc.)')\n .parse(process.argv)\n\n const options = program.opts()\n const address = options.address\n const network = options.network\n let admins = []\n\n if (!address) {\n throw new Error('Address not given')\n } else {\n console.log('address', address)\n }\n\n if (fs.existsSync(adminFile)) {\n admins = fs.readFileSync(adminFile, 'utf8').split('\\n')\n console.log('admins', admins)\n } else {\n console.log(`No admin addreses set on ${adminFile}`)\n }\n\n const provider = getProvider(network, 1)\n const web3 = new Web3(provider)\n const networkId = await web3.eth.net.getId()\n console.log('networkId', networkId)\n\n const accounts = await web3.eth.getAccounts()\n const [account] = accounts\n console.log(`Owner: ${account}`)\n\n const deployer = new web3.eth.Contract(Deployer.abi, address)\n const isAdmin = await deployer.methods.isAdmin(account).call();\n console.log('isAdmin', isAdmin)\n\n const baseTokenUri = await deployer.methods.baseTokenUri().call();\n console.log('baseTokenUri', baseTokenUri)\n\n const existingAdmins = await deployer.methods.getAdmins().call();\n console.log('existingAdmins', existingAdmins)\n\n if (Array.isArray(existingAdmins)) {\n const newAdmins = []\n for (let index = 0; index < admins.length; index++) {\n const admin = admins[index]\n if (existingAdmins.findIndex(item => item.toLowerCase() === admin.toLowerCase()) < 0) {\n console.log(`Granting '${admin}' admin right`)\n newAdmins.push(admin)\n }\n }\n if (newAdmins.length > 0) {\n console.log(newAdmins)\n await deployer.methods.grant(newAdmins).send({ from: account, gas: 200000 })\n }\n }\n}", "createDeployment (context, deploy) {\n const deployment = ApiGateway.toDeployment(deploy)\n deployment.environment = deploy.namespace\n return context.github.repos.createDeployment(deployment)\n }", "function addAppForBiz(req, res, next){\n var params=req.params;\n\n bizApplyDao.addBizApply(req.params, function(error , result){\n if(error){\n logger.error(' addAppForBiz ' + error.message);\n throw sysError.InternalError(error.message,sysMsg.SYS_INTERNAL_ERROR_MSG);\n }\n logger.info(' addAppForBiz ' + 'success');\n res.send(200,{success:true,applyId:result.insertId});\n next();\n });\n}", "function deploy() {\r\n\tvar dir = '/public_html/multisite/wp-content/themes/theme02';\r\n\tvar conn = ftp.create({\r\n\t\thost: 'es31.siteground.eu',\r\n\t\tuser: '[email protected]',\r\n\t\tpassword: '2vBG42WaegaaQv',\r\n\t\tparallel: 3,\r\n\t\tlog: log,\r\n\t});\r\n\tgulp.src(CONF.PATHS.package, { cwd: 'CONF.PATHS.main', buffer: false })\r\n\t\t.pipe(conn.newer(dir))\r\n\t\t.pipe(conn.dest(dir));\r\n\tgulp.src([CONF.PATHS.dist + '/**/*'], { cwd: 'CONF.PATHS.dist', buffer: false })\r\n\t\t.pipe(conn.newer(dir + '/dist'))\r\n\t\t.pipe(conn.dest(dir + '/dist'));\r\n}", "async function applicationPackageCreate() {\n const subscriptionId = process.env[\"BATCH_SUBSCRIPTION_ID\"] || \"subid\";\n const resourceGroupName = process.env[\"BATCH_RESOURCE_GROUP\"] || \"default-azurebatch-japaneast\";\n const accountName = \"sampleacct\";\n const applicationName = \"app1\";\n const versionName = \"1\";\n const credential = new DefaultAzureCredential();\n const client = new BatchManagementClient(credential, subscriptionId);\n const result = await client.applicationPackageOperations.create(\n resourceGroupName,\n accountName,\n applicationName,\n versionName\n );\n console.log(result);\n}", "function startJob(params, cb) {\n var resourcePath = config.addURIParams(constants.APPDATA_BASE_PATH + \"/export\", params);\n var method = \"POST\";\n\n params.resourcePath = resourcePath;\n params.method = method;\n params.data = {\n stopApp: params.stopApp\n };\n\n mbaasRequest.admin(params, cb);\n}", "async function main() {\n try {\n // load the network configuration\n const ccpPath = path.resolve(__dirname, '..', '..', 'test-network', 'organizations', 'peerOrganizations', 'org1.example.com', 'connection-org1.json');\n let ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8'));\n\n // Create a new file system based wallet for managing identities.\n const walletPath = path.join(process.cwd(), 'wallet');\n const wallet = await Wallets.newFileSystemWallet(walletPath);\n console.log(`Wallet path: ${walletPath}`);\n\n // Check to see if we've already enrolled the user.\n const identity = await wallet.get('appUser');\n if (!identity) {\n console.log('An identity for the user \"appUser\" does not exist in the wallet');\n console.log('Run the registerUser.js application before retrying');\n return;\n }\n\n // Create a new gateway for connecting to our peer node.\n const gateway = new Gateway();\n await gateway.connect(ccp, { wallet, identity: 'appUser', discovery: { enabled: true, asLocalhost: true } });\n\n // Get the network (channel) our contract is deployed to.\n const network = await gateway.getNetwork('mychannel');\n\n // Get the contract from the network.\n const contract = network.getContract('fabcar');\n\n // Submit the specified transaction.\n // createCar transaction - requires 5 argument, ex: ('createCar', 'CAR12', 'Honda', 'Accord', 'Black', 'Tom')\n // changeCarOwner transaction - requires 2 args , ex: ('changeCarOwner', 'CAR12', 'Dave')\n // await contract.submitTransaction('createCar', 'CAR12', 'Honda', 'Accord', 'Black', 'Tom');\n //await contract.submitTransaction('registerUser', '[email protected]', '[email protected]', 'sherlocked123', 'sherlocked');\n \n //console.log(uniqid());\n const today = new Date();\n const productID = today.getFullYear()+\"\"+(today.getMonth()+1)+\"\"+today.getDate()+\"\"+today.getHours()+\"\"+today.getMinutes()+\"\"+today.getMilliseconds();\n //await contract.submitTransaction('createProducts', productID, 'RICE', '10 KG', 'Isaaq');\n //await contract.submitTransaction('registerUser', '[email protected]', '[email protected]', 'a12', 'yoyo');\n\n //await contract.submitTransaction('registerUser', '[email protected]', '[email protected]', 'a012', 'A012','producer', 'A company');\n //createProductsOfProducer(ctx, productID, name, quantity, org, unit='KG')\n //await contract.submitTransaction('createProductsOfProducer', productID, '[email protected]','RICE', '100', 'KG');\n // console.log(p);\n //await contract.submitTransaction('registerUser', '[email protected]', '[email protected]', 'b012', 'B012', 'retailer', 'B company');\n //await contract.submitTransaction('registerUser', '[email protected]', '[email protected]', 'b123', 'B123', 'consumer', 'consumer');\n //await contract.submitTransaction('requestOwnerShipOfProduct', '2021424734204', '[email protected]', '100');\n //await contract.submitTransaction('requestOwnerShipOfProduct', '20214262211609', '[email protected]', '100');\n // console.log(p);\n //const p = await contract.submitTransaction('updateProductsOfRetailer', '2021424210667', '10');\n //console.log(p.toString());\n //await contract.submitTransaction('changeOwnerShipOfProduct', '2021424139376');\n // console.log(p);\n //const p = await contract.submitTransaction('queryProduct', '2021424139376');\n //console.log(p.toString());\n //updateProductsOfRetailer(ctx, productID, quantity)\n //queryProduct(ctx, productID)\n //changeOwnerShipOfProduct(ctx, productId);\n //requestOwnerShipOfProduct(ctx, productID, newOwnerId, quantity)\n //createProductsOfProducer(ctx, productID, userID, name, quantity, unit)\n //registerUser(ctx, userId, email, password, name, role, org)\n console.log('Transaction has been submitted');\n\n // Disconnect from the gateway.\n await gateway.disconnect();\n\n } catch (error) {\n console.error(`Failed to submit transaction: ${error}`);\n process.exit(1);\n }\n}", "function deploystack(config, callback){\r\n\r\n config || (config = {});\r\n\r\n /*\r\n \r\n this is the hq url of the stack we are booting\r\n \r\n */\r\n var id = config.id || utils.littleid();\r\n var name = config.name || 'running stack';\r\n var stackpath = config.stackpath;\r\n\r\n var deployment = SparkManager.drone({\r\n id:id,\r\n name:name,\r\n stackpath:stackpath,\r\n network:network,\r\n deployment_database_path:options.deployment_database_path + '/' + id\r\n })\r\n\r\n deployment.boot(callback);\r\n\r\n }", "function dropApp(event){\n\tvar id = event.dataTransfer.getData('text');\n\t//console.log(id);\n\t \n\tchrome.management.get(id, function(info){\n\t\tvar message = chrome.i18n.getMessage('uninstall', info.name);\n\t\tif(confirm(message)){\n\t\t\tchrome.management.uninstall(id);\n\t\t}\n\t});\n\t \n\tevent.preventDefault();\n}", "async function createOrUpdateContainerApp() {\n const subscriptionId =\n process.env[\"APPSERVICE_SUBSCRIPTION_ID\"] || \"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345\";\n const resourceGroupName = process.env[\"APPSERVICE_RESOURCE_GROUP\"] || \"rg\";\n const name = \"testcontainerApp0\";\n const containerAppEnvelope = {\n configuration: { ingress: { external: true, targetPort: 3000 } },\n kind: \"containerApp\",\n kubeEnvironmentId:\n \"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube\",\n location: \"East US\",\n template: {\n containers: [{ name: \"testcontainerApp0\", image: \"repo/testcontainerApp0:v1\" }],\n dapr: { appPort: 3000, enabled: true },\n scale: {\n maxReplicas: 5,\n minReplicas: 1,\n rules: [\n {\n name: \"httpscalingrule\",\n custom: { type: \"http\", metadata: { concurrentRequests: \"50\" } },\n },\n ],\n },\n },\n };\n const credential = new DefaultAzureCredential();\n const client = new WebSiteManagementClient(credential, subscriptionId);\n const result = await client.containerApps.beginCreateOrUpdateAndWait(\n resourceGroupName,\n name,\n containerAppEnvelope\n );\n console.log(result);\n}", "async function deploy_stage() {\n // const DIR = process.cwd() + \"/NiggaBonkHead\";\n // const repoURL = \"https://github.com/longshotdev/rice-bot.git\";\n // const version = \"v0.1\";\n // console.log(DIR);\n // console.log(colors.green(\"Initalizing Local Repo\"));\n // await exec(`git init`, { cwd: DIR });\n // console.log(colors.green(\"Add Remote\"));\n // try {\n // await exec(`git remote add ship ${repoURL}`, { cwd: DIR });\n // console.log(colors.green(\"Fetch\"));\n // await exec(`git fetch ship --prune \"refs/tags/*:refs/tags/*\"`, {\n // cwd: DIR,\n // });\n // } catch (e) {}\n // console.log(colors.green(\"Checking out\"));\n // await exec(`git checkout ${version}`, { cwd: DIR });\n // console.log(colors.green(\"Resetting\"));\n // await exec(`git reset --hard`, { cwd: DIR }, execCB);\n // console.log(colors.green(\"Cleaning\"));\n // await exec(`git clean -df`, { cwd: DIR }, execCB);\n // console.log(colors.green(\"Pulling.\"));\n // await exec(`git pull -f ship ${version}`, { cwd: DIR }, execCB);\n\n // await exec(`yarn --production`, { cwd: DIR }, execCB);\n\n // function execCB(err, stdout, stderr) {\n // if (stdout) console.log(stdout);\n // if (stderr) console.log(stderr);\n // if (err) console.log(err);\n // }\n shell.cd(\"..\");\n await shell.exec(\"~/scripts/deploy_stage\", { async: true });\n}", "deploymentsPost(inline) {\n const localVarPath = this.basePath + '/deployments';\n const queryParameters = {};\n const headerParams = Object.assign({}, this.defaultHeaders);\n const fd = new FormData();\n // verify required parameter 'inline' is not null or undefined\n if (inline === null || inline === undefined) {\n throw new Error('Required parameter inline was null or undefined \\\n when calling deploymentsPost.');\n }\n if (inline !== undefined) {\n fd.append('inline', inline, 'Manifest.json');\n }\n const requestOptions = {\n data: fd,\n headers: headerParams,\n method: 'POST',\n params: queryParameters,\n url: localVarPath\n };\n if (this.isNode()) {\n requestOptions.headers = fd.getHeaders();\n // console.log('Headers', requestOptions.headers)\n }\n this.authentications.apiAuthorization.applyToRequest(requestOptions);\n this.authentications.default.applyToRequest(requestOptions);\n const deferred = new __1.Deferred();\n axios_1.default(requestOptions)\n .then((response) => {\n if (response.status >= 200 && response.status <= 299) {\n deferred.resolve(response.data);\n }\n else {\n deferred.reject(response);\n }\n })\n .catch((reason) => {\n deferred.reject(reason);\n });\n return deferred.promise;\n }", "async function deployRs(deployer, network) {\n let reserveToken = \"0xdF5e0e81Dff6FAF3A7e52BA697820c5e32D806A8\"; // ycrv\n let uniswap_factory = \"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f\";\n await deployer.deploy(TATOReserves, reserveToken, TATOProxy.address);\n await deployer.deploy(TATORebaser,\n TATOProxy.address,\n reserveToken,\n uniswap_factory,\n TATOReserves.address\n );\n let rebase = new web3.eth.Contract(TATORebaser.abi, TATORebaser.address);\n\n let pair = await rebase.methods.uniswap_pair().call();\n console.log(\"TATO <-> YCRV UNISWAP Pair: \", pair)\n let tato = await TATOProxy.deployed();\n await tato._setRebaser(TATORebaser.address);\n console.log(\"tato._setRebaser\");\n let reserves = await TATOReserves.deployed();\n await reserves._setRebaser(TATORebaser.address)\n console.log(\"reserves._setRebaser\");\n\n}", "function transmitAppName() {\n let options = {\n showName: false,\n manufacturer: ESPRUINO_COMPANY_CODE,\n manufacturerData: JSON.stringify({ name: APP_ID }),\n interval: 2000\n }\n\n NRF.setAdvertising({}, options);\n}", "function DeployContract(eth_accountAddr,eth_bytecode){\n\n\t// if( typeof eth_arguments != undefined)\n\t// {\n\t// \tvar _arguments = eth_arguments;\n\t// }\n\tdataString = {\"jsonrpc\":\"2.0\",\"method\":\"eth_sendTransaction\",\"id\":1,\"params\":[{\n\t\t\"from\": eth_accountAddr,\n\t\t\"data\":eth_bytecode,\n\n\t}]}\n\toptions = {\n url: REQUESTURL,\n method:'POST',\n headers:headers,\n body: dataString,\n json: true\n\t}\n\treturn options;\n}", "async function updateRemote(deployInfo) {\n console.log(\"Updating remote magento server\");\n\n if (\n shell.exec(\n `ssh ${deployInfo.host} \"cd ${path.resolve(\n deployInfo.dest,\n \".magento\"\n )}; bin/magento setup:upgrade; bin/magento cache:flush\"`\n ).code !== 0\n ) {\n console.error(\n \"Was not able to upgrade the remote magento server to reflect the deploy\"\n );\n }\n}", "async function migration(deployer, network, accounts) {\n const unit = web3.utils.toBN(10 ** 18);\n const totalBalance = unit.muln(INITIAL_GME_FOR_LP);\n\n const gmeToken = await GameStopToken.deployed();\n\n const lpPoolETHGME = artifacts.require(lpPools.ETHGME.contractName);;\n\n await deployer.deploy(\n LPRewardsDistributor,\n GameStopToken.address,\n lpPoolETHGME.address,\n totalBalance.toString()\n );\n const distributor = await LPRewardsDistributor.deployed();\n\n await gmeToken.mint(distributor.address, totalBalance.toString());\n console.log(`Deposited ${INITIAL_GME_FOR_LP} GME to LPRewardsDistributor.`);\n\n console.log(`Setting distributor to LPRewardsDistributor (${distributor.address})`);\n await lpPoolETHGME.deployed().then(pool => pool.setRewardDistribution(distributor.address));\n\n await distributor.distribute();\n}", "handleDeploySample() {\n this.setState({ deploying: true });\n const promisedSampleAPI = this.createSampleAPI();\n promisedSampleAPI.then((sampleAPI) => {\n sampleAPI\n .publish()\n .then(() => {\n const message = 'Pet-Store API Published successfully';\n this.setState({ published: true, api: sampleAPI });\n Alert.info(message);\n })\n .catch((error) => {\n console.error(error);\n this.setState({ deploying: false });\n Alert.error(error);\n });\n });\n }", "async _syncApplications(req, res) {\n // log method\n logger.log(1, '_syncApplications', 'Attempting to sync applications');\n try {\n // lambda invoke parameters\n let params = {\n FunctionName: `expense-app-${STAGE}-PortalDataSyncFunction`,\n Qualifier: '$LATEST'\n };\n const resp = await lambdaClient.send(new InvokeCommand(params));\n const result = JSON.parse(Buffer.from(resp.Payload));\n // send successful 200 status\n res.status(200).send(result);\n // return result from lambda function\n return result;\n } catch (err) {\n // log error\n logger.log(1, '_syncApplications', 'Failed to sync applications');\n // send error status\n this._sendError(res, err);\n // return error\n return err;\n }\n }", "async function deployToken(deployer, network, accounts) {\n let gas_price = 1000000000;\n let fromAccount = accounts[0];\n\n await deployer.deploy(comptroller);\n await deployer.deploy(proxyObj);\n\n let comptrollerAddress = comptroller.address;\n let proxyAddress = proxyObj.address;\n \n let contract_comptroller = new web3.eth.Contract(comptroller.abi, comptrollerAddress);\n let contract_proxy = new web3.eth.Contract(proxyObj.abi, proxyAddress);\n\n await Promise.all([\n contract_proxy.methods._setPendingImplementation(comptrollerAddress).send({ from: fromAccount, gasPrice: gas_price, gas: 100000}, function(err, txId) {\n if (err != null) {\n console.log(\"_setPendingImplementation error: \" + err);\n }\n console.log(\"_setPendingImplementation txid: \"+txId);\n }),\n\n contract_comptroller.methods._become(proxyAddress).send({ from: fromAccount, gasPrice: gas_price, gas: 100000}, function(err, txId) {\n if (err != null) {\n console.log(\"_become error: \" + err);\n }\n console.log(\"_become txid: \"+txId);\n }),\n\n ]);\n}", "async createAppId(anOrgId, anAppObject) {\n const method = 'createAppId'\n\n // await this.getUuidsForWalletAddresses()\n // return\n // TODO: 1. Might want to check if the user has the org_id in their sid\n // user data property.\n // 2. Might want to check if the user is listed as a member in the\n // org data table.\n // 3. Use update to do the assignment (right now we're doing the\n // horrible read--modify--clobber-write)\n // 4. Def check to make sure the same app id doesn't exist / collide\n // in the wallet analytics table\n\n const appId = uuidv4()\n\n // 1. Fetch the organization data\n //\n let orgData = undefined\n try {\n // TODO: See TODO.3 above!\n orgData = await organizationDataTableGet(anOrgId)\n } catch (error) {\n throw new Error(`${method} Failed to fetch organization data.\\n${error}`)\n }\n\n // 2 Get the public key\n //\n let publicKey = undefined\n try {\n publicKey = orgData.Item.cryptography.pub_key\n\n if (!publicKey) {\n throw new Error(`publicKey is undefined in organization data.`)\n }\n } catch (error) {\n throw new Error(`${method} Failed to fetch public key from organization data.\\n${error}`)\n }\n\n // 3. Create an entry for 3Box in the new app's data. Encrypt the 3Box id for\n // this app using the same shared public key used for analytics:\n // - TODO: very similar to getChatSupportAddress code in 3.a. (Unify if possible)\n try {\n const chatSupportWallet = ethers.Wallet.createRandom()\n const chatSupportWalletStr = JSON.stringify(chatSupportWallet)\n let chatSupportWalletCipherText = await eccrypto.encrypt(publicKey, Buffer.from(chatSupportWalletStr))\n anAppObject.chat_support = {\n wallet: chatSupportWalletCipherText\n }\n } catch (error) {\n throw new Error(`${method} Failed to create chat support address.\\n${error}`)\n }\n\n // 4. Update the apps entry for the organization with the new app's data:\n //\n try {\n orgData.Item.apps[appId] = anAppObject\n await organizationDataTablePut(orgData.Item)\n } catch (error) {\n throw new Error(`${method} Failed to update organization data.\\n${error}`)\n }\n\n // 5. Update the Wallet Analytics Data table\n //\n try {\n const walletAnalyticsRowObj = {\n app_id: appId,\n org_id: anOrgId,\n public_key: publicKey,\n analytics: {}\n }\n await walletAnalyticsDataTablePut(walletAnalyticsRowObj)\n } catch (error) {\n throw new Error(`${method} Failed to add wallet analytics data table row.\\n${error}`)\n }\n\n // AC: Not sure if this is needed.\n // // 6. TODO: Update the user data using Cognito IDP (the 'sid' property)\n // //\n // await this.tableUpdateWithIdpCredentials('sid', 'apps', appId, {})\n\n return appId\n }", "function createNewDeployment(stDeployId) {\r\n var stLogTitle = 'suitelet_approveTime.callScheduledScript.createNewDeployment';\r\n\r\n var record = nlapiCopyRecord('scriptdeployment', stDeployId);\r\n record.setFieldValue('status', 'NOTSCHEDULED');\r\n record.setFieldValue('startdate', nlapiDateToString(new Date(), 'date'));\r\n\r\n var stId = nlapiSubmitRecord(record, true, true);\r\n\r\n nlapiLogExecution('AUDIT', stLogTitle, 'New deployment created = ' + stId);\r\n}", "function seedApps() {\n const done = this.async();\n new Client({ name: 'juggernaut' })\n .save()\n .then(_client => {\n return new Client({ name: 'ronan' }).save();\n })\n .then(_client => {\n return new Client({ name: 'loki' }).save();\n })\n .then(_client => {\n return new Client({ name: 'deadpool' }).save();\n })\n .then(_client => done());\n }", "async function sync(deployInfo) {\n process.env.MAGENTO_INSTALL_FOLDER = path.resolve(\n deployInfo.dest,\n \".magento\"\n );\n process.env.MAGENTO_REMOTE = deployInfo.host;\n process.env.MAGENTO_MODULE = deployInfo.module || process.env.MAGENTO_MODULE;\n\n console.log(\n \"Syncing files\",\n deployInfo.src,\n `${process.env.MAGENTO_REMOTE}:${process.env.MAGENTO_INSTALL_FOLDER}`\n );\n\n await require(\"../lib/magento/sync-plugin\")();\n}", "approveTenant(state, payload) {\n const { item, index } = payload;\n state.newRegisteredTenant.splice(index, 1);\n state.tenant.push(item);\n }", "async function deploy(ethers) {\n\n const devMode = process.env.DEPLOY_NETWORK === 'localhost'\n\n const currentChain = chains[process.env.DEPLOY_NETWORK]\n\n if (!currentChain) {\n throw new Error('Unsupported chain')\n }\n\n let [\n validator\n ] = args;\n\n if (devMode) {\n validator = '0x70997970c51812dc3a010c7d01b50e0d17dc79c8'\n }\n\n // store\n const Tweedentities = await ethers.getContractFactory(\"Tweedentities\");\n const tweedentities = await Tweedentities.deploy(\n currentChain[1]\n );\n await tweedentities.deployed();\n\n // claimer\n const TweedentityClaimer = await ethers.getContractFactory(\"TweedentityClaimer\");\n const tweedentityClaimer = await TweedentityClaimer.deploy(\n tweedentities.address\n );\n await tweedentityClaimer.deployed();\n\n // identity manager\n const TweedentityManager = await ethers.getContractFactory(\"TweedentityManager\");\n const tweedentityManager = await TweedentityManager.deploy(\n tweedentities.address,\n tweedentityClaimer.address\n [1, 2, 3],\n [validator, validator, validator]\n );\n\n const MANAGER_ROLE = await tweedentities.MANAGER_ROLE()\n await tweedentities.grantRole(MANAGER_ROLE, tweedentityManager.address)\n await tweedentities.grantRole(MANAGER_ROLE, tweedentityClaimer.address)\n await tweedentityClaimer.grantRole(MANAGER_ROLE, tweedentityManager.address)\n\n if (devMode) {\n const timestamp = (await ethers.provider.getBlock()).timestamp - 1\n const tid = 5876772\n const bob = (await ethers.getSigners())[3]\n const signature = await getSignature(ethers, tweedentityManager, bob.address, 1, tid, timestamp)\n await tweedentityManager.connect(bob).setIdentity(1, tid, timestamp, signature)\n }\n\n let names = [\n 'Tweedentities',\n 'TweedentityManager',\n 'TweedentityClaimer'\n ]\n let bytes32Names = names.map(e => ethers.utils.formatBytes32String(e))\n\n let addresses = [\n tweedentities.address,\n tweedentityManager.address,\n tweedentityClaimer.address\n ]\n\n const Registry = await ethers.getContractFactory(\"TweedentityRegistry\");\n const registry = await Registry.deploy(\n bytes32Names,\n addresses\n );\n await registry.deployed();\n\n let res = {\n TweedentityRegistry: registry.address\n }\n\n const deployedJson = require('../config/deployed.json')\n let currentJson = deployedJson.TweedentityRegistry[currentChain[0]]\n deployedJson.TweedentityRegistry[currentChain[0]] = {\n address: registry.address,\n when: (new Date).toISOString()\n }\n if (currentJson) {\n let old = {}\n old[currentChain[0]] = currentJson\n deployedJson.TweedentityRegistry.previousVersions.push(old)\n }\n\n fs.writeFileSync(path.resolve(__dirname, '../config/deployed.json'), JSON.stringify(deployedJson, null, 2))\n\n return res\n\n}", "async function triggerNPMPublish() {\n const allTags = (await git.tags()).all;\n if (includes(allTags, \"RELEASE\")) {\n console.log(\"deleting old local<RELEASE> Tag\");\n await git.tag([\"-d\", \"RELEASE\"]);\n }\n console.log(\"creating new local <RELEASE> Tag\");\n await git.tag([\"RELEASE\"]);\n\n try {\n console.log(\"trying to delete old remote <RELEASE> Tag\");\n await git.push([\"--delete\", \"origin\", \"RELEASE\"]);\n } catch (e) {\n console.log(e.message);\n }\n\n console.log(\"pushing new remote <RELEASE> Tag\");\n await git.push(\"origin\", \"RELEASE\");\n}", "function registerApp(cookies, user, dapp, provider, appName, _os, _cpu, binaryUrl, _type) {\n return new Promise((resolve, reject) => {\n if ((_os === undefined) || (_cpu === undefined) || (binaryUrl === undefined)) {\n reject(new Error('registerApp() : OS or CPU undefined'));\n return;\n }\n\n const os = _os.toUpperCase();\n const cpu = _cpu.toUpperCase();\n const type = _type.toUpperCase();\n\n if (!(cpu in knownCPUs)) {\n reject(new Error(`registerApp() : unknown CPU '${cpu}'`));\n return;\n }\n if (!(os in knownOSes)) {\n reject(new Error(`registerApp() : unknown OS '${os}'`));\n return;\n }\n\n\n const appUid = uuidV4();\n debug(`registerApp (${appName}, ${os}, ${cpu}, ${binaryUrl})`);\n\n const appDescription = `<app><uid>${appUid}</uid><name>${appName}</name><type>DEPLOYABLE</type><accessrights>0x1700</accessrights></app>`;\n sendApp(cookies, dapp, appDescription).then(() => {\n setApplicationBinary(cookies, appUid, os, cpu, binaryUrl, type).then(() => {\n resolve(appUid);\n }).catch((err) => {\n reject(new Error(`registerApp() setApplicationBinary error : ${err}`));\n });\n }).catch((err) => {\n reject(new Error(`registerApp() sendApp error : ${err}`));\n });\n });\n }", "function apps (args, cb) { \n if (args.length == 0){\n return list(cb);\n }\n\n var action = args[0];\n if (action == 'read') {\n var appId = fhc.appId(args[1]);\n return read(appId, cb);\n } else if (action === 'list') { \n return list(cb);\n } else if (action === 'create'){\n args.shift();\n if (args.length === 0 || args.length > 4) return cb(apps.usage);\n // TODO order here is important unfortunately.. would be good to have command specific options..\n var title = args[0];\n var repo = args[1];\n var branch = args[2];\n return create(title, repo, branch, cb);\n }else if (action === 'update' || action === 'set'){\n args.shift();\n if (args.length !== 3) return cb(apps.usage);\n var appId = fhc.appId(args[0]);\n var name = args[1];\n var value = args[2];\n return update(appId, name, value, cb);\n }else if (action === 'delete'){\n args.shift();\n var appId = fhc.appId(args);\n return deleteApps(appId, cb);\n }else if (args.length == 1){\n var appId = fhc.appId(args[0]);\n return read(appId, cb);\n }else{\n return cb(apps.usage);\n }\n}", "function actionPost (req, res, next) {\n\thelper.validateActionPost(req, res);\n\tif (res.parcel.message) {\n\t\treturn res.parcel.deliver();\n\t}\n\n\tapp.locals.db.runAsTransaction(function (client, callback) {\n\t\tasync.waterfall([\n\t\t\t// Blacklist/Unblacklist app\n\t\t\tfunction (callback) {\n\t\t\t\tif (req.body.blacklist) {\n\t\t\t\t\tclient.getOne(sql.insertAppBlacklist(req.body), callback);\n\t\t\t\t} else {\n\t\t\t\t\tclient.getOne(sql.deleteAppBlacklist(req.body.uuid), callback);\n\t\t\t\t}\n\t\t\t},\n\t\t\t// Update approval status for app\n\t\t\tfunction (blacklist, callback) {\n\t\t\t\tclient.getOne(sql.changeAppApprovalStatus(req.body.id, req.body.approval_status, (req.body.denial_message || null)), callback);\n\t\t\t},\n\t\t\t// sync the status to SHAID\n\t\t\tfunction (result, callback) {\n\t\t\t\tif(!req.body.version_id){\n\t\t\t\t\t// skip notifying SHAID if there is no version ID (legacy support)\n\t\t\t\t\tcallback(null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tapp.locals.shaid.setApplicationApprovalVendor([{\n\t\t\t\t\t\"uuid\": req.body.uuid,\n\t\t\t\t\t\"blacklist\": req.body.blacklist || false,\n\t\t\t\t\t\"version_id\": req.body.version_id,\n\t\t\t\t\t\"approval_status\": req.body.approval_status,\n\t\t\t\t\t\"notes\": req.body.denial_message || null\n\t\t\t\t}], callback);\n\t\t\t}\n\t\t], callback);\n\t}, function (err, response) {\n\t\tif (err) {\n\t\t\tapp.locals.log.error(err);\n\t\t\treturn res.parcel.setStatus(500).deliver();\n\t\t} else {\n\t\t\treturn res.parcel.setStatus(200).deliver();\n\t\t}\n\t});\n}", "function deployRpc(options) {\n options = Object.assign({}, options);\n options.headers = Object.assign({}, options.headers || {});\n if (options.headers.cookie) {\n throw new Error(\"sorry, can't combine cookie headers yet\");\n }\n options.qs = Object.assign(\n {},\n options.qs,\n { capabilities: CAPABILITIES.slice() },\n options.deployWithTokenProps || {}\n );\n // If we are waiting for deploy, we let Galaxy know so it can\n // use that information to send us the right deploy message response.\n if (options.waitForDeploy) {\n options.qs.capabilities.push('willPollVersionStatus');\n }\n\n const deployURLBase = getDeployURL(options.site).await();\n\n if (options.printDeployURL) {\n Console.info(\"Talking to Galaxy servers at \" + deployURLBase);\n }\n\n let operand = '';\n if (options.operand) {\n operand = `/${options.operand}`;\n } else if (options.site) {\n operand = `/${options.site}`;\n }\n\n // XXX: Reintroduce progress for upload\n try {\n var result = request(Object.assign(options, {\n url: deployURLBase + '/' + options.operation +\n operand,\n method: options.method || 'GET',\n bodyStream: options.bodyStream,\n useAuthHeader: true,\n encoding: 'utf8' // Hack, but good enough for the deploy server..\n }));\n } catch (e) {\n return {\n statusCode: null,\n errorMessage: \"Connection error (\" + e.message + \")\"\n };\n }\n\n var response = result.response;\n var body = result.body;\n var ret = { statusCode: response.statusCode };\n\n if (response.statusCode !== 200) {\n if (body.length > 0) {\n ret.errorMessage = body;\n } else {\n ret.errorMessage = \"Server error \" + response.statusCode +\n \" (please try again later)\";\n }\n return ret;\n }\n\n var contentType = response.headers[\"content-type\"] || '';\n if (contentType === \"application/json; charset=utf-8\") {\n try {\n ret.payload = JSON.parse(body);\n } catch (e) {\n ret.errorMessage =\n \"Server error (please try again later)\\n\"\n + \"Invalid JSON: \" + body;\n return ret;\n }\n } else if (contentType === \"text/plain; charset=utf-8\") {\n ret.message = body;\n }\n\n const hasAllExpectedKeys =\n (options.expectPayload || [])\n .map(key => ret.payload && hasOwn.call(ret.payload, key))\n .every(x => x);\n\n if ((options.expectPayload && ! hasOwn.call(ret, 'payload')) ||\n (options.expectMessage && ! hasOwn.call(ret, 'message')) ||\n ! hasAllExpectedKeys) {\n delete ret.payload;\n delete ret.message;\n\n ret.errorMessage = \"Server error (please try again later)\\n\" +\n \"Response missing expected keys.\";\n }\n\n return ret;\n}", "function deployStudio() {\n return configureFlowWithFunction().then(() => {\n return client.studio.flows\n .create({\n commitMessage: 'Code Exchange automatic deploy',\n friendlyName: 'Vaccine FAQ Bot',\n status: 'published',\n definition: flowDefinition,\n })\n .then((flow) => flow)\n .catch((err) => {\n throw new Error(err.details);\n });\n });\n }", "async function deploy() {\n console.log(`Deploying upgradeable Greeter contract...`);\n const Greeter = await ethers.getContractFactory('Greeter');\n const greeter = await upgrades.deployProxy(Greeter).then(c => c.deployed());\n console.log(` ${greeter.address}`);\n return greeter;\n}", "async function main() {\n // Buidler always runs the compile task when running scripts through it.\n // If this runs in a standalone fashion you may want to call compile manually\n // to make sure everything is compiled\n // await bre.run('compile');\n\n // We get the contract to deploy\n const Greeter = await ethers.getContractFactory('Greeter')\n const greeter = await Greeter.deploy('Hello, Buidler!')\n\n await greeter.deployed()\n\n console.log('Greeter deployed to:', greeter.address)\n}", "function updateRemoteApp() {\n let cmd = \"rm -rf \" + repoNameOLD;\n cmd += \"&& mv \" + repoName + \"/\" + nodeModulesDir + \" \" + repoNameTemp; \n cmd += \" && mv \" + repoName + \" \" + repoNameOLD;\n cmd += \" && mv \" + repoNameTemp + \" \" + repoName;\n\tconsole.log(\"##Attempting folder moves on remote host with cmd: \" + cmd);\n\treturn ssh.execCommand(cmd, { cwd:'/home/ubuntu' })\n}", "@action setup_apps() {\n this._applications_to_configure.forEach((app_conf) => {\n if ( !app_conf.name ) {\n throw new TypeError(`Apps need a name as part of their configuration! Looked inside: ${JSON.stringify(app_conf)}`)\n }\n\n // Parse its routes into our router\n // TideStore (.. which is badly named... its technically just a rendering engine).\n // will end up using the context to determine which layout to use during a render\n for (let route of app_conf.routes) {\n route.context.app_label = app_conf.name;\n this.router.set(route);\n }\n\n // Give the application some of its own configured data\n app_conf.app.store = app_conf.store;\n app_conf.app.tide = this;\n\n if(this._apps.has(app_conf.name)){\n throw new ConfigurationError(`The application named ${app_conf.name} was listed twice.`)\n }\n\n // Set the completed app in our table\n this._apps.set(app_conf.name, app_conf);\n });\n\n // Now that all the apps are in the listing\n // Let it complete them complete their initialization\n this.apps().map(app_conf => {\n let initial = this.initial_data[app_conf.name] || {};\n console.log(`[Tide] Initial for ${app_conf.name}`, initial);\n app_conf.ready(initial)\n })\n }", "function doLiveAct(appId, funct, data, cb) { \n common.getAppNameUrl(appId, 'live', function(err, appName, appUrl) {\n // post to /cloud\n request({uri: appUrl + \"/cloud/\" + funct, method: 'POST', json: data}, function (err, response, body) {\n log.silly(response, \"act response\");\n return cb(common.nullToUndefined(err), body);\n });\n });\n}", "publishMasterHost() {\n this.log.info('Bonjour: Casting Master mode server on port: '+this.settings.WEBSERVER_PORT+' name: '+this.masterServiceName);\n this.mastetService = this.bonjour.publish({ name: this.masterServiceName, type: 'piLaz0rTag', port: this.settings.WEBSERVER_PORT })\n }", "createEnvironment(incomingOptions, cb) {\n const Bitbucket = require('./dist');\n\n let apiInstance = new Bitbucket.DeploymentsApi(); // String | The account // String | The repository // DeploymentEnvironment | The environment to create.\n /*let username = \"username_example\";*/ /*let repoSlug = \"repoSlug_example\";*/ /*let body = new Bitbucket.DeploymentEnvironment();*/ apiInstance.createEnvironment(\n incomingOptions.username,\n incomingOptions.repoSlug,\n incomingOptions.body,\n (error, data, response) => {\n if (error) {\n cb(error, null, response);\n } else {\n cb(null, data, response);\n }\n }\n );\n }", "function createHybridApp(config) {\n // console.log(\"Config:\" + JSON.stringify(config, null, 2));\n var outputDir = config.outputdir;\n if (!outputDir) outputDir = process.cwd();\n outputDir = path.resolve(outputDir);\n var projectDir = path.join(outputDir, config.appname);\n\n // Make sure the Cordova CLI client exists.\n var cordovaCliVersion = cordovaHelper.getCordovaCliVersion();\n if (cordovaCliVersion === null) {\n console.log('cordova command line tool could not be found. Make sure you install the cordova CLI from https://www.npmjs.org/package/cordova.');\n process.exit(11);\n }\n\n var minimumCordovaVersionNum = miscUtils.getVersionNumberFromString(minimumCordovaCliVersion);\n var cordovaCliVersionNum = miscUtils.getVersionNumberFromString(cordovaCliVersion);\n if (cordovaCliVersionNum < minimumCordovaVersionNum) {\n console.log('Installed cordova command line tool version (' + cordovaCliVersion + ') is less than the minimum required version (' + minimumCordovaCliVersion + '). Please update your version of Cordova.');\n process.exit(12);\n }\n\n console.log('Using cordova CLI version ' + cordovaCliVersion + ' to create the hybrid app.');\n\n shelljs.exec('cordova create \"' + projectDir + '\" ' + config.companyid + ' ' + config.appname);\n shelljs.pushd(projectDir);\n shelljs.exec('cordova platform add ios@' + cordovaPlatformVersion);\n shelljs.exec('cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin');\n\n // Remove the default Cordova app.\n shelljs.rm('-rf', path.join('www', '*'));\n\n // Copy the sample app, if a local app was selected.\n if (config.apptype === 'hybrid_local') {\n var sampleAppFolder = path.join(__dirname, 'HybridShared', 'samples', 'userlist');\n shelljs.cp('-R', path.join(sampleAppFolder, '*'), 'www');\n }\n\n // Add bootconfig.json\n var bootconfig = {\n \"remoteAccessConsumerKey\": config.appid || \"3MVG9Iu66FKeHhINkB1l7xt7kR8czFcCTUhgoA8Ol2Ltf1eYHOU4SqQRSEitYFDUpqRWcoQ2.dBv_a1Dyu5xa\",\n \"oauthRedirectURI\": config.callbackuri || \"testsfdc:///mobilesdk/detect/oauth/done\",\n \"oauthScopes\": [\"web\", \"api\"],\n \"isLocal\": config.apptype === 'hybrid_local',\n \"startPage\": config.startpage || 'index.html',\n \"errorPage\": \"error.html\",\n \"shouldAuthenticate\": true,\n \"attemptOfflineLoad\": false\n };\n // console.log(\"Bootconfig:\" + JSON.stringify(bootconfig, null, 2));\n\n fs.writeFileSync(path.join('www', 'bootconfig.json'), JSON.stringify(bootconfig, null, 2));\n shelljs.exec('cordova prepare ios');\n shelljs.popd();\n\n // Inform the user of next steps.\n var nextStepsOutput =\n ['',\n outputColors.green + 'Your application project is ready in ' + projectDir + '.',\n '',\n outputColors.cyan + 'To build the new application, do the following:' + outputColors.reset,\n ' - cd ' + projectDir,\n ' - cordova build',\n '',\n outputColors.cyan + 'To run the application, start an emulator or plug in your device and run:' + outputColors.reset,\n ' - cordova run',\n '',\n outputColors.cyan + 'To use your new application in XCode, do the following:' + outputColors.reset,\n ' - open ' + projectDir + '/platforms/ios/' + config.appname + '.xcodeproj in XCode',\n ' - build and run',\n ''].join('\\n');\n console.log(nextStepsOutput);\n console.log(outputColors.cyan + 'Before you ship, make sure to plug your OAuth Client ID,\\nCallback URI, and OAuth Scopes into '\n + outputColors.magenta + 'www/bootconfig.json' + outputColors.reset);\n}", "function addUeApp(name, parent) {\n click(meep.CFG_BTN_NEW_ELEM);\n select(meep.CFG_ELEM_TYPE, meep.ELEMENT_TYPE_UE_APP);\n verifyForm(meep.CFG_ELEM_LATENCY, true, 'have.value', String(meep.DEFAULT_LATENCY_APP));\n verifyForm(meep.CFG_ELEM_LATENCY_VAR, true, 'have.value', String(meep.DEFAULT_LATENCY_JITTER_APP));\n verifyForm(meep.CFG_ELEM_PKT_LOSS, true, 'have.value', String(meep.DEFAULT_PACKET_LOSS_APP));\n verifyForm(meep.CFG_ELEM_THROUGHPUT_DL, true, 'have.value', String(meep.DEFAULT_THROUGHPUT_DL_APP));\n verifyForm(meep.CFG_ELEM_THROUGHPUT_UL, true, 'have.value', String(meep.DEFAULT_THROUGHPUT_UL_APP));\n type(meep.CFG_ELEM_LATENCY, appLatency);\n type(meep.CFG_ELEM_LATENCY_VAR, appLatencyVar);\n type(meep.CFG_ELEM_PKT_LOSS, appPktLoss);\n type(meep.CFG_ELEM_THROUGHPUT_DL, appThroughput);\n type(meep.CFG_ELEM_THROUGHPUT_UL, appThroughput-1);\n select(meep.CFG_ELEM_PARENT, parent);\n type(meep.CFG_ELEM_NAME, name);\n type(meep.CFG_ELEM_IMG, ueAppImg);\n type(meep.CFG_ELEM_GPU_COUNT, ueAppGpuCount);\n select(meep.CFG_ELEM_GPU_TYPE, ueAppGpuType);\n type(meep.CFG_ELEM_CPU_MIN, ueAppCpuMin);\n type(meep.CFG_ELEM_CPU_MAX, ueAppCpuMax);\n type(meep.CFG_ELEM_MEMORY_MIN, ueAppMemoryMin);\n type(meep.CFG_ELEM_MEMORY_MAX, ueAppMemoryMax);\n type(meep.CFG_ELEM_ENV, ueAppEnv);\n type(meep.CFG_ELEM_CMD, ueAppCmd);\n type(meep.CFG_ELEM_ARGS, ueAppArgs);\n type(meep.CFG_ELEM_PLACEMENT_ID, ueAppPlacementId);\n click(meep.MEEP_BTN_APPLY);\n verifyEnabled(meep.CFG_BTN_NEW_ELEM, true);\n verifyEnabled(meep.CFG_BTN_DEL_ELEM, false);\n verifyEnabled(meep.CFG_BTN_CLONE_ELEM, false);\n }", "appExecute() {\n\n\t\tthis.appConfig();\n\t\tthis.includeRoutes(this.app);\n\n\t\tthis.http.listen(this.port, this.host, () => {\n\t\t\tconsole.log(`Listening on http://${this.host}:${this.port}`);\n\t\t});\n\t}", "function ping(argv, cb) {\n var args = argv._;\n if (args.length === 0) {\n return cb(ping.usage);\n }\n\n var appId = fhc.appId(args[0]);\n var deployTarget = ini.getEnvironment(argv);\n\n return pingApp(appId, deployTarget, cb);\n}", "async function deployRs(deployer, network) {\n let reserveToken = \"0xdF5e0e81Dff6FAF3A7e52BA697820c5e32D806A8\";\n let uniswap_factory = \"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f\";\n await deployer.deploy(TIMETRAVELReserves, reserveToken, TIMETRAVELProxy.address);\n await deployer.deploy(TIMETRAVELRebaser,\n TIMETRAVELProxy.address,\n reserveToken,\n uniswap_factory,\n TIMETRAVELReserves.address\n );\n let rebase = new web3.eth.Contract(TIMETRAVELRebaser.abi, TIMETRAVELRebaser.address);\n\n let pair = await rebase.methods.uniswap_pair().call();\n console.log(pair)\n let timetravel = await TIMETRAVELProxy.deployed();\n await timetravel._setRebaser(TIMETRAVELRebaser.address);\n let reserves = await TIMETRAVELReserves.deployed();\n await reserves._setRebaser(TIMETRAVELRebaser.address)\n}", "function update_k8s_deployment() {\n deployment_info = k8s.callWS('/apis/apps/v1/namespaces/' + k8s_namespace + \"/deployments/myvd-\" + k8s_obj.metadata.name,\"\",0);\n\n if (deployment_info.code == 200) {\n\n deployment = JSON.parse(deployment_info.data);\n\n\n patch = {\n \"spec\" : {\n \"template\" : deployment.spec.template \n }\n };\n\n if (patch.spec.template.metadata.annotations == null) {\n patch.spec.template.metadata.annotations = {};\n }\n patch.spec.template.metadata.annotations[\"tremolo.io/update\"] = java.util.UUID.randomUUID().toString();\n\n \n\n if (deployment.spec.replicas != cfg_obj.replicas) {\n print(\"Changeing the number of replicas\");\n patch.spec['replicas'] = cfg_obj.replicas;\n }\n\n if (deployment.spec.template.spec.containers[0].image !== cfg_obj.image) {\n print(\"Changing the image\");\n \n patch.spec.template.spec.containers[0].image = cfg_obj.image;\n }\n\n k8s.patchWS('/apis/apps/v1/namespaces/' + k8s_namespace + \"/deployments/myvd-\" + k8s_obj.metadata.name,JSON.stringify(patch));\n \n } else {\n print(\"No deployment found, running create\");\n create_static_objects();\n\n }\n}", "function deployStudio() {\n return client.studio.flows\n .create({\n friendlyName: context['FLOW-PRIMARY_FRIENDLY_NAME'],\n status: 'published',\n definition: flowDefinition,\n })\n .then((flow) => flow)\n .catch((err) => {\n console.log(err.details);\n throw new Error(err.details)\n });\n }", "function createMerakiNetwork(apiKey, orgId, shard, payload){\n var headers = {\n \"x-cisco-meraki-api-key\": apiKey\n };\n var options =\n {\n \"method\" : \"post\",\n \"payload\": payload,\n \"headers\": headers,\n \"content-type\": \"application/json\",\n \"contentLength\": payload.length,\n \"followRedirects\": true,\n \"muteHttpExceptions\":true\n }; \n var cache = CacheService.getScriptCache();\n var response = UrlFetchApp.fetch('https://'+shard+'.meraki.com/api/v0/organizations/'+orgId+'/networks', options);\n var result = JSON.parse(response.getContentText());\n var new_network_id = result.id;\n cache.put(\"net_id\", new_network_id);\n Logger.log(\"Create network result: \" +JSON.stringify(result));\n Logger.log(\"Create network HTTP response: \" +response.getResponseCode());\n}", "async function main() {\n const program = new Command();\n program.parse(process.argv);\n await fs.mkdir(\"build\", { recursive: true });\n await fs.writeFile(\n \"build/config.json\",\n JSON.stringify(await getDeployConfig(), null, 2) + \"\\n\"\n );\n console.log(\"wrote build/config.json\");\n process.exit(0);\n}", "function deploy(bytecode, abi, pipe) {\n\n}" ]
[ "0.6045106", "0.5855501", "0.568801", "0.56382346", "0.5465194", "0.54348034", "0.5375702", "0.53549707", "0.5347991", "0.53236043", "0.5288324", "0.52631855", "0.52187955", "0.519844", "0.5172483", "0.51483744", "0.513677", "0.51349205", "0.512596", "0.5113219", "0.51042336", "0.51039064", "0.5079276", "0.5077953", "0.50677174", "0.50557774", "0.5051187", "0.5034173", "0.50322634", "0.50133866", "0.49746054", "0.49725026", "0.49587503", "0.49539417", "0.4939523", "0.49369317", "0.49320525", "0.4923119", "0.49206552", "0.4908791", "0.48969102", "0.4896169", "0.4894274", "0.48893142", "0.48874605", "0.48868716", "0.4886267", "0.48854828", "0.48792064", "0.48774624", "0.48538074", "0.48533767", "0.48495114", "0.48413903", "0.48384717", "0.4833675", "0.48268598", "0.4819054", "0.47852388", "0.4783265", "0.47719356", "0.47526145", "0.4735414", "0.4730318", "0.47070107", "0.47042227", "0.46948427", "0.46905896", "0.4674661", "0.46656504", "0.46648246", "0.4654225", "0.46443734", "0.46240786", "0.46238148", "0.46175244", "0.46162376", "0.45994118", "0.45991194", "0.45987964", "0.4596116", "0.4595614", "0.45950818", "0.45924369", "0.4587621", "0.45873827", "0.45825535", "0.45821548", "0.45740765", "0.45699528", "0.4565138", "0.4558488", "0.45577815", "0.4553447", "0.4552879", "0.4551463", "0.45506945", "0.45407987", "0.45296755", "0.4528039" ]
0.60331744
1
accepts a number. Return true/false depending if number can be trucanted from both left and right hand side directions
function isTrunk(num){ //return false, if the number passed is non-prime if (primes[+num] ==0){ return false; } //return false if we hit a non-prime by removing numbers //from the left var removeLeft = num.toString(); while (removeLeft.length>0){ // console.log("removeleft:%s",removeLeft); if (primes[+removeLeft] ==0){ return false; } removeLeft = removeLeft.slice(1); } //return false if we hit a non-prime by removing numbers //from the right var removeRight = num.toString(); while (removeRight.length>0){ // console.log("removeRight:%s",removeRight); if (primes[+removeRight] ==0){ return false; } removeRight = removeRight.slice(0,removeRight.length-1); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function esPotencia2(numero) {\n if (typeof numero != 'number') {\n throw TypeError('El argumento debe ser un número.');\n }\n\n return numero && (numero & (numero - 1)) === 0;\n}", "function checkNumber(a, b) {\n if (a == 8 || b == 8) {\n console.log(true);\n } else if (a + b == 8) {\n console.log(true);\n } else if (a - b == 8 || b - a == 8) {\n console.log(true);\n } else {\n console.log(false);\n }\n}", "function canMove(direction) {\n // 37 - left arrow\n // 38 - up arrow\n var a = 1,\n b = 4,\n c = 1;\n // 39 - right arrow\n // 40 - down arrow\n if (direction == 39 || direction == 40) {\n a = 2;\n b = -1;\n c = -1;\n }\n for (var i = 0; i < 4; i++) {\n for (var j = a; j != b; j += c) {\n switch (direction) {\n // when moving left or rigth, we check whether there are either free space\n // or two adjacent tiles with the same number in the same row\n case 37:\n case 39:\n if (all_numbers[i][j]) {\n if (all_numbers[i][j - c] == 0 || all_numbers[i][j] == all_numbers[i][j - c]) {\n return true;\n }\n }\n break;\n case 38:\n case 40:\n // when moving up or down, we check whether there are either free space\n // or two adjacent tiles with the same number in the same column\n if (all_numbers[j][i]) {\n if (all_numbers[j - c][i] == 0 || all_numbers[j][i] == all_numbers[j - c][i]) {\n return true;\n }\n }\n break;\n }\n }\n }\n return false;\n}", "function is_valid_number()\r\n{\r\n\treturn isValidNumber.apply(this, arguments)\r\n}", "function numberCheck (input) {\n\tif (input >= 0 && input <= 9) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function isLEQZero(Number) {\n if (Number <= 0) {\n console.log(true);\n } else {\n console.log(false);\n }\n}", "function checkNum() {\n for (let i = arguments.length - 1; i >= 0; i--) {\n if (isNaN(arguments[i]) || arguments[i] < 0) {\n return false;\n }\n continue;\n }\n return true;\n }", "function checkisNum(number) {\n if(typeof number=== 'number' && number>0 ){\n return true;\n }\n return false;\n}", "function likeNumber(value) {\n\t var code = value.charCodeAt(0);\n\t var nextCode;\n\n\t if (code === plus || code === minus) {\n\t nextCode = value.charCodeAt(1);\n\n\t if (nextCode >= 48 && nextCode <= 57) {\n\t return true;\n\t }\n\n\t var nextNextCode = value.charCodeAt(2);\n\n\t if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {\n\t return true;\n\t }\n\n\t return false;\n\t }\n\n\t if (code === dot) {\n\t nextCode = value.charCodeAt(1);\n\n\t if (nextCode >= 48 && nextCode <= 57) {\n\t return true;\n\t }\n\n\t return false;\n\t }\n\n\t if (code >= 48 && code <= 57) {\n\t return true;\n\t }\n\n\t return false;\n\t}", "function checkState(number){\n console.log(number)\n if (number ===2 || number === 1){\n return true;\n }\n console.log(number)\n return false;\n }", "function acceptsNumber(number) {\n if (number > 1) {\n for (var i = 1; i <= number; i++) {\n //must check of 1 because number / 0 = ...\n if (number % i === 0) {\n return false;\n }\n return true;\n }\n } else {\n return \"Number is not valid for check!!!\";\n }\n}", "function isRamp(number) {\n numString = number.toString();\n for (j=1; j<numString.length; j++) {\n if (numString[j]<numString[j-1])\n return false;\n }\n return true;\n}", "_isLegalT(t) {\n if (t >= 0 && t <= 1) {\n t -= this._tBuffer;\n return (t > 0) ? round(t, 4) : 0;\n }\n return 10;\n }", "function isNumberOk(num) {\n if (num > 0 && num < 99999999) return true;\n return false;\n}", "inRange (number, start, end){\r\n // if end is undefined, start = 0 and end = start, then check if in range\r\n if (typeof end === 'undefined'){\r\n end = start;\r\n start = 0;\r\n } else if ( start > end ){\r\n // swap the two values around\r\n let temp = start;\r\n start = end;\r\n end = temp;\r\n }\r\n if ((number > start) && (number < end)){\r\n return true;\r\n }\r\n else\r\n return false;\r\n }", "function isToLeft(roadValue) {\r\n return (roadValue & TO_LEFT) == TO_LEFT;\r\n }", "function isToLeft(roadValue) {\n return (roadValue & TO_LEFT) == TO_LEFT;\n }", "function checkNum(num) {\n return num === currentNumber;\n}", "function isTriangular(num) {\n let res = null;\n let sum = 0;\n for (let i = 1; i <= num; i++) {\n sum = sum + i;\n if (sum === num) {\n res = true;\n }\n }\n return res ? true : false;\n}", "function isInteger(n) {\n return n === +n && n === (n|0);\n }", "function isPalindrom(nr) {\n\tvar invers=0;\n\tvar dubluraNr=nr;\n\twhile(dubluraNr!=0) {\n\t\tinvers=(invers*10)+(dubluraNr%10);\n\t\tdubluraNr=parseInt(dubluraNr/10);\n\t}\n\tif(invers==nr) return true;\n\telse return false;\n}", "function validateNumber(value) {\n if (value % 1 === 0 && value > 0) {\n return true;\n } else {\n console.log(\" **** Please enter a whole number above zero. ****\");\n }\n}", "function isInt(n) {\n return n === +n && n === (n | 0);\n}", "function isNatualNum(n){\n if (typeof n !== 'number'){\n return \"not a number\";\n }\n return (n > 0.0) && (Math.abs(n) === n) && (n !== 'infinite');\n}", "directionIsValide(){\n let max_x = window.innerWidth;\n let max_y = window.innerHeight;\n let new_x= this.dir.x*this.dir.vect+this.pos.x;\n let new_y= this.dir.y*this.dir.vect+this.pos.y;\n return (new_x>0 && new_y>0 && new_x<max_x && new_y<max_y );\n }", "check_d_range(space) {\r\n const xd = Math.abs(this.x - space.x);\r\n\r\n if(xd <= this.straight) {\r\n return true;\r\n } else {\r\n return false;\r\n };\r\n }", "function makes10(a, b){\n if (a === 10 || b === 10){\n return true\n } else if (a + b === 10){\n return true\n } else {\n return false\n }\n }", "function numbers_ranges(x, y) {\n if ((x >= 0 && x <= 15 && y >= 0 && y <= 15))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "function ct(t) {\n return \"number\" == typeof t && Number.isInteger(t) && !at(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;\n}", "function comprobarLetraDNI(num, letra) {\r\n var letras = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E'];\r\n num = num % 23;\r\n if (letra == letras[num]) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "function checkDirection (currentPoint, point) {\n let alpha = (point.alpha - currentPoint.alpha > 1.8 * Math.PI ? \n point.alpha + ALPHA_DIRECTION * 2 * Math.PI :\n point.alpha),\n diffR = currentPoint.radius - point.radius,\n diffA = alpha - currentPoint.alpha,\n curDirR = currentPoint.direction.radius,\n curDirA = currentPoint.direction.alpha,\n candDirR = point.direction.radius,\n candDirA = point.direction.alpha;\n\n if (currentPoint.alpha - point.alpha > 1.8 * Math.PI) return false;\n\n return diffR * curDirR >= 0 && diffA * curDirA >= 0 &&\n diffR * candDirR >= 0 && diffA * candDirA >= 0;\n}", "function sc_isInexact(n) {\n return true;\n}", "function validateNumber(value) {\n var valid = Number.isInteger(parseFloat(value));\n var sign = Math.sign(value);\n\n if (valid && (sign === 1)) {\n return true;\n } else {\n return \"Please enter a number\";\n }\n}", "function isPositive(number) {\n return number >= 0\n}", "function po2(n) {\n if (typeof n !== 'number')\n return 'Not a number';\n\n return n && (n & (n - 1)) === 0;\n}", "function goodNumber(v) {\n\t return isNumeric(v) && Math.abs(v) < FP_SAFE;\n\t }", "function goodNumber(v) {\n\t return isNumeric(v) && Math.abs(v) < FP_SAFE;\n\t }", "function isPositive(number) {\r\n return number >= 0;\r\n}", "function goodNumber(v) {\n return isNumeric(v) && Math.abs(v) < FP_SAFE;\n }", "function goodNumber(v) {\n return isNumeric(v) && Math.abs(v) < FP_SAFE;\n }", "function isTriangleNumber(number) {\n if (number < 0) return false\n if (number === 0) return true;\n let sum=0;\n for(let i=1; i<=number; i++){\n sum+=i; \n if(sum===number){ \n return true; \n }\n }\n return false;\n}", "function lessThanOrEqualToZero(num) {\n if(num <= 0){\n return true;\n } else{\n return false;\n }\n}", "function numericEquals(left,right){// Implemented based on Object.is() polyfill from\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nif(left===right){// +0 != -0\nreturn left!==0||1/left===1/right;}else{// NaN == NaN\nreturn left!==left&&right!==right;}}", "function checkIntegerNumber(val) {\r\n if (val && val == parseInt(val, 10))\r\n return true;\r\n else\r\n return false;\r\n}", "function isTriangular(n) {\n return Number.isInteger((Math.sqrt(1 + 8 * n) + 1) / 2);\n}", "function numPali2 (num) {\n return parseInt(num.toString().split('').reverse().join('')) === num;\n}", "function checkAllowNumber(e) {\n var code = (e.which) ? e.which : e.keyCode;\n if ((code < 48 || code > 57) && code != 8 && code != 13 && code != 27 && code != 0 && code != 46 && (code < 37 || code > 40)) {\n return false;\n }\n return true;\n}", "function ot(t) {\n return \"number\" == typeof t && Number.isInteger(t) && !it(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;\n}", "function verifyNum(number, min, max)\n{\n\t'use strict';\n\t\n\t// If number can be converted to a number, and min and max are numbers\n\tif(!isNaN(Number(number)) && typeof min == \"number\" && typeof max == \"number\")\n\t{\n\t\t// Convert number to an integer\n\t\tnumber = parseInt(number);\n\t\tmin = parseInt(min);\n\t\tmax = parseInt(max);\n\t\t\n\t\t// Return whether number falls within the range min --> max\n\t\treturn (number >= min && number <= max);\n\t}\n\treturn false;\n}", "verifyPositiveNumber(value) {\n return parseInt(value) >= 0;\n }", "function checkNbr(n) {\n\t//je check si n est plus petit ou égal à 0, puis retourne true. \n\tif(n<=0){\n\t return true;\n\t//sinon, je retourne false\n\t} else {return false;}\n}", "function boundsCheck(value) {\n\t\tif (base == 10)\tvalue = parseFloat(value);\t\t\t\t\t\t// value is a string, if in base 10, parseFloat() it\n\t\telse value = parseInt(value, 16);\t\t\t\t\t\t\t\t// value is a string, if in base 16, parseInt() it with 16 as parameter (converts to base 10)\n\t\t\n\t\tif (minValue === null && maxValue === null) return true;\t\t// if both min and max is null, there is no limit, simple return true\n\t\telse if (minValue !== null && maxValue !== null) {\t\t\t\t// if both of the values aren't null, check both bounds\n\t\t\tif (value <= maxValue && value >= minValue) return true;\n\t\t}\n\t\telse if (minValue === null && maxValue !== null) {\t\t\t\t// if only the min is null, then there is no lower bound; check the upper bound\n\t\t\tif (value <= maxValue) return true;\n\t\t}\n\t\telse if (minValue !== null && maxValue === null) {\t\t\t\t// if only the max is null, then there is no upper bound; check the lower bound\n\t\t\tif (value >= minValue) return true;\n\t\t}\n\t\t\n\t\treturn false;\t// if we made it here, the number isn't valid; return false\n\t}", "function isValidNumber(x) {\n return !isNaN(x) && (x != Infinity) && (x != -Infinity);\n}", "function isValidNumber(x) {\n return !isNaN(x) && (x != Infinity) && (x != -Infinity);\n}", "function goodNumber(v) {\n return isNumeric(v) && Math.abs(v) < FP_SAFE;\n}", "function isMachineOp(value) {\n return value >= 0 && value <= 15;\n}", "function isMachineOp(value) {\n return value >= 0 && value <= 15;\n}", "function isMachineOp(value) {\n return value >= 0 && value <= 15;\n}", "function number (data) {\n return typeof data === 'number' && data > neginf && data < posinf;\n }", "function chkGoRight(n){\n\n if ( (n+1) - Math.floor(n+1) > 0.1){\n return Math.floor(n+1);\n }\n return Math.round(n);\n}", "function cn(t) {\n return \"number\" == typeof t && Number.isInteger(t) && !hn(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;\n}", "function isNegative(number) {\n\n return number < 0;\n\n}", "function isPositive(number){\n if(number > 0){\n return true;\n } else {\n return false;\n }\n}", "function validNumber(value) {\n const intNumber = Number.isInteger(parseFloat(value));\n const sign = Math.sign(value);\n\n if (intNumber && (sign === 1)) {\n return true;\n } else {\n return 'Please use whole non-zero numbers only.';\n }\n}", "function palindromeWithin(n) {\n return !Number.isInteger(n) || n < 0 ? \"Not valid\" : /(\\d)\\d?\\1/.test('' + n);\n}", "function testNumbers(options){\n\tif (options.hasOwnProperty('a') && options.hasOwnProperty('b') && isNum(options.a) && isNum(options.b) ) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "function isEven(number) {\n let new_number = number >= 0 ? number: -number;\n if (new_number === 0) {\n return true;\n } else if (new_number === 1){\n return false;\n } else { \n return isEven(new_number - 2);\n }\n}", "function checkAllowNumber(e) {\r\n var code = (e.which) ? e.which : e.keyCode; \r\n if ((code < 48 || code > 57) && code != 8 && code != 13 && code != 27 && code != 0 && code != 46 && (code < 37 || code > 40)) {\r\n return false;\r\n }\r\n return true;\r\n}", "function checkNumber(x) {\n return !isNaN(+x);\n}", "function isValidNumber ( input ) {\r\n\t\treturn typeof input === 'number' && isFinite( input );\r\n\t}", "function isValidNumber ( input ) {\r\n\t\treturn typeof input === 'number' && isFinite( input );\r\n\t}", "function anyNumber(firstNum, secondNum){\n // if(firstNum % secondNum === 0){\n // console.log(true);\n // } else {\n // console.log(false);\n // }\n console.log(firstNum % secondNum == 0); // can also write it like this \n}", "isForward(range) {\n return !Range.isBackward(range);\n }", "isForward(range) {\n return !Range.isBackward(range);\n }", "function isValidNumber(input) {\n return typeof input === 'number' && isFinite(input);\n }", "function lessThanOrEqualToZero(num) {\n if (num <= 0) {\n return true;\n } else {\n return false;\n }\n}", "isInQuadrant(q) {\n // Map quadrant to x & y coordinate pairs and multiply with coordinates,\n // then check sign:\n // 1: [ 1, 1]\n // 2: [-1, 1]\n // 3: [-1, -1]\n // 4: [ 1, -1]\n return this.x * (q > 1 && q < 4 ? -1 : 1) >= 0 && this.y * (q > 2 ? -1 : 1) >= 0;\n }", "function isValidNumber ( input ) {\n\t\treturn typeof input === 'number' && isFinite( input );\n\t}", "function isValidNumber ( input ) {\n\t\treturn typeof input === 'number' && isFinite( input );\n\t}", "function isLegal(square) { return (square & 136) == 0; }", "function checkNum(str){\n var num = parseInt(str, 10);\n return (!isNaN(num) && !(num < 1));\n}", "function isNegative(number){\n if(number < 0){\n return true;\n } else {\n return false;\n }\n}", "function checkRangeNumber(min, max, number) {\r\n var resultRange = false;\r\n if(number >= min && number <= max) {\r\n resultRange = true;\r\n }\r\n return resultRange;\r\n}", "function number_plus(event){\n var char = event.which;\n if (char > 31 && (char < 48 || char > 57) && char != 43) {\n return false;\n }\n}", "canShowDirection() {\n if (!this.start_point || !this.dest_point) return false;\n return true;\n }", "function isTriangle(a,b,c){\n let numbers = [a,b,c];\n for (let i = 0; i <= 2; i++) {\n if ((Number.isInteger(numbers[i])) == false) {\n console.log(`ERROR: number \"${numbers[i]}\" is not an integer`);\n return false;\n }\n else if (numbers[i] <= 0) {\n console.log( `ERORR: \"${numbers[i]}\" is not a side of triangle`);\n return false;\n }\n }\n if (a + b <= c) {\n console.log(`ERROR: number ${c} is not a side of triangle`);\n return false;\n }\n if (a + c <= b) {\n console.log(`ERROR: number ${b} is not a side of triangle`);\n return false;\n }\n if (b + c <= a) {\n console.log(`ERROR: number ${a} is not a side of triangle`);\n return false;\n } \n return true;\n}", "function checkValue(target, value) {\r\n\tif (isNaN(value)) {\r\n\t\tinformationText.innerText = `${target} value should be a number!`\r\n\t\tsendingButton.setAttribute('disabled', 'disabled')\r\n\t\treturn false\r\n\t}\r\n\tswitch(target) {\r\n\t\tcase 'X': \r\n\t\t\tif (value < -5 || value > 3) {\r\n\t\t\t\tinformationText.innerText = '\"X\" value should be [-5;3]!'\r\n\t\t\t\tsendingButton.setAttribute('disabled', 'disabled')\r\n\t\t\t\treturn false\r\n\t\t\t}\r\n\t\t\tbreak\r\n\t\tcase 'R':\r\n\t\t\tif (value < 2 || value > 5) {\r\n\t\t\t\tinformationText.innerText = '\"R\" value should be [2;5]!'\r\n\t\t\t\tsendingButton.setAttribute('disabled', 'disabled')\r\n\t\t\t\treturn false\r\n\t\t\t}\r\n\t\t\tbreak\r\n\t}\r\n\treturn true\r\n}", "function isValidNumber(input) {\n return typeof input === \"number\" && isFinite(input);\n }", "function isPositive( number ) {\n if ( number > 0 ){\n return true;\n }\n else{return false;\n }\n}", "function checkRange(num){\r\n if(num>=65 && num<=90){\r\n return true;\r\n }\r\n return false;\r\n}", "function isPrimse(number) {\n // your code here...\n}", "function isInteger(num) {\n if (Math.floor (num) === num) {return true;}\n else {return false;}}", "function isNumeric(input) { return (input - 0) == input && input.length > 0;}", "function isPositive( number ) {\n if ( number > 0 ){\n return true;}\n else ( number <= 0 );{\n return false;\n }//end if else\n}", "function checkBorderR(num){\n if(num<19&&num>=0)\n {\n return true;\n }\n else\n {\n return false;\n }\n}", "function isPalindromeNumber(n) {\n var head, tail;\n var digits = [];\n while (n >= 10) {\n digits.push(n % 10);\n n = Math.floor(n / 10);\n }\n digits.push(n);\n head = digits.length - 1;\n tail = 0;\n while (head > tail) {\n if (digits[head] !== digits[tail]) {\n return false;\n }\n head--;\n tail++;\n }\n return true;\n}", "function withBitwiseOperator(n) {\n if (n < 1) {\n return false;\n } else {\n return (n & n - 1) === 0;\n }\n}", "function isPositive( number ) {\n if ( number > 0 ){\n return true;\n }\n return false;\n}", "function isNegatvie(num) {\n return parseInt(num, 10) < 0;\n}", "function isANumber(number) {\n return !isNaN(number);\n }", "function M(t) {\n return \"number\" == typeof t && Number.isInteger(t) && !q(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;\n}" ]
[ "0.62930053", "0.6185014", "0.6154536", "0.6000826", "0.5988791", "0.598493", "0.5982636", "0.5921438", "0.5869946", "0.58697784", "0.5849518", "0.5792611", "0.5775912", "0.57641983", "0.57595485", "0.57483196", "0.57293725", "0.5695945", "0.5668529", "0.5667061", "0.56634915", "0.5652534", "0.5650461", "0.56228936", "0.56018883", "0.5601566", "0.55933243", "0.55767673", "0.55611235", "0.5546994", "0.5543621", "0.552012", "0.5515821", "0.55073726", "0.549432", "0.5493947", "0.5493947", "0.54861224", "0.5479405", "0.5479405", "0.5477934", "0.5474585", "0.5473329", "0.54728186", "0.5459308", "0.5456002", "0.5450653", "0.5447472", "0.5446393", "0.5444872", "0.543981", "0.54371035", "0.5432105", "0.5432105", "0.5410001", "0.5404808", "0.5404808", "0.5404808", "0.53936934", "0.5393073", "0.5389776", "0.5389113", "0.5382364", "0.53787893", "0.53780276", "0.53753936", "0.5360935", "0.53576845", "0.53534144", "0.5352115", "0.5352115", "0.53477556", "0.53464854", "0.53464854", "0.53457034", "0.5343928", "0.534303", "0.53382695", "0.53382695", "0.5324641", "0.53244275", "0.5323633", "0.53146243", "0.5314361", "0.5313198", "0.5311676", "0.53089905", "0.5304782", "0.5301809", "0.53017575", "0.529829", "0.5296094", "0.5294601", "0.5282965", "0.5281567", "0.52815235", "0.5280117", "0.5279216", "0.5279154", "0.5278834", "0.5277868" ]
0.0
-1
HELPER FUNCTIONS FOR CHECKING FOR GENERATING PRIMES return array with all prime numbers less than a limit [0,1,2,3,0,5,0,7,0,0,0,11...limit]
function sieve(limit){ // console.log("starting sieve"); var arr = []; //initialize an array for (var i =0; i < limit; i++){ arr.push(i); } arr[1]=0; //check all 2*n, 3*n, 4*n,etc... and make their entries 0 //whatever remains must be a prime for (var j=2; j < limit; j++){ if (arr[j]!=0){ for (var k=2; k < limit/j; k++){ arr[k*j] = 0; } } } return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function primes(limit) {\n let list = [];\n let nonPrimes = [];\n\n //build range\n for (let idx = 2; idx <= limit; idx++) list.push(idx);\n\n // mark nonPrimes\n list.forEach(number => {\n if (!nonPrimes.includes(number)) {\n for (let testNum = number * 2; testNum <= limit; testNum += number) {\n nonPrimes.push(testNum);\n }\n }\n });\n \n // filter out nonPrimes\n return list.filter(number => !nonPrimes.includes(number));\n}", "function generatePrimes(limit) {\n const marks = new Array(limit + 1).fill(false);\n for (let i = 2; i * i <= limit; i++) {\n if (!marks[i]) { // If not prime...\n // Mark all multiples as non-prime\n for (let j = i * i; j <= limit; j += i) {\n marks[j] = true;\n }\n }\n }\n const primes = [];\n for (let i = 0; i <= limit; i++) {\n if (i > 1 && !marks[i]) {\n primes.push(i);\n }\n }\n return primes;\n}", "function all_primes_intherange(lowerLimit, upperLimit) {\r\n let checker = false;\r\n let primeList = [];\r\n if (+lowerLimit%2 === 0){\r\n loop1:for (let i = +lowerLimit+1; i <= +upperLimit; i+=2) {\r\n for (let j = 3; j < i/2; j+=2) {\r\n if ( i % j !== 0 ) { checker = true; \r\n } else { checker = false;break;} \r\n }\r\n if (checker === true) { primeList.push(i);}\r\n }\r\n } else {\r\n for (let i = +lowerLimit; i <= +upperLimit; i+=2) {\r\n for (let j = 3; j < i/2; j+=2) {\r\n if ( i % j !== 0 ) { checker = true;\r\n } else { checker = false;} \r\n }\r\n if (checker === true) { primeList.push(i);}\r\n }\r\n }\r\n return primeList;\r\n}", "function sieve(limit){\n\n\tvar arr =[];\n\t//generate array with numbers 0,1, ...limit\n\tfor (var i =0; i < limit; i++){\n\t\tarr.push(i);\n\t}\n\n\t//remove all non-prime numbers using sieve method\n\tfor (var j =2; j < limit; j++){\n\t\tfor (var k= 2; k <limit/j; k++){\n\t\t\tarr[j*k] = 0;\n\t\t}\n\t}\n\treturn arr;\n}", "function primesArray(input) {\n //initialising array\n let primes = [];\n //avoid returning 1 as a prime value\n let i = 2;\n\n //setting condition - total number of values returned should be equal to n\n while (primes.length < input) {\n //if i passes prime test add it to the array\n if (isPrime(i)) {\n primes.push(i);\n }\n //increment in and add 1 to i\n i += 1;\n }\n return primes;\n}", "function notPrimes(a,b){\n let arr = [];\n for (let i = a; i < b; i++){\n if (!/[014689]/.test(i)) {\n for (let j = 2; j <= Math.sqrt(i); j++){\n if (i % j === 0) { arr.push(i); break;}\n }\n }\n }\n return arr;\n}", "function PrimeValues(value) {\n let primes = [], tempArr=[];\n\n //fills an array with 'true' from 2 to the given value.\n for(let i = 2; i < value; i++) {\n primes[i] = true;\n }\n\n //work way thru array tagging primes & non-primes\n let limit = Math.sqrt(value);\n for(let i = 2; i < limit; i++) {\n if(primes[i] === true) {\n for(let j = i * i; j < value; j += i) {\n primes[j] = false;\n }\n }\n }\n\n // remove nonprimes from array.\n for(let i = 2; i < value; i++) {\n if(primes[i] === true) {\n tempArr.push(i);\n }\n }\n return tempArr;\n }", "function getPrimes(max) {\n var sieve = [];\n var i;\n var j;\n var primes = [2];\n for (i = 3; i <= max; i+=2) {\n if (!sieve[i]) {\n // i has not been marked -- it is prime\n primes.push(i);\n for (j = i << 1; j <= max; j += i) {\n // make all multiples equal true, so they don't get pushed\n sieve[j] = true; \n }\n }\n }\n return primes;\n }", "function primes(count) {\n const primeNums = [];\n let i = 2;\n \n while (primeNums.length < count) {\n if (isPrime(i)) primeNums.push(i);\n i += 1;\n }\n \n return primeNums;\n}", "function getPrimes(max) {\n var sieve = [];\n var i;\n var j;\n var primes = [];\n for (i = 2; i <= max; ++i) {\n if (!sieve[i]) {\n // i has not been marked -- it is prime\n primes.push(i);\n for (j = i << 1; j <= max; j += i) {\n sieve[j] = true;\n }\n }\n }\n\n return primes;\n }", "function getPrimes(int) {\r\n var primes = [];\r\n var curr = 2n;\r\n \r\n while (curr < int) {\r\n if ((int / curr) * curr === int) {\r\n int /= curr;\r\n primes.push(curr);\r\n console.log(curr);\r\n } else {\r\n curr += 1n;\r\n }\r\n }\r\n primes.push(int);\r\n \r\n return primes;\r\n}", "function randomPrime(limit) {\n var primeList = [];\n for (var i=3; i < limit; i++) {\n if (i == leastFactor(i)) {\n primeList.push(i);\n }\n }\n return primeList[Math.floor(Math.random() * primeList.length)];\n}", "function getPrimes(max) {\r\n var sieve = [];\r\n var i;\r\n var j;\r\n var primes = [];\r\n for (i = 2; i <= max; ++i) {\r\n if (!sieve[i]) {\r\n // i has not been marked -- it is prime\r\n primes.push(i);\r\n for (j = i < 1; j <= max; j += i) {\r\n sieve[j] = true;\r\n }\r\n }\r\n }\r\n\r\n return primes;\r\n }", "function primeList() {\n // For max=60M, computes 3.5 million primes in 15 seconds\n // For max=10M, computes 67k primes in 2 seconds.\n\n // Initialize variables\n let max = 10000000; // Maximum number to check if prime.\n let a = new Array(max);\n let out = []\n\n // Initialize sieve array\n for (var i=0; i<=max; i++) {\n a[i]=1;\n }\n\n // Mark all composite numbers\n for (var i=2; i<=max; i++) {\n for (var j=2; i*j<=max; j++) {\n a[i*j]=0;\n }\n }\n\n // Generate output list of prime numbers\n for (var i=2; i<=max; i++) {\n if (a[i]==1) {\n out.push(i)\n }\n }\n\n return out;\n}", "function getPrimes(max) {\n if (max > 0) {\n const sieve = [];\n let iCount = 0;\n let jCount = 0;\n const primes = [];\n for (iCount = 2; iCount <= max; ++iCount) {\n if (!sieve[iCount]) {\n primes.push(iCount);\n for (jCount = iCount << 1; jCount <= max; jCount += iCount) {\n sieve[jCount] = true;\n }\n }\n }\n store = primes;\n }\n}", "function primeGen(num) {\n const array = [];\n for (let i = 2; i < num; i++) {\n if (isPrime(i)) array.push(i);\n }\n\n return array;\n}", "function checkPrimes(size) {\n var primes = [];\n var isPrime = true;\n for (var i = 2; i < size; i++) {\n isPrime = true;\n for (var j = 2; j < i / 2; j++) {\n if (i % j == 0 ) {\n isPrime = false;\n }\n }\n if (isPrime) {\n primes.push(i);\n }\n }\n return primes;\n}", "function primeGenerator(n) {\n\tvar result = [];\n\tvar counter = 2;\n\t\n\twhile (result.length < n) {\n\t\tif (testPrime(counter)) {\n\t\t\tresult.push(counter);\n\t\t}\n\t\tcounter++;\n\t}\n\treturn result;\n}", "function findPrime() {\n prime = [2];\n const value = document.getElementById(\"input\").value;\n\n for (let number = 3; number <= value; number++) {\n let numArr = [];\n for (let divider = 2; divider < number; divider++) {\n numArr.push(number % divider);\n }\n\n let isZero = numArr.includes(0);\n\n if (!isZero) {\n prime.push(number);\n }\n }\n console.log(prime);\n}", "function primes(n) {\n var realNumbers = [];\n for(i=0; i<=n; i++) {\n realNumbers.push(true);\n }\n var primeNumbers = [];\n for (i=0; i<=n; i++) {\n if (i == 0 || i == 1 || realNumbers[i] === false) {\n continue;\n }\n primeNumbers.push(i);\n for (j=i; true; j++) {\n if (i*j < realNumbers.length) {\n realNumbers[i*j] = false;\n } else {\n break;\n }\n }\n }\n return primeNumbers;\n}", "function findPrimes(max) {\n //Create variables for our loops and empty arrays to .push to\n var sieve = [];\n var i;\n var j;\n var primes = [];\n //Loop through max starting at 2(first prime number) \n for(i = 2; i <= max; ++i) {\n //If not(!) a sieve number..\n if(!sieve[i]) {\n //Push i to the primes array\n primes.push(i);\n \n for(j = i << 1; j<=max; j+=i) {\n //add other numbers(non primes) to sieve array\n sieve[j] = true;\n }\n }\n }\n return primes;\n }", "function showPrimes(limit) {\n for (let i = 0; i <= limit; i++) {\n if (isPrime(i)) {\n console.log(i);\n }\n }\n}", "function potentialPrimes(min, max) {\n const start = (min % 2 === 0) ? min + 1 : min;\n return range(start, max + 1, 2);\n}", "checkPrime(s1, s2) {\n var count = 0, flag = 0, k = 0;\n var array = [];\n for (var i = s1; i <= s2; i++) {\n for (var j = 2; j < i; j++) {\n if (i % j == 0) {\n flag = 0;\n count++;\n break;\n }\n else {\n flag = 1;\n }\n }\n if (flag == 1) {\n array[k++] = i;\n }\n }\n return array;\n }", "function primeListNew(max) {\n console.time();\n var numList = [];\n for (let i = 0; i <= max; i++) {\n numList.push(true);\n }\n //turn all even index to false\n for (let i = 4; i < numList.length; i+=2) {\n numList[i] = false;\n }\n for (let i = 3; i < Math.sqrt(numList.length); i+=2) {\n for (let j = i; i * j < numList.length; j++) {\n numList[i * j] = false;\n }\n }\n var primeList = []\n for (let i = 2; i < numList.length; i++) {\n if (numList[i]) {\n primeList.push(i);\n }\n }\n console.timeEnd();\n return primeList;\n}", "function numPrimorial(n) {\r\n let j;\r\n let arr = new Set;\r\n\r\n function createPrimeArr(length) {\r\n if (arr.size == n) return;\r\n for (let i = 1; i <= length; i++) {\r\n let tempArr = [];\r\n for (j = 0; j <= i; j++) {\r\n if (i % j == 0) tempArr.push(i);\r\n }\r\n\r\n if (tempArr.length == 2) {\r\n\r\n arr.add(tempArr[0])\r\n };\r\n };\r\n createPrimeArr(length + 1)\r\n };\r\n createPrimeArr(n)\r\n return arr\r\n}", "function primeList(max) {\n console.time()\n var primelist = []\n for (let i = 2; i <= max; i++) {\n if (isPrime(i)) {\n primelist.push(i);\n }\n }\n console.timeEnd();\n return primelist;\n}", "function howManyPrimes(max) {\n var primeNumbers = []\n for(var i = 0; i < max; i++){\n if(isPrime(i)) primeNumbers.push(i);\n }\n return primeNumbers\n }", "function primeNumbers(n) {\n let primes = [];\n\n nextPrime:\n for (let i = 2; i <= n; i++) {\n for (let j = 2; j < i; j++) {\n if (i % j === 0) {\n continue nextPrime;\n }\n }\n \n primes.push(i);\n }\n\n return primes;\n}", "function showPrimes(limit) {\n for (number = 2; number <= limit; number++)\n if (isPrime(number)) console.log(number);\n}", "function getPrimeNumbers(num) {\n let primes = [];\n for (let i = num; i > 1; i--) {\n if (isPrime(i)) {\n primes.push(i);\n }\n }\n return primes;\n }", "function nPrimeList(n) {\n var primelist = []\n for (let i = 2; primelist.length < n; i++) {\n if (isPrime(i)) {\n primelist.push(i);\n }\n }\n return primelist;\n}", "function findSmallerPrimes() {\n for (let i = 0; i < 1000; i++) {\n isPrime(i);\n }\n}", "function sieve(max) {\n // Returns array a of length max where a[i]=1 if i is prime.\n // For max=60M, computes 3.5 million primes in 15 seconds\n // For max=10M, computes 67k primes in 2 seconds.\n\n // Initialize variables\n let a = new Array(max);\n\n // Initialize sieve array\n for (var i=0; i<=max; i++) {\n a[i]=1;\n }\n\n // Mark all composite numbers\n for (var i=2; i<=max; i++) {\n for (var j=2; i*j<=max; j++) {\n a[i*j]=0;\n }\n }\n\n return a;\n}", "function printAllPrimesUpTo(max){\n for (let i = 2; i <= max; i++) {\n let possiblePrime = checkPrime(i);\n if (possiblePrime) {\n console.log(possiblePrime);\n }\n }\n}", "function showPrimes(limit) {\n for(let number=2; number<=limit; number++) {\n\n let isPrime = true;\n \n for (let factor=2; factor<number; factor++) {\n if (number % factor === 0) {\n //isPrime = false;\n //break; // no sense in checking the rest of the numbers\n }\n }\n\n if (isPrime) console.log(number);\n } \n}", "function prime(num) {\n // Generate an array containing every prime number between 0 and the num specified (inclusive)\n\tvar primeNum = [];\n for(var i = 2; i <= num; i++) {\n \tif( prime2(i) ) {\n \tprimeNum.push(i);\n }\n }\n return primeNum;\n}", "function notPrimes(a,b) {\n let nonPrimeArr = [];\n for(let i = a; i <= b; i++) {\n if(!isPrime(i) && checkForPrimeDigits(i)) {\n nonPrimeArr.push(i)\n }\n }\n return nonPrimeArr;\n\n function checkForPrimeDigits(num) {\n let numStr = num.toString();\n for(let elem of numStr) {\n if(elem!=='2' && elem!=='3' && elem!=='5' && elem!=='7') {\n return false;\n }\n }\n return true;\n }\n function isPrime(num) {\n if(num < 2) return false;\n for(let i=2; i < num; i++){\n if(num%i===0) return false;\n }\n return true;\n }\n}", "function showPrimes(limit) {\n for (let number = 2; number <= limit; number++) {\n // 2 - current (number)\n\n let isPrime = true;\n for (let factor = 2; factor < number; factor++) {\n if (number % factor === 0) {\n isPrime = false;\n break;\n }\n }\n if (isPrime) console.log(number);\n }\n}", "function allPrimesLessThanN(n) {\n for (let i = 0; i < n; i++) {\n if (isPrime2(i)) {\n \n }\n }\n}", "function primeListSoE(max) {\n console.time();\n var numList = [];\n for (let i = 0; i <= max; i++) {\n numList.push(true);\n }\n //turn all even index to false\n for (let i = 4; i < numList.length; i+=2) {\n numList[i] = false;\n }\n for (let i = 3; i < Math.sqrt(numList.length); i+=2) {\n if (numList[i] != false) {\n for (let j = i; i * j < numList.length; j+=2) {\n numList[i * j] = false;\n }\n }\n }\n // var primeList = [];\n // for (let i = 2; i < numList.length; i++) {\n // if (numList[i]) {\n // primeList.push(i);\n // }\n // }\n\n console.timeEnd();\n // return primeList;\n while (numList[numList.length - 1] === false) {\n numList.pop();\n }\n return numList.length - 1;\n}", "function primeSieve(max) {\n let output = sieveMultiplesOf(2, max)\n let counter = 3;\n let baseMultipes = [2,3]\n\n while (counter*2 < max) {\n output = reSieve(counter, output);\n counter = findNextNumberInArray(counter, output)\n }\n\n output.unshift(2);\n\n return output\n .filter(item => item !== false);\n}", "function fillArray() {\n\n let inputValue = document.getElementById('ingreso');\n let arrayPrimeNumber = [];\n console.time(\"Iniciodefuerzabruta\");\n for (let i = 0; i < Number(inputValue.value); i++) {\n let numberPrime = isPrime();\n if (numberPrime === null) {\n i--;\n } else {\n arrayPrimeNumber[i] = numberPrime;\n }\n\n }\n console.timeEnd(\"Iniciodefuerzabruta\");\n\n console.log(arrayPrimeNumber);\n let maximo = 0;\n for (let x = 0; x < arrayPrimeNumber.length; x++) {\n if (maximo < arrayPrimeNumber[x]) {\n maximo = arrayPrimeNumber[x];\n }\n }\n console.log(maximo);\n\n\n\n}", "function findPrime2(max) {\n var arr = []\n for (let i = 2; i <= max; i++) {\n arr.push(i)\n }\n // console.log(\"Prime Array: \" + arr)\n for (let i = 0; i < (Math.ceil(Math.sqrt(max))); i++) {\n for (let j = arr[i];arr[i]*j <= arr[arr.length -1]; j++) {\n // console.log(\"we are at number :\" + arr[i] )\n // var multval = arr[i]*j\n // console.log(\"multiple is:\" + multval)\n var multiple = arr.indexOf(arr[i]*j)\n // console.log(\"multiple index is :\" + multiple)\n if (multiple != -1) {\n arr.splice(multiple,1)\n // console.log(\"removed \" + multiple + \"new array :\" + arr)\n }\n }\n }\n return arr\n}", "function primeSieve(n) {\n var array = [], upperLimit = Math.sqrt(n), output = [];\n\n //makes an array from 2 to (n-1)\n for (var i = 0; i < n; i++){\n array.push(true);\n }\n\n //removes multiples of primes starting from 2,3,5\n for (var i = 2; i <= upperLimit; i++){\n if (array[i]) {\n for (var j = i * i; j < n; j += i) {\n array[j] = false;\n }\n }\n }\n\n //all array[i]set to true are primes for(var i = 2; i < n; i++){\n for (var i = 2; i < n; i++){\n if (array[i]){\n output.push(i);\n }\n }\n return output;\n}", "function primeMover(num){\n\t\n\tfunction sOE(n){\n\t\tvar tempArray = [];\n\t\tvar outputArray = [];\n\t\tvar upperLimit = Math.sqrt(n);\n\t\t\n\t\tfor(var i = 0; i < n; i++){\n\t\t\ttempArray.push(true);\n\t\t}\n\t\t\n\t\tfor(var j = 2; j <= upperLimit; j++){\n\t\t\tif(tempArray[j]){\n\t\t\t\tfor(var k = j*j ; k < n; k += j){\n\t\t\t\t\ttempArray[k] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(var l = 2; l < n; l++){\n\t\t\tif(tempArray[l]){\n\t\t\t\toutputArray.push(l);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn outputArray;\n\t}\n\t\n\n\tvar primes = sOE(10000);\n\t\tconsole.log(primes);\n\t\n\treturn primes[num - 1];\n}", "function sumPrimes(num) {\n // CREATE ARRAY TO STORE PRIMES\n var result = [];\n // GO OVER THE NUMBERS +1 BECAUSE WE WANT TO TEST THE GIVEN NUMBER AS WELL\n for (var i = 1; i < num + 1; i++) {\n // 2 IS THE FIRST PRIME SO WE PUSH\n if (i === 2) {\n result.push(i);\n } else {\n var x = 1;\n // WHILE THE X IS SMALLER THEN THE I UNTIL THE LAST\n while (x < i) {\n x++;\n if (i % x === 0) {\n break;\n }\n // -1 BECAUSE WE LOOK IF X<I THIS IS THE LAST PRIME IN I\n if (x === i - 1) result.push(i);\n }\n }\n }\n // console.log(result)\n return result.reduce((a, b) => a + b);\n}", "function primeFactorsTo(max)\n{\n var store = [], i, j, primes = [];\n for (i = 2; i <= max; ++i)\n {\n if (!store [i])\n {\n primes.push(i);\n for (j = i << 1; j <= max; j += i)\n {\n store[j] = true;\n }\n }\n }\n return primes;\n}", "function printPrime(value) {\n let primes = [];\n for(let i = 2; i < value; i++) {\n primes[i] = true;\n }\n let limit = Math.sqrt(value);\n for(let i = 2; i < limit; i++) {\n console.log(` i ${i} limit ${limit} `)\n if(primes[i] === true) {\n for(let j = i * i; j < value; j += i) {\n console.log(` j ${j} `)\n primes[j] = false;\n }\n }\n }\n for(let i = 2; i < value; i++) {\n // if(primes[i] === true) {\n console.log(i + \" \" + primes[i]);\n // }\n }\n}", "function prime3(n) {\n const data = new Int8Array((n + 1) / 2);\n data[0] = 1;\n for(let i = 1; i < data.length; i+= 1) {\n if (data[i] === 0) {\n let k = 2 * i + 1;\n let u = i * (1 + k);\n if (u > data.length) { break; }\n for (let j = u; j < data.length; j += k) {\n data[j] = 1;\n }\n }\n }\n const result = [2];\n for(let i = 0; i < data.length; i += 1) {\n if (data[i] == 0) {\n result.push(2 * i + 1);\n }\n }\n return result;\n }", "function getPrimeFactorArray(number) {\n let arr = [], primeFactor = 1\n while (number > 1)\n {\n primeFactor++\n while(number % primeFactor == 0)\n {\n arr.push(primeFactor)\n number = number / primeFactor\n }\n }\n return arr\n }", "function findMultiples(integer, limit) {\r\n //your code here\r\n\r\n //\r\n let output = []\r\n for (let i = 1; (integer * i) <= limit; i++) {\r\n if ((integer * i) - limit <= 0) {\r\n output.push(integer*i)\r\n }\r\n }\r\n return output\r\n}", "function prime2(n) {\n const data = [];\n for (let i = 1; i < n; i += 2) {\n data.push(i);\n }\n data[0] = 0;\n for(let i = 1; i < data.length; i+= 1) {\n if (data[i] > 0) {\n let k = data[i];\n let u = i * (1 + k);\n if (u > data.length) { break; }\n for (let j = u; j < data.length; j += k) {\n data[j] = 0;\n }\n }\n }\n const result = [2];\n for (let i of data) {\n if (i > 0) {\n result.push(i);\n }\n }\n return result;\n }", "function primeMover(num) {\n\t var firstSort = [1,2,3];\n\t \n\t for(var i = 4; i < 10000; i++) {\n\t\t \n\t\t if(i % 2 !== 0 && i % 3 !== 0){\n\t\t\t\tprimeArray.push(i);\n\t\t\t\t}\n\t }\n\t\n\tfor(var j = 0; j < firstSort.length; j++){\n\t\tfor(var k = 0; k < firstSort.length; k++) {\n\t\t\t\n\t\t}\n\t}\n\t \n\tconsole.log(primeArray);\n\t\n\t return primeArray[num - 1];\n }", "function primesToN(n) {\n\tvar result = [];\n\tfor (var i = 2; i <= n; i++) {\n\t\tif (testPrime(i)) {\n\t\t\tresult.push(i);\n\t\t}\n\t}\n\treturn result;\n}", "function printPrimes(limit) {\n // the for loop iterates through the prime numbers up to the limit passed in as argument\n for(var i = 1; i<=limit; i++) {\n // call checkPrime to see if each iteration is Prime\n if(checkPrime(i)===true) {\n console.log(i);\n }\n }\n}", "function findPrimes(startFrom, endAt)\n\t{\n\t// INSERT YOUR CODE HERE\n\t}", "function sieveOfEratosthenes(n) {\n let primes = [];\n\n for(let i=0; i <= n; i++) {\n if(isPrime(i)) primes.push(i);\n }\n return primes;\n}", "function findPrimes(n) {\n const primes = new Array(n + 1).fill(true);\n\n for (let i = 2; Math.pow(i, 2) <= n; i++) {\n if (primes[i]) {\n for (let j = Math.pow(i, 2); j <= n; j = j + i) {\n primes[j] = false;\n }\n }\n }\n\n for (let i = 2; i <= n; i++) {\n if (primes[i]) console.log(i);\n }\n}", "function listPrimes(n) {\n const list = [];\n const output = [];\n // Make an array from 2 to (n-1)\n for (let i = 0; i < n; i += 1) {\n list.push(true);\n }\n // remove multiples of primes starting from 2,3,5...\n for (let i = 2; i <= Math.sqrt(n); i += 1) {\n if (list[i]) {\n for (let j = i * i; j < n; j += i) {\n list[j] = false;\n }\n }\n }\n\n // All array[i] set to ture are primes\n for (let i = 2; i < n; i += 1) {\n if (list[i]) {\n output.push(i);\n }\n }\n return output;\n}", "function findMultiples(int,limit){\n let result = []\n \n for (let i = int; i<=limit ; i+=int)\n result.push(i)\n \n return result\n}", "function primes(amount) {\n const segSize = segmentSize(amount);\n const base = primeBase(segSize);\n\n // generate and concat new segments to base until we have enough primes\n let result = base;\n for(\n let s = [segSize, 2 * segSize - 1];\n result.length < amount;\n s = [s[0] + segSize, s[1] + segSize]\n ) {\n result = result.concat(sweptSegment(s[0], s[1], base));\n }\n\n // return requested amount of primes\n return result.slice(0, amount);\n}", "function generateNumArr(limit) {\n ret = [];\n for (var i = 1; i < limit; i++) {\n ret.push(i);\n }\n \n return ret;\n }", "function smallestMultiple(limit){\n\t\n\t/*\n\tlet result = limit;\n\tfor(let i = limit - 1; i > 1; i--){\n\t\tif (result % i != 0){\n\n\t\t\tresult *= i;\n\t\t\tconsole.log(\"i \", i, \"result\", result);\n\t\t}\n\t}\n\t*/\n\t// no, too big a number\n\n/*\n\tif the following number cannot be obtained by multiplying some of the entries of the array, push it into it\n\t...though it's like super overhead\n\t*/\n\t/*\n\tlet result = 1;\n\tlet arr = [1];\n\n\tfor(let i = 2; i <= limit; i++){\t\n\t}\n*/\n\n/* \n\tokay we may make an array\n\tmake a for i loop\n\tand just start dividing all of its items by array[i], if divisible\n*/\n\n\tlet arr = Array.from(Array(limit).keys());\n\t\tfor (let i = 0; i < arr.length; i++){\n\t\t\t// console.log(\"i\", i);\n\t\t\tfor (let j = i + 1; j < arr.length; j++){\n\t\t\t\tif (arr[j] % arr[i] == 0){\n\t arr[j] = parseInt(arr[j] / arr[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \n\tarr = arr.slice(1, arr.length+1);\n \n\treturn arr.reduce((a, b) => a*b);\n}", "function atkin(limit) {\n const sieve = new Array(limit).fill(false)\n\n for (let x = 0; x * x < limit; x++) {\n for (let y = 0; y * y < limit; y++) {\n let n = 4 * x * x + y * y\n if (n <= limit && (n % 12 == 1 || n % 12 == 5)) sieve[n] = true\n\n n = 3 * x * x + y * y\n if (n <= limit && n % 12 == 7) sieve[n] = true\n\n n = 3 * x * x - y * y\n if (x > y && n <= limit && n % 12 == 11) sieve[n] = true\n }\n }\n for (let r = 5; r * r < limit; r++) {\n if (sieve[r]) for (let i = r * r; i < limit; i += r * r) sieve[i] = false\n }\n\n const res = [2, 3]\n for (let a = 5; a < limit; a++) {\n if (sieve[a]) res.push(a)\n }\n return res\n}", "function PrimeMover(num) {\n var primes = [2];\n for (var i = 3; i <= 10^4; i += 2) {\n var prime = true;\n if (num === primes.length) {\n return primes[primes.length-1];\n }\n for (var j = 2; j <= i / 2; j++) {\n if (i % j === 0) {\n prime = false;\n }\n }\n if (prime) {\n primes.push(i);\n }\n }\n}", "function prime4(n) {\n const data = new Int8Array((n + 1) / 2);\n data[0] = 1;\n\n // clear 3's\n for (let j = 4; j < data.length; j += 3) {\n data[j] = 1;\n }\n\n let step = 2;\n let u = 1;\n const result = [2, 3];\n for(let i = 2; i < data.length; i += step) {\n if (data[i] === 0) {\n let k = 2 * i + 1;\n result.push(k);\n if (u < data.length) {\n u = i * (1 + k); // (i + 2 * i**2 + i\n for (let j = u; j < data.length; j += k) {\n data[j] = 1;\n }\n }\n }\n step = 3 - step;\n }\n\n return result;\n }", "function getPrimeRange(from, to){\n\n\tfor(let i = from; i <= to; i++){\n\t\tif (i===2 || i===3){\n console.log(i);\n\t\t} else if((i%2===0) || (i%3===0) ){\n\t\t continue;\n\t }else{\n\t\t console.log(i);\n\t }\n\t}\n}", "function prim(x) {\n if (x < 2) return false;\n\n for (let i = 2; i < x; i++) {\n if (x % i === 0) {\n return false;\n }\n }\n return true;\n}", "function problem10() {\n \"use strict\";\n var i, j, k, l, m, s, a; // i, j, k are counters, others are defined as we go\n l = Math.floor((2000000 - 1) / 2); //not sure why we're going halfway\n a = [];\n for (i = 0; i < l; i += 1) {\n a[i] = true; // make a whole bunch of numbers true\n }\n m = Math.sqrt(2000000); // first part that makes sense\n for (i = 0; i <= m; i += 1) { \n if (a[i]) { // all a[i] are already true\n j = 2 * i + 3; // all primes can be represented as 2k+3, certainly not for all k in Z as k = 3 gives 9 which is not prime\n k = i + j; // initialize k as a multiple of 3; k = 2i + 3 + i = 3i+3 = 3(i+1);\n while (k < l) {\n a[k] = false; // makes sense \n k += j; // make k a multiple of j and set it to false\n }\n }\n } // this doesn't seem like the seive of eratosthenes\n s = 2;\n for (i = 0; i < l; i += 1) { // now I see why we halved limit\n if (a[i]) {\n s += 2 * i + 3; // because here we use the 2k + 3\n }\n }\n return s;\n\n}", "function checkIfPrimeFromPrimeList(x, primeArray, endIndex) {\n let startIndex = 3;\n for(; endIndex > startIndex; startIndex++) {\n if(! (x % primeArray[startIndex])) {\n return; // not prime\n }\n }\n \n primeArray[primeArray.length] = x;\n }", "findPrime(s1, s2) {\n var count = 0, flag = 0, k = 0;\n var prime = [];\n for (var i = s1; i <= s2; i++) {\n for (var j = 2; j < i; j++) {\n if (i % j == 0) {\n flag = 0;\n count++;\n break;\n }\n else {\n flag = 1;\n }\n }\n if (flag == 1) {\n prime[k++] = i;\n }\n }\n return prime;\n }", "function primeFactorList(n) {\n if (n < 1) throw new RangeError(\"Argument error\");\n var result = [];\n\n while (n !== 1) {\n var factor = smallestFactor(n);\n result.push(factor);\n n /= factor;\n }\n\n return result;\n}", "findPrime(s1, s2) {\n var flag = 0, k = 0;\n var prime = [];\n\n for (var i = s1; i <= s2; i++) {\n for (var j = 2; j < i; j++) {\n if (i % j == 0) {\n flag = 0;\n break;\n }\n else {\n flag = 1;\n }\n }\n if (flag == 1) {\n prime[k++] = i;\n }\n }\n return prime;\n }", "function primeSieve(num){\n var primes = [];\n for(var i = 0; i <= num; i++){\n primes.push(1);\n }\n for(var j = 2; j <= Math.floor(Math.sqrt(primes.length)); j++){\n console.log('j', j);\n if(primes[j] === 1){\n for(var k = j * j; k <= num; k += j){\n primes[k] = 0; \n }\n }\n }\n return primes; \n}", "function getPrime(x,y){\n for(let i=x;i<y;i++){\n let flag = true;\n for(let a=2;a<i;a++){\n if(i%a==0 && i!==a){\n flag= false\n break\n }\n }\n if(flag==true){\n console.log(i)\n }\n }\n}", "function generaNumeri(numeroIterazioni, min, max){\n var mine = [];\n var numero = Math.floor((Math.random() * max) + min);\n mine.push(numero);\n\n //genero i numeri\n for(var i = 1 ; i < numeroIterazioni ; i ++){\n numero = Math.floor((Math.random() * max) + min);\n\n console.log(isInArray(mine,numero));\n while(isInArray(mine,numero) == true){\n numero = Math.floor((Math.random() * max) + min);\n }\n\n mine.push(numero);\n }\n\n return mine;\n}", "function funcIsPrimeOrFactors(numNumber) {\n // body... \n var numHalf = Math.floor(numNumber / 2);\n var arrFactors = [];\n\n for (var i = 2; i <= numHalf; i++) {\n var numQuotient = Math.floor(numNumber / i);\n var numRemainder = numNumber % i;\n if (numRemainder === 0) {\n arrFactors.push([i, numQuotient]);\n }\n }\n console.log(arrFactors);\n return [arrFactors.length === 0, arrFactors];\n}", "function primesUntil(n) {\n const segSize = segmentSize(n);\n const base = primeBase(segSize);\n\n // concat subsequent segments to base\n return segments(n, segSize).reduce((acc, s) =>\n acc.concat(sweptSegment(s[0], s[1], base)), base);\n}", "function prime(){\r\n \r\n\r\nnumArray = numArray.filter((number) => {\r\n for (var i = 2; i <= Math.sqrt(number); i++) {\r\n if (number % i === 0) return false;\r\n }\r\n return true;\r\n\r\n\r\n});\r\n\r\nconsole.log(numArray);\r\n }", "function primeBetweenRange(lowerNumber, higherNumber) {\n let res = [];\n let smallPrime = 0;\n let largePrime = 0;\n if (getLowestPrime(lowerNumber, higherNumber) && getHighestNumber(lowerNumber, higherNumber)) {\n smallPrime = getLowestPrime(lowerNumber, higherNumber);\n largePrime = getHighestNumber(lowerNumber, higherNumber);\n return largePrime - smallPrime;\n }\n return -1;\n}", "function primesGen(count) {\n var primes = [],\n isComposite = [],\n nextPrime,\n maxNum,\n stopAt;\n\n // estimate upper bound for prime numbers\n maxNum = parseInt(count * Math.log(count) + count * (Math.log(Math.log(count))), 10);\n\n // fill the array with false values\n isComposite = Array.apply(null, new Array(maxNum + 1)).map(Boolean.prototype.valueOf, false);\n\n // mark all even numbers\n for (var i = 4; i <= maxNum; i += 2) {\n isComposite[i] = true;\n }\n nextPrime = 3;\n stopAt = Math.sqrt(maxNum);\n while (nextPrime < stopAt) {\n for (var i = nextPrime * 2; i <= maxNum; i += nextPrime) {\n isComposite[i] = true;\n }\n\n nextPrime += 2;\n\n while ((nextPrime <= maxNum) && (isComposite[nextPrime])) {\n nextPrime += 2;\n }\n }\n\n // add all non-composite (prime) numbers to an array\n for (var i = 2; i <= maxNum && primes.length < count; i++) {\n if (!isComposite[i]) {\n primes.push(i);\n }\n }\n\n return primes;\n}", "function primeFactorize(v)\n{let factors=[];\n for(k=1;k<v;k++)\n {\n if(v%k===0&&isPrime(k))\n {\n if(!factors.includes(k))\n factors.push(k);\n }\n }\n for(j=0;j<factors.length;j++)\n {\n console.log(factors[j]+\" \");\n }\n}", "function multiples(num1, num2) {\n let new_array = [];\n for (let i = 1; i <= 100; i++) {\n if (i % num1 === 0 && i % num2 === 0) {\n new_array.push(i);\n }\n } //end of for\n return new_array;\n } //end of multiples", "function getPrime() {\n var i = 0;\n var j = 0;\n\n limit_numbers = document.getElementById('limit').value;\n\n //loop till i equals to limit_numbers of numbers\n for (i = 1; i <= limit_numbers; i++) {\n count = 0;\n\n for (j = 1; j <= i; j++) {\n // % modules will give the reminder value, so if the reminder is 0 then it is divisible\n if (i % j == 0) {\n //increment the value of count\n count++;\n }\n }\n\n\n //prime number should be exactly divisible by 2 times only (itself and 1)\n if (count == 2) {\n document.getElementById(\"result\").insertAdjacentHTML('beforeend', i + '<br>');\n }\n }\n}", "function primeFactorization(n) {\n var ret = [];\n var divider = 2;\n while(n > 1) {\n if(n%divider === 0) {\n ret.push(divider);\n n = n/divider;\n }\n else {\n divider++;\n }\n }\n return ret;\n}", "function primefactor(max) {\n var pfactors = []\n var factor = 2\n var remain = max\n while (remain > 1) {\n while (remain % factor == 0) {\n pfactors.push(factor)\n remain = remain / factor\n }\n factor++\n console.log(\"factor is: \" + factor)\n console.log(\"remain is: \" + remain)\n if (factor * factor > remain) {\n if (remain > 1) {\n pfactors.push(remain)\n }\n break\n }\n }\n console.log(pfactors)\n return pfactors.pop()\n}", "function getPrimeFactors(num) {\n const solution = [];\n let divisor = 2;\n while (num > 2) {\n if (num % divisor === 0) {\n solution.push(divisor);\n num = num / divisor;\n } else divisor++;\n }\n return solution;\n}", "function primeFactorList(n) {\n\t\tif (n < 1)\n\t\t\tthrow new RangeError(\"Argument error\");\n\t\tlet result = [];\n\t\twhile (n != 1) {\n\t\t\tconst factor = smallestFactor(n);\n\t\t\tresult.push(factor);\n\t\t\tn /= factor;\n\t\t}\n\t\treturn result;\n\t}", "function pipeFix(numbers) {\n const min = Math.min(...numbers)\n const max = Math.max(...numbers)\n const arr = []\n for (let i = min; i <= max; i++) {\n arr.push(i)\n }\n return arr\n}", "function findPrime(nPrimes,startAt){\n var n = 100\n k=startAt+nPrimes\n \n while (startAt<=k){\n i=2\n flag = false\n while(i<startAt){\n if(startAt%i===0){\n flag = true\n }\n \n i++\n }\n \n console.log(flag? startAt+' is not a prime':startAt+' is prime')\n startAt++\n }\n}", "function findPrimeFactors(num = 0) {\n if (num === 0) return [];\n\n const primeFactors = [];\n let divisor = 2;\n\n while (num >= Math.pow(divisor, 2)) {\n if (num % divisor === 0) {\n primeFactors.push(divisor);\n num /= divisor;\n } else {\n divisor++;\n }\n }\n\n primeFactors.push(num);\n\n return primeFactors;\n}", "function sieve(n) {\n let arr = [];\n for (let i = 2; i <= n; i++) arr[i - 2] = i;\n\n for (let i = 2; i * i <= n; i++) {\n // we stop if the square of i is greater than n\n if (arr[i - 2] != 0) {\n // if the number is marked then all it's factors are marked so we move to the next number\n for (let j = Math.pow(i, 2); j <= n; j++) {\n // we start checking from i^2 because all the previous factors of i would be already marked\n if (arr[j - 2] % i == 0) arr[j - 2] = 0;\n }\n }\n }\n return arr;\n}", "function largePrime(val) {\n var count = 0;\n var primenum = 1\n while (count < val) {\n primenum ++;\n if (isPrime(primenum)) {\n count ++;\n }\n \n \n }\n return primenum;\n}", "function findPrimes(n) {\n var i,s,p,ans;\n s=new Array(n);\n for (i=0;i<n;i++)\n s[i]=0;\n s[0]=2;\n p=0; //first p elements of s are primes, the rest are a sieve\n for(;s[p]<n;) { //s[p] is the pth prime\n for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p]\n s[i]=1;\n p++;\n s[p]=s[p-1]+1;\n for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0)\n }\n ans=new Array(p);\n for(i=0;i<p;i++)\n ans[i]=s[i];\n return ans;\n }", "function iterator(range){\n let primesCheckedArray = [];\n let primeNumberCounter = 3;\n primesCheckedArray.push(2,3,5);\n\n for (var i = 0; i < primesCheckedArray.length; i++) {\n consoleLogger(primesCheckedArray[i]);\n }\n\n for (var i = 6; i < range; i++) {\n if (checkExceptions(i) === true){\n continue;\n } else if (checkPrime(i,primesCheckedArray) === true) {\n primesCheckedArray.push(i);\n consoleLogger(i);\n primeNumberCounter ++;\n }\n }\n return primeNumberCounter;\n}", "function bnIsProbablePrime(t) {\nvar i, x = this.abs();\nif(x.t == 1 && x.data[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x.data[0] == lowprimes[i]) return true;\n return false;\n}\nif(x.isEven()) return false;\ni = 1;\nwhile(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n}\nreturn x.millerRabin(t);\n}", "function bnIsProbablePrime(t) {\nvar i, x = this.abs();\nif(x.t == 1 && x.data[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x.data[0] == lowprimes[i]) return true;\n return false;\n}\nif(x.isEven()) return false;\ni = 1;\nwhile(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n}\nreturn x.millerRabin(t);\n}", "function bnIsProbablePrime(t) {\nvar i, x = this.abs();\nif(x.t == 1 && x.data[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x.data[0] == lowprimes[i]) return true;\n return false;\n}\nif(x.isEven()) return false;\ni = 1;\nwhile(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n}\nreturn x.millerRabin(t);\n}", "function bnIsProbablePrime(t) {\nvar i, x = this.abs();\nif(x.t == 1 && x.data[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x.data[0] == lowprimes[i]) return true;\n return false;\n}\nif(x.isEven()) return false;\ni = 1;\nwhile(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n}\nreturn x.millerRabin(t);\n}" ]
[ "0.8066804", "0.78435403", "0.750811", "0.7365144", "0.7283588", "0.7076695", "0.7043132", "0.7038277", "0.7012754", "0.69983685", "0.6969858", "0.6945218", "0.69313216", "0.69144374", "0.68968797", "0.68853337", "0.68460906", "0.68367714", "0.6828308", "0.6819231", "0.6809624", "0.6802726", "0.6789956", "0.67818844", "0.67738026", "0.6761979", "0.67559254", "0.67492294", "0.6742497", "0.67319655", "0.6661504", "0.6660858", "0.6652952", "0.6625594", "0.66239613", "0.6598742", "0.6572365", "0.65690804", "0.655713", "0.6545369", "0.6516615", "0.65156883", "0.65140224", "0.6513741", "0.6474", "0.6456322", "0.64446527", "0.6410357", "0.6409432", "0.6408546", "0.63923013", "0.6357345", "0.6349168", "0.6341167", "0.63330626", "0.63252", "0.63232315", "0.6313581", "0.6311205", "0.6303863", "0.6299091", "0.6295136", "0.6289432", "0.62805414", "0.6277842", "0.6273237", "0.6268201", "0.6260738", "0.62496674", "0.6244687", "0.62371063", "0.62269104", "0.621783", "0.6207304", "0.6207116", "0.62054425", "0.61987174", "0.61952806", "0.6191846", "0.6189452", "0.6185364", "0.61850846", "0.61833847", "0.6178861", "0.6173616", "0.61716974", "0.61603886", "0.613828", "0.6136443", "0.61266637", "0.6104591", "0.6095777", "0.6081808", "0.6075227", "0.60710526", "0.6066447", "0.6052222", "0.6052222", "0.6052222", "0.6052222" ]
0.7606336
2
resets even class to all dt's without hidden class
function setStripes() { var currentEven = $('.even'); if (currentEven) { currentEven.removeClass('even'); } $('#apis > dt:not(.hidden)').forEach(function(element, index) { if (index % 2 === 1) { $(element).addClass('even'); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearAll() {\n for (var i = 0; i < tds.length; i++) {\n tds[i].className = '';\n }\n }", "function clickRight() {\n var sept = document.getElementsByClassName('september'); \n for(var i = 0; i < sept.length; i++){\n sept[i].classList.add(\"d-none\");\n }\n \n var oct = document.getElementsByClassName('october');\n for(var i = 0; i < oct.length; i++){\n oct[i].classList.remove(\"d-none\");\n }\n}", "function reset() {\n time = 0;\n for(var i = 0; i < size + 1; i++) {\n for(var j = 0; j < size + 1; j++) {\n table.rows[i].cells[j].className = \"\";\n }\n }\n}", "function SP_RemoveCalendarClass()\n{\n\t$.each($(\".frm_text\"),function(j, items)\n\t{\n\t\tif($(this).prop(\"disabled\"))\n\t\t{\t\t\t\t\n\t\t\t$(this).removeClass(\"frm_text\");\n\t\t\t$(this).addClass(\"textfield\");\n\t\t}\n\t});\n}", "function clickLeft() {\n var oct = document.getElementsByClassName('october');\n for(var i=0;i<oct.length;i++){\n oct[i].classList.add(\"d-none\");\n }\n \n var sept = document.getElementsByClassName('september'); \n for(var i=0;i<sept.length;i++){\n sept[i].classList.remove(\"d-none\");\n }\n}", "function unhide_dates(){\r\n\t$(\"#hidden_row\").css(\"display\",\"inline\");\r\n}", "function hideDtypes() {\n svg.selectAll('.dtype').remove();\n }", "function initDatePickerSelected( e, className ) {\n\t\t\tvar current = $( e.target );\n\t\t\tcurrent.closest( 'table' ).find( 'td' ).each( function() {\n\t\t\t\t$( this ).removeClass( className );\n\t\t\t} );\n\t\t}", "function Erase(d) {\n d.class = \"\";\n if (d.children)\n d.children.forEach(Erase);\n else if (d._children)\n d._children.forEach(Erase);\n}", "handleToggleClass() {\n this.dl.addEventListener('click', event => {\n const dt = event.target\n if (dt.tagName === 'DT') {\n const dd = event.target.nextElementSibling\n dt.classList.toggle('section__title--active')\n dd.classList.toggle('section__content--active')\n }\n })\n }", "function updateDays() {\n const todayID = getToday().toISOString().slice(0, 10);\n Object.keys(dayData).forEach(dayID => {\n const day = dayData[dayID];\n const dateObj = new Date(dayID);\n const schedule = getSchedule(dateObj);\n day.classList[schedule.noSchool ? 'add' : 'remove']('date-selector-no-school');\n day.classList[schedule.alternate ? 'add' : 'remove']('date-selector-alternate');\n day.classList[dayID === todayID ? 'add' : 'remove']('date-selector-today');\n });\n}", "exibir(e) {\n e.classList.remove('d-none');\n }", "function updateTableClassing() {\n var rows = $('table.sortable').find('tbody tr');\n rows.removeClass('alt first last');\n var table = $('table.sortable');\n table.find('tr:even').addClass('alt');\n table.find('tr:first').addClass('first');\n table.find('tr:last').addClass('last');\n\n}", "_clearState() {\n for (let rowIdx = 0; rowIdx < this._table.rows.length; rowIdx++) {\n this._table.rows[rowIdx].classList.remove(CSS.rowDeletable);\n\n for (let cellIdx = 0; cellIdx < this._numberOfColumns; cellIdx++) {\n this._table.rows[rowIdx].cells[cellIdx].classList.remove(CSS.cellDeletable);\n }\n }\n }", "function clearDim(){\r\n\td3.selectAll('circle.year')\r\n\t .classed('dimmed', false)\r\n\t .classed('unclickable', false);\r\n}", "function removeNewLoadElementsClasses() {\n $('.load-unload-city-container').removeClass('col-sm-4 col-lg-3 col-sm-6');\n $('.load-date-container').removeClass('col-sm-4 col-lg-3 col-sm-6');\n $('.load-price-container').removeClass('hidden col-lg-3 col-sm-6');\n\n $('.field-loadcar-quantity').removeClass('col-lg-2 col-lg-3 col-sm-6 col-sm-4 hidden col-sm-3');\n $('.field-loadcar-model').removeClass('col-lg-3 col-sm-6 col-sm-4 col-sm-3');\n $('.field-loadcar-price').removeClass('col-lg-3 col-sm-6 hidden col-sm-4 col-lg-2 col-sm-5 col-sm-3');\n $('.field-loadcar-state').removeClass('col-lg-3 col-sm-6 col-sm-4');\n}", "function clearPastFutureColornig(){\n $('#life-calendar .time-box').each(function(){\n $(this).removeClass('past-colored');\n $(this).removeClass('future-colored');\n });\n}", "function clearDarkenenedState() {\n var selected = svgDoc.getElementsByClassName('bordered');\n if (selected.length > 0) {\n var className = selected[0].getAttribute('class').replace('bordered','').trim();\n selected[0].setAttribute('class', className);\n }\n }", "function desactivarAccion (datos) {\n setTimeout(function(){\n if($(\"#tabla > thead > tr > th:last-child\").hasClass('sorting_asc')){\n $(\"#tabla > thead > tr > th:last-child\").removeClass('sorting_asc');\n }\n else if($(\"#tabla > thead > tr > th:last-child\").hasClass('sorting_desc')){\n $(\"#tabla > thead > tr > th:last-child\").removeClass('sorting_desc');\n }\n else{\n $(\"#tabla > thead > tr > th:last-child\").removeAttr('class');\n }\n }, 0);\n}", "removeDayOverview () {\n this.items\n .selectAll ('.item-block')\n .transition ()\n .duration (this.settings.transition_duration)\n .ease (d3.easeLinear)\n .style ('opacity', 0)\n .attr ('x', (d, i) => {\n return i % 2 === 0 ? -this.settings.width / 3 : this.settings.width / 3;\n })\n .remove ();\n this.labels.selectAll ('.label-time').remove ();\n this.labels.selectAll ('.label-project').remove ();\n this.hideBackButton ();\n }", "function removeDayBackgrounds(){\n\tvar labelBars = document.getElementsByClassName(\"Y-bK-bz\")\n\tfor(var i = 0; i < labelBars.length; i++){\n\t\tlabelBars[i].style.background = \"transparent\";\n\t}\n}", "function resetStates(){\n //add all of the cell wrappers to an array\n for(i = 0; i < cells.length; i++){\n cells[i].querySelector('.state-one').style.display = 'none';\n cells[i].querySelector('.state-two').style.display = 'none';\n cells[i].querySelector('.state-three').style.display = 'none';\n cells[i].querySelector('.state-four').style.display = 'none';\n }\n}", "function initCells(){\n\t\tvar days = ['Monday', 'Tuesday', 'Wednesday', \n\t\t\t'Thursday', 'Friday', 'Saturday', 'Sunday'];\n\t\tvar tableRows = document.getElementById('schedTable').children[0].children;\n\t\tvar numericClass = 0000;\n\t\tvar toggle = true;\n\t\tvar first = true;\n\t\tfor(row in tableRows){\n\t\t\tif(!isNaN(row)){\n\t\t\t\tvar tableDatas = tableRows[row].children;\n\t\t\t\tif(!first){\n\t\t\t\t\tvar counter = 0;\n\t\t\t\t\tfor(dat in tableDatas){\n\t\t\t\t\t\tif(!isNaN(dat)){\n\t\t\t\t\t\t\tif(!tableDatas[dat].classList.contains('timeLabel')){\n\t\t\t\t\t\t\t\tvar html = days[counter].toLowerCase();\n\t\t\t\t\t\t\t\tcounter++\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add(html);\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add(numericClass);\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add('cell');\n\t\t\t\t\t\t\t\ttableDatas[dat].setAttribute('data-type','');\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\tif(toggle){\n\t\t\t\t\t\tnumericClass += 30;\n\t\t\t\t\t\ttoggle = false;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tnumericClass += 70;\n\t\t\t\t\t\ttoggle = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfirst = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function clearPreviousClasses( el ) {\n\n for (var i = mkArray.length - 1; i >= 0; i--) {\n if(mkArray[i] !== mk) {\n el.removeClass(mkArray[i]);\n }\n }\n}", "function clearTimer() {\r\n if(tr!=null&&td!=null) {\r\n td.className = td.oldClassName;\r\n td.style.borderLeft = \"\";\r\n td.style.borderRight = \"\";\r\n td.style.backgroundPosition = \"\";\r\n td.oldClassName = null;\r\n } \r\n }", "_updateCols(selected) {\n this.$.table.removeAttribute(\"default-xs-display\");\n let cols = this.$.table.querySelectorAll(\"th,td\");\n this.$.table.setAttribute(\"transition\", true);\n setTimeout(function() {\n for (let i = 0; i < cols.length; i++) {\n let col = cols[i],\n index = col.cellIndex,\n delay;\n if (index === 0 || index === selected) {\n col.removeAttribute(\"xs-hidden\");\n } else {\n col.setAttribute(\"xs-hidden\", true);\n }\n }\n }, 200);\n this.$.table.removeAttribute(\"transition\");\n }", "function removeHiddenClassForAll() {\n let hiddenElements = document.querySelectorAll('.hidden');\n hiddenElements.forEach((elem) => {\n elem.classList.remove('hidden');\n });\n}", "function clean() {\n $j('a, b, span, div, td').removeClass(change_odds_classes.down).removeClass(change_odds_classes.up);\n $j('b').attr('style', '');\n }", "page_edit_start() {\r\n $(\".edit_page_item\").removeClass(\"d-none\")\r\n $(\".no_edit_page_item\").addClass(\"d-none\")\r\n $(\"#page_edit\").addClass(\"d-none\")\r\n $(\"#page_edit_done\").removeClass(\"d-none\")\r\n }", "updateClassName() {\n BEM.addModifier(this.node, MODIFIER_DATE);\n }", "function hideAllCells(classname) {\r\n $(\".\" + classname).css(\"display\", 'none');\r\n $(\".\" + classname).css(\"visibility\", 'collapse');\r\n}", "function datesort() {\n $('.categories, .categories li').css('display','none');\n $('.recent').css('display','block');\n $('.fas').removeClass('fa-caret-down, fa-caret-right').addClass('fa-caret-right');\n}", "function emptyTds() {\n $(\"td\").each(function () {\n i_fontawesome = $(this).find(\"div\").find(\"i\");\n if (\n !i_fontawesome.hasClass(\"accepted\") &&\n !i_fontawesome.hasClass(\"danger\")\n ) {\n i_fontawesome.removeClass(\"fas fa-user\");\n i_fontawesome.addClass(\"far fa-user\");\n }\n\n $(this).removeClass(\"text-lightgray\");\n $(this).addClass(\"cursor_pointer hoverable\");\n });\n}", "function swap_class(root_obj, from_class, to_class) {\n console.debug(\"#swap_class (\" + from_class + \" \" + to_class + \")\");\n var edit_cells3 = root_obj.querySelectorAll(\"[class=\" + from_class + \"]\");\n var m = 0;\n while (m < edit_cells3.length && m < 50) {\n console.debug(edit_cells3[m]);\n edit_cells3[m].setAttribute(\"class\", to_class);\n m++;\n }\n\n}", "function datesort() {\n $('.categories').css('display','none');\n $('.recent').css('display','block')\n}", "function disableClass() {\n $(o.btnPrev).removeClass();\n $(o.btnNext).removeClass();\n $(o.btnUp).removeClass('active');\n $(o.btnDown).removeClass('active');\n $(\"#pfCategoryTop\").html(\"&nbsp;\");\n $(\"#pfCategoryBottom\").html(\"&nbsp;\");\n }", "function removingMonth () {\n $(\".mthsName\").empty();\n $(\".dayBox\").empty().removeClass(\"today\");\n }", "reset() {\n\n if(this.cell) {\n this.cell.classList.remove('food');\n }\n\n }", "function showDataEntryPanel() {\n $(\"#data_entry_panel\").removeClass(\"d-none\");\n $(\"#data_table_panel\").addClass(\"d-none\");\n}", "function hideold(hide) {\n\tvar rows = document.querySelectorAll('*[data-name~=\"lvarow\"]');\n\tfor (var i=0; i < rows.length; i++) {\n\t\tif(hide && String(rows[i].getAttribute(\"class\")).indexOf(\"currentlva\") == -1) {\n\t\t\trows[i].setAttribute(\"data-hiderow_semester\",\"true\");\n\t\t} else {\n\t\t\trows[i].setAttribute(\"data-hiderow_semester\",\"false\");\n\t\t}\n\t}\t\n\t\n\tpropagateVisibility(false);\n}", "resetStyles () {\n\t\tthis.selection\n\t\t\t.attr('data-rel', '')\n\t\t\t.attr('data-hidden', '')\n\t}", "function removeActiveClass(){\n document.querySelectorAll('.timeline-header .item').forEach(function (elem) {\n $(elem).removeClass('active');\n });\n document.querySelectorAll('.timeline-container .item').forEach(function (elem) {\n $(elem).removeClass('active');\n })\n}", "_resetOldSorting() {\n const rowChildren = this.shadowRoot.querySelectorAll('.th[sorted]');\n rowChildren.forEach((el) => el.removeAttribute('sorted'));\n }", "function restoreList(){\n document.querySelectorAll('.card').forEach(el => el.classList.remove('hidden'))\n }", "clean() {\r\n\t\tconst\r\n\t\t\tmarkedCells = Array.from(document.querySelectorAll(selectors.marked));\r\n\r\n\t\tmarkedCells.forEach(cell => cell.classList.remove(cssClasses.marked));\r\n\t}", "removeClassButtonAction() {\n let $columns = $('tr.groupedit-new-row');\n $.each($columns, (key, item) => {\n item.className = '';\n });\n }", "function clearXFlag() {\n var tds = document.getElementsByClassName(\"clear-td-class\");\n if(tds == null || tds.length == 0)return ;\n for(var i = 0; i < tds.length; i++){\n tds[i].innerHTML = \"\";\n }\n}", "function resetLinkClassNames() {\n\n for (let index = 0; index < paginationLinks.length; index += 1) {\n const currTag = paginationLinks[index].firstElementChild;\n currTag.removeAttribute(\"class\");\n }\n\n}", "function cambiaAHoy() {\n dia = hoy.getDate()+\"/\"+(hoy.getMonth()+1)+\"/\"+hoy.getFullYear();\n document.getElementsByClassName('table-responsive')[0].classList = \"table-responsive\"\n document.getElementsByClassName('elija-fecha')[0].classList = \"elija-fecha u-display-none\"\n}", "function dragOut (zone) {\n zone.setAttribute('class', '')\n}", "function resetMasterSched () {\n\tfor (var i = 0; i < masterSched.length; i++) {\n\t\tfor (var j = 0; j < masterSched[i].length; j++) {\n\t\t\t$(\"td.\" + conversionTable[i] + \"Col.mod\" + (j + 1)).css(\"backgroundColor\", \"\").text(\"\");\n\t\t\ttippyInstances[i+(6*j)].disable();\n\t\t}\n\t}\n}", "function revealAllHidden() {\r\n\t\tdocument.querySelectorAll('.hidden').forEach(function(el) {\r\n\t\t\tel.classList.remove('hidden')\r\n\t\t})\r\n\t}", "function legendReset(n){\n\tconsole.log(n.children[0].className = 'normal');\n}", "function resetVacDayLabel(erase)\r\n{\r\n\tvar color = 'yellow';\r\n\tif(erase) color = \"transparent\";\r\n\tvar blank = \"&nbsp&nbsp&nbsp\";\r\n\tvar label = \"\";\r\n\t\r\n\t//if(!msg) msg = \r\n\tfor(var i = 0; i < vae.eventDays.length; i++) {\r\n\t\t$('.mvDay').each(function(index) {\r\n\t\t\tvar mvDay = parseInt($(this).text());\r\n\t\t\tif( mvDay == vae.eventDays[i]) {\r\n\t\t\t\t$(this).siblings('.vaeResult').css(\"background-color\", color);\r\n\t\t\t\tif(erase) label = blank;\r\n\t\t\t\telse label = vae.types[i];\r\n\t\t\t\t$(this).siblings('.vaeResult').last().html(label);\r\n\t\t\t\t//continue;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "function loadActiveDay() {\n for (var i = 0; i <= $('.days').children().children().length; i++) {\n if (Number($($('.days').children().children()[i]).text()) === Number(displayDay)) {\n $($('.days').children().children()[i]).addClass('active-day')\n }\n }\n for (var i = 0; i < $('.active-day').length; i++) {\n if (Number($($('.active-day')[i]).text()) != Number(displayDay)) {\n $($('.active-day')[i]).removeClass('active-day')\n }\n }\n }", "function clearClass(name)\n{\n console.log(\"Clear Class: \" + name);\n var change = document.getElementsByClassName(name); // Find the elements\n for (var i = 0; i < change.length; i++)\n {\n change[i].className=\"\"; // Change the content\n }\n}", "function resetNodes() {\n let allVisited = document.querySelectorAll('.visited-node')\n let allPath = document.querySelectorAll('.path-node')\n allVisited.forEach((node) => {\n node.classList = 'unvisited'\n })\n allPath.forEach((node) => {\n node.classList = 'unvisited'\n })\n}", "function revelarElemento(object){\n object.addClass(\"di_bl\").removeClass(\"di_no\");\n}", "removePeriodAndTaskMarker(task){\n let taskElem = task;\n if (taskElem) {\n let taskDays = $('.day[data-task=true]');\n let taskDebut = taskElem.datedebut;\n let taskFin = taskElem.datefin;\n let periodDays = [];\n //On genere un tableau representant la periode de la tache et les cellules concerné\n $.each(taskDays, (i, e) => {\n if ($(e).attr('data-date') >= taskDebut && $(e).attr('data-date') <= taskFin) {\n periodDays.push(e);\n }\n });\n //on verifie si les cellules de la periode on d'autre taches que celle supprimé.\n let emptyDay = periodDays.filter((e) => {\n let date = $(e).attr('data-date');\n let taskPerDay =0;\n $.each(this.tasks, (i, e) => {\n let dateDebut = e.datedebut;\n let dateFin = e.datefin;\n if (date >= dateDebut && date <= dateFin) {\n taskPerDay++\n }\n\n });\n //si aucune date de tache ne correspond a la date de la cellules on la met dans un tableau\n //representant une cellule vide\n if(!taskPerDay)return true;\n });\n //on retire l'attribut;\n $.each(emptyDay,(i,e)=>{\n if($(e).attr('data-task')){\n $(e).removeAttr('data-task');\n }\n });\n $('.period').toggleClass('period');\n }\n }", "function showDays () {\n\tvar emptyDays = document.getElementsByClassName(\"dayNumber\"); // find all day elements\n\tfor (var i = 0; i < emptyDays.length; i++) { // iterate through day elements array\n\t\temptyDays[i].parentNode.style.visibility = \"visible\"; // show all elements\n\t}\n}", "function showAll(){\n a.classList.remove(\"dn\");\n a.classList.add(\"db\");\n\n hideTasks();\n hideStatus();\n hideReplies();\n}", "function lifeItemsDel() {\n for (let i = 3; i > 0; --i) {\n lifeItems[i].classList = \" \";\n }\n }", "function resetClass(e) {\n e = e || window.event;\n var trgt = e.trgt || e.srcElement;\n trgt.className = \"\";\n}", "@autobind\n clearLabels() {\n if(this.labels){\n for (var i=0; i<this.labels.length; i++) {\n this.labels[i].innerHTML = \"\";\n this.labelDots[i].removeAttribute('style');\n }\n }\n }", "removeMonthOverview () {\n this.items\n .selectAll ('.item-block-month')\n .selectAll ('.item-block-rect')\n .transition ()\n .duration (this.settings.transition_duration)\n .ease (d3.easeLinear)\n .style ('opacity', 0)\n .attr ('x', (d, i) => {\n return i % 2 === 0 ? -this.settings.width / 3 : this.settings.width / 3;\n })\n .remove ();\n this.labels.selectAll ('.label-day').remove ();\n this.labels.selectAll ('.label-week').remove ();\n this.hideBackButton ();\n }", "function resetButtons() {\n allButton.setAttribute(\"class\", \"\");\n activeButton.setAttribute(\"class\", \"\");\n completedButton.setAttribute(\"class\", \"\");\n}", "function _AtualizaClasses() {\n var classes_desabilitadas = [];\n var div_classes = Dom('classes');\n var divs_classes = DomsPorClasse('classe');\n var maior_indice = divs_classes.length > gPersonagem.classes.length ?\n divs_classes.length : gPersonagem.classes.length;\n for (var i = 0; i < maior_indice; ++i) {\n var div_classe = divs_classes[i];\n if (i < gPersonagem.classes.length) {\n if (!div_classe) {\n AdicionaClasse(i, div_classes);\n }\n _AtualizaClasse(\n classes_desabilitadas, gPersonagem.classes[i].classe,\n gPersonagem.classes[i].nivel, gPersonagem.classes[i].nivel_conjurador, i);\n classes_desabilitadas.push(gPersonagem.classes[i].classe);\n } else {\n RemoveFilho(div_classe.id, div_classes);\n }\n }\n\n // Desabilita selects.\n var selects_classes = DomsPorClasse('selects-classes');\n for (var i = 0; i < selects_classes.length - 1; ++i) {\n selects_classes[i].disabled = true;\n }\n selects_classes[selects_classes.length - 1].disabled = false;\n}", "removeYearOverview () {\n this.items\n .selectAll ('.item-circle')\n .transition ()\n .duration (this.settings.transition_duration)\n .ease (d3.easeLinear)\n .style ('opacity', 0)\n .remove ();\n this.labels.selectAll ('.label-day').remove ();\n this.labels.selectAll ('.label-month').remove ();\n this.hideBackButton ();\n }", "function reset(table) {\n \ttable.find('td').each(function() {\n \t\t$(this).removeClass('black').removeClass('red').empty();\n \t})\n\t}", "_updateWeeksVisibility() {\n const that = this\n const focusedWeek = that._focusedCell.parentElement;\n\n //NOTE: classlist is used because when months > 1(or animation is ON) all weeks need to extend JQX\n if (!focusedWeek.classList.contains('jqx-hidden')) {\n return;\n }\n\n const monthWeeks = [].slice.call(focusedWeek.parentElement.children),\n weekIndex = monthWeeks.indexOf(focusedWeek),\n shouldWeekBeHidden = function (week) {\n for (let d = 1; d < week.children.length; d++) {\n if (!week.children[d].classList.contains('jqx-visibility-hidden')) {\n return false;\n }\n }\n\n return true;\n };\n let counter = 0;\n\n monthWeeks.map(week => week.classList.add('jqx-hidden'));\n\n for (let i = weekIndex; i < monthWeeks.length; i++) {\n if (shouldWeekBeHidden(monthWeeks[i])) {\n continue;\n }\n\n monthWeeks[i].classList.remove('jqx-hidden');\n counter++;\n\n if (counter === that.weeks) {\n return;\n }\n }\n\n if (counter < that.weeks) {\n for (let i = weekIndex - 1; i >= 0; --i) {\n monthWeeks[i].classList.remove('jqx-hidden');\n counter++;\n\n if (counter === that.weeks) {\n return;\n }\n }\n }\n }", "function removeGreenColorOnNextDays()\n {\n $('.calendar .calendar-frame .current td').each(function(){\n if(parseInt(calendar_current_month) > parseInt(current_month))\n {\n $(this).addClass('next');\n }\n else if(parseInt($(this).text()) > parseInt(current_day) && parseInt(calendar_current_month) == parseInt(current_month))\n {\n $(this).addClass('next');\n }\n }) \n }", "function hideEmptyDays() {\n\tvar emptyDays = document.getElementsByClassName(\"dayNumber\"); // find all day elements\n\tfor (var i = 0; i < emptyDays.length; i++) { // iterate through day elements array\n\t\tif(emptyDays[i].innerHTML == \"\") { // if array element's inner HTML is empty\n\t\t\temptyDays[i].parentNode.style.visibility = \"hidden\"; // hide empty element\n\t\t} else { // if array element's inner HTML is not empty\n\t\t\temptyDays[i].style.cursor=\"pointer\"; // change a cursor style to pointer\n\t\t}\n\t}\n}", "function refreshDiplo() {\r\n\tif (setCheckBoxCookie(checkBoxDiplo, \"NODIPLO\")) {\r\n\t\tfor (var i = nbTrolls+1; --i >= 3;) {\r\n\t\t\tx_trolls[i].style.backgroundColor = \"\";\r\n\t\t\tx_trolls[i].setAttribute('class', 'mh_tdpage');\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\tif (isDiploComputed == true) putRealDiplo();\t\r\n}", "function mydate() {\n\t//alert(\"\");\n\tdocument.getElementById(\"dt\").hidden = false;\n\tdocument.getElementById(\"DOB\").hidden = true;\n}", "function fondo() {\n for (let i = 0; i < c.length; i++)\n\t{\n\t\td[i].className = \"articleamarillo\"\n\t} \n}", "function selectDate(event) {\n let removeClass = document.querySelectorAll('td');\n for (let i = 0; i < removeClass.length; i++) {\n if (removeClass[i].className == 'enabled selected') {\n removeClass[i].className = 'enabled'\n }\n }\n if (event.target.className == 'enabled') {\n setMyClass(event.target, 'enabled selected')\n document.getElementById('selectedItem').innerHTML = event.target.innerHTML + '/' + monthList[currentMonth - 1] + '/' + currentYear;\n }\n else {\n document.getElementById('selectedItem').innerHTML = 'wrong Date'\n }\n}", "function dropEnd () {\n for (const i of dropZones) {\n i.setAttribute('class', '')\n }\n}", "function resetAll(){\r\n\tdocument.getElementById(\"one\").classList.remove(\"tan\");\r\n\tdocument.getElementById(\"two\").classList.remove(\"tan\");\r\n\tdocument.getElementById(\"three\").classList.remove(\"tan\");\r\n\tdocument.getElementById(\"four\").classList.remove(\"tan\");\r\n}", "function fillAllUncoloredCells() {\r\n let uncoloredCells = document.querySelectorAll(\"td.NoColor\");\r\n for(let i = 0; i < uncoloredCells.length; i++){\r\n uncoloredCells[i].style.backgroundColor = color;\r\n uncoloredCells[i].classList.toggle(\"NoColor\");\r\n }\r\n}", "function cleanBoard() {\r\n var elTds = document.querySelectorAll('.mark, .selected');\r\n for (var i = 0; i < elTds.length; i++) {\r\n elTds[i].classList.remove('mark', 'selected');\r\n }\r\n}", "removeClass(clazz) {\n this.eachElem(item => item.classList.remove(clazz));\n return this;\n }", "removeClass(clazz) {\n this.eachElem(item => item.classList.remove(clazz));\n return this;\n }", "function hideLineup() {\n let statuslineup = document.querySelectorAll(\".lineUpSection__scheduleContainer\");\n for (let i = 0; i < statuslineup.length; i++) {\n statuslineup[i].classList.remove('lineUpSection__scheduleContainer--show');\n }\n console.log(\"not\");\n}", "function removeEditFromTables() {\n var checkTable = setInterval(function() {\n let table = document.querySelectorAll('.table');\n\n if (table.length) {\n table[0].classList.add('hidden-edit');\n }\n\n let items = document.querySelectorAll('.table .td-fit');\n\n if (items.length) {\n let items = document.querySelectorAll('.table .td-fit');\n for (var i = 0; i < items.length; i++) {\n var elements = items[i].getElementsByTagName('span');\n if (isNode(items[1]) && isElement(elements[1])) {\n items[i].removeChild(elements[1]);\n }\n }\n clearInterval(checkTable);\n }\n }, 100);\n}", "function resetFields() {\n $('.user .field-meele').removeClass('unselectable-row');\n $('.user .field-range').removeClass('unselectable-row');\n $('.user .field-super-renge').removeClass('unselectable-row');\n\n $('.user .field-for-cards').removeClass('grayscl');\n //$('.user .field-range').removeClass('grayscl');\n $('.user .field-for-cards').removeClass('swapable');\n}", "function clearTree() {\n\td3.select(\"#data-struct-title\")\n\t\t.html(\"\")\n\t\t.attr(\"class\", \"\");\n\td3.select(\".data-struct\")\n \t.html(\"\");\n}", "function toggle(d) {\n if (d.children) {\n d._children = d.children;\n d.children = null;\n } else if (d._children) {\n d.children = d._children;\n d._children = null;\n }\n }", "function toggle(d) {\n if (d.children) {\n d._children = d.children;\n d.children = null;\n } else {\n d.children = d._children;\n d._children = null;\n }\n }", "function toggle(td, fill) {\n if (td.className === \"empty\") {\n td.className = fill;\n }\n else {\n td.className = \"empty\";\n }\n return td.className;\n}", "unsetClass(el, classname) {\n el.className = el.className.replace(' ' + classname, '');\n }", "page_edit_end() {\r\n $(\".edit_page_item\").addClass(\"d-none\")\r\n $(\".no_edit_page_item\").removeClass(\"d-none\")\r\n $(\"#page_edit\").removeClass(\"d-none\")\r\n $(\"#page_edit_done\").addClass(\"d-none\")\r\n }", "function flushClass(){\n $( '.community-filter' ) . removeClass( 'active' );\n}", "function clearAllCells() {\r\n let allCells = document.querySelectorAll(\"td\");\r\n for(let i = 0; i < allCells.length; i++){\r\n allCells[i].style.backgroundColor = \"silver\";\r\n if(!allCells[i].classList.contains(\"NoColor\")) {\r\n allCells[i].classList.add(\"NoColor\");\r\n }\r\n }\r\n}", "function delAddClass(dlcls, adcls, cls) {\r\n // get number of elements in each parameter\r\n var nr_dlcls = dlcls.length;\r\n var nr_adcls = adcls.length;\r\n\r\n // traverse each array, delete \"class\" of $dlcls, add class from $cls to $adcls\r\n for(var i=0; i<nr_dlcls; i++) {\r\n if(document.getElementById(dlcls[i])) document.getElementById(dlcls[i]).className = '';\r\n }\r\n for(var i=0; i<nr_adcls; i++) {\r\n if(document.getElementById(adcls[i])) document.getElementById(adcls[i]).className = cls;\r\n }\r\n}", "clearActiveColumns() {\n let tf = this.tf;\n tf.eachCol((idx) => {\n removeClass(tf.getHeaderElement(idx), this.headerCssClass);\n\n if (this.highlightColumn) {\n this.eachColumnCell(idx,\n (cell) => removeClass(cell, this.cellCssClass));\n }\n });\n }", "function removeClassesOfView(){ \n\t\t$('#products').removeClass('grid grid-2 list list-2 catelog'); \n\t}", "function toggle(d) \n\t\t{\n\t\t\tif (d.children) \n\t\t\t{\n\t\t\t\td._children = d.children;\n\t\t\t\td.children = null;\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\td.children = d._children;\n\t\t\t\td._children = null;\n\t\t\t}\n\t\t\tupdate(d);\n\t\t}", "function deselectAll()\n{\nfor(i=0; i<suggestions; i++)\n{\nvar oCrtTr = document.getElementById(\"tr\" + i);\noCrtTr.className = \"\";\n}\n}", "function delFrom_cls() {\n if (clsRows > 1 && transitioning == false) {\n\n // reduce number of rows\n clsRows--;\n var clsRowsObj = document.getElementById(\"clsRows\");\n while (clsRowsObj.lastChild.nodeName !== \"DIV\") {\n clsRowsObj.removeChild(clsRowsObj.lastChild);\n }\n\n // set classes\n clsRowsObj.lastChild.className = \"clsRow toHide\";\n\n // and set up transition\t\t \n transitioning = true;\n setTimeout(function() { delRow(clsRowsObj); }, 500);\n\n }\n}", "function TUI_toggle_class(className)\n{\n var hidden = toggleRule('tui_css', '.'+className, 'display: none !important');\n TUI_store(className, hidden ? '' : '1');\n TUI_toggle_control_link(className);\n}" ]
[ "0.6643962", "0.57419723", "0.5740775", "0.57109827", "0.5701641", "0.5670024", "0.55317307", "0.5518069", "0.55007416", "0.5476566", "0.54550266", "0.54270494", "0.5416296", "0.54116243", "0.53957784", "0.53781676", "0.53037506", "0.5302284", "0.53000146", "0.5289943", "0.52863675", "0.52844065", "0.52835184", "0.5267108", "0.52420086", "0.5230229", "0.52262855", "0.52111864", "0.5187024", "0.518494", "0.5178334", "0.5178112", "0.51649886", "0.5164731", "0.51465875", "0.5142212", "0.51221305", "0.511875", "0.51174647", "0.51152205", "0.5110614", "0.5109697", "0.5102795", "0.51021016", "0.5099602", "0.5095946", "0.5094183", "0.50824565", "0.5064147", "0.50569475", "0.5050221", "0.50480556", "0.504573", "0.50419295", "0.5038452", "0.5023868", "0.50197667", "0.50140536", "0.50110054", "0.50083274", "0.49962622", "0.4990917", "0.49839732", "0.49837235", "0.4981307", "0.49763215", "0.4974811", "0.49732187", "0.49728343", "0.49725795", "0.49709716", "0.49618983", "0.4957932", "0.49571142", "0.49507973", "0.49502832", "0.49455568", "0.49442264", "0.49413562", "0.49410468", "0.49407113", "0.49407113", "0.49373537", "0.4934539", "0.49330562", "0.4931757", "0.49313757", "0.49307746", "0.49305674", "0.49288705", "0.49271482", "0.49243677", "0.4920195", "0.49189746", "0.49060163", "0.49041203", "0.4900168", "0.48973963", "0.4888261", "0.48854384" ]
0.55572283
6
hides all certified dt and closes dd if opened
function hideCertified() { $('dt.certified').forEach(function(element) { element = $(element); element.addClass('hidden'); // hide description if opened var model = element._model; if (model.visible) { model.visible = false; // XXX this will need to be changed if any animation will be // implemented to hide model.hide(); } }); setStripes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mydate() {\n\t//alert(\"\");\n\tdocument.getElementById(\"dt\").hidden = false;\n\tdocument.getElementById(\"DOB\").hidden = true;\n}", "function unhide_dates(){\r\n\t$(\"#hidden_row\").css(\"display\",\"inline\");\r\n}", "function hideDate(id){\n document.getElementById(id).style.display =\"none\";\n}", "function hideDetails (d, i, datum, IDs)\n{\n globals.tooltip.hideTooltip();\n if (globals.timelineType == \"1d\") {\n // remove functional equivalence lines after the user mouses over the event\n lines = d3.select(\"#timeline svg\").selectAll(\"line\");\n lastElement = lines[0].length-1;\n for (var i = 0; i < IDs[d.fe_id].length/2-1; i++) {\n lines[0][lastElement-i].remove();\n }\n }\n}", "function showDataEntryPanel() {\n $(\"#data_entry_panel\").removeClass(\"d-none\");\n $(\"#data_table_panel\").addClass(\"d-none\");\n}", "function hiddenTableCalendar() {\n\tvar table_calendar = document.getElementById(\"table_calendar\");\n\ttable_calendar.style.display = \"none\";\n}", "function hide_widget_wizard() {\n $('#open-nc-widget').remove();\n $('#dd-form, #data-tables').show('slow'); \n }", "function cancelHide(id){\n var h = document.getElementById(id + '-ddheader');\n var c = document.getElementById(id + '-ddcontent');\n clearTimeout(h.timer);\n clearInterval(c.timer);\n if(c.offsetHeight < c.maxh){\n c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);\n }\n}", "function hideDtypes() {\n svg.selectAll('.dtype').remove();\n }", "function cancelHide(id){\r\n var h = document.getElementById(id + '-ddheader');\r\n var c = document.getElementById(id + '-ddcontent');\r\n clearTimeout(h.timer);\r\n clearInterval(c.timer);\r\n if(c.offsetHeight < c.maxh){\r\n c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);\r\n }\r\n}", "function hideEmptyDays() {\n\tvar emptyDays = document.getElementsByClassName(\"dayNumber\"); // find all day elements\n\tfor (var i = 0; i < emptyDays.length; i++) { // iterate through day elements array\n\t\tif(emptyDays[i].innerHTML == \"\") { // if array element's inner HTML is empty\n\t\t\temptyDays[i].parentNode.style.visibility = \"hidden\"; // hide empty element\n\t\t} else { // if array element's inner HTML is not empty\n\t\t\temptyDays[i].style.cursor=\"pointer\"; // change a cursor style to pointer\n\t\t}\n\t}\n}", "function showDays () {\n\tvar emptyDays = document.getElementsByClassName(\"dayNumber\"); // find all day elements\n\tfor (var i = 0; i < emptyDays.length; i++) { // iterate through day elements array\n\t\temptyDays[i].parentNode.style.visibility = \"visible\"; // show all elements\n\t}\n}", "close() {\n this.showDayView = this.showMonthView = this.showYearView = false\n if (!this.isInline) {\n this.$el.querySelector('.vdp-datepicker div').style.boxShadow = \"none\";\n this.$emit('closed');\n document.removeEventListener('click', this.clickOutside, false)\n }\n }", "function toggletoD12D20(){\n\tdocument.getElementById(\"D4\").style.display = \"none\";\n\tdocument.getElementById(\"D6\").style.display = \"none\";\n\tdocument.getElementById(\"D8\").style.display = \"none\";\n\tdocument.getElementById(\"D10\").style.display = \"none\";\n\tdocument.getElementById(\"D12\").style.display = \"inline\";\n\tdocument.getElementById(\"D20\").style.display = \"inline\";\n}", "function hideYearPickerICD(hideElement) {\n\t\tlet overviewChartMonthDiv = document.getElementById('overviewChartMonth');\n\t\tlet dateMonthArrowDiv = document.getElementById('dateMonthArrow');\n\t\t\n\t\tif(hideElement) {\n\t\t\tif(!overviewChartMonthDiv.classList.contains('d-none')) {\n\t\t\t\toverviewChartMonthDiv.classList.add('d-none');\n\t\t\t}\n\t\t\t\n\t\t\tif(!dateMonthArrowDiv.classList.contains('d-none')) {\n\t\t\t\tdateMonthArrowDiv.classList.add('d-none');\n\t\t\t}\n\t\t} else {\n\t\t\tif(overviewChartMonthDiv.classList.contains('d-none')) {\n\t\t\t\toverviewChartMonthDiv.classList.remove('d-none');\n\t\t\t}\n\t\t\t\n\t\t\tif(dateMonthArrowDiv.classList.contains('d-none')) {\n\t\t\t\tdateMonthArrowDiv.classList.remove('d-none');\n\t\t\t}\n\t\t}\n\t}", "function hideDetail(d) {\n\n\t\td3.select(this)\n\t\t.attr(\"stroke\", d3.rgb(fillColor(d.group)).darker());\n\n\t\ttooltip.hideTooltip();\n\n\t}", "function hideDeletedItems() {\n var parent = document.getElementById(TODOS_DELETED_ID);\n if (parent.style.display === 'none') {\n parent.style.display = 'block';\n } else {\n parent.style.display = 'none';\n }\n}", "function hideheaders(hide) {\n\tif(hide){\n\t\tshowAllDiv('modul1');\n\t\tshowAllDiv('modul2');\n\t\tshowAllDiv('fach');\n\t\tdocument.getElementById(\"content\").setAttribute(\"data-hideheaders\",\"true\");\n\t}else{\n\t\tdocument.getElementById(\"content\").setAttribute(\"data-hideheaders\",\"false\");\n\t}\n\t\n\tredrawFix();\n}", "function showCertified() {\n $('dt.certified').removeClass('hidden');\n setStripes();\n }", "function showHideDatatables() {\n\n const checked = document.getElementById(\"datatablesCheckbox\").checked;\n const datatable = document.getElementById(\"datatable\");\n if (checked) {\n datatable.style.display = \"inline-block\";\n }\n else {\n datatable.style.display = \"none\";\n }\n\n resizePanels();\n}", "function hide_popups()\r\n{\r\n\tvar oDiv = document.getElementById('date-picker');\r\n\tvar oIF = document.getElementById(\"date-picker-shimer\");\r\n\tvar oDivCR = document.getElementById('call_rating');\r\n\tif(oDiv!=null)oDiv.style['display']='none';\r\n\tif(oIF!=null)oIF.style['display']='none';\r\n\tif(oDivCR!=null)oDivCR.style['display']='none';\r\n}", "function hidelinesSave(){\n $('.rowlines, #closecanvastable').hide();\n }", "function HideContent(d) {\ndocument.getElementById(d).style.display = \"none\";\n}", "function hide_all() {\n $('#punctual-table-wrapper').collapse(\"hide\")\n $(\"#meta-info\").hide()\n $(\"#progress_bar\").hide()\n $(\"#arrived-late\").hide()\n $(\"#punctual\").hide()\n $(\"#left-early\").hide()\n $(\"#punctual-day-chart\").hide()\n $(\"#breakdown p\").hide()\n}", "function showDtypes() {\n // Another way to do this would be to create\n // the year texts once and then just hide them.\n var dtypesData = d3.keys(dtypesTitleX);\n var dtypes = svg.selectAll('.dtype')\n .data(dtypesData);\n\n dtypes.enter().append('text')\n .attr('class', 'dtype')\n .attr('x', function (d) { return dtypesTitleX[d]; })\n .attr('y', 40)\n .attr('text-anchor', 'middle')\n .text(function (d) { return d; });\n }", "function openNewDdt(){\n\t$(\"#autonum\").prop(\"disabled\", false);\n\t$(\"#autonum\").prop(\"checked\", true);\n\t$(\"#saveNewDdt\").prop(\"disabled\", false);\n\t$(\"#newDdt\").prop(\"disabled\", false);\n\t$(\"#saveNewAndPrintDdt\").prop(\"disabled\", false);\n\t\n\t$(\"#saveDdt\").prop(\"disabled\", true);\n\t$(\"#printDdt\").prop(\"disabled\", true);\n\t\n\tvar d = new Date();\n\tvar day = d.getDate();\n\tif(day < 10)\n\t\tday = \"0\"+day;\n\t\n\tvar today = d.getFullYear() + \"-\" + (d.getMonth() + 1) + \"-\" + day;\n\tvar time = d.getHours() + \":\" + d.getMinutes();\n\t$(\"#ddtObject_ddt_oraTrasporto\").val(time);\n\t$(\"#ddtObject_ddt_dataTrasporto\").val(today);\n\t$(\"#ddtObject_ddt_data\").val(today);\n}", "function closeContactFormular(indexDoc) {\n document.getElementById(\"popUpDate\" + indexDoc).style.display = \"none\";\n}", "function hidelines(){\n $('.rowlines, #closecanvastable').hide();\n }", "function hide(tid, obj, showtxt, hidetxt)\n{\n /*\n\tif (showtxt == \"\")\n\t\tshowtxt = \"Show\";\n\tif (hidetxt == \"\")\n\t\thidetxt = \"Hide\";\n\t*/\n\tvar i, s, e, b;\n\tvar validChars = '0123456789';\n\tvar x;\n\n\tif(tid.indexOf('-') > -1)\n\t{\n\t\tx = 0;\n\t\ts = '';\t\t\t\t\t\n\t\t\n\t\t//This allows to name elements with a number in them, like td390_1 for example\n\t\t//Now we can do toggledisplay('td390_1-10')\n\t\tif(tid.indexOf('_') > -1)\n\t\t{\n\t\t\tfor(i = tid.indexOf('_'); i < tid.indexOf('-'); i++)\n\t\t\t{\n\t\t\t\tif(validChars.indexOf(tid.charAt(i)) > -1)\n\t\t\t\t{\n\t\t\t\t\tif(x == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ts = tid.substr(i , tid.indexOf('-') - i);\n\t\t\t\t\t\tb = tid.substr(0, i);\n\t\t\t\t\t\tx = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \t\t\n\t\t\te = tid.substr(tid.indexOf('-') + 1);\n\t\t\t//alert('Toggling ' + s + ' to ' + e);\n\t\t\tfor(i = s; i <= e; i++)\n\t\t\t{\n\t\t\t //alert('Trying to toggle ' + b + i);\n\t\t\t\tif(document.getElementById(b + i))\n\t\t\t\t{\n\t\t\t\t\thideOne(b + i, obj, showtxt, hidetxt);\t\t\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(i = 0; i < tid.indexOf('-'); i++)\n\t\t\t{\n\t\t\t\tif(validChars.indexOf(tid.charAt(i)) > -1)\n\t\t\t\t{\n\t\t\t\t\tif(x == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ts = tid.substr(i , tid.indexOf('-') - i);\n\t\t\t\t\t\tb = tid.substr(0, i);\n\t\t\t\t\t\tx = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \t\t\n\t\t\te = tid.substr(tid.indexOf('-') + 1);\n\t\t\t\n\t\t\tfor(i = s; i <= e; i++)\n\t\t\t{\n\t\t\t\tif(document.getElementById(b + i))\n\t\t\t\t{\n\t\t\t\t\t//alert('Toggling ' + b + i);\n\t\t\t\t\thideOne(b + i, obj, showtxt, hidetxt);\t\t\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\telse if(tid.indexOf(',') > -1)\n\t{\n\t\ts = tid;\n\t\twhile(s.indexOf(',') > -1)\n\t\t{\n\t\t\tx=s.indexOf(',');\n\t\t\tb=s.substr(0, x);\n\t\t\ts=s.substr(x + 1);\n\t\t\tif(document.getElementById(b))\n\t\t\t{\n\t\t\t\thideOne(b, obj, showtxt, hidetxt);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tif(document.getElementById(tid))\n\t\t{\n\t\t\thideOne(tid, obj, showtxt, hidetxt);\n\t\t}\n\t}\n}", "function hidePicker() {\n\t\t\t\t\t\t\treturn $field\n\t\t\t\t\t\t\t\t.attr(\"datepicker\", \"hidden\")\n\t\t\t\t\t\t\t\t.datepicker(\"hide\");\n\t\t\t\t\t\t}", "function datepickerClose(obj) {\n\t$(obj).css(\"display\", \"none\");\n\t$(obj).prev().focus();\n}", "function frmPatientSummary_hideDropDownsOnFormclick() {\n frmPatientSummary.fcunitslist.setVisibility(false);\n}", "function lfOpen() {\n $(\"#down-content\").style.display = \"block\";\n }", "static get DS_HIDDEN() { return 0; }", "function showHide()\r\n{\r\n var showHides = jQ(\"fieldset.showHide\");\r\n for(var x=0; x<showHides.size(); x++)\r\n {\r\n showHide = showHides.eq(x);\r\n legend = showHide.children(\"legend\");\r\n legendText = legend.text();\r\n legend.html(\"Hide \" + legendText);\r\n legend.css(\"cursor\", \"pointer\");\r\n legend.css(\"color\", \"blue\");\r\n //div = showHide.children(\"div\")\r\n show = jQ(\"<span style='cursor:pointer;color:blue;padding-left:1ex;'>Show \" + legendText + \"</span>\");\r\n showHide.wrap(\"<div/>\");\r\n showHide.before(show);\r\n showHide.hide();\r\n function showFunc(event)\r\n {\r\n target = jQ(event.target);\r\n target.hide();\r\n target.next().show();\r\n }\r\n function hideFunc(event)\r\n {\r\n target = jQ(event.target).parent();\r\n target.hide();\r\n target.prev().show();\r\n }\r\n show.click(showFunc);\r\n legend.click(hideFunc);\r\n }\r\n showHides = jQ(\"div.showHideToggle\");\r\n showHides.each(function() {\r\n var showHideDiv = jQ(this);\r\n var toggleText = showHideDiv.find(\"input[@name='toggleText']\").val();\r\n var contentDiv = showHideDiv.find(\">div\");\r\n var cmd = showHideDiv.find(\">span.command\");\r\n cmd.click(function(){ contentDiv.toggleClass(\"hidden\"); var t=cmd.html(); cmd.html(toggleText); toggleText=t; });\r\n });\r\n}", "function hidelist(d,t) {\r\n if(t.checked==true)\r\n {\r\n document.getElementById(d).style.display=\"none\";\r\n }\r\n else {\r\n document.getElementById(d).style.display=\"block\";\r\n }\r\n}", "function hideDeleteButtons(){\n $('li').find('.delmark').hide();\n }", "function hideDbDescriptions( altShow ) {\n // hide descriptions\n $( \".dbDescription\" ).hide( function() {\n resizeFrame();\n }\n );\n \n // show proper toggle icon\n $( \".dbToggleIcon\" ).each( function() {\n this.src = \"/library/image/sakai/expand.gif?panel=Main\";\n this.alt = altShow;\n } );\n}", "function hideold(hide) {\n\tvar rows = document.querySelectorAll('*[data-name~=\"lvarow\"]');\n\tfor (var i=0; i < rows.length; i++) {\n\t\tif(hide && String(rows[i].getAttribute(\"class\")).indexOf(\"currentlva\") == -1) {\n\t\t\trows[i].setAttribute(\"data-hiderow_semester\",\"true\");\n\t\t} else {\n\t\t\trows[i].setAttribute(\"data-hiderow_semester\",\"false\");\n\t\t}\n\t}\t\n\t\n\tpropagateVisibility(false);\n}", "function hideReportLinks(){\n\t\tdocument.getElementById(\"bd_report\").style.display=\"none\";\n\t\tdocument.getElementById(\"blc_report\").style.display=\"none\";\n\t}", "hide() {\n this.visible = false;\n this.closed.emit();\n }", "function closeDhcp() {\n\t\t\tdocument.getElementById(\"Dhcp\").style.width = \"0\";\n\t\t}", "function frmPatientSummary_showHideFcWoundDescription(eventobject) {\n searchPatient_closeSearchList();\n var evenObjectId;\n if (isIpad && !isNetworkAvailable()) {} else {\n evenObjectId = eventobject.id;\n var index = evenObjectId.replace(\"fcexpandarrow\", \"\");\n if (frmPatientSummary[\"fcwounddesc\" + index].isVisible) {\n frmPatientSummary[\"fcwounddesc\" + index].setVisibility(false);\n frmPatientSummary[\"imgexpandarrow\" + index].src = \"sidearrow.png\";\n } else {\n frmPatientSummary[\"fcwounddesc\" + index].setVisibility(true);\n frmPatientSummary[\"imgexpandarrow\" + index].src = \"headerarrow.png\";\n }\n var indexNum = parseInt(index);\n for (var i = 1; i <= woundCount; i++) {\n if (indexNum !== i) {\n var currentIndex = i.toString();\n if (frmPatientSummary[\"fcwounddesc\" + i].isVisible) {\n frmPatientSummary[\"fcwounddesc\" + i].setVisibility(false);\n frmPatientSummary[\"imgexpandarrow\" + i].src = \"sidearrow.png\";\n }\n }\n }\n }\n frmPatientSummary.forceLayout();\n}", "function showhideclosegroups(show){\n var Dom = YAHOO.util.Dom;\n var divs = Dom.getElementsByClassName(\"closed\", \"div\");\n var display;\n if (show){\n display = '';\n }\n else display = 'none';\n for(var i = 0; i < divs.length; ++i){\n divs[i].style.display=display;\n }\n}", "function hideStartingInfo() {\r\n // Hides savings/checking info and transaction info.\r\n hideToggle(checking_info); \r\n hideToggle(savings_info); \r\n hideToggle(transactions); \r\n}", "function hideSaveDeleteButtons() {\n artworkInfo.style.display = \"none\"\n}", "function hideFiles() { showFiles(true,this); }", "function closeDelete() {\n results.style.display = \"none\";\n}", "function displayEvent() {\n $('tbody.event-calendar td').on('click', function(e) {\n \n $('.day-event').slideUp('fast');\n var monthEvent = $(this).attr('date-month');\n var yearEvent = $(this).attr('date-year');\n var dayEvent = $(this).text();\n if($('.day-event[date-month=\"' + monthEvent + '\"][date-day=\"' + dayEvent + '\"][date-year=\"'+yearEvent+'\"]').css('display') == 'none')\n $('.day-event[date-month=\"' + monthEvent + '\"][date-day=\"' + dayEvent + '\"][date-year=\"'+yearEvent+'\"]').slideDown('fast');\n });\n }", "function showDatePicker(e){ \n e.stopPropagation();\n\n //fire event to close other date picker before show date picker\n triggerEvent(document, \"click\");\n\n updateDatePicker();\n self.datePickerContainer.classList.remove(\"rdpicker-hide\"); \n setDatePickerPosition(self.datePickerInputElement);\n document.addEventListener(\"click\", self.close.bind(self));\n }", "function showDatePicker(e){ \n e.stopPropagation();\n\n //fire event to close other date picker before show date picker\n triggerEvent(document, \"click\");\n\n updateDatePicker();\n self.datePickerContainer.classList.remove(\"rdpicker-hide\"); \n setDatePickerPosition(self.datePickerInputElement);\n document.addEventListener(\"click\", self.close.bind(self));\n }", "function datesort() {\n $('.categories').css('display','none');\n $('.recent').css('display','block')\n}", "function hideWheels(dw, i) {\n\t $('.dwfl', dw).css('display', '').slice(i).hide();\n\t }", "function hideParentDirFromTable() {\n var parentDirLinkBox = document.getElementById('parentDirLinkBox');\n parentDirLinkBox.style.display = 'none';\n}", "function hide(){\r\n // change display style from block to none\r\n details.style.display='none';\r\n}", "function hideElementsOfSalesReport() {\n document.getElementById(\"salesReportTable\").style.visibility = \"hidden\";\n document.getElementById(\"exportCsvButton\").style.visibility = \"hidden\";\n}", "function hideElements() {\n\tlet scroll = document.getElementById(\"convertTypes\");\n\tif (scroll.options[scroll.selectedIndex].value === \"disem\") {\n\t\tdocument.getElementById(\"mnemonicOptions\").style.display = \"none\";\n\t\tdocument.getElementById(\"secondWrapper\").style.display = \"none\";\n\t} else {\n\t\tdocument.getElementById(\"mnemonicOptions\").style.display = \"inline-block\";\n\t\tdocument.getElementById(\"secondWrapper\").style.display = \"inline-block\";\n\t}\n}", "function hidetableau() {\n console.log(\"hiding viz\");\n viz.hide();\n}", "function frame_help_hide() {\n\treturn; \n\tvar aDivs = document.getElementsByName(\"DV_HELPTXT\");\n\tvar i = 0;\n\tfor (i=0;i<aDivs.length;i++ )\n\t{\n\t\t//aDivs[i].style.display = 'none';\n\t}\n}", "function OcultarCosas(DID) {\n $(DID).css(\"display\", \"none\");\n }", "function hiddenWorkMonth() {\n for (var i = 1; i <= 13; i++) {\n $(\"#w\" + i).hide();\n }\n }", "function hiddenDiv()\n\t{\n\t\tdocument.getElementById('flotante').style.display='none';\n\t}", "function hideDetails() {\n if (!graphClicked){ //keep details shown if user clicks\n focus.style(\"opacity\", 0);\n focusText.style(\"opacity\", 0);\n focusLineX.style(\"opacity\", 0);\n focusLineY.style(\"opacity\", 0);\n }\n }", "function hideDeleteTemBox(){\r\n\t\toVar.iSelect = false;\r\n\t\t$(mark).hide();\r\n\t\t//oVar = null;\r\n\t}", "function expandDdn(e) {\n var id = (e.target.id).replace(\"btn\", \"ddn\");\n document.getElementById(id).classList.toggle(\"show\");\n }", "function fnhideInformation()\r\n\t\t{\r\n\t\t\tmblnOnInfoWindow = false;\r\n\t\t}", "function afiseaza_ddls(){\n\n document.getElementById(\"lista_simptome\").setAttribute('style', 'display: inline-block');\n document.getElementById(\"lista_boli\").setAttribute('style', 'display: none');\n\n}", "function startHidden() {\n $(\"#hider\").hide();\n }", "handleToggleClass() {\n this.dl.addEventListener('click', event => {\n const dt = event.target\n if (dt.tagName === 'DT') {\n const dd = event.target.nextElementSibling\n dt.classList.toggle('section__title--active')\n dd.classList.toggle('section__content--active')\n }\n })\n }", "function hide() {\n that.isSelected = false;\n // change class to default\n that.row.className = 'maqaw-visitor-list-entry';\n that.row.style.display = 'none';\n // tell the VisitorList that we are going to hide this visitor so that it can deselect\n // it if necessary\n that.visitorList.hideVisitor(that);\n // clear chat window\n that.visitorList.chatManager.clear(that);\n }", "function ddMenu(id,d){\r\n var h = document.getElementById(id + '-ddheader');\r\n var c = document.getElementById(id + '-ddcontent');\r\n clearInterval(c.timer);\r\n if(d == 1){\r\n clearTimeout(h.timer);\r\n if(c.maxh && c.maxh <= c.offsetHeight){return}\r\n else if(!c.maxh){\r\n c.style.display = 'block';\r\n c.style.height = 'auto';\r\n c.maxh = c.offsetHeight;\r\n c.style.height = '0px';\r\n }\r\n c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);\r\n }else{\r\n h.timer = setTimeout(function(){ddCollapse(c)},50);\r\n }\r\n}", "hide(){\n\t\tif(atom && this.panel)\n\t\t\tthis.panel.hide();\n\t\telse (\"dialog\" === this.elementTagName)\n\t\t\t? this.element.close()\n\t\t\t: this.element.hidden = true;\n\t\tthis.autoFocus && this.restoreFocus();\n\t}", "function denevanToggle() {\r\n var x = document.getElementById('denevanInfo');\r\n if (x.style.display === 'none') {\r\n x.style.display = 'block';\r\n } else {\r\n x.style.display = 'none';\r\n }\r\n\r\n}", "function hideTools() {\n\t\t\thideAllBtn();\n\t\t\t$('#colorelement').css('display','none');\n\t\t\t$('#fntEdit').css('display','none');\n\t\t}", "function hide() {\n // First things first: we don't show it anymore.\n scope.tt_isOpen = false;\n\n //if tooltip is going to be shown after delay, we must cancel this\n $timeout.cancel(popupTimeout);\n removeTooltip();\n }", "function openDatePicker () {\n if (dateDis.classList.contains(\"hidden\")) {\n var dayOfWeek = days[dueDate.getDay()];\n var dayOfMonth = dueDate.getDate();\n var curYear = dueDate.getFullYear();\n var curMonth = dueDate.getMonth() + 1;\n document.getElementById(\"curDateDisplay\").innerHTML = dayOfWeek+\", \"+curMonth+\"/\"+dayOfMonth+\"/\"+curYear;\n dateDis.classList.remove(\"hidden\");\n }\n todoStage.classList.remove(\"hidden\");\n todoCal.addEventListener(\"datetap\", function(e){\n dueDate = e.detail.date;\n dayOfWeek = days[dueDate.getDay()];\n dayOfMonth = dueDate.getDate();\n curYear = dueDate.getFullYear();\n curMonth = dueDate.getMonth() + 1;\n document.getElementById(\"curDateDisplay\").innerHTML = dayOfWeek+\", \"+curMonth+\"/\"+dayOfMonth+\"/\"+curYear;\n });\n}", "function hideAllDetails( altShow ) {\n // hide descriptions\n $( \".citationDetails\" ).hide( function() {\n resizeFrame();\n }\n );\n \n // show proper toggle icon\n $( \".toggleIcon\" ).each( function() {\n this.src = \"/library/image/sakai/expand.gif?panel=Main\";\n this.alt = altShow;\n } );\n}", "function hideDetail() {\n\n // hide tooltip\n return tooltip.style(\"visibility\", \"hidden\");\n}", "function close_to_del() {\n text_input.value = \"\";\n toggle_visibility(); //put mouse point input search\n if (text_input.value != \"\") {\n btn_close_to_del.style.display = \"flex\";\n } else {\n btn_close_to_del.style.display = \"none\";\n }\n}", "unShowFileTree(hideStatsAndFiles = true) {\n this.hide()\n\n if (hideStatsAndFiles) {\n switch (window.vizState.infoBoxMode) {\n case 'top-stats':\n $topStats.show()\n break\n\n case 'all-files':\n $allFilesContainer.show()\n break\n }\n }\n\n const u = d3.select('.info-box-file-tree .file-tree')\n .selectAll('tr')\n .data([])\n\n u.exit().remove()\n }", "function hidedesc(thisdesc) {\n\t\t\t\tthisdesc.activeItem++;\n\t\t\t\tthisdesc.intresume();\t//resume the interval\n\t\t\t\tdescription.style.display=\"none\";\n\t\t\t}", "function displayContent(show, hide) {\r\n show.classList.remove(\"d-none\");\r\n hide.classList.add(\"d-none\");\r\n}", "function details_off(d) {\n\n\tvar sp_dot = document.getElementById(\"sp\"+d.Team);\n\tvar tm_node = document.getElementById(\"tm\"+d.Team);\n\n switch(zoom_level) {\n\t // Conference - make everyone visible\n\t case 0: \n\t\t\tteams.forEach(function(team) {\n\t\t\t\tdocument.getElementById(\"sp\"+team).setAttribute(\"opacity\", 1);\n\t\t\t});\n\t\t\tbreak;\n\t\t\t\n\t // Division - make division's teams visible\n\t case 1: \n\t\t\tteams.forEach(function(team) {\n\t\t\t\tif(division_map[team] == current_division) \n\t\t\t\t\tdocument.getElementById(\"sp\"+team).setAttribute(\"opacity\", 1);\n\t\t\t});\n\t\t\tbreak;\n\t\t\t\n\t // Team - make focused team visible\n\t case 2:\n\t\t\tteams.forEach(function(team) {\n\t\t\t\tdocument.getElementById(\"sp\"+team).setAttribute(\"opacity\", .1);\n\t\t\t});\n\t\t\tdocument.getElementById(\"sp\"+current_team).setAttribute(\"opacity\", 1);\n\t\t\tbreak;\n\t}\n\t\n\t// Reset dot\n\tsp_dot.setAttribute(\"r\", old_dot);\n sp_dot.setAttribute(\"opacity\", old_opacity);\n\t\n\t// Reset node\n\ttm_node.style.opacity = \"1\";\n\t\n\t//Disappear tooltip\n\ttooltip.transition()\n\t\t.duration(100)\n\t\t.style(\"opacity\", 0); \n}", "function hide(ele){\n\t\t\tvar eventId = ele.parentNode.getAttribute(\"data-event-id\"),\n\t\t\t\teId = ele.parentNode.getAttribute(\"data-eid\"),\n\t\t\t\tpId = ele.parentNode.getAttribute(\"data-pid\");\n\t\t\t\t\n\t\t\tvar instanceId = ele.parentNode.getAttribute(\"data-instance-id\");\n\t\t\t$(\"[data-eid=\"+eId+\"][data-pid=\"+pId+\"]\").each(function(){\n\t\t\t\tif(this == ele) return\n\t\t\t\t\tif(this.getElementsByClassName(\"locked\")[0])\n\t\t\t\t\t\tthis.getElementsByClassName(\"locked\")[0].style.display = \"\";\n\t\t\t\t\tif(this.getElementsByClassName(\"unlocked\")[0])\n\t\t\t\t\t\tthis.getElementsByClassName(\"unlocked\")[0].style.display = \"\";\n\t\t\t});\n\t\t}", "function TurnoffDisplay(){\n\tdocument.getElementById(\"D4\").style.display = \"none\";\n\tdocument.getElementById(\"D6\").style.display = \"none\";\n\tdocument.getElementById(\"D8\").style.display = \"none\";\n\tdocument.getElementById(\"D10\").style.display = \"none\";\n\tdocument.getElementById(\"D12\").style.display = \"none\";\n\tdocument.getElementById(\"D20\").style.display = \"none\";\n}", "function closeDetails() {\n if (selectedDiv_ != null) {\n selectedDiv_.classList.remove(\"file-selected\");\n selectedDiv_ = null;\n }\n var detailsDiv = document.getElementById(\"details-body\");\n detailsDiv.parentNode.classList.add(\"hidden\");\n}", "function unhide() {\n figure.style.display = \"block\";\n}", "function hideDiaryForm() {\n //hide diary form //\n $('#diary').hide();\n //show bedroom mask //\n $('#bedroomMask').css('display', 'block');\n}", "afterHidden() {}", "hide(silent = false) {\n const me = this,\n parent = me.parent; // Reject non-change\n\n if (!me.hidden) {\n me.hidden = true;\n\n if (parent && !parent.isRoot) {\n // check if all sub columns are hidden, if so hide parent\n const anyVisible = parent.children.some(child => child.hidden !== true);\n\n if (!anyVisible && !parent.hidden) {\n silent = true; // hiding parent will trigger event\n\n parent.hide();\n }\n }\n\n if (me.children) {\n me.children.forEach(child => child.hide(true));\n }\n\n if (!silent) {\n me.stores.forEach(store => store.trigger('hideColumn'));\n }\n }\n }", "function dd_click(d) {\n if (d.children) {\n d._children = d.children;\n d.children = null;\n } else {\n d.children = d._children;\n d._children = null;\n }\n dd_update(d);\n}", "function toggle() {\n $('#travel-dates').toggle();\n $('#trip-create').toggle();\n // Hide any errors\n $(\".form-error\").hide();\n }", "function showBulkHideWindow () {\n\t\t\t$('#bulk-order .bulk-order-content').removeClass(\"hide\");\n\t\t}", "function hide() {\n var div = document.getElementById('for');\n if (div.style.display !== 'none') {\n div.style.display = 'none';\n }\n else {\n div.style.display = 'block';\n }\n}", "static hide(obj) {\n obj.setAttribute('visibility', 'hidden');\n }", "function hideDetails() {\n\t$('#scrollable').height(802);\n\t$(\".details\").each(function(i) {\n \t\t\t$(this).delay(i * 1).fadeOut(400);\n\t\t\t});\t\n\n\t\t\t$(\".column\").each(function(i) {\n \t\t\t\t$(this).delay(i * 1).fadeIn(200);\n\t\t\t});\n\t}", "function onReportDiagnosticSeeAllPopupHide() {\r\n seeAllClosed = true;\r\n tau.openPopup(reportDiagnosticPopup);\r\n }", "function a11yc_empty_table(){\n//console.time('a11yc_empty_table');\njQuery(function($){\n//\tconsole.log('function:'+'a11yc_empty_table');\n\tif(!a11yc_env.is_hide_passed_item) return;\n\n\t// hide disuse items\n\t$('.a11yc form').find('.a11yc_section_guideline, .a11yc_table_check').each(function(){\n\t\tvar $t = !$(this).is('table') ? $(this) : $(this).closest('.a11yc_section_criterion');\n\n\t\tif (!$(this).find('tr:not(.off)')[0]) // 見えているものがない場合\n\t\t{\n\t\t\t\t$t.hide();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(!$t.hasClass('a11yc_dn')) $t.show();\n\t\t}\n\t});\n});\n//\tconsole.timeEnd('a11yc_empty_table');\n}", "toggleHidden() {\n if (this.isHidden) this.show();\n else this.hide();\n }", "function birthday_visbility_bind(){\n\t$(\"#person_birthday_visibility\").bind('change', function(event) {\n\t\tswitch($(this).val()){\n\t\t\tcase \"Show only month & day in my profile.\":\n\t\t\t\t$('#person_dob_1i').hide();\n\t\t \tbreak;\n\t\t\tcase \"Don't show my birthday in my profile.\":\n\t\t\t\t$('#person_dob_1i').hide();\n\t\t\t\t$('#person_dob_2i').hide();\n\t\t\t\t$('#person_dob_3i').hide();\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$('#person_dob_1i').show();\n\t\t\t\t$('#person_dob_2i').show();\n\t\t\t\t$('#person_dob_3i').show();\n\t\t\t}\n\t});\n}" ]
[ "0.67143506", "0.6281024", "0.61245894", "0.61185396", "0.5967705", "0.58774936", "0.5781316", "0.5752279", "0.57493913", "0.5716294", "0.56873137", "0.56736743", "0.56594384", "0.5642195", "0.56330305", "0.5612947", "0.5612326", "0.5598936", "0.5596466", "0.55714846", "0.5560858", "0.5557157", "0.55567616", "0.5548916", "0.55321926", "0.5525657", "0.5525156", "0.5507717", "0.5507563", "0.5480394", "0.5476788", "0.5471607", "0.5470222", "0.543667", "0.5408868", "0.5393549", "0.53801465", "0.5379521", "0.53787524", "0.53726727", "0.5371595", "0.53534615", "0.53531355", "0.5352496", "0.5343261", "0.5336537", "0.53328", "0.5317657", "0.5314165", "0.5311283", "0.5311283", "0.53097486", "0.5301409", "0.53010625", "0.53009576", "0.52868354", "0.52786565", "0.52661365", "0.5265989", "0.5265276", "0.5263236", "0.52616614", "0.52581096", "0.52578306", "0.5253088", "0.52481496", "0.52334523", "0.5225453", "0.5220346", "0.5219032", "0.5216051", "0.52124506", "0.52067083", "0.5202767", "0.51961035", "0.51949096", "0.519399", "0.51885986", "0.5186333", "0.51727855", "0.5172766", "0.5171192", "0.5169019", "0.5166632", "0.51661557", "0.5162836", "0.5161314", "0.51607645", "0.515712", "0.5152867", "0.5146916", "0.51433563", "0.51423943", "0.514156", "0.51403373", "0.5136677", "0.5136115", "0.51357335", "0.51326674", "0.5131019" ]
0.6534959
1
show all certified dt
function showCertified() { $('dt.certified').removeClass('hidden'); setStripes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewAllDepts() {\n connection.query(\"SELECT d.name AS Department FROM department d ORDER BY d.name;\", function (err, res) {\n if (err) throw err;\n let tableResults = [];\n for (var i = 0; i < res.length; i++) {\n var deptObj = [res[i].Department];\n tableResults.push(deptObj);\n }\n console.clear();\n console.log(\n \" ------------------------------------ \\n ALL COMPANY DEPARTMENTS AT THIS TIME \\n ------------------------------------\"\n );\n console.table([\"Department\"], tableResults);\n actions();\n });\n}", "function viewAllDepts() {\n console.log(\"Showing all departments...\\n\");\n connection.query(\"SELECT * FROM department \", function (err, res) {\n if (err) throw err;\n console.table(res);\n connection.end();\n });\n}", "function displayAllDepartments() {\n let query = \"SELECT * FROM department \";\n connection.query(query, (err, res) => {\n if (err) throw err;\n\n console.log(\"\\n\\n ** Full Department list ** \\n\");\n console.table(res);\n });\n}", "function viewAllDepartments() {\n db.query(\"SELECT * FROM department\", function (err, res) {\n if (err) throw err;\n console.log(\n \"---------------------------------------------------------------------------------------------------------------------------------------\"\n );\n console.table(res);\n console.log(\n \"---------------------------------------------------------------------------------------------------------------------------------------\"\n );\n start();\n });\n}", "function showAllDayCols() {\n var str = '';\n var start = 0;\n var idstr = ''\n var calcDay = null;\n var cd = currDate;\n var currDay = new Date(cd.getFullYear(), cd.getMonth(), cd.getDate());\n\n for (var i = 0; i < 7; i++) {\n str += '<div class=\"allDayListDayDiv\" id=\"allDayListDiv' + i +\n '\" style=\"left:' + start + 'px; width:' +\n (cosmo.view.cal.canvas.dayUnitWidth-1) + 'px;\">&nbsp;</div>';\n start += cosmo.view.cal.canvas.dayUnitWidth;\n }\n str += '<br style=\"clear:both;\"/>';\n allDayColsNode.innerHTML = str;\n return true;\n }", "function displayAlldept() {\n // let query = \"SELECT * FROM department\";\n connection.query(\"SELECT * FROM department\", (err, res) => {\n if (err) throw err;\n\n console.log(\"\\n\\n ** Full Department list ** \\n\");\n printTable(res);\n });\n}", "_getShowedDates(allDates) {\n return allDates.slice(-this.MAX_DATES_NUM);\n }", "function showAll() {\r\n\t\r\n\tObject.keys(this.datastore).sort().forEach((key)=>\r\n\t{\r\n\t\tconsole.log(key + \" -> \" + this.datastore[key]);\r\n\t});\r\n}", "function viewAllDepts() {\n connection.query(\n 'SELECT * FROM Department', (err, res) => {\n if (err) {\n console.log(err);\n }\n console.table(res)\n startProgram();\n })\n}", "function visData(){\r\n\tvar days=new Array(\"Domenica\",\"Luned&igrave;\",\"Marted&igrave;\",\"Mercoled&igrave;\",\"Gioved&igrave;\",\"Venerd&igrave;\",\"Sabato\");\r\n\tvar months=new Array(\"Gennaio\",\"Febbraio\",\"Marzo\",\"Aprile\",\"Maggio\",\"Giugno\",\"Luglio\",\"Agosto\",\"Settembre\",\"Ottobre\",\"Novembre\",\"Dicembre\");\r\n\tvar dateObj=new Date();\r\n\tvar lmonth=months[dateObj.getMonth()];\r\n\tvar anno=dateObj.getFullYear();\r\n\tvar date=dateObj.getDate();\r\n\tvar wday=days[dateObj.getDay()];\r\n\tdocument.write(\" \" + wday + \" \" + date + \" \" + lmonth + \" \" + anno);\r\n}", "function getAllDays() {\n for (var x = 0; x < self.dates.length; x++) {\n for (var z in self.dates[x]) {\n self.allDays.push(self.dates[x][z]);\n }\n }\n }", "function viewAllDepartments(conn, start) {\n conn.query(`SELECT * FROM department ORDER BY name;`, function(err, results) {\n if (err) throw err;\n console.table(results);\n start();\n });\n }", "function data_for_datatables(){\n var obj_date_datables=[], range_title='';\n if(typeof Const.year !='undefined' && Const.year!=null && Const.year != get_current_date().year){\n range_title = config_moments('undefined', ''+Const.year+'-12-02', ''+Const.year+'-12-31').diff_days;\n\n obj_date_datables={\n config_data:{day:undefined,\n data_i:''+Const.year+'-12-02',\n data_f:''+Const.year+'-12-31',\n },\n title:range_title,\n };\n\n } else {\n range_title = moment(new Date()).format('YYYY');\n obj_date_datables={\n config_data:{day:undefined,\n data_i:String(get_current_date().year+'-01-01'),//01/01/2015\n data_f:undefined\n },\n title:range_title,\n };\n }\n\n return obj_date_datables;\n}", "function displayTable() {\r\n dayMapsDB.transaction(function (transaction) {\r\n transaction.executeSql('SELECT * FROM dayMapsDB', [], function (tx, results) {\r\n var len = results.rows.length, i;\r\n for (i = 0; i < len; i++) {\r\n console.log(results.rows.item(i).id + \" \" + results.rows.item(i).date + \" \" + results.rows.item(i).efficiency + \" \" + results.rows.item(i).totalStartTime + \" \" + results.rows.item(i).totalStopTime);\r\n }\r\n }, null);\r\n });\r\n }", "function showTable() {\n\tmyDB.transaction(function(transaction) {\n\ttransaction.executeSql('SELECT * FROM patients_local', [], function (tx, results) {\n\t\tvar len = results.rows.length, i;\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tpatients[i] = {\"id\":results.rows.item(i).id, \"name\":results.rows.item(i).name, \"date\":results.rows.item(i).date, \"image\":results.rows.item(i).image};\n\t\t}\n\t\tdisplayList(patients);\n\t}, null);\n\t});\n}", "async function viewDepartments() {\n\tconst res = await queryAsync('SELECT * FROM department');\n\tconst allDepartments = [];\n\tconsole.log(' ');\n for (let i of res) {\n\t allDepartments.push({ ID: i.id, NAME: i.name });\n }\n console.table(allDepartments);\n start();\n}", "function viewAllDepartments() {\n const query = 'SELECT * FROM department';\n connection.query(query, function (err, res) {\n if (err) {\n console.log(err)\n }\n else {\n // do stuff with the results \n console.log(res)\n console.table(res);\n options();\n }\n })\n}", "viewAllDept() {\n\t\tconst query = `SELECT *\n\t FROM department;`;\n\t\treturn this.connection.query(query);\n\t}", "function showAll(req, res) {\n // On récupère la date demandée.\n const date = req.params.date;\n\n retrieveAll(date, (jsonRes) => {\n var templateParameters = {\n flights: jsonRes,\n date: date\n };\n res.render(__dirname + '/templates/flight_list.ejs', templateParameters);\n });\n}", "function allData() {\n tbody.html(\"\");\n tableData.forEach((report) => {\n var row = tbody.append(\"tr\");\n Object.entries(report).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n numberEvents.text(objectLength(tableData));\n}", "function showSelectedDays() {\r\n var selectedDates = data.selectedDates;\r\n for (var index in selectedDates) {\r\n var day = selectedDates[index][\"day\"];\r\n var month = selectedDates[index][\"month\"];\r\n var year = selectedDates[index][\"year\"];\r\n showAsSelected(day, month, year);\r\n }\r\n }", "function showChartDataAsText() {\n\tvar d = getCurrentDataAsDict();\n\tvar names = d[0];\n\tvar tbl = d[1];\n\tvar htmlContent = \"<table id='showDataTable' class='table table-striped table-bordered table-condensed'><tr><th>Time</th><th>\" + names.join(\"</th><th>\") + \"</th></tr>\\n\";\n\tObject.keys(tbl).sort().forEach(function(key) { htmlContent += \"<tr><td>\" + moment(key).format(\"YYYY/MM/DD HH:mm:ss.SSS\") + \"</td><td>\" + tbl[key].join(\"</td><td>\") + \"</td></tr>\\n\"; });\n\t$(\"#showDataTableDiv\").empty();\n\t$(\"#showDataTableDiv\").append(htmlContent);\n\t$('#showDataModal').modal('show');\n}", "function empDt() {\n let depdtArr = empDataTable();\n depdtArr.forEach(element => {\n let dataArr = Object.values(element);\n dataTable.rows().add(dataArr);\n });\n}", "function listalltimetable(req, res) {\r\n internalSchema.find({}, { _id: 0, semester: 1, dateTimeSub: 1 }, function (err, internalsemester) {\r\n res.send(internalsemester);\r\n });\r\n}", "function viewAllDepartments() {\n connection.query(`SELECT department FROM employee_tracker_db.department;`,\n function(err, res) {\n if (err) throw err;\n console.log(\"\\n\");\n // Log all results of the SELECT statement\n console.table(res);\n //go back to inital\n initialQuestion();\n });\n}", "async listAllDataInTable(table) {\n const datas = await table.findAll({\n attributes: {\n exclude: [\n 'createdAt',\n 'password',\n 'updatedAt'\n ]\n },\n order: [\n [\n 'createdAt',\n 'DESC'\n ]\n ]\n });\n return datas;\n }", "function viewDataAll(table) {\n console.log(\"view data all...\");\n db.transaction(function(transaction) {\n transaction.executeSql('SELECT * FROM '+table, [], function (tx, results) {\n var resLen = results.rows.length;\n console.log(\"table results=\"+JSON.stringify(results));\n for (i = 0; i < resLen; i++){\n console.log(\"id=\"+results.rows.item(i).id+\"-title=\"+results.rows.item(i).title+\"-desc=\"+results.rows.item(i).desc);\n $(\"#data-output\").append(\"<p>id=\"+results.rows.item(i).id+\" - title=\"+results.rows.item(i).title+\" - desc=\"+results.rows.item(i).desc)\n }\n }, null);\n });\n }", "function display(events) {\n var list = events.map(function(event) {\n const date = event.date.replace(\"T\", \" \").replace(\":00.000Z\", \" \");\n return `<tr data-id=\"${event.id}\">\n <td>${event.name}</td>\n <td>${date}</td>\n <td>${event.needed}</td>\n <td>${event.applied}</td>\n <td>\n <button onClick=\"applyVolunteer(${\n event.id\n })\" href=\"#\" class=\"apply\">Apply</a></button>\n </td>\n </tr>`;\n });\n document.querySelector(\"#event tbody\").innerHTML = list.join(\"\");\n}", "function viewAllDept() {\n console.log('viewAllDept');\n connection.query('SELECT * FROM department', (err, res) => {\n if (err) throw err;\n console.table(res);\n userSelect()\n })\n}", "function viewAllDepartments() {\n connection.query(\n 'SELECT d_id AS id, name AS department_name FROM department ORDER BY d_id ASC;',\n function (err, results) {\n if (err) throw err;\n console.table(results);\n backMenu();\n }\n );\n}", "showDoctors(){\n var j=1;\n console.log('\\nSr.NO. Doctor Name \\t\\t|Speciality \\t\\t|Availablity\\t\\t|DOC ID\\n');\n for (let i = 0; i < this.dfile.Doctors.length; i++) {\n console.log(j+++'\\t'+this.dfile.Doctors[i].DoctorName+'\\t\\t|'+this.dfile.Doctors[i].Specialization+'\\t\\t|'+this.dfile.Doctors[i].Availability+'\\t\\t\\t|'+this.dfile.Doctors[i].DocID); \n }\n }", "function viewDepartments() {\n connection.query(\"SELECT * FROM department\", function(error, results) {\n if (error) throw error;\n console.table(results);\n start();\n })\n}", "function printConcerts (concerts) {\n $('.fc-day-number').removeClass('selected')\n $('.fc-content-skeleton .event').remove();\n concerts.band_concerts.forEach(function (concert) {\n $('[data-date=' + concert.date + ']').addClass('concert');\n $('.fc-content-skeleton [data-date=' + concert.date + ']').append('\\\n <img src=\"/assets/quaver-calendar.png\" alt=\"quaver\" class=\"event\"/>\\\n <div class=\"event\">\\\n <p class=\"event concert-time\">' + concert.time + 'h</p>\\\n <p class=\"event venue-name\">' + concert.venue_name + '</p>\\\n </div>')\n })\n fill_empty_days();\n }", "function showAll() {\n for (var key in this.dataStore) {\n console.log(key + \" → \" + this.dataStore[key]);\n }\n }", "function viewDepartments(){\n // Select all data from the departmenets table\n connection.query(`SELECT * FROM department_table`, (err, res) => {\n // If error log error\n if (err) throw err;\n // Display the data in a table format...\n console.table(res);\n // Run the task completed function\n taskComplete();\n })\n }", "function displayTable(filteredData){\n // Use d3 to get a reference to the table body\n var tbody = d3.select(\"tbody\");\n\n //remove any data from the table\n tbody.html(\" \");\n\n // Iterate throug the UFO Info to search through the date time\n filteredData.forEach((date) => {\n \n //Use d3 to append row\n var row = tbody.append(\"tr\");\n \n //Use `Object entries to log the dates\n Object.entries(date).forEach(([key,value]) => {\n var cell = row.append(\"td\");\n cell.text(value)\n \n //Print filteredData\n console.log(filteredData);\n\n \n });\n });\n}", "function depEmpDt() {\n let depEmpArr = depDataTable();\n depEmpArr.forEach(element => {\n let dataArr = Object.values(element);\n dataTable.rows().add(dataArr);\n });\n}", "function dataTable(table){\n // Reset table\n tbody.text(\"\");\n\n // Populate table\n table.forEach(function(incident) {\n // console.log(incident);\n var row = tbody.append(\"tr\");\n Object.entries(incident).forEach(function([key, value]) {\n // console.log(key, value);\n var cell = row.append(\"td\");\n cell.text(value);\n });\n});\n}", "function viewAllEmployees() {\n connection.query(\n `SELECT * from employees`,\n function (err, res) {\n if (err) throw err;\n console.log(\"Employees:\");\n console.table(res);\n\n })\n}", "function displayData(allData){ \n tbody.text(\"\")\n allData.forEach(function(ufoSighting){\n newTr = tbody.append(\"tr\")\n Object.entries(ufoSighting).forEach(function([key, value]){\n newTd = newTr.append(\"td\").text(value)\t\n })\n})}", "getLTCPrices (date) {\n return axios.get('https://min-api.cryptocompare.com/data/pricehistorical?fsym=LTC&tsyms=USD&ts=' + date);\n }", "function cityEmpDt() {\n let cityEmpArr = houseDataTable();\n cityEmpArr.forEach(element => {\n let dataArr = Object.values(element);\n dataTable.rows().add(dataArr);\n });\n}", "function consoleTableDept(title, results) {\n\tvar values = [];\n\tfor (var i = 0; i < results.length; i++) {\n\t\tvar resultObject = {\n\t\t\tID: results[i].department_id,\n\t\t\tDepartment: results[i].department_name,\n\t\t\tover_head_costs: \"$\" + results[i].over_head_costs.toFixed(2),\n\t\t};\n\t\tvalues.push(resultObject);\n\t}\n\tconsole.table(title, values);\n}", "function viewDepartments() {\n connection.query(\"SELECT * FROM department\", function(err, results) {\n if (err) throw err;\n // show results in table format\n console.table(results);\n // re-prompt the user for further actions by calling \"start\" function\n start();\n });\n}", "function listOnDutyDays(events) {\n $scope.onDutyDays = [];\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = events[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var evt = _step2.value;\n\n if (evt.title === $scope.user) {\n $scope.onDutyDays.push(evt.start.format('YYYY-MM-DD'));\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }", "function display_data(shifts) {\n init_table_html = '<table id=\"punctual-table\" class=\"table \" cellspacing=\"0\" width=\"100%\">' +\n '<thead> <tr>' +\n '<th class=\"col-1\">Day</th>' +\n '<th class=\"col-2\">Rostered Start</th>' +\n '<th class=\"col-3\">Actual Start</th>' +\n '<th class=\"col-4\">Rostered Finish</th>' +\n '<th class=\"col-5\">Actual Finish</th>' +\n '</tr> </thead> <tbody> </tbody>'\n $(\"#punctual-table-wrapper\").html(init_table_html)\n var html;\n for (var i = 0; i < shifts.length; i++) {\n\n html = \"<tr>\" +\n \"<td>\" + shifts[i].day + \"</td>\" +\n \"<td>\" + shifts[i].start + \"</td>\" +\n \"<td>\" + status_to_html(shifts[i].actualStart) + \"</td>\" +\n \"<td>\" + shifts[i].finish + \"</td>\" +\n \"<td>\" + status_to_html(shifts[i].actualFinish) + \"</td>\" + \"</tr>\"\n $(\"#punctual-table tbody\").append(html)\n }\n //Format and initialize datatable\n $('#punctual-table').DataTable({\n \"dom\": '<\"top\">rt<\"bottom\"lip><\"clear\">',\n \"fnDrawCallback\": function (oSettings) {\n $('[data-toggle=\"tooltip\"]').tooltip();\n }\n });\n}", "function viewAllDepartmentsBudgets(conn, start) {\n conn.query(`SELECT\td.name Department, \n LPAD(CONCAT('$ ', FORMAT(SUM(r.salary), 0)), 12, ' ') Salary, \n COUNT(e.id) \"Emp Count\"\n FROM\temployee e \n LEFT JOIN role r on r.id = e.role_id\n LEFT JOIN department d on d.id = r.department_id\n WHERE\te.active = true\n GROUP BY d.name\n ORDER BY Salary desc;`, function(err, results) {\n if (err) throw err;\n console.table(results);\n start();\n });\n }", "function showAllTr() {\r\n getAllTr().then(function(list) {\r\n $(\"#transactionListC\").html('');\r\n list.forEach(function(item, index) {\r\n $(\"#transactionListC\").append(\"<tr><td>\" + item.id + \"</td><td>\" + item.currentTx + \"</td><td>\" + item.referenceTx + \"</td><td>\" + item.se + \"</td><td>\" + item.re + \"</td><td>\" + item.time + \"</td></tr>\");\r\n });\r\n })\r\n}", "async function showAttendanceInOutTime(){\n arrOnSites = await getDataAttendance();\n if(!arrOnSites) {\n AlertService.showAlertError('Không có dữ liệu', '', 4000);\n arrFilteredOnSites = [];\n }\n else arrFilteredOnSites = arrOnSites.slice();\n showPagination(arrOnSites, 1);\n}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function DT (dt) {gnuplot.dashtype(dt);}", "function viewDepartments() {\n connection.query(\"SELECT * FROM department\", function (err, res){\n if (err) throw err; \n console.table(res); \n });\n // init.init()\n}", "function allDepartments() {\n connection.query(\"SELECT * FROM departments\", function (err, res) {\n if (err) throw err;\n console.table(\"Departments\", res);\n start();\n });\n}", "function viewAllDoctors(res){\n User.find({userType: \"doctor\"}, function (err, docs) {\n Availability.find({}, function(err, availabilities) {\n res.render(\"viewDoctors\", {doctors: docs, availabilities: availabilities});\n });\n });\n}", "function displayList(){\n output = \"These are the courses for which you registered and their registration dates: <br><br>\";\n store.each(function(val, key) {\n output += key + \" registered on \" + val +\"<br>\" ;\n document.getElementById('showInfo').innerHTML = output;\n });\n}", "printTradeTable() {\n \n var columns = columnify(this.data.intervalls);\n \n return console.log(columns)\n }", "async function viewAllDepartments() {\n\n let query = \"SELECT * FROM department\";\n const rows = await db.query(query);\n console.table(rows);\n}", "function departmentTable() { }", "function prettifyDates(){\n // Prettify all dates as I desire\n // - If only one could this IRL :)\n var dates = document.querySelectorAll(\".pretty-date\");\n for(var i = 0; i < dates.length; i++){\n var date = dates[i];\n if(date.dataset[\"datetime\"])\n date.innerHTML = dxr.prettyDate(date.dataset[\"datetime\"]);\n }\n}", "function _list() {\r\n\t\tvar len = _events.length,\r\n\t\t\ti, out = '';\r\n\t\tfor (i = 0; i < len; i += 1) {\r\n\t\t\tout += _events[i].name + ' ' + _events[i].time + '\\n';\r\n\t\t}\r\n\t\tconsole.log(out);\r\n\t}", "show() {\r\n console.table(this.data);\r\n }", "function showTodos() {\n db.allDocs({include_docs: true, descending: true}, function(err, doc) {\n redrawTodosUI(doc.rows);\n });\n }", "function showEvents() {\n for (var i=0;i<Events.length;i++) {\n //if no date of event was given, show a message instead of date\n if(Events[i].dateOfEvent==undefined) Events[i].dateOfEvent=\" -n/a- \";\n prettyVisualization(i);\n } console.log(\"\\n\");\n}", "function viewAll () {\n connection.query(\"SELECT * FROM employee\", (err, res) => {\n if (err) throw err;\n console.table(res);\n restartProcess();\n });\n \n}", "function getTimeEntries() {\n\t\t\t\ttime.getTime().then(function(results) {\n\t\t\t\t\tvm.timeentries = results;\n\t\t\t\t\tconsole.log(vm.timeentries);\n\t\t\t\t}, function(error) {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t});\n\t\t\t}", "function getDailyInfo() {\n var year = new Date().getFullYear();\n var month = new Date().getMonth() + 1;\n var day = new Date().getDate() - 1;\n var date = year + \"-\" + month + \"-\" + day;\n\n fetch('http://localhost:3000/complete-data/' + date)\n .then(response => response.json())\n .then(data => {\n if (data.length == 0) {\n year = new Date().getFullYear();\n month = new Date().getMonth() + 1;\n day = new Date().getDate() - 2;\n date = year + \"-\" + month + \"-\" + day;\n\n fetch('http://localhost:3000/complete-data/' + date)\n .then(response => response.json())\n .then(data => {\n var tmp = data[i].data_date.toString();\n var dateString = tmp.slice(0, -14);\n document.getElementById('data_date').innerHTML = dateString;\n document.getElementById('data_date_death').innerHTML = dateString;\n document.getElementById('total_cases').innerHTML = thousands_separators(data[i].total_cases);\n document.getElementById('new_cases').innerHTML = thousands_separators(data[i].new_cases);\n document.getElementById('total_deaths').innerHTML = thousands_separators(data[i].total_deaths);\n document.getElementById('new_deaths').innerHTML = thousands_separators(data[i].new_deaths);\n });\n }\n for (var i = 0; i < data.length; i++) {\n var tmp = data[i].data_date.toString();\n var dateString = tmp.slice(0, -14);\n document.getElementById('data_date').innerHTML = dateString;\n document.getElementById('data_date_death').innerHTML = dateString;\n document.getElementById('total_cases').innerHTML = thousands_separators(data[i].total_cases);\n document.getElementById('new_cases').innerHTML = thousands_separators(data[i].new_cases);\n document.getElementById('total_deaths').innerHTML = thousands_separators(data[i].total_deaths);\n document.getElementById('new_deaths').innerHTML = thousands_separators(data[i].new_deaths);\n }\n });\n}", "function dts () {\r\n\tvar date = new Date();\r\n\treturn date.getTime();\r\n}", "displayAllDepartments()\n {\n const sql = \"SELECT * FROM departments ORDER BY id\";\n \n this.db.promise().query(sql)\n .then( ([rows]) => {\n\n //log a line break and then a table with data\n console.log(\"\");\n console.table(rows);\n\n //rerun the main application loop\n this.runApplication();\n })\n .catch( err => {\n //catch the error, display the error message and restart the loop\n console.log(`\\nError: ${err.message}\\n`);\n this.runApplication();\n });\n }", "function getXaxisInstantReport(){\n\n var db = getDatabase();\n var rs = \"\";\n\n db.transaction(function(tx) {\n rs = tx.executeSql('SELECT cat_name FROM category');\n }\n );\n /* build the array */\n var categoryNames = [];\n for(var i =0;i < rs.rows.length;i++) {\n categoryNames.push(rs.rows.item(i).cat_name);\n }\n\n return categoryNames;\n }", "function getAll(req, res) {\n // On récupère la date demandée.\n const date = req.params.date;\n\n retrieveAll(date, (jsonRes) => {\n res.status(200).json(jsonRes);\n });\n}", "function displayAllEmployees() {\n let query = \"SELECT * FROM employee \";\n connection.query(query, (err, res) => {\n if (err) throw err;\n\n console.log(\"\\n\\n ** Full Employee list ** \\n\");\n console.table(res);\n });\n}", "function datenya(a){a(\".datex .time\").each(function(){var d=a(this).attr(\"title\");var b=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];if(d!=\"\"){var g=d.substring(0,10),h=g.substring(0,4),f=g.substring(5,7),e=g.substring(8,10),c=b[parseInt(f,10)-1]}a(this).html(c+\" \"+e+\", \"+h)})}", "function viewDepartments() {\n connection.query(\"SELECT name FROM department\", (err, results) => {\n if (err) throw err;\n console.log(\"\\n\");\n console.table(results);\n console.log(\"===============================\");\n console.log(\"\\n \\n \\n \\n \\n \\n \\n\");\n });\n // RETURN TO MAIN LIST\n runTracker();\n}", "async function getHistoricalAll(){\n\ttry{\n\t\tlet response = await fetch(`https://corona.lmao.ninja/v2/historical/all`),\n\t \t\t data \t= await response.json();\n\t \t// converting an object to an array\n\t\t\tcasesDate = Object.entries(data.cases);\n\t\t\tdeathsDate = Object.entries(data.deaths);\n\t\t\trecoveredDate = Object.entries(data.recovered);\n\n\t\t// get historical data for the chart\n\t\tfor (var i = casesDate.length-14; i < casesDate.length; i++) {\n\t\t\txLabels.push(casesDate[i][0]);\n\t\t\tyCases.push(casesDate[i][1]);\n\t\t}\n\t\tfor (var i = deathsDate.length-14; i < deathsDate.length; i++) {\n\t\t\tyDeaths.push(deathsDate[i][1]);\n\t\t}\n\t\tfor (var i = recoveredDate.length-14; i < deathsDate.length; i++) {\n\t\t\tyRecovered.push(recoveredDate[i][1]);\n\t\t}\n\t}\n\tcatch(err){\n\t\tconsole.log(err);\n\t}\n}", "function display (dataFiltered) {\n tbody.html(\"\");\n dataFiltered.forEach((report) => {\n var row = tbody.append(\"tr\");\n Object.entries(report).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n })\n })\n}", "function seeAllDepartments(){\n //query to see all departments on department table\n db.viewAllDepartments().then(([res]) => {\n console.table(res)\n loadMainPrompt();\n });\n}", "function showDataTable(data) {\n const table = document.querySelector('table tbody');\n console.log(data);\n\n if (data.length === 0) {\n table.innerHTML = \"<tr><td class='no-data' colspan='5'>No data</td></tr>\";\n return;\n }\n let tableHTML = \"\";\n data.forEach(function ({ id, name, date_added }) {\n tableHTML += \"<tr>\";\n tableHTML += `<td>${id}</td>`;\n tableHTML += `<td>${name}</td>`;\n tableHTML += `<td>${new Date(date_added).toLocaleString()}</td>`;\n tableHTML += `<td><button class=\"edit-button\" data-id=${id}>Edit</td>`;\n tableHTML += `<td><button class=\"delete-button\" data-id=${id}>Delete</td>`;\n tableHTML += \"</tr>\";\n });\n table.innerHTML = tableHTML;\n}", "function viewDepartments() {\n connection.query(\"SELECT * FROM department\", function (err, res) {\n if (err) throw err;\n console.log(\"\\n\" + res.length + \" departments found!\\n\" + \"______________________________________\\n\");\n for (var i = 0; i < res.length; i++) {\n console.log(\n \"|| \" +\n res[i].id +\n \" ||\\t\" +\n res[i].title + \"\\n\" + \"______________________________________\\n\"\n );\n }\n start();\n });\n}", "function showDayNameHeaders() {\n var str = '';\n var start = HOUR_LISTING_WIDTH + 1;\n var idstr = '';\n var calcDay = null;\n\n // Spacer to align with the timeline that displays hours below\n // for the timed event canvas\n str += '<div id=\"dayListSpacer\" class=\"dayListDayDiv\"' +\n ' style=\"left:0px; width:' +\n (HOUR_LISTING_WIDTH - 1) + 'px; height:' +\n (DAY_LIST_DIV_HEIGHT-1) +\n 'px;\">&nbsp;</div>';\n\n // Do a week's worth of day cols with day name and date\n for (var i = 0; i < 7; i++) {\n calcDay = cosmo.datetime.Date.add(viewStart, cosmo.datetime.util.dateParts.DAY, i);\n // Subtract one pixel of height for 1px border per retarded CSS spec\n str += '<div class=\"dayListDayDiv\" id=\"dayListDiv' + i +\n '\" style=\"left:' + start + 'px; width:' + (self.dayUnitWidth-1) +\n 'px; height:' + (DAY_LIST_DIV_HEIGHT-1) + 'px;';\n str += '\">';\n str += cosmo.datetime.abbrWeekday[i] + '&nbsp;' + calcDay.getDate();\n str += '</div>\\n';\n start += self.dayUnitWidth;\n }\n dayNameHeadersNode.innerHTML = str;\n return true;\n }", "function viewAllDepartments() {\n connection.query(\"SELECT * FROM department\", function (err, results) {\n if (err) throw err;\n console.log(\"----------------------------------------------------------------------\")\n console.table(results)\n userInput()\n });\n}", "async function showAttendanceLateSoon() {\n arrOnSites = await getDataAttendance();\n if(!arrOnSites) {\n AlertService.showAlertError('Không có dữ liệu', '', 4000);\n arrFilteredOnSites = [];\n }\n else arrFilteredOnSites = arrOnSites.slice();\n showPagination(arrOnSites, 3);\n}", "function displaytable(data){\n tbody.html(\"\");\n data.forEach(function(Table) {\n console.log(Table);\n var row = tbody.append(\"tr\");\n Object.entries(Table).forEach(function([key, value]) {\n console.log(key, value);\n // Append a cell to the row for each value\n // in the weather report object\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "function displayData() {\n // Get the domain data\n var domains = JSON.parse(localStorage[\"domains\"]);\n var chart_data = [];\n var table_data = [];\n // var colors = ['#5c91e6', '#a711f2', '#c353e6', '#ed39a8', '#e66ec8', '#eb3147', '#ffae00', '#0db81e', '#fff700'];\n for (var domain in domains) {\n var domain_data = JSON.parse(localStorage[domain]);\n var numSeconds = 0;\n numSeconds = domain_data.today;\n if (numSeconds > 0) {\n chart_data.push([\n domain,\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal;\",\n },\n },\n ]);\n var rnd = Math.floor(Math.random() * 8);\n switch(rnd) {\n case 0:\n table_data.push([\n {\n v: domain,\n p:{\n style: \"text-align: left; white-space: normal; background-color: #5c91e6;\"\n }\n },\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #5c91e6;\"\n }\n }\n ]);\n break;\n case 1:\n table_data.push([\n {\n v: domain,\n p:{\n style: \"text-align: left; white-space: normal; background-color: #a711f2;\"\n }\n },\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #a711f2;\"\n }\n }\n ]);\n break;\n case 2:\n table_data.push([\n {\n v: domain,\n p:{\n style: \"text-align: left; white-space: normal; background-color: #c353e6;\"\n }\n },\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #c353e6;\"\n }\n }\n ]);\n break;\n case 3:\n table_data.push([\n {\n v: domain,\n p:{\n style: \"text-align: left; white-space: normal; background-color: #ed39a8;\"\n }\n },\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #ed39a8;\"\n }\n }\n ]);\n break;\n case 4:\n table_data.push([\n {\n v: domain,\n p:{\n style: \"text-align: left; white-space: normal; background-color: #e66ec8;\"\n }\n },\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #e66ec8;\"\n }\n }\n ]);\n break;\n case 5:\n table_data.push([\n {\n v: domain,\n p:{\n style: \"text-align: left; white-space: normal; background-color: #eb3147;\"\n }\n },\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #eb3147;\"\n }\n }\n ]);\n break;\n case 6:\n table_data.push([\n {\n v: domain,\n p:{\n style: \"text-align: left; white-space: normal; background-color: #ffae00;\"\n }\n },\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #ffae00;\"\n }\n }\n ]);\n break;\n case 7:\n table_data.push([\n {\n v: domain,\n p:{\n style: \"text-align: left; white-space: normal; background-color: #0db81e;\"\n }\n },\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #0db81e;\"\n }\n }\n ]);\n break;\n default:\n table_data.push([\n {\n v: domain,\n p:{\n style: \"text-align: left; white-space: normal; background-color: #5c91e6;\"\n }\n },\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #5c91e6;\"\n }\n }\n ]);\n }\n // table_data.push([\n // {\n // v: domain,\n // p:{\n // style: \"text-align: left; white-space: normal; background-color: cyan;\"\n // }\n // },\n // {\n // v: numSeconds,\n // f: timeString(numSeconds),\n // p: {\n // style: \"text-align: left; white-space: normal; background-color: cyan;\"\n // }\n // }\n // ]);\n }\n }\n\n // Display help message if no data\n if (chart_data.length === 0) {\n document.getElementById(\"nodata\").style.display = \"inline\";\n } else {\n document.getElementById(\"nodata\").style.display = \"none\";\n }\n\n // Sort data by descending duration\n chart_data.sort(function (a, b) {\n return b[1].v - a[1].v;\n });\n table_data.sort(function (a, b) {\n return b[1].v - a[1].v;\n });\n\n // Limit chart data\n var limited_data_chart = [];\n var limited_data_table = [];\n var chart_limit;\n // For screenshot: if in iframe, image should always have 9 items\n if (top == self) {\n chart_limit = parseInt(localStorage[\"chart_limit\"], 10);\n } else {\n chart_limit = 9;\n }\n for (var i = 0; i < chart_limit && i < chart_data.length; i++) {\n limited_data_chart.push(chart_data[i]);\n limited_data_table.push(table_data[i]);\n }\n var sum = 0;\n for (var i = chart_limit; i < chart_data.length; i++) {\n sum += chart_data[i][1].v;\n }\n\n if (sum > 0) {\n limited_data_chart.push([\n \"Others\",\n {\n v: sum,\n f: timeString(sum),\n p: {\n style: \"text-align: left; white-space: normal;\",\n },\n },\n ]);\n var rnd = Math.floor(Math.random() * 8);\n switch(rnd) {\n case 0:\n limited_data_table.push([\n {\n v: \"Others\",\n p:{\n style: \"text-align: left; white-space: normal; background-color: #5c91e6;\"\n }\n },\n {\n v: sum,\n f: timeString(sum),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #5c91e6;\"\n }\n }\n ]);\n break;\n case 1:\n limited_data_table.push([\n {\n v: \"Others\",\n p:{\n style: \"text-align: left; white-space: normal; background-color: #a711f2;\"\n }\n },\n {\n v: sum,\n f: timeString(sum),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #a711f2;\"\n }\n }\n ]);\n break;\n case 2:\n limited_data_table.push([\n {\n v: \"Others\",\n p:{\n style: \"text-align: left; white-space: normal; background-color: #c353e6;\"\n }\n },\n {\n v: sum,\n f: timeString(sum),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #c353e6;\"\n }\n }\n ]);\n break;\n case 3:\n limited_data_table.push([\n {\n v: \"Others\",\n p:{\n style: \"text-align: left; white-space: normal; background-color: #ed39a8;\"\n }\n },\n {\n v: sum,\n f: timeString(sum),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #ed39a8;\"\n }\n }\n ]);\n break;\n case 4:\n limited_data_table.push([\n {\n v: \"Others\",\n p:{\n style: \"text-align: left; white-space: normal; background-color: #e66ec8;\"\n }\n },\n {\n v: sum,\n f: timeString(sum),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #e66ec8;\"\n }\n }\n ]);\n break;\n case 5:\n limited_data_table.push([\n {\n v: \"Others\",\n p:{\n style: \"text-align: left; white-space: normal; background-color: #eb3147;\"\n }\n },\n {\n v: sum,\n f: timeString(sum),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #eb3147;\"\n }\n }\n ]);\n break;\n case 6:\n limited_data_table.push([\n {\n v: \"Others\",\n p:{\n style: \"text-align: left; white-space: normal; background-color: #ffae00;\"\n }\n },\n {\n v: sum,\n f: timeString(sum),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #ffae00;\"\n }\n }\n ]);\n break;\n case 7:\n limited_data_table.push([\n {\n v: \"Others\",\n p:{\n style: \"text-align: left; white-space: normal; background-color: #0db81e;\"\n }\n },\n {\n v: sum,\n f: timeString(sum),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #0db81e;\"\n }\n }\n ]);\n break;\n default:\n limited_data_table.push([\n {\n v: \"Others\",\n p:{\n style: \"text-align: left; white-space: normal; background-color: #5c91e6;\"\n }\n },\n {\n v: sum,\n f: timeString(sum),\n p: {\n style: \"text-align: left; white-space: normal; background-color: #5c91e6;\"\n }\n }\n ]);\n }\n // limited_data_table.push([\n // \"Other\",\n // {\n // v: sum,\n // f: timeString(sum),\n // p: {\n // style: \"text-align: left; white-space: normal; background-color: cyan;\",\n // },\n // },\n // ]);\n }\n\n drawChart(limited_data_chart);\n\n // Add total time\n var total = JSON.parse(localStorage[\"total\"]);\n var numSeconds = 0;\n numSeconds = total.today;\n limited_data_table.push([\n {\n v: \"Total\",\n p: {\n style: \"text-align: left; font-weight: bold; background-color: cyan;\",\n },\n },\n {\n v: numSeconds,\n f: timeString(numSeconds),\n p: {\n style: \"text-align: left; white-space: normal; font-weight: bold; background-color: cyan;\",\n },\n },\n ]);\n\n drawTable(limited_data_table);\n}", "async showAll() {\n await this.model.read((data) => {\n this.view.render('showEntries', data);\n });\n }", "function loadAndDisplayPatients() {\n $(\"#hideBoxPatients\").delay(1000).fadeOut('fast', function() {\n var oTable = $('#patientTable').dataTable({\n // Options for proper display, sorting with datatables\n \"aoColumnDefs\": [\n { \"aTargets\": [0], \"sType\": \"html\" },\n { \"aTargets\": [4], \"sType\": \"date-uk\" }\n ],\n // FIXME - \"Tous\" not localized\n \"aLengthMenu\": [[10, 100 , -1], [10, 100, \"Tous\"]],\n // Empty sorting means we let sql output handle the sorting\n aaSorting: []\n });\n $(\"#patientOutput\").removeClass('invisible');\n });\n }", "static renderEntries(){\n entriesList().innerHTML = \"\"\n\n this.all = this.all.sort((a,b) => b.date.getTime() - a.date.getTime())\n\n this.all.forEach(entry => {\n entry.render()\n })\n }", "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredDateTime.length; i++) {\n // Get get the current date_time object and its fields\n var date_time = filteredDateTime[i];\n var fields = Object.keys(date_time);\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 date_time object, create a new cell at set its inner text to be the current value at the current date_time's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = date_time[field];\n }\n }\n}", "function viewAll(){\n // Select important data from all three tables and join them into one view\n connection.query(\n `SELECT \n employee_table.employee_firstname, \n employee_table.employee_lastname, \n role_table.employee_role_title, \n role_table.employee_salary,\n department_table.department_name\n FROM ((employee_table \n INNER JOIN role_table ON role_table.id=employee_table.role_id)\n INNER JOIN department_table ON role_table.department_id=department_table.id);`\n , \n (err, res) => {\n // If error log error\n if (err) throw err;\n // Display the data in a table format...\n console.table(res);\n // Run the task completed function\n taskComplete();\n })\n }", "function print(clear=false) {\r\n if (clear != false){\r\n $(\"#appointment_list > tbody\").html(\"\");\r\n return true;\r\n };\r\n let data = JSON.parse((localStorage.getItem(\"tbAppointment\")));\r\n if (data[0] !== null) {\r\n for (let i = 0; i < data.length; i++) {\r\n const element = data[i];\r\n $(\"#appointment_list > tbody\").append(\r\n `\r\n <tr>\r\n <td class=\"text-center align-middle\">${element.date}</td>\r\n <td class=\"text-center align-middle\">${element.time}</td>\r\n <td class=\"text-center align-middle\">${element.name}</td>\r\n </tr>\r\n `\r\n );\r\n }\r\n }\r\n}", "function displayDoctors() {\n\n // Reading Doctors file.\n var d = readFromJson('doc');\n\n // For loop to run till all the doctor's are printed.\n for (var i = 0; i < d.doctors.length; i++) {\n\n // Printing doctor's id, name & speciality.\n console.log(d.doctors[i].id + \". \" + d.doctors[i].name + \" (\" + d.doctors[i].special + \")\");\n }\n}", "function viewDepartments() {\n \n let query =\n \"SELECT department.id, department.dept_name FROM department\";\n return connection.query(query, function (err, res) {\n if (err) throw err;\n console.table(res);\n start();\n });\n}", "function displayAll() {\n connection.query(\"SELECT id, product_name, price FROM products\", function(err, res){\n if (err) throw err;\n console.log(\"\");\n console.log(' WELCOME TO BAMAZON ');\n var table = new Table({\n head: ['Id', 'Product Description', 'Price'],\n colWidths: [5, 50, 7],\n colAligns: ['center', 'left', 'right'],\n style: {\n head: ['cyan'],\n compact: true\n }\n });\n for (var i = 0; i < res.length; i++) {\n table.push([res[i].id, res[i].product_name, res[i].price]);\n }\n console.log(table.toString());\n // productId();\n }); //end connection to products\n}", "function displayData(tableData){\r\n tableData.forEach(function(record){\r\n // console.log(record);\r\n var row = tbody.append(\"tr\");\r\n \r\n Object.entries(record).forEach(function([key, value]){\r\n var cell = row.append(\"td\");\r\n cell.text(value);\r\n });\r\n })}", "function viewDeps() {\n connection.query(\"SELECT * FROM department\", (err, results) => {\n if (err) throw err\n console.table(results)\n action()\n })\n}", "function getLegendDataInstantReport(){\n\n instantReportTableListModel.clear();\n\n var db = getDatabase();\n db.transaction(function(tx) {\n var rs = tx.executeSql('select cat_name, current_amount from category c left join category_report_current r where r.id_category = c.id');\n for(var i =0;i < rs.rows.length;i++){\n instantReportTableListModel.append(rs.rows.item(i));\n }\n }\n );\n }" ]
[ "0.608084", "0.59012055", "0.5722991", "0.5713949", "0.56503654", "0.5640247", "0.5575808", "0.5571545", "0.55162346", "0.5503084", "0.5481278", "0.54632676", "0.54398346", "0.54068756", "0.5396296", "0.5376146", "0.5364056", "0.5333311", "0.5326717", "0.5278247", "0.5264913", "0.52513784", "0.52376795", "0.5236526", "0.5234405", "0.5218932", "0.5192519", "0.5188361", "0.5184463", "0.5175815", "0.51668733", "0.5149521", "0.5148321", "0.5142095", "0.513958", "0.5133822", "0.5120918", "0.5108641", "0.50990117", "0.5094556", "0.50832385", "0.50781745", "0.50695425", "0.50695264", "0.50606155", "0.50580883", "0.5057067", "0.5048866", "0.5026208", "0.5019645", "0.5019645", "0.5019645", "0.5019645", "0.5019645", "0.5019645", "0.5019645", "0.501933", "0.50189275", "0.5013196", "0.49987948", "0.49895993", "0.49880847", "0.49804667", "0.49803472", "0.49758598", "0.49676502", "0.49669033", "0.49650875", "0.49574792", "0.49487558", "0.4947783", "0.4939523", "0.4938395", "0.49382573", "0.4924658", "0.49206913", "0.491842", "0.49120894", "0.4901342", "0.4900297", "0.49002877", "0.4895147", "0.48919162", "0.4888202", "0.48871383", "0.48820385", "0.4880914", "0.4874866", "0.48665756", "0.4863837", "0.48580554", "0.48556015", "0.48554707", "0.48470667", "0.48436198", "0.48398244", "0.48364356", "0.48358026", "0.48347193", "0.4826911" ]
0.5436921
13
show hide certified regarding the setting
function renderCertified() { if (settings.get('certifiedVisible')) { showCertified(); } else { hideCertified(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideDevOpts(hide = true) {\n if (hide) {\n $('#showcaymans')[0].style.display = 'none';\n $('#loggingEnabled')[0].style.display = 'none';\n $('#viewcache')[0].style.display = 'none';\n opt_showcaymans = false;\n GM_setValue(\"opt_showcaymans\", opt_showcaymans);\n } else {\n $('#showcaymans')[0].style.display = 'block';\n $('#loggingEnabled')[0].style.display = 'block';\n $('#viewcache')[0].style.display = 'block';\n }\n }", "set DontShow(value) {}", "function displayGmailSettings() {\n show('gmail-settings');\n hide('gmail-content');\n}", "function showMyprop()\n{\n\tif (MyhideStatus == \"hidden\")\n\t{\n\t\tdocument.getElementById('Myprop').style.display = \"block\";\n\t\tdocument.propsImg.src = '../graphics/downnode_big.gif';\n\t\tdocument.propsImg.alt = 'Hide Title, Keywords and Description';\n\t\tMyhideStatus = \"show\"\n\t}\n\telse\n\t{\n\t\tdocument.getElementById('Myprop').style.display = \"none\";\n\t\tdocument.propsImg.src = '../graphics/upnode_big.gif';\n\t\tdocument.propsImg.alt = 'Show Title, Keywords and Description';\n\t\tMyhideStatus = \"hidden\"\n\t}\n}", "function showHideSecurityCounterpartyDetailBlockConf(type){\n\tswitch (type)\n\t{\n\tcase \"H\":\n\t $(\"#uSecSide2_2\").hide();\n\t\t$(\"#uSecSide2_3\").hide();\n\t\t$(\"#uSecSide2_4\").hide();\n\t\t$(\"#uSecSide2_51\").hide();\n\t\t$(\"#uSecSide2_52\").hide();\n\t\t$(\"#uSecSide2_6\").hide();\n\t\t$(\"#uSecSide2_7\").hide();\n\t\t$(\"#uSecSide2_7\").hide();\n\t\t$(\"#cpdetails\").hide();\n\t\tbreak;\n\tcase \"S\":\n\t $(\"#uSecSide2_2\").show();\n\t\t$(\"#uSecSide2_3\").show();\n\t\t$(\"#uSecSide2_4\").show();\n\t\t$(\"#uSecSide2_51\").show();\n\t\t$(\"#uSecSide2_52\").show();\n\t\t$(\"#uSecSide2_6\").show();\n\t\t$(\"#uSecSide2_7\").show();\n\t\t$(\"#cpdetails\").show();\n\t\tbreak;\n\t}\n}", "static toggleSettings() {\n document.getElementById('settingsContainer').hidden = !document.getElementById('settingsContainer').hidden;\n }", "function showSettings(checked, id) {\r\n\t$('#' + id + '-settings').css('display', (checked ? 'block' : 'none'));\r\n\t$('#' + id + '-color-key').css('display', (checked ? 'block' : 'none')); //ADDED CODE BY ISAAC\r\n}", "function hide_educational()\n{\n change_educational('none', 'block')\n}", "get DontShow() {}", "function showSettings() {\n $(this).next(s.taskSettingsOverlay).hide().removeClass('hide').slideDown(600);\n }", "function toggleSettings() {\n self.showingSettings = !self.showingSettings;\n }", "function toggleSettings() {\n\tlet settings = document.getElementById('settings-popup');\n\tsettings.style.visibility = settings.style.visibility == 'hidden' ? 'visible' : 'hidden';\n}", "function settings()\r\n\t\t{\r\n\t\t\tdocument.getElementById('menu').style.display = \"none\";\r\n\t\t\tdocument.getElementById('settings').style.display = \"initial\";\r\n\t\t}", "function showSettings() {\n $(this).next(s.projectSettingsOverlay).hide().removeClass('hide').slideDown(600);\n }", "function showSettings() {\n $(this).next(s.projectSettingsOverlay).hide().removeClass('hide').slideDown(600);\n }", "function updateSlideSettingsDisplay() {\n if ( $('#customize-control-slider_auto_rotate').find('input:checked').val() == 'no' ) {\n $('#customize-control-slider_time').addClass('hide');\n console.log('asdfsfd');\n } else {\n $('#customize-control-slider_time').removeClass('hide');\n }\n }", "function toggleShowFilterSettings() {\r\n var settingsList = byID(\"betterSwecFilterSettingsList\");\r\n var betterSwecFilterSettingsExpandLink = byID(\"betterSwecFilterSettingsExpandLink\");\r\n if (!!settingsList) { \r\n if (settingsList.style.display === \"block\") {\r\n settingsList.style.display = \"none\";\r\n betterSwecFilterSettingsExpandLink.innerHTML = \"+ Filterinställningar\";\r\n }\r\n else {\r\n settingsList.style.display = \"block\";\r\n betterSwecFilterSettingsExpandLink.innerHTML = \"– Filterinställningar\";\r\n }\r\n }\r\n}", "function showCertified() {\n $('dt.certified').removeClass('hidden');\n setStripes();\n }", "function showOptions() {\n document.getElementById(\"controls\").hidden = !document.getElementById(\"controls\").hidden;\n}", "function hideForSubscribed() {\n js_cookie__WEBPACK_IMPORTED_MODULE_3___default.a.set('NL_POPUP_HIDE', 1, {\n expires: 7\n });\n}", "showHideNewPassword() {\n this.showHideNew = this.showHideNew === false;\n }", "function showHidePreferencesCall(objectId) {\n showHidePreferences(objectId, showPref,hidePref);\n }", "function option_show_hide(){\n var optionShow= document.getElementById('option-3dot');\n if(optionShow.style.display == \"none\"){\n optionShow.style.display = \"block\";\n } else{\n optionShow.style.display = \"none\";\n }\n}", "static show(v) {\n // Set style to original value\n UI.find(v).removeAttribute(\"hidden\");\n }", "function hide() {\n toogle = 'hide'\n\n }", "function h_showSettingsOnly()\n{\n\t// show settings div\n\t$('#div_Settings').hide(); \n\t$('#div_Settings').fadeIn(1000); // 1 sec\n\t\n\t// and hide most other divs\n\t$('#div_Gameresult').hide();\n\t$('#div_Info').hide();\n\t$('#div_Highscore').hide();\n\t$('#div_ActionButtons').hide();\n\t$('#div_StatusTable').hide();\n\t$('#div_Market').hide();\n\t$('#div_GameProgress').hide();\n}", "function show()\n{\n // Restart any timers that were stopped on hide\n\t\n\tvar url = widget.preferenceForKey(instancePreferenceKey('url'));\n var username = widget.preferenceForKey(instancePreferenceKey('username'));\n\n\tvar u = splitURL(url);\n\tvar password;\n\tif (u) {\n\t\tpassword = KeychainPlugIn.getPassword(username, u.serverName, u.serverPath);\n\t}\n}", "function ac_showConfigPanel() {\n\tac_switchTool(\"cfg\");\n}", "function showSettings() {\n settingsContainer.classList.remove('hidden');\n}", "function showHideHoleParameters() {\n\tvar x = document.getElementById(\"holeParameters\");\n\tif (x.style.display === \"none\") {\n\t x.style.display = \"block\";\n\t} else {\n\t x.style.display = \"none\";\n\t}\n }", "static set visible(value) {}", "function mdm_hide_suspend() { document.getElementById(\"suspend\").style.display = 'none'; }", "function showHideCashCounterpartyDetailBlockConf(type){\n\tswitch (type)\n\t{\n\tcase \"H\":\n\t //uCash_cp samirj\n\t $(\"#uCashSide2_2\").hide();\n\t\t$(\"#uCashSide2_3\").hide();\n\t\t$(\"#uCashSide2_4\").hide();\n\t\t$(\"#uCashSide2_51\").hide();\n\t\t$(\"#uCashSide2_52\").hide();\n\t\t$(\"#uCashSide2_6\").hide();\n\t\t$(\"#uCashSide2_7\").hide();\n\t\t$(\"#cashCpdetails\").hide();\n\t\tbreak;\n\tcase \"S\":\n\t $(\"#uCashSide2_2\").show();\n\t\t$(\"#uCashSide2_3\").show();\n\t\t$(\"#uCashSide2_4\").show();\n\t\t$(\"#uCashSide2_51\").show();\n\t\t$(\"#uCashSide2_52\").show();\n\t\t$(\"#uCashSide2_6\").show();\n\t\t$(\"#uCashSide2_7\").show();\n\t\t$(\"#cashCpdetails\").show();\n\t\tbreak;\n\t}\n}", "function hideCertified() {\n $('dt.certified').forEach(function(element) {\n element = $(element);\n element.addClass('hidden');\n // hide description if opened\n var model = element._model;\n if (model.visible) {\n model.visible = false;\n // XXX this will need to be changed if any animation will be\n // implemented to hide\n model.hide();\n }\n });\n setStripes();\n }", "function denevanToggle() {\r\n var x = document.getElementById('denevanInfo');\r\n if (x.style.display === 'none') {\r\n x.style.display = 'block';\r\n } else {\r\n x.style.display = 'none';\r\n }\r\n\r\n}", "function enable() {\n\tlet settings = Convenience.getSettings();\n\tlet boolHideIcon = settings.get_boolean(Preferences.HIDE_ICON);\n\tlet boolHideLabel = settings.get_boolean(Preferences.HIDE_LABEL);\n\tlet boolHideArrow = settings.get_boolean(Preferences.HIDE_ARROW);\n\t\n\thideIcon(boolHideIcon);\n\thideLabel(boolHideLabel);\n\thideArrow(boolHideArrow);\n}", "function showHideSettings(caller) {\r\n\r\n\tif (caller == \"firstLine\") {\r\n\t\r\n\t\tif (radioSettingsVisible) {\r\n\t\t\tdocument.getElementById('firstLineSettings').style.display = \"none\";\r\n\t\t\tradioSettingsVisible = false;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\tdocument.getElementById('firstLineSettings').style.display = \"block\";\r\n\t\t\tradioSettingsVisible = true;\r\n\t\t}\r\n\t\t\r\n\t\tGM_setValue('firstLineVisible', radioSettingsVisible);\t\t\r\n\t}\r\n\t\r\n\telse {\r\n\t\r\n\t\tif (checkboxSettingsVisible) {\r\n\t\t\tdocument.getElementById('secondLineSettings').style.display = \"none\";\r\n\t\t\tcheckboxSettingsVisible = false;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\tdocument.getElementById('secondLineSettings').style.display = \"block\";\r\n\t\t\tcheckboxSettingsVisible = true;\r\n\t\t}\r\n\t\t\r\n\t\tGM_setValue('secondLineVisible', checkboxSettingsVisible);\r\n\t}\r\n}", "show() {\n this.updateObject();\n if (this.needsElemUpdate) this.setKVPairElems();\n this.elem.classList.remove(\"hiding\");\n this.elem.classList.remove(\"noDisplay\");\n this.isHidden = false;\n }", "function signDisplayNoneBadFunctionChangeThis() {\n store.dispatch({\n type: \"SHOW_SIGN\",\n payload: {\n display: \"none\"\n }\n });\n }", "function setup_showInfo() {\n\tdocument.getElementById(\"basic\").style.display = \"none\";\n\tdocument.getElementById(\"create\").style.display = \"none\";\n\tdocument.getElementById(\"source\").style.display = \"none\";\n\tdocument.getElementById(\"info\").style.display = \"block\";\n}", "function mdm_hide_xdmcp() { document.getElementById(\"xdmcp\").style.display = 'none'; }", "function melissaToggle() {\r\n var x = document.getElementById('melissaInfo');\r\n if (x.style.display === 'none') {\r\n x.style.display = 'block';\r\n } else {\r\n x.style.display = 'none';\r\n }\r\n\r\n}", "function tcm_hideShow(v) {\r\n var $source=jQuery(v);\r\n if($source.attr('tcm-hideIfTrue') && $source.attr('tcm-hideShow')) {\r\n var $destination=jQuery('[name='+$source.attr('tcm-hideShow')+']');\r\n if($destination.length==0) {\r\n $destination=jQuery('#'+$source.attr('tcm-hideShow'));\r\n }\r\n if($destination.length>0) {\r\n if($source.is(':radio')) {\r\n //mmmh\r\n }\r\n var isChecked=$source.is(\":checked\");\r\n var hideIfTrue=($source.attr('tcm-hideIfTrue').toLowerCase()=='true');\r\n\r\n if(isChecked) {\r\n if(hideIfTrue) {\r\n $destination.hide();\r\n } else {\r\n $destination.show();\r\n }\r\n } else {\r\n if(hideIfTrue) {\r\n $destination.show();\r\n } else {\r\n $destination.hide();\r\n }\r\n }\r\n }\r\n }\r\n }", "function toggleDevOptions() {\n returnURL.val('auto#');\n lang.val('default');\n lang.parent().parent().toggle();\n referer.parent().parent().toggle();\n returnURL.parent().parent().toggle();\n oauthState.parent().parent().hide();\n}", "function showHidePseudocode() {\n\n hdxAV.traceActions = document.getElementById(\"pseudoCheckbox\").checked;\n document.getElementById(\"pseudoText\").style.display =\n (hdxAV.traceActions ? \"\" : \"none\");\n document.getElementById(\"pscode\").style.display =\n (hdxAV.traceActions ? \"\" : \"none\");\n\n document.getElementById(\"pseudo\").parentNode.style.display =\n (hdxAV.traceActions ? \"\" : \"none\");\n document.getElementById(\"pscode\").style.display =\n (hdxAV.traceActions ? \"\" : \"none\");\n}", "function showOptions(){\n\n\tif(isCorrect == true){\n\t\t//show the two options\n\t\t//A button to delete the account\n\t\t//The two boxes to introduce the new password\n\n\t\tdocument.getElementById(\"old_password\").style.display = 'none';\n\t\tdocument.getElementById(\"options\").style.display = 'initial';\n\n\t}\n\n}", "function toggleConfShowButtons(){\n\tshowButtons = toggleConfBool('botones', showButtons);\n\tget('wcr_botones').style.display = showButtons ? '' : 'none';\n}", "set hideFlags(value) {}", "set hideFlags(value) {}", "set hideFlags(value) {}", "set hideFlags(value) {}", "set hideFlags(value) {}", "set hideFlags(value) {}", "function showMeTheMoney() {\n const x = document.getElementById('showMeTheMoney');\n if (x.style.display === 'none') {\n x.style.display = '';\n } else {\n x.style.display = 'none';\n }\n }", "function show(){\r\n // change display style from none to block\r\n details.style.display='block';\r\n}", "function hideShowInfoDetails() {\n linkId = this.valueOf();\n highlightSelectedMeasure(null);\n hideShowRequest({\n requestingMethod: \"LearningCurve.hideShowInfoDetails\",\n datasetId: dataset,\n linkId: linkId,\n hideShow: $(linkId).up().visible() ? \"hide\" : \"show\"\n });\n}", "function initVisibility() {\n\tvar storage = globalStorage[window.location.hostname];\n \n\tvar page = window.pageName.replace(/\\W/g,'_');\n\tvar show = storage.getItem('infoboxshow-' + page);\n \n\tif( show == 'false' ) {\n\t\tinfoboxToggle();\n\t}\n \n\tvar hidables = getElementsByClass('hidable');\n \n\tfor(var i = 0; i < hidables.length; i++) {\n\t\tshow = storage.getItem('hidableshow-' + i + '_' + page);\n \n\t\tif( show == 'false' ) {\n\t\t\tvar content = getElementsByClass('hidable-content', hidables[i]);\n\t\t\tvar button = getElementsByClass('hidable-button', hidables[i]);\n \n\t\t\tif( content != null && content.length > 0 &&\n\t\t\t\tbutton != null && button.length > 0 && content[0].style.display != 'none' )\n\t\t\t{\n\t\t\t\tbutton[0].onclick('bypass');\n\t\t\t}\n\t\t} else if( show == 'true' ) {\n\t\t\tvar content = getElementsByClass('hidable-content', hidables[i]);\n\t\t\tvar button = getElementsByClass('hidable-button', hidables[i]);\n \n\t\t\tif( content != null && content.length > 0 &&\n\t\t\t\tbutton != null && button.length > 0 && content[0].style.display == 'none' )\n\t\t\t{\n\t\t\t\tbutton[0].onclick('bypass');\n\t\t\t}\n\t\t}\n\t}\n}", "function displayAlternativeSettings(){\n displaySettings();\n alternatives.showAlternative(alternativeList[1]);\n}", "get isHidden() {\n return this._label === TAU;\n }", "function openHideInfoCli(op)\n{\n\tvar cliSansCpt = document.getElementById(\"cliSansCpt\");\n\tvar clicpt = document.getElementById(\"clicpt\");\n\t\t\n\tif(op=='0')\n\t{\n\t\tcliSansCpt.style.display=\"none\";\n\t\tclicpt.style.display=\"\";\n\t}else if(op=='1')\n\t{\n\t\tcliSansCpt.style.display=\"\";\n\t\tclicpt.style.display=\"none\";\n\t}\n\t\n}", "function MostraNascondi(x)\n{\n if (x=='N') document.getElementById('setup').style.display='none';\n else document.getElementById('setup').style.display='block';\n}", "function hide_product_supplier_settings()\n{\n\t//Empty the html \n\t$(\"#sup_list_view_global\").html(\"\");\n\t//Hide the modal box \n\t$('.overlay').hide(); \n\t$('#setng_supplier_global').hide();\n\t//Nothing else to be done \n\t//update back array - TBD\n}", "function showHidden(id) {\r\n $(id).css(\"color\", \"#ff0000\");\r\n $(id).text(\"Hidden or unavailable\");\r\n }", "function hide(){\r\n // change display style from block to none\r\n details.style.display='none';\r\n}", "function initVisibility() {\n\tvar page = window.pageName.replace(/\\W/g,'_');\n\tvar show = localStorage.getItem('infoboxshow-' + page);\n\n\tif( show == 'false' ) {\n\t\tinfoboxToggle();\n\t}\n\n\tvar hidables = getElementsByClass('hidable');\n\n\tfor(var i = 0; i < hidables.length; i++) {\n\t\tshow = localStorage.getItem('hidableshow-' + i + '_' + page);\n\n\t\tif( show == 'false' ) {\n\t\t\tvar content = getElementsByClass('hidable-content', hidables[i]);\n\t\t\tvar button = getElementsByClass('hidable-button', hidables[i]);\n\n\t\t\tif( content != null && content.length > 0 &&\n\t\t\t\tbutton != null && button.length > 0 && content[0].style.display != 'none' )\n\t\t\t{\n\t\t\t\tbutton[0].onclick('bypass');\n\t\t\t}\n\t\t} else if( show == 'true' ) {\n\t\t\tvar content = getElementsByClass('hidable-content', hidables[i]);\n\t\t\tvar button = getElementsByClass('hidable-button', hidables[i]);\n\n\t\t\tif( content != null && content.length > 0 &&\n\t\t\t\tbutton != null && button.length > 0 && content[0].style.display == 'none' )\n\t\t\t{\n\t\t\t\tbutton[0].onclick('bypass');\n\t\t\t}\n\t\t}\n\t}\n}", "function hideAwareness() {\n var projCont = document.getElementById(\"project-status-container\");\n projCont.style.display = \"none\";\n var chatCont = document.getElementById(\"chat-box-container\");\n chatCont.style.display = \"none\";\n}", "function hideAwareness() {\n var projCont = document.getElementById(\"project-status-container\");\n projCont.style.display = \"none\";\n var chatCont = document.getElementById(\"chat-box-container\");\n chatCont.style.display = \"none\";\n}", "_showHidePlaceholder() {\n\t\tshowHide(this._exported.placeholder, !this._value);\n\t}", "static hide(v) {\n // Set style to none\n UI.find(v).setAttribute(\"hidden\", \"true\");\n }", "function showProt(label) {\n\t\tvar node = cy.$(\"node[role='protein_main'][label='\"+label+\"']\");\n\t\tvar display = node.style(\"display\");\n\t\tif (display==\"none\"){\n\t\t\tnode.style(\"display\", \"element\");\n\t\t\t// cy.center(node);\n\t\t} else {\n\t\t\tnode.style(\"display\", \"none\");\n\t\t}\n\t}", "function showPrivacyUrl() {\n\tremoveMessageFromDivId();\n\tremoveSuccessOrFailureStrip();\n\tbookmarks.sethash('#moreinfo', showFooterPopup, footerUrlName[\"FooterPrivacyUrl\"]);\n\treturn false;\n}", "function pratiibhToggle() {\r\n var x = document.getElementById('pratiibhInfo');\r\n if (x.style.display === 'none') {\r\n x.style.display = 'block';\r\n } else {\r\n x.style.display = 'none';\r\n }\r\n\r\n}", "function showNotesOptions(modelname) {\n\tvar worknotesoptions = $('front-notes-options')\n\tworknotesoptions.toggle();\n\tif (!worknotesoptions.visible()) {\n\t\t$(modelname + '_notes').clear();\n\t\t$('worknoteswarning').hide();\n\t}\n\telse {\n\t\t$('worknoteswarning').show();\n\t}\n}", "canShowDetailedInfo() {\n return false;\n }", "function hide_show_checkbox() {\n // console.log(f)\n // const g = f.target.value\n // console.log(Number(g))\n if(document.getElementById('RH_IN:Show_annotations').checked) {\n document.getElementById(\"cont2\").style.display=\"initial\";\n }\n else {\n document.getElementById(\"cont2\").style.display=\"none\";\n } \n}", "function openSetting(){\r\n document.getElementById(\"card-container\").style.display = 'none';\r\n document.getElementById(\"header-container\").style.display = 'none';\r\n document.getElementById(\"settings\").style.display = 'none';\r\n document.getElementById(\"settingsCard\").style.display = 'block';\r\n}", "function showHide()\n\t{\n\t\tvar visible = document.getElementById(\"alerts\");\n\t\tif(visible.style.display === \"none\")\n\t\t{\n\t\t\tvisible.style.display = \"block\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvisible.style.display = \"none\";\n\t\t}\n\n\t}", "function initVisibility() {\n\tvar storage = globalStorage[window.location.hostname];\n\n\tvar page = window.pageName.replace(/\\W/g,'_');\n\tvar show = storage.getItem( 'infoboxshow-' + page );\n\n\tif( show == 'false' ) {\n\t\tinfoboxToggle();\n\t}\n\n\tvar hidables = getElementsByClass( 'hidable' );\n\n\tfor( var i = 0; i < hidables.length; i++ ) {\n\t\tshow = storage.getItem( 'hidableshow-' + i + '_' + page );\n\n\t\tif( show == 'false' ) {\n\t\t\tvar content = getElementsByClass( 'hidable-content', hidables[i] );\n\t\t\tvar button = getElementsByClass( 'hidable-button', hidables[i] );\n\n\t\t\tif(\n\t\t\t\tcontent != null && content.length > 0 &&\n\t\t\t\tbutton != null && button.length > 0 &&\n\t\t\t\tcontent[0].style.display != 'none'\n\t\t\t) {\n\t\t\t\tbutton[0].onclick( 'bypass' );\n\t\t\t}\n\t\t} else if( show == 'true' ) {\n\t\t\tvar content = getElementsByClass( 'hidable-content', hidables[i] );\n\t\t\tvar button = getElementsByClass( 'hidable-button', hidables[i] );\n\n\t\t\tif(\n\t\t\t\tcontent != null && content.length > 0 &&\n\t\t\t\tbutton != null && button.length > 0 &&\n\t\t\t\tcontent[0].style.display == 'none'\n\t\t\t) {\n\t\t\t\tbutton[0].onclick( 'bypass' );\n\t\t\t}\n\t\t}\n\t}\n}", "function No(){\r\n\tfirstOption.hide();\r\n\tsecondOption.hide();\r\n\r\n\ttitle.html(\"You don't need to buy anything.\");\r\n}", "static hide(obj) {\n obj.setAttribute('visibility', 'hidden');\n }", "function hideSettings() {\n settingsContainer.classList.add('hidden');\n}", "function advancedOptions() {\n \tif (document.getElementById('advanced_options_checkbox').checked) {\n \t\tdocument.getElementById('advanced_options').style.display = \"inherit\";\n \t}\n \telse {\n \t\tdocument.getElementById('advanced_options').style.display = \"none\";\n \t}\n }", "showAdvancedSettings() {\n this.channel.show_advanced_settings = true\n }", "function hideStartingInfo() {\r\n // Hides savings/checking info and transaction info.\r\n hideToggle(checking_info); \r\n hideToggle(savings_info); \r\n hideToggle(transactions); \r\n}", "function hideSettings() {\n $(this).parent(s.projectSettingsOverlay).slideUp(600);\n }", "function hideSettings() {\n $(this).parent(s.projectSettingsOverlay).slideUp(600);\n }", "function showHideReversalConfiguration()\r\n{\r\n\tmakePageBusy();\r\n\tvar display = 'none';\r\n\tif($('#chkCanReverse').is(':checked') === true)\r\n\t\tdisplay = '';\r\n\t\r\n\t$('tr [id=optRow]').css('display', display);\r\n\tmakePageUnBusy();\r\n}", "function hideExt(state) {\n $('#toolbar-id').attr('hidden', state);\n $('#main-content-id').attr('hidden', state);\n}", "function showMembersSettings() {\n $(this).next(s.membersSettingsOverlay).hide().removeClass('hide').slideDown(600);\n }", "onBeforeHide() {\n this.enableWifiScans_ = false;\n Oobe.getInstance().setOobeUIState(OOBE_UI_STATE.HIDDEN);\n this.isCloseable_ = true;\n }", "function toggleSettings() {\n\tif (document.getElementById(\"ToggleSettings\").checked) {\n\t\tdocument.getElementById(\"Settings\").style.display = \"block\";\n\t}\n\telse {\n\t\tdocument.getElementById(\"Settings\").style.display = \"none\";\n\t}\n}", "function showSensorTypeSettings() {\n setElementDisplay([sensorTypeSettingMenu], \"block\");\n}", "show() {\n if (getCookie(\"showWarning\") == \"false\") { // If the cookie showWarning is false just delete the meal, don't show the warning\n this.props.deleteMeal()\n } else { // Otherwise show the warning window\n this.setState({display: true})\n }\n }", "function hideSettings() {\n $(this).parent(s.taskSettingsOverlay).slideUp(600);\n }", "function showToggleAlert() {\n document.getElementById(\"pop\").removeAttribute(\"hidden\");\n}", "function show(aval) {\n if (aval == \"expedition\") {\n nlsignup.style.display='none';\n ersignup.style.display='block';\n Form.fileURL.focus();\n } else if (aval == \"newsletter\") {\n ersignup.style.display='none';\n nlsignup.style.display='block';\n Form.fileURL.focus(); \n }\n else {\n ersignup.style.display='none';\n nlsignup.style.display='none';\n }\n }", "function Contextdisplay(whichID) {\r\n document.getElementById(whichID).style.display = (document.getElementById(whichID).style.display != 'block' ? 'block' : 'none');\r\n}", "function show(mode) {\n\tobj = document.getElementById('popup-wrapper');\n\tif(mode)\n\t\tobj.style.visibility = 'visible';\n\telse\n\t\tobj.style.visibility = 'hidden'; \n}", "static hide(obj) {\n obj.setAttribute('visibility', 'hidden');\n }", "function motwHide() {\r\n\tsettings.style.disable_motw = true;\r\n\tsettingsSave();\r\n\twindow.location.reload();\r\n}" ]
[ "0.6927425", "0.6925881", "0.6666956", "0.66298", "0.66105646", "0.6588622", "0.6551528", "0.6545508", "0.6483497", "0.64807105", "0.64746046", "0.64739096", "0.64353746", "0.64170873", "0.64170873", "0.6405065", "0.63640314", "0.6358734", "0.6350933", "0.6347156", "0.63392496", "0.631627", "0.6316211", "0.6314144", "0.62865347", "0.62837875", "0.6282676", "0.62819606", "0.62818664", "0.6280135", "0.6273444", "0.6262497", "0.62589633", "0.62372863", "0.62355876", "0.623508", "0.6220659", "0.6218411", "0.62163013", "0.62123454", "0.62084913", "0.6192475", "0.6185642", "0.6180899", "0.61663425", "0.6148254", "0.6144117", "0.6143863", "0.6143863", "0.6143863", "0.6143863", "0.6143863", "0.6143863", "0.61403227", "0.61395097", "0.61393785", "0.6127857", "0.612208", "0.6120067", "0.61188745", "0.6106131", "0.6101547", "0.61014175", "0.6080415", "0.6078553", "0.60777116", "0.60777116", "0.6076986", "0.6068421", "0.60594124", "0.6053634", "0.60527045", "0.6050874", "0.60495585", "0.6044256", "0.6042837", "0.6033824", "0.603207", "0.60242665", "0.6021337", "0.6020322", "0.602", "0.60074514", "0.6003201", "0.6002173", "0.6002173", "0.5998772", "0.5998356", "0.59981596", "0.59957325", "0.59942126", "0.5988424", "0.5984093", "0.5983739", "0.5983386", "0.5976634", "0.5972941", "0.59729326", "0.5970118", "0.5963125" ]
0.6330753
21
end of init function mapReady function that fires when the first or base layer has been successfully added to the map. Very useful in many situations. called above by this line: dojo.connect(map, "onLoad", mapReady)
function mapReady(map){ //Sets the globe button on the extent nav tool to reset extent to the initial extent. dijit.byId("extentSelector").set("initExtent", map.extent); //Create scale bar programmatically because there are some event listeners that can't be set until the map is created. //Just uses a simple div with id "latLngScaleBar" to contain it var latLngBar = new wim.LatLngScale({map: map}, 'latLngScaleBar'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "afterMapLoaded(map) {\r\n this.initQueryParamListener();\r\n this.initFeatureClickEvent();\r\n this.initLayerAnchorClickEvent();\r\n }", "function ready(error, us1, data1) {\n us = us1;\n one = data1;\n drawMap(null, one);\n}", "function initialize(){\r\n //<-window.onload\r\n setMap(); //->\r\n}", "function init(map) {\n olMap = map;\n eventHandler.RegisterEvent(ISY.Events.EventTypes.ChangeLayers, _registerProgress);\n }", "function startHere(){\n createStartMap();// step 1: Create a map on load with basemap and overlay map (with empty faultlinesLayer & EarhtquakesLayer ).\n addFaultlinesLayer();//step 2: Query data and add them to faultlinesLayer \n addEarthquakesLayer(); //step 3: Query data and add them to EarhtquakesLayer \n}", "function mapsLoaded() {\n $(init);\n}", "function initialize(){\n //<-window.onload\n setMap(); //->\n}", "function initialiseMap() {\n var enableDrawing = options.drawControl;\n\n options.drawControl = false;\n\n mapImpl = L.map(id, options);\n\n mapImpl.addLayer(drawnItems);\n\n addCoordinates();\n\n L.Icon.Default.imagePath = getLeafletImageLocation();\n\n mapImpl.addLayer(options.baseLayer);\n if (options.defaultLayersControl) {\n self.addLayersControl(options.otherLayers, options.overlays, {overlayLayersSelectedByDefault: options.overlayLayersSelectedByDefault, autoZIndex: options.autoZIndex});\n }\n\n\n if (options.showFitBoundsToggle) {\n var css = \"ala-map-fit-bounds fa \" + (options.zoomToObject ? \"fa-search-minus\" : \"fa-search-plus\");\n self.addButton(\"<span class='\" + css + \"' title='Toggle between the full map and the bounds of the data'></span>\", self.toggleFitBounds, \"topleft\");\n }\n\n if (options.useMyLocation) {\n var title = options.myLocationControlTitle || \"Use my location\";\n self.addButton(\"<span class='ala-map-my-location fa fa-location-arrow' title='\" + title + \"'></span>\", self.markMyLocation, \"topleft\");\n }\n\n if (options.allowSearchLocationByAddress) {\n addGeocodeControl(ALA.MapConstants.DRAW_TYPE.POINT_TYPE);\n }\n\n if (options.allowSearchRegionByAddress) {\n addGeocodeControl(ALA.MapConstants.DRAW_TYPE.POLYGON_TYPE);\n }\n\n if (enableDrawing) {\n initDrawingControls(options);\n }\n\n if(options.trackWindowHeight) {\n addWindowResizeListener();\n adjustMapContainerHeight();\n }\n\n if (options.showReset) {\n self.addButton(\"<span class='ala-map-reset fa fa-refresh reset-map' title='Reset map'></span>\", self.resetMap, \"bottomright\");\n }\n\n // If the map container is not visible, add a listener to trigger a redraw once it becomes visible.\n // This avoids problems with the map viewport being initialised to an incorrect size because Leaflet could not\n // determine the size of the container.\n var container = $(\"#\" + id);\n if (!container.is(\":visible\")) {\n container.onImpression({\n callback: self.redraw\n });\n }\n\n // make sure the base layers never sit on top of other layers when the base layer is changed\n mapImpl.on('baselayerchange', function (event) {\n currentBaseLayer = event.layer;\n\n if (event.layer.setZIndex) {\n event.layer.setZIndex(-1);\n }\n });\n\n // when an overlay layer is selected, bring it to the front and mark it as selected\n mapImpl.on('overlayadd', function (e) {\n if (e && e.layer) {\n overlayLayerSelect(e.layer);\n }\n });\n\n // when an overlay layer is de-selected, remove selected marker\n mapImpl.on('overlayremove', function (e) {\n if (e && e.layer) {\n overlayLayerDeselect(e.layer);\n }\n });\n }", "function initMap() {\n}", "mapLoaded(map){\n //remove the event handler using the actual event reference\n this.map.off(\"load\", this.mapLoadedEvent); \n this.mapLoadedEvent = undefined;\n //add the to sources and layers\n this.addToLayers();\n //call the event in the app component\n this.props.mapStyleLoaded();\n }", "mapLoaded(resolve) {\r\n // Resolve map load promise\r\n resolve();\r\n\r\n // Add map layers\r\n this.addMapLayers();\r\n }", "function init(){\n basemap();\n}", "function initializeMap() {\n \n _loadAsyncScript();\n\n }", "function addEmptyLayerToWebmap()\r\n\t\t\t{\r\n\t\t\t\tvar layer = MapTourBuilderHelper.getNewLayerJSON(MapTourBuilderHelper.getFeatureCollectionTemplate(true));\r\n\t\t\t\t_webmap.itemData.operationalLayers.push(layer);\r\n\t\t\t\t\r\n\t\t\t\t// Set the extent to the portal default\r\n\t\t\t\tif ( app.portal && app.portal.defaultExtent )\r\n\t\t\t\t\tapp.data.getWebMapItem().item.extent = Helper.serializeExtentToItem(new Extent(app.portal.defaultExtent));\r\n\t\t\t\t\r\n\t\t\t\tvar saveSucceed = function() {\r\n\t\t\t\t\tchangeFooterState(\"succeed\");\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t_initCompleteDeferred.resolve();\r\n\t\t\t\t\t}, 800);\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\tif( app.isDirectCreationFirstSave || app.isGalleryCreation ) \r\n\t\t\t\t\tsaveSucceed();\r\n\t\t\t\telse\r\n\t\t\t\t\tWebMapHelper.saveWebmap(_webmap, _portal).then(saveSucceed);\r\n\t\t\t}", "function initialize(map) {\r\n\t\tmap.loading(true);\r\n\r\n\t\tmap.loadingMessage('Loading background layer');\r\n\t\tsetTimeout(function () {\r\n\t\t\tconstructBackgroundLayer(map, tg.factories.mapEntityFactory);\r\n\r\n\t\t\tmap.loadingMessage('Loading embellishment layer');\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tconstructEmbellishmentLayer(map, tg.factories.mapEntityFactory);\r\n\r\n\t\t\t\tmap.loadingMessage('Loading interaction layer');\r\n\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t constructSelectionLayer(map, tg.factories.mapEntityFactory);\r\n\t\t\t\t onScaleFactorChanged(map);\r\n\t\t\t\t\teditableMap.loading(false);\r\n\t\t\t\t}, 100);\r\n\t\t\t}, 100);\r\n\t\t}, 100);\r\n\t}", "function tiles_loaded_handler ( )\n\t{\n\t\tif ( !g_allMarkers.length )\n\t\t\t{\n\t\t\tdraw_markers();\n\t\t\t};\n\t}", "function loadMap() {\n require([\n\t\t\t\"esri/map\",\n \"esri/basemaps\",\n\t\t\t\"esri/geometry/Point\",\n\t\t\t\"esri/symbols/SimpleMarkerSymbol\",\n\t\t\t\"esri/graphic\",\n\t\t\t\"esri/layers/GraphicsLayer\",\n\t\t\t\"esri/layers/ArcGISDynamicMapServiceLayer\",\n\t\t\t\"esri/layers/ImageParameters\",\n\t\t\t\"dojo/domReady!\"\n ], \n\t\tfunction (Map, Point, SimpleMarkerSymbol, Graphic, GraphicsLayer, ArcGISDynamicMapServiceLayer) {\n\t\t map = new Map(\"mapDiv\", {\n\t\t center: [-122.3000, 37.8000],\n\t\t zoom: 12,\n\t\t basemap: \"streets\"\n\t\t });\n\n\t\t $(window).load(function () {\n\t\t $(\".loader\").fadeOut(\"slow\");\n\t\t })\n\t\t});\n }", "function initMap() {\n \t\n esri.config.defaults.io.proxyUrl = location.protocol + '//' + location.host + \"/sharing/proxy.ashx\";\n esri.config.defaults.io.alwaysUseProxy = false;\n \t\n \trequire([\"esri/map\", \"dojo/domReady!\"], function(Map) { \n map = new Map(\"map\", {\n center: [-56.049, 38.485],\n zoom: 3,\n basemap: \"oceans\"\n });\n \t});\n \t\n \trequire([\n \"esri/map\", \n \"esri/dijit/BasemapToggle\",\n \"dojo/domReady!\"\n ], function(\n Map, BasemapToggle\n ){\n\tvar toggle = new BasemapToggle({\n map: map,\n basemap: \"gray\"\n }, \"BasemapToggle\");\n toggle.startup();\n });\n \t \n\t//add chrome theme for popup. \n dojo.addClass(map.infoWindow.domNode, \"chrome\"); \n}", "function initialize() {\n loadMap();\n loadGroups();\n }", "function initializeNarrativeMaps(callback) {\n setTimeout(function () {\n $('#narrativeMaps').height(430);\n narrativeMaps = L.map('narrativeMaps', {\n maxZoom: 22\n }).setView([38.134556577054134, -48.51562500000001], 3);\n narratives_layer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {\n attribution: '&copy; <a href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors'\n });\n narratives_layer.addTo(narrativeMaps);\n callback();\n }, 500);\n }", "handleMapLoad(map) {\n this._mapComponent = map;\n if (map) {\n }\n }", "function initialize() {\n rendermap();\n retrieveMarkerLocations();\n}", "_mapLoaded(map) {\n // Notify the subclass the map has been loaded.\n\n this.didLoadMap(map);\n\n // Instruct the subclass to create its entity. We will then show the entity.\n const entity = this.createEntity();\n this._showEntity(entity);\n }", "function Map_init(){ \n\n\tvar MapLayer= new ol.layer.Tile({ \n\t\tsource: new ol.source.XYZ({ \n\t\turl:'http://192.168.1.1/Tracker/maps/{z}/{x}/{y}.png'\n\t\t})\n\t\t}); \n\n\t//defines possible starting coordinates \t\n\tvar PerryvilleLonLat = [-89.86, 37.86]; \n\n\tvar KankakeeLonLat= [-87.86, 41.12]; \n\n\tvar KankakeeWebMercator= ol.proj.fromLonLat(KankakeeLonLat);\n\n\tvar PerryvilleWebMercator = ol.proj.fromLonLat(PerryvilleLonLat);\n\t\n\t//sets the map view \n\tvar view = new ol.View({ \n\t\tcenter:KankakeeWebMercator, \n\t\tzoom:12\n\t\t}); \n\n\t//adds the different layers to the map \n\tmap = new ol.Map({ \n\t\ttarget:'map', \n\t\tlayers: [MapLayer, GPS, WB9SKY, KC9LHW, KC9LIG, Predictions],\n\t\tview: view\n\t\t}); \n\n \tmap.addControl(mousePosition);\n\n}", "function loadMap() {\n\t\t// Ensure we have data loaded\n\t\tif(window.activeMap.Data == null || window.activeMap.Info == null) return;\n\n\t\t// Update the local storage of maps\n\t\tupdateLocalStorage();\n\n\t\t// Set the active layer to terrain\n\t\tactiveLayer = window.layerStore.LayerTerrain;\n\n\t\t// Load terrain\n\t\tloadLayer('LayerTerrain');\n\n\t\t// Load Objects\n\t\tloadLayer('LayerObjects');\n\n\t\t// Load Activity Layer\n\t\tloadLayerSimple(\n\t\t\t'LayerFog',\n\t\t\twindow.layerStore.LayerTerrain.width + '|' + window.layerStore.LayerTerrain.height + '|'\n\t\t);\n\n\t\t// Read main entities chunk\n\t\tloadLevelEntities();\n\n\t\t// Read extra entities\n\t\tloadLevelExtraEntites();\n\n\t\t// Read fast entities\n\t\tloadFastEntities();\n\n\t\t// Read map events\n\t\tloadLevelEvents();\n\n\t\t// Load map props\n\t\tloadMapProps();\n\n\t\t// Load info about map\n\t\tloadInfo();\n\n\t\t// Update the entity display\n\t\twindow.updateEntityMenu();\n\n\t\t// Perform a full re-render of the map\n\t\tmapFullRender();\n\n\t\t// Allow export\n\t\t$('#btnSaveChanges').removeAttr('disabled');\n\n\t\t// But we aren't up to date\n\t\twindow.setMapExportUpToDate(false);\n\n\t\t// Update which tool is selected\n\t\twindow.setTool('primaryTool', 'setToolMapPainter');\n\t\twindow.setTool('brushType', 'setToolMapPainterSingle');\n\t\twindow.setTool('brushColor', 'toolTerrainEarth');\n\n\t\t// Update what is displayed\n\t\twindow.updateLayerToggles();\n\n\t\t// We are no longer loading\n\t\tsetIsLoading(false);\n\n\t\t// Map is loaded\n\t\t$('#mainContainer').addClass('mapIsLoaded\t');\n\t}", "function initMap() {\n\n //Grap some map textures to use in our app.\n var mbAttr = 'Map data &copy; <a href=\"http://openstreetmap.org\">OpenStreetMap</a> contributors, ' +\n '<a href=\"http://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, ' +\n 'Imagery © <a href=\"http://mapbox.com\">Mapbox</a>',\n mbUrl = 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6IjZjNmRjNzk3ZmE2MTcwOTEwMGY0MzU3YjUzOWFmNWZhIn0.Y8bhBaUMqFiPrDRW9hieoQ';\n\n //Create the new tiles.\n var grayscale = L.tileLayer(mbUrl, {id: 'mapbox.light', attribution: mbAttr}),\n streets = L.tileLayer(mbUrl, {id: 'mapbox.streets', attribution: mbAttr});\n\n //Init the map.\n map = L.map('map', {\n center: [47.5952, -122.3316], //Center in on CenturyLink Field on the map\n zoom: 15,\n layers: [streets]\n });\n\n //A couple different map variations, a grayscale color scheme and one with detailed streets.\n var baseLayers = {\n \"Grayscale\": grayscale,\n \"Streets\": streets\n };\n\n L.control.layers(baseLayers).addTo(map);\n }", "function init() {\n log('MapCtrl init');\n\n // create the map\n map = $gMapService.init({\n drawingMode: true,\n drawingModeDisableAfterCreate: true\n });\n // on map click \n map.addListener('click', function($event) {\n $scope.$apply(function() {\n log('map clicked: ', $event);\n $scope.test = \"map clicked\";\n });\n });\n\n // on drawing object created\n $gMapService.addDrawingListener(onOverlayCreated);\n\n $gMapService.center();\n\n // so we know we've already initialized\n return true;\n }", "function init(map, message) {\n olMap = map;\n if (message && message.length > 0) {\n _message = message;\n }\n getIsySubLayerFromPool = _getIsySubLayerFromPool;\n eventHandler.RegisterEvent(ISY.Events.EventTypes.ChangeLayers, _registerMessageHandler);\n }", "function initialize() {\r\n //get the json\r\n $.getJSON('/resources/maps/' + name + '.json', {}, function (data) {\r\n //json loaded\r\n\r\n //get size of map\r\n _self.size = new Size(data.size.width, data.size.height);\r\n\r\n //get the tilesets\r\n for (var k = 0; k < data.tilesets.length; k++) {\r\n var tileset = data.tilesets[k];\r\n\r\n var img = new Image();\r\n img.src = tileset.src;\r\n var set = {\r\n image: img,\r\n autotile: tileset.autotile,\r\n frames: tileset.frames,\r\n size: tileset.size\r\n };\r\n //add tileset to array\r\n _tilesets.push(set);\r\n }\r\n\r\n //separate the layers out into logical layers to be drawn\r\n //get all tiles with prioriry 0, and layer them first\r\n createLayers(data, _bottomLayers, PRIORITY_BELOW);\r\n\r\n //then, get all tiles with priority 1, and layer them last\r\n createLayers(data, _topLayers, PRIORITY_ABOVE);\r\n\r\n //map is loaded\r\n _self.mapLoaded = true;\r\n\r\n //loaded callback\r\n if (typeof loaded == 'function') {\r\n loaded();\r\n }\r\n });\r\n\r\n }", "function WaitUntilTheMapAndDataAreLoaded(){\r\n\tstartLoadingIndicator();\r\n\t\r\n\tif(mapIsLoaded && dataIsLoaded){\r\n\t\t//setup the list view\r\n\t\tinitList();\r\n\t\t//setup the map view\r\n\t\tinitMap();\r\n\t\t\r\n\t\t//reset the loading flags\r\n\t\tdataIsLoaded = false;\r\n\t\tmapIsLoaded = false;\r\n\t\t\r\n\t\tstopLoadingIndicator();\r\n\t\r\n\t} else {\r\n\t\tsetTimeout(\"WaitUntilTheMapAndDataAreLoaded()\",250);\r\n\t}\r\n}", "function initMap() {\n\tvar mapProp = {\n\t\t\tcenter : new google.maps.LatLng(-34.9038055, -57.9392111, 18),\n\t\t\tzoom : 10,\n\t\t\tmapTypeId : google.maps.MapTypeId.ROADMAP\n\t\t};\n\tif (document.getElementById(\"map\") != null){\n\t\tmap = new google.maps.Map(document.getElementById(\"map\"), mapProp);\n\n\t\tmap.addListener('click', function(e) {\n\t\t\tagregarMarker(e.latLng, map);\n\n\t\t});\n\t\tpuntos = [];\n\t\tinitPolyline();\n\t\tobtenerMarkers();\n\t\t\n\t}\n\t\n\t//loadKmlLayer(src, map);\n\t\n}", "function initMap(){\n\n\t//Initializing the Map\n\tmap = new google.maps.Map(document.getElementById('map'), {\n\t\tcenter: coor,\n\t\tzoom: 12,\n\t\tstyles: [{\n\t\t\tstylers: [{ visibility: 'simplified' }]\n\t\t}, {\n\t\t\telementType: 'labels',\n\t\t\tstylers: [{ visibility: 'off' }]\n\t\t}]\n\t});\n\n\t//Initializing the InfoWindow\n\tinfoWindow = new google.maps.InfoWindow();\n\n\t//Initializing the Service\n\tservice = new google.maps.places.PlacesService(map);\n\n \t//The idle event is a debounced event, so we can query & listen without\n //throwing too many requests at the server.\n map.addListener('idle', performSearch);\n}", "function isMapLoaded() {\n if (!mapReceived) {\n currentNode.trigger('onMapRequested', eventName);\n }\n return mapReceived;\n }", "handleMapLoad(map) {\n }", "function whenLoaded(map, f) {\n if (map.loaded()) {\n console.log('Already loaded.');\n f();\n }\n else { \n console.log('Wait for load');\n map.once('load', f);\n }\n}", "function initMap() {\n logger('function initMap is called');\n map = new gmap.Map(document.getElementById('map'), {\n center: {\n lat: 22.451754,\n lng: 114.164387\n },\n zoom: defaultZoomLevel\n });\n model.markers.forEach(function (marker) {\n createMarker(marker);\n });\n logger('function initMap is ended');\n }", "function isReady() {\n return map != null;\n }", "_initMap() {\n if (this.isDestroying || this.isDestroyed) { return; }\n\n const canvas = get(this, 'canvas.element');\n const options = get(this, '_options');\n\n const map = new google.maps.Map(canvas, options);\n const publicAPI = this.publicAPI;\n\n google.maps.event.addListenerOnce(map, 'idle', () => {\n if (this.isDestroying || this.isDestroyed) { return; }\n\n set(this, 'map', map);\n\n this.registerEvents();\n tryInvoke(this, 'onLoad', [{ map, publicAPI }]);\n\n let componentInitPromises =\n Object.values(this.components)\n .reduce((a, b) => a.concat(b))\n .map((a) => a.isInitialized.promise);\n\n all(componentInitPromises)\n .then(() => {\n tryInvoke(this, 'onComponentsLoad', [\n { map: this.map, publicAPI: this.publicAPI }\n ]);\n });\n });\n }", "function mapError() {\n\talert(\"Map didnt load\");\n}", "function initMap() {\n map = new google.maps.Map(document.getElementById('map'), {\n center: new google.maps.LatLng(40.730610,-73.935242),\n zoom: 8,\n mapTypeId: 'terrain'\n });\n loadKmlLayer(src, src2, map);\n }", "attachedCallback () {\n /**\n * Now that we are in the DOM we can append our container\n */\n this.appendChild(this._container);\n\n /**\n * Create our Map and MapView.\n */\n this.map = new Map({\n basemap: this.basemap\n });\n\n this.view = new MapView({\n container: this._container.id,\n zoom: this.zoom,\n map: this.map,\n center: this.center\n });\n\n /**\n * Dispatch a event, just like a click or keyboard\n * event, bubbling it up the DOM. This is useful for\n * inter-element communication or for notifiying\n * applications of things the element is doing.\n *\n * You must bubble the event or you cannot listen\n * to then event in some frameworks like Ember.\n */\n this.dispatchEvent(new CustomEvent('mapready', {\n bubbles: true\n }));\n\n /**\n * Set a flag so other elements can check if this\n * is ready.\n */\n this.ready = true;\n }", "function init_map()\n{\n map = create_map('map-container-global', true);\n\n markers = new L.MarkerClusterGroup({ \n spiderfyOnMaxZoom: true, \n showCoverageOnHover: false, \n zoomToBoundsOnClick: true \n });\n\n map_initiated = true;\n}", "function onMapComplete( err ) {\n if ( err ) {\n Y.log( 'Error mapping prescription form: ' + err, 'warn', NAME );\n return callback( err );\n }\n\n template.raise( 'mapcomplete', formData );\n callback( null );\n }", "function onLoad(mapInstance) {\n setMap(mapInstance);\n }", "function onLoadStarted() {\n // nicer visually to not display the lightlayer yet when we start loading\n franceLightLayer.remove();\n loadingBar.addTo(map);\n}", "function mapInit() {\n map = L.map('map').fitWorld();\n\n // Map tiling\n L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {\n attribution: 'Map data &copy; <a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> contributors, <a href=\"https://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, Imagery © <a href=\"https://www.mapbox.com/\">Mapbox</a>',\n maxZoom: 18,\n id: 'mapbox/streets-v11',\n tileSize: 512,\n zoomOffset: -1,\n accessToken: mapboxToken \n }).addTo(map);\n\n // Routing\n L.Routing.control({\n router: L.Routing.mapbox(mapboxToken)\n });\n }", "function drawmap(ASes, Links, canvas, title, order, is_init) {\n\tif( is_init ) {\n\t makeTable(ASes, canvas, title);\n\t}\n\tASCoreMap(canvas, ASes, Links, order);\n\t$('canvas#'+canvas).parent().find('h2.loading').hide();\n\t$('canvas#'+canvas).show();\n\t$('body > h2.loading').append(\".\");\n\taddEvents();\n\tif( is_init && canvas == data[data.length-1][3]) {\n\t $('body > h2.loading').html(\"Now loading .\");\n\t $('h2.loading').hide();\n\t $('.container').fadeIn('slow');\n\t CountryRank('ccrank', ccRank);\n\t is_init = null;\n\t}\n }", "function init() {\n map = new google.maps.Map(document.getElementById('map'), {\n zoom: 4,\n center: new google.maps.LatLng(39.3, -95.8),\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n styles: [\n {\n featureType: 'water',\n stylers: [{ color: '#c3cfdd'}]\n },\n {\n featureType: 'poi',\n stylers: [{visibility: 'off'}]\n }\n ]\n });\n\n SHPParser.load('tl_2010_06_tract10/tl_2010_06_tract10.shp', shpLoad,\n shpLoadError);\n DBFParser.load('tl_2010_06_tract10/tl_2010_06_tract10.dbf', dbfLoad,\n dbfLoadError);\n}", "function init() { \n gmaps();\n bindEvents(); \n }", "function ready(worldBackground, NfaWorld) {\r\n // First draw the continents' land, which will serve as a basemap:\r\n displayBasemap(worldBackground);\r\n\r\n // Draw the choropleth thematic map:\r\n displayThematicLayer(NfaWorld);\r\n\r\n // Define behavior when the mouse hovers above a country:\r\n defineMouseOverBehavior();\r\n\r\n // Define behavior when the mouse moves away from a country:\r\n defineMouseOutBehavior()\r\n\r\n}", "function showMap() {\r\n\t// remove the loading message div completely\r\n\tvar element = document.getElementById(\"map_loading\");\r\n\telement.parentNode.removeChild(element);\r\n\tmap.setCenter(baltimore);\r\n\tmap.setZoom(11);\r\n\tmapCanvas.style.visibility='visible';\r\n\tif (markerArray.length == 0) {\r\n\t\talert('Error adding libraries and monuments to map! The geocoding service is most likely down.');\r\n\t}\r\n\tmapInitialized = true;\r\n}", "function init() \n{\n resize();\n var shaderProgram = createMapShaders();\n getGeoLocation(function(position) \n {\n OsmMaps.data.getPointsWithPosition(shaderProgram, position, function(shaderProgram, position, data) \n {\n drawMap(shaderProgram, position, data);\n });\n });\n}", "function AddMapOverlays() { try { LoadPoliticalBoundaries(); LoadSoilsService(); } catch (e) { HiUser(e, \"AddMapOverlays\"); } }", "function initMap() \n{\n\t// load the google map\n\tmap = new google.maps.Map(document.getElementById('map'), {\n\t\tcenter: mapcenter,\n\t\tzoom: 13,\n\t\tdisableDefaultUI: true\n\t});\n\t\n\t// load the custom marker libraries to put the custom markers on the screen\n\tInitCustomMarker();\n\tInitCustomLocationMarker();\n \n\t// load the checkboxes\n\tLoadData();\n\t\n\t// load the user location marker\n\tLoadUserMarker();\n\t\n\t// set the event for closing the marker\n\t$(\".contentDetails\").hide();\n\t$(\".exitContainer\").click(HideMarkerInfo);\n}", "function initialize() {\r\n $(function () {\r\n var mapOptions = ({\r\n rotateControls: true\r\n });\r\n \r\n mapDiv = document.getElementById('map');\r\n \r\n if (typeof AMessageChecker !== 'undefined') Events.on('mapsconfigured', registerMessageCheckerExtension);\r\n \r\n Events.on('mapsloaded', configureMap);\r\n Events.on('mapsloaded', function () {\r\n // ParseLayers\r\n $.each(LAYERS, function (i, layer_obj) {\r\n MapLayers.createLayer(layer_obj);\r\n });\r\n \r\n Events.emit('layersready');\r\n });\r\n \r\n map = aMap.init(mapDiv, mapOptions, function (map_) {\r\n map = map_;\r\n \r\n //Getting deal with mapCenter\r\n getMapCenter();\r\n \r\n if (form_query_search || form_type_search) { if (mapCenterLatLng) makeSearch(mapCenterLatLng) }\r\n if (FORM['COORDX'] && FORM['COORDY']) aMap.setCenter(FORM['COORDX'], FORM['COORDY']);\r\n if (FORM['ZOOM']) aMap.setZoom(FORM['ZOOM']);\r\n \r\n if (FORM['SHOW_BUILDS']) {\r\n Events.on('billingdefinedlayersshowed', function () {\r\n if (\r\n // If no build markers\r\n !MapLayers.getLayerObjects(LAYER_ID_BY_NAME['BUILD']).length\r\n // and no build polygons\r\n && !MapLayers.getLayerObjects(LAYER_ID_BY_NAME['BUILD2']).length\r\n ) {\r\n // download builds\r\n MapLayers.enableLayer(LAYER_ID_BY_NAME['BUILD']);\r\n }\r\n });\r\n }\r\n \r\n // Show by layer id\r\n if (FORM['show_layer']) {\r\n Events.on('billingdefinedlayersshowed', function () {\r\n var layer_id = FORM['show_layer'];\r\n if (MapLayers.hasLayer(layer_id)) {\r\n MapLayers.onLayerEnabled(layer_id, function () {\r\n if (isDefined(FORM['OBJECT_ID'])) {\r\n MapLayers.showObject(layer_id, FORM['OBJECT_ID']);\r\n }\r\n });\r\n MapLayers.enableLayer(layer_id);\r\n }\r\n else {\r\n aTooltip.displayError('show_layer on unexisting layer')\r\n }\r\n });\r\n }\r\n // Show by layer name\r\n else if (FORM['show'] && LAYER_ID_BY_NAME[FORM['show']]) {\r\n Events.on('billingdefinedlayersshowed', function () {\r\n var layer_id = LAYER_ID_BY_NAME[FORM['show']];\r\n \r\n if (MapLayers.hasLayer(layer_id)) {\r\n MapLayers.onLayerEnabled(layer_id, function () {\r\n \r\n if (isDefined(FORM['OBJECT_ID'])) {\r\n MapLayers.onLayerEnabled(layer_id, function () {\r\n MapLayers.showObject(layer_id, FORM['OBJECT_ID']);\r\n });\r\n }\r\n \r\n });\r\n MapLayers.enableLayer(layer_id);\r\n }\r\n else {\r\n console.warn('Show object on unexisting layer', LAYER_ID_BY_NAME, FORM['show']);\r\n }\r\n });\r\n }\r\n \r\n if (FORM['add']) {\r\n Events.on('layersready', function () {\r\n var layer_id = LAYER_ID_BY_NAME[FORM['add']];\r\n if (isDefined(layer_id) && MapLayers.hasLayer(layer_id)) {\r\n if (isDefined(FORM['OBJECT_ID'])) {\r\n addNewPoint(layer_id, FORM['OBJECT_ID']);\r\n }\r\n else {\r\n addNewPoint(layer_id);\r\n }\r\n }\r\n else {\r\n console.warn('add unknown layer')\r\n }\r\n })\r\n }\r\n \r\n Events.on('mapsloaded', function () {\r\n \r\n if (form_query_search || form_type_search) {\r\n if (mapCenterLatLng) makeSearch(mapCenterLatLng);\r\n }\r\n \r\n //If it is register build action\r\n if (FORM['LOCATION_TYPE']) {\r\n if (FORM['LOCATION_ID'] || FORM['ROUTE_ID']) {\r\n addNewPoint(FORM['LOCATION_TYPE']);\r\n }\r\n }\r\n \r\n if (FORM['MAKE_NAVIGATION_TO']) {\r\n if (form_nav_x && form_nav_y) {\r\n Events.on('realpositionretrieved', function (position) {\r\n var destination = aMap.createPosition(form_nav_x, form_nav_y);\r\n aMap.setCenter(position[0], position[1]);\r\n aNavigation = new Navigation(map);\r\n aNavigation.createExtendedRoute(destination);\r\n });\r\n }\r\n }\r\n });\r\n \r\n Events.emit('mapsloaded', true);\r\n });\r\n \r\n });\r\n}", "mapLayersChanged_ () {\n this.renderLayerList();\n }", "function onMapLoad (event) {\n\t\t// assign src for activity map <img> to loaded map\n\t\t$.activityMap.src = this.src;\n\t\t// display activity image for additional 5 seconds before show map\n\t\tsetTimeout( function() {\n\t\t\tshowMap(true);\n\t\t\t// begin next ajax request\n\t\t\tsetTimeout(ajaxReq, 3000);\n\t\t}, 5000);\n\t}", "function refreshAndInitMap() {\n // Remove all added layer:\n removeAllLayers();\n // Remove all source:\n removeAllSources();\n}", "function loadWebmap(e) {\n // Get new webmap and extract map and map parts\n var bootstrapmap = new BootstrapMap();\n var mapDeferred = bootstrapmap.createWebMap(\"7a6ead3957e8440dbdfcc78f9ba8f2ba\", \"mapDiv\", {\n slider: true,\n nav: false,\n smartNavigation: false\n });\n\n mapDeferred.then(function (response) {\n map = response.map;\n\n // Add titles\n //dom.byId(\"mapTitle\").innerHTML = response.itemInfo.item.title;\n //dom.byId(\"mapSubTitle\").innerHTML = response.itemInfo.item.snippet;\n // Add scalebar and legend\n var layers = esri.arcgis.utils.getLegendLayers(response);\n if (map.loaded) {\n initMapParts(layers);\n }\n else {\n on(map, \"load\", function () {\n initMapParts(layers);\n });\n }\n\n }, function (error) {\n alert(\"Sorry, couldn't load webmap!\");\n console.log(\"Error loading webmap: \" & dojo.toJson(error));\n });\n }", "function onMapperInitialized() {\n itcb( null );\n }", "function load_map(divId, initialBounds, dataLayer) {\n console.log(\"Loading a map into div [\" + divId + \"] with data layer [\" + dataLayer.name + \"], url [\" + dataLayer.url + \"], keys [\" + Object.keys(dataLayer) + \"]\");\n\n var map = createMapContainer(divId);\n\n map.addLayers([createGoogleBaseLayer(), dataLayer]);\n \n map.zoomToExtent(initialBounds.espg900913);\n\n console.log(\"Set the extent to [\" + initialBounds.lonLatString +\"]\");\n console.log(\"Map Layers: \" + map.layers);\n\n}", "function on_pageLoad() \n{ \n getDataSets(); \n\t//debug(\"createMap()\"); \n\t//getUrlParas(); \n\tcreateMap(); \n}", "function initMap() {\n console.log('initMap');\n\n // ======= map styles =======\n var styleArray = [\n { featureType: \"all\",\n stylers: [\n { saturation: -80 }\n ]\n },\n { featureType: \"road.arterial\",\n elementType: \"geometry\",\n stylers: [\n { hue: \"#00ffee\" },\n { saturation: 50 }\n ]\n },\n { featureType: \"poi.business\",\n elementType: \"labels\",\n stylers: [\n { visibility: \"off\" }\n ]\n }\n ];\n\n // ======= map object =======\n map = new google.maps.Map(document.getElementById('map'), {\n center: {lat: 38.89, lng: -77.00},\n disableDefaultUI: true,\n draggable: false,\n scrollwheel: false,\n styles: styleArray, // styles for map tiles\n mapTypeId: google.maps.MapTypeId.TERRAIN,\n zoom: 10\n });\n\n }", "function onLoad() {\n // Load map.\n OpenLayers.ProxyHost = '/proxy/';\n map = new OpenLayers.Map('map');\n map.addControl(new OpenLayers.Control.LayerSwitcher());\n\n var layer = new OpenLayers.Layer.WMS('OpenLayers WMS',\n 'http://labs.metacarta.com/wms/vmap0',\n {layers: 'basic'},\n {wrapDateLine: true});\n map.addLayer(layer);\n map.setCenter(new OpenLayers.LonLat(-145, 0), 3);\n\n // Add layer for the buoys.\n buoys = new OpenLayers.Layer.Markers('TAO array');\n map.addLayer(buoys);\n\n // Add buoys. Apparently, dapper always returns the data\n // in the order lon/lat/_id, independently of the projection.\n var url = baseUrl + \".dods?location.lon,location.lat,location._id\";\n jsdap.loadData(url, plotBuoys, '/proxy/');\n\n // Read variables in each location.\n jsdap.loadDataset(baseUrl, loadVariables, '/proxy/');\n}", "function initMap() {\n // Definitions of some styles for the map.\n var styles = [\n {\n featureType: 'water',\n stylers: [\n { color: '#19a0d8' }\n ]\n },{\n featureType: 'administrative',\n elementType: 'labels.text.stroke',\n stylers: [\n { color: '#ffffff' },\n { weight: 6 }\n ]\n },{\n featureType: 'administrative',\n elementType: 'labels.text.fill',\n stylers: [\n { color: '#e85113' }\n ]\n },{\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [\n { color: '#efe9e4' },\n { lightness: -40 }\n ]\n },{\n featureType: 'transit.station',\n stylers: [\n { weight: 9 },\n { hue: '#e85113' }\n ]\n },{\n featureType: 'road.highway',\n elementType: 'labels.icon',\n stylers: [\n { visibility: 'off' }\n ]\n },{\n featureType: 'water',\n elementType: 'labels.text.stroke',\n stylers: [\n { lightness: 100 }\n ]\n },{\n featureType: 'water',\n elementType: 'labels.text.fill',\n stylers: [\n { lightness: -100 }\n ]\n },{\n featureType: 'poi',\n elementType: 'geometry',\n stylers: [\n { visibility: 'on' },\n { color: '#f0e4d3' }\n ]\n },{\n featureType: 'road.highway',\n elementType: 'geometry.fill',\n stylers: [\n { color: '#efe9e4' },\n { lightness: -25 }\n ]\n }\n ];\n\n // Constructor creates a new map.\n map = new google.maps.Map(document.getElementById('map'), {\n center: {lat: 52.520008, lng: 13.404954},\n zoom: 13,\n styles: styles,\n mapTypeControl: false\n });\n largeInfoWindow = new google.maps.InfoWindow();\n ko.applyBindings(new ViewModel());\n}", "function gmMapLoaded() {\r\n\r\n\t\t\tif (_helpDlg) {\r\n\t\t\t\t// note _helpBtn is the container, not the link inside the container\r\n\t\t\t\tvar btnContainer = _helpBtn;\r\n\r\n\t\t\t\t// work out where the top-left of the dialog should be placed\r\n\t\t\t\tvar dialogLeft = btnContainer.position().left;\r\n\t\t\t\tdialogLeft += (btnContainer.width() / 2);\r\n\t\t\t\tdialogLeft -= (_helpDlg.width() / 2);\r\n\r\n\t\t\t\tvar dialogTop = btnContainer.position().top;\r\n\t\t\t\tdialogTop += btnContainer.height() * 2;\r\n\r\n\t\t\t\t_helpDlg\r\n\t\t\t\t\t.css(\"z-index\", 999)\r\n\t\t\t\t\t.css(\"position\", \"absolute\")\r\n\t\t\t\t\t.css(\"top\", dialogTop)\r\n\t\t\t\t\t.css(\"right\", \"1%\")\r\n\t\t\t\t\t.css(\"width\", \"20%\")\r\n\t\t\t\t;\r\n\r\n\t\t\t\tif (settings.showHelpOnLoad && _helpBtn.click) {\r\n\t\t\t\t\t_helpBtn.trigger(\"click\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (settings.findGeoOnLoad) {\r\n\t\t\t\t_plugIn.setMapCentreByGeo();\r\n\t\t\t}\r\n\r\n\t\t} // gmMapLoaded", "function initMap () {\n\n ContentManager.tilesheight = 32;\n ContentManager.tileswidth = 32;\n\n var tilesetimg = loadingQueue.getResult(\"tileset\");\n\n var imageData = {\n images : [ tilesetimg ],\n frames : {\n width : ContentManager.tileswidth,\n height : ContentManager.tilesheight\n }\n };\n\n tilesetSheet = new createjs.SpriteSheet(imageData);\n map = new Map(stage);\n\n unistJson = jQuery.parseJSON(loadingQueue.getResult(\"units-json\",true));\n\n addUnitImageInMenu();\n\n gameStatut = GameStatut.PLACEMENT;\n\n\n\n createjs.Ticker.addEventListener(\"tick\", tick);\n createjs.Ticker.useRAF = true;\n createjs.Ticker.setFPS(60);\n\n }", "function loadMap() {\n\n //Change the cursor\n map.getCanvas().style.cursor = 'pointer';\n\n //NOTE Draw order is important, largest layers (covers most area) are added first, followed by small layers\n\n\n //Add raster data and layers\n rasterLayerArray.forEach(function(layer) {\n map.addSource(layer[0], {\n \"type\": \"raster\",\n \"tiles\": layer[1]\n });\n\n map.addLayer({\n \"id\": layer[2],\n \"type\": \"raster\",\n \"source\": layer[0],\n 'layout': {\n 'visibility': 'none'\n }\n });\n });\n\n //Add polygon data and layers\n polyLayerArray.forEach(function(layer) {\n map.addSource(layer[0], {\n \"type\": \"vector\",\n \"url\": layer[1]\n });\n\n map.addLayer({\n \"id\": layer[2],\n \"type\": \"fill\",\n \"source\": layer[0],\n \"source-layer\": layer[3],\n \"paint\": layer[4],\n 'layout': {\n 'visibility': 'none'\n }\n });\n });\n\n map.setLayoutProperty('wildness', 'visibility', 'visible');\n\n //Add wildness vector data source and layer\n for (i = 0; i < polyArray.length; i++) {\n map.addSource(\"vector-data\"+i, {\n \"type\": \"vector\",\n \"url\": polyArray[i]\n });\n\n //fill-color => stops sets a gradient\n map.addLayer({\n \"id\": \"vector\" + i,\n \"type\": \"fill\",\n \"source\": \"vector-data\" + i,\n \"source-layer\": polySource[i],\n \"minzoom\": 6,\n \"maxzoom\": 22,\n \"paint\": wildPolyPaint\n });\n }\n\n //Add polygon/line data and layers\n for (i=0; i<lineLayerArray.length; i++) {\n map.addSource(lineLayerArray[i][0], {\n \"type\": \"vector\",\n \"url\": lineLayerArray[i][1]\n })\n\n map.addLayer({\n \"id\": lineLayerArray[i][2],\n \"type\": \"line\",\n \"source\": lineLayerArray[i][0],\n \"source-layer\": lineLayerArray[i][4],\n \"paint\": {\n 'line-color': lineLayerArray[i][5],\n 'line-width': 2\n }\n });\n\n map.addLayer({\n \"id\": lineLayerArray[i][3],\n \"type\": \"fill\",\n \"source\": lineLayerArray[i][0],\n \"source-layer\": lineLayerArray[i][4],\n \"paint\": {\n 'fill-color': lineLayerArray[i][5],\n 'fill-opacity': .3\n }\n });\n\n map.setLayoutProperty(lineLayerArray[i][2], 'visibility','none');\n map.setLayoutProperty(lineLayerArray[i][3], 'visibility','none');\n map.moveLayer(lineLayerArray[i][2]);\n map.moveLayer(lineLayerArray[i][3]);\n }\n\n //Add States data set\n map.addSource('states', {\n \"type\": \"vector\",\n \"url\": \"mapbox://wildthingapp.2v1una7q\"\n });\n\n //Add States outline layer, omitting non-state territories\n map.addLayer({\n \"id\": \"states-layer\",\n \"type\": \"line\",\n \"source\": \"states\",\n \"source-layer\": \"US_State_Borders-4axtaj\",\n \"filter\": [\"!in\",\"NAME\",\"Puerto Rico\", \"Guam\",\"American Samoa\", \"Commonwealth of the Northern Mariana Islands\",\"United States Virgin Islands\"]\n });\n\n map.setLayerZoomRange('wildness', 0, 7);\n}", "function init(targetId, mapConfig, callback, options){\n mapImplementation.InitMap(targetId, mapConfig, callback, options);\n layerHandler.Init(mapConfig);\n categoryHandler.Init(mapConfig);\n\n _loadCustomCrs();\n\n eventHandler.TriggerEvent(BW.Events.EventTypes.MapLoaded);\n }", "function mapError() {\n alert(\"Map could not be loaded at this moment. Please try again\");\n}", "function initMap() {\n //The api is loaded at this step\n //L'api est chargée à cette étape\n\n //add translations\n translate();\n\n if (gGEOPORTALRIGHTSMANAGEMENT.apiKey.length==0) {\n alert(OpenLayers.i18n('badKey',{'apiKey':\"123454565444344\"}));\n } else {\n alert(OpenLayers.i18n('Gotcha !-('));\n }\n}", "function init_Mapa1() {\n //Crear mapa en el elemento DOM\n var bingApiKey = \"AoqHQ_lF0XVJw-wQgHZa-nD_s49vCYuKDLzXriH-cgFPpI0l8bVw_C__Af5BNLnM\";\n\n var mapa = new ol.Map({\n view: new ol.View({\n zoom: 4,\n center: [-223293, 5247800],\n }),\n target: 'Mapa1',\n layers: [new ol.layer.Tile({\n source: new ol.source.BingMaps({\n key: bingApiKey,\n imagerySet: 'CanvasGray'\n }),\n title: 'CanvasGray'\n }),\n new ol.layer.Tile({\n source: new ol.source.TileWMS({\n url: 'http://demo.mapserver.org/cgi-bin/wms',\n params: {\n 'LAYERS': 'bluemarble'\n },\n }),\n opacity: 0.5\n })\n ]\n });\n}", "function loadMapLayer() {\n if (getPreference(\"MAP_CHOICE\") === \"1\"){\n map.removeLayer(_light);\n map.addLayer(_dark);\n }else{\n map.removeLayer(_dark);\n map.addLayer(_light);\n }\n}", "function initMap(){\n\n var mapWidget = new MapWidget('spatialmap',true);\n resetCoordinates();\n mapWidget.addDataLayer(true,\"default\",true); // data layer is the metadata markers layer\n\n mapWidget.addDrawLayer({\n geometry: \"box\", \n allowMultiple: false, \n afterDraw: updateCoordinates\n });\n \n // load regions list for drop down \n $.getJSON('/api/regions.json',function(data){\n $.each(data.layers,function(key,val){\n var visibility = false;\n mapWidget.addExtLayer({\n url: val.geo_url,\n protocol: \"WMS\",\n geoLayer: val.geo_name,\n layerName: val.l_id,\n visibility: visibility\n });\n }); \n //functionality to click on the region to search\n mapWidget.registerClickRegions(data.layers,showInfo); \n });\n \n enableToolbarClick(mapWidget);\n enableCoordsClick();\n //changing coordinates in textbox should change the map appearance\n enableCoordsChange(mapWidget); \n \n //map help contents\n $(\"#map-help-text\").dialog({autoOpen:false, height: 500});\n $(\"#map-help\").click(function(){\n $(\"#map-help-text\").dialog('open');\n return false;\n });\n \n //map change base layer type\n $(\"#map-view-selector a\").bind('click',function(element){\n mapWidget.setBaseLayer($(this).attr(\"id\")); \n });\n \n // collapse the map\n $(\"#map-toolbar\").on('click', \"a.hide\", function(){\n $(\"#spatialmap\").hide();\n $(this).attr('class','show');\n $(this).html('Show');\n $(\"#map-toolbar li:not(.heading)\").hide();\n $(\"#map-toolbar\").css(\"height\", \"37px\");\n });\n \n // show the map\n $(\"#map-toolbar\").on(\"click\", \"a.show\", function()\n {\n $(\"#spatialmap\").show(); \n $(this).attr('class','hide');\n $(this).html('Hide');\n $(\"#map-toolbar li:not(.heading)\").show();\n $(\"#map-toolbar\").css(\"height\", \"67px\");\n });\n \n \n return mapWidget;\n }", "function onMapInit(map) {\n\tvar timer=2000;\n\tif(displayInfo.derivedPlatform===\"Android\")\n\t\ttimer=50;\n /* else{\n\n } */\n\tsetTimeout(function(){\n\t\tconsole.log(\"timed initialization:\"+timer);\n\t\t_onMapInit(map);\n\t},timer);\n}", "initMap(entries){\n //Destroy the old map so we can reload a new map\n var map = this.get('map');\n\n var tpkLayer = new TPKLayer();\n\n tpkLayer.on(\"progress\", function (evt) {\n console.log(\"TPK loading...\" + evt);\n });\n tpkLayer.extend(entries);\n\n tpkLayer.map = map;\n map.addLayer(tpkLayer, 0);\n }", "function initMap()\n\n\n {\n var options = {\n mode: 'normal',\n territory: 'FXX'\n };\n\n _viewer = new Geoportal.Viewer.Default(_mapDivId, options, OpenLayers.Util.extend(\n options, window.gGEOPORTALRIGHTSMANAGEMENT === undefined ? {\n 'apiKey': 'cleok'\n } : gGEOPORTALRIGHTSMANAGEMENT));\n\n if (!_viewer)\n {\n throw new Error(\"Failed to intilise the Geoportal viewer\");\n }\n\n //Remove logo and copyright\n var dirts = [_viewer.getMap().getControlsByClass('Geoportal.Control.PermanentLogo')[0],\n _viewer.getMap().getControlsByClass('Geoportal.Control.Logo')[0],\n _viewer.getMap().getControlsByClass('Geoportal.Control.TermsOfService')[0]];\n\n for (var k = 0, dirtLen = dirts.length; k < dirtLen; k++) {\n _viewer.getMap().removeControl(dirts[k]);\n }\n\n //Hide copyright\n //document.getElementById(\"cp_Geoportal.Control.Information_55\").style.display = \"none\";\n\n //---- LAYERS\n\n //---- PREDEFINED GEOPORTAL LAYERS\n try {\n\n _viewer.addGeoportalLayer('GEOGRAPHICALGRIDSYSTEMS.MAPS', {});\n _viewer.addGeoportalLayer('ORTHOIMAGERY.ORTHOPHOTOS', {});\n //_viewer.addGeoportalLayer('ORTHOIMAGERY.ORTHOPHOTOS.PARIS', {});\n }\n catch (e) {\n console.error(\"Something went wrong while loading one of the Geoportal layer\")\n }\n\n // ---- OPEN DATA TREES (Paris 12)\n // @TODO : load this kind of data from db or conf files\n\n // var treeLayerStyle = new OpenLayers.StyleMap(new OpenLayers.Style(\n // {\n // 'externalGraphic': 'img/arbre.png',\n // 'graphicWidth': \"${dimension}\",\n // 'graphicHeight': \"${dimension}\"\n // },\n // {\n // context: {\n // dimension: function (feature)\n // {\n // if (typeof(feature.attributes.count) === 'undefined') { // not a cluster, atomic feature\n // return 15;\n // }\n // else\n // {\n // var featuresInCluster = feature.attributes.count;\n // if ( featuresInCluster >= 1000){\n // return 40;\n // }\n // else if (featuresInCluster >= 100) {\n // return 30;\n // }\n // else {\n // return 20;\n // }\n // }\n // }\n // }\n // })\n // );\n //\n //\n // try {\n // _viewer.getMap().addLayer(\n // \"WFS\",\n // 'Trees',\n // \"http://localhost/cgi-bin/mapserv.exe?map=..%5Cwfs.map&\", //@todo change hard coded address\n // {typename:'trees_wfs'},\n // {\n // featurePrefix:'ms',\n // featureNS:'http://mapserver.gis.umn.edu/mapserver',\n // geometryName:'msGeometry',\n // projection:'EPSG:2154',\n // maxExtent:new OpenLayers.Bounds(653227.687500,6858349.000000, 657171.625000, 6861778.000000),\n // styleMap:treeLayerStyle,\n // visibility:false,\n // strategies:[new OpenLayers.Strategy.Fixed(), new OpenLayers.Strategy.Cluster({\n // distance: 40,\n // threshold: 10\n // })]\n // });\n // }\n // catch (e) {\n // console.error(\"Unable to access open data on mapserver\");\n // console.error(e.message);\n // }\n\n //--- CURRENT POSITION\n _currentPosLayer = new OpenLayers.Layer.Vector(\"Current Position\");\n _viewer.getMap().addLayer(_currentPosLayer);\n\n var currentPosGeom = new OpenLayers.Geometry.Point(_currentPos.easting, _currentPos.northing);\n\n // converting from lambert93 to viewer srs\n currentPosGeom = currentPosGeom.transform(new OpenLayers.Projection(\"EPSG:2154\"), _viewer.getMap().getProjectionObject());\n var truckFeature = new OpenLayers.Feature.Vector(currentPosGeom, {},\n {\n externalGraphic: \"images/position.png\",\n graphicWidth: 35,\n graphicHeight: 71\n });\n\n /*var frustumFeature = new OpenLayers.Feature.Vector(currentPosGeom.clone(), {},\n {\n externalGraphic: \"images/frustum.png\",\n graphicWidth: 46,\n graphicHeight: 129\n });*/\n\n _currentPosLayer.addFeatures([/*frustumFeature,*/truckFeature]);\n\n // click on map move the current position and the position in the 3D world if possible\n // add the control enabling it there\n OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {\n defaultHandlerOptions: {\n 'single': true,\n 'double': true,\n 'pixelTolerance': 0,\n 'stopSingle': false,\n 'stopDouble': false\n },\n handleRightClicks: true,\n initialize: function(options) {\n\n\n // Get control of the right-click event:\n document.getElementById('geoportailDiv').oncontextmenu = function(e) {\n e = e ? e : window.event;\n if (e.preventDefault)\n e.preventDefault(); // For non-IE browsers.\n else\n return false; // For IE browsers.\n };\n\n\n this.handlerOptions = OpenLayers.Util.extend({}, this.defaultHandlerOptions);\n OpenLayers.Control.prototype.initialize.apply(this, arguments);\n this.handler = new OpenLayers.Handler.Click(\n this,\n {\n 'click': this.trigger,\n\n }, this.handlerOptions\n );\n },\n //@todo\n trigger: function(e) {\n\n var lonlat = _viewer.getMap().getLonLatFromPixel(e.xy);\n lonlat.transform(_viewer.getMap().getProjectionObject(), new OpenLayers.Projection(\"EPSG:2154\"));\n Navigation.goToClosestPosition({x: lonlat.lon, y: 0, z: lonlat.lat}, {distance: 100});\n\n },\n \n\n });\n\n var click = new OpenLayers.Control.Click();\n _viewer.getMap().addControl(click);\n click.activate();\n\n //--- PANORAMICS (dev helper @todo see how to exclude it when building)\n if (DEBUG === true) {\n _panoramicLayer = new OpenLayers.Layer.Vector(\"Zone Accquisition\");\n\n // _itineraryLayer **********************************************\n _itineraryLayer = new OpenLayers.Layer.Vector(\"Biking Navigation\");\n _viewer.getMap().addLayer(_itineraryLayer);\n\n _laserLayer = new OpenLayers.Layer.Vector(\"Laser Mesure\");\n _viewer.getMap().addLayer(_laserLayer);\n\n _geoveloLayer= new OpenLayers.Layer.Vector(\"geovelo\");\n _viewer.getMap().addLayer(_geoveloLayer);\n\n _selectControl = new OpenLayers.Control.SelectFeature(_panoramicLayer, {\n onSelect: function(feature)\n {\n _selectedFeature = feature;\n var popup = new OpenLayers.Popup.FramedCloud(\"Pano\",\n feature.geometry.getBounds().getCenterLonLat(),\n null,\n \"<div style='font-size:.8em'>\\n\\\n <p>Easting : \" + feature.attributes.easting + \"</p>\\n\\\n <p>Northing : \" + feature.attributes.northing + \"\\n\\\n <p>Distance to position : \" + feature.attributes.distance + \"<p>\\n\\\n <p>Orientation to position : \" + feature.attributes.orientation + \"<p>\\n\\\n </div>\",\n null, true, function(evt) {\n _selectControl.unselect(_selectedFeature)\n });\n feature.popup = popup;\n //_viewer.getMap().addPopup(popup);\n },\n onUnselect: function(feature) {\n _viewer.getMap().removePopup(feature.popup);\n feature.popup.destroy();\n feature.popup = null;\n },\n hover: false\n });\n _viewer.getMap().addLayer(_panoramicLayer);\n\n //_viewer.getMap().addControl(_selectControl);\n //_selectControl.activate();\n }\n\n var initPos = currentPosGeom.clone();\n initPos.transform(_viewer.getMap().getProjectionObject(), new OpenLayers.Projection(\"CRS:84\"))\n\n _viewer.getMap().setCenterAtLonLat(initPos.x, initPos.y, 17);\n\n _viewer.openToolsPanel(false);\n _viewer.openLayersPanel(false);\n _viewer.setInformationPanelVisibility(false);\n _viewer.setToolsPanelVisibility(false);\n\n _initialized = true;\n _initializing = false;\n\n // Cartography.rotatePositionMarker(-90);//_heading); console.log(\"HEADIIIING\",_heading);\n }", "function initMap()\n\n\n {\n var options = {\n mode: 'normal',\n territory: 'FXX'\n };\n\n _viewer = new Geoportal.Viewer.Default(_mapDivId, options, OpenLayers.Util.extend(\n options, window.gGEOPORTALRIGHTSMANAGEMENT === undefined ? {\n 'apiKey': 'cleok'\n } : gGEOPORTALRIGHTSMANAGEMENT));\n\n if (!_viewer)\n {\n throw new Error(\"Failed to intilise the Geoportal viewer\");\n }\n\n //Remove logo and copyright\n var dirts = [_viewer.getMap().getControlsByClass('Geoportal.Control.PermanentLogo')[0],\n _viewer.getMap().getControlsByClass('Geoportal.Control.Logo')[0],\n _viewer.getMap().getControlsByClass('Geoportal.Control.TermsOfService')[0]];\n\n for (var k = 0, dirtLen = dirts.length; k < dirtLen; k++) {\n _viewer.getMap().removeControl(dirts[k]);\n }\n\n //Hide copyright\n //document.getElementById(\"cp_Geoportal.Control.Information_55\").style.display = \"none\";\n\n //---- LAYERS\n\n //---- PREDEFINED GEOPORTAL LAYERS\n try {\n\n _viewer.addGeoportalLayer('GEOGRAPHICALGRIDSYSTEMS.MAPS', {});\n _viewer.addGeoportalLayer('ORTHOIMAGERY.ORTHOPHOTOS', {});\n //_viewer.addGeoportalLayer('ORTHOIMAGERY.ORTHOPHOTOS.PARIS', {});\n }\n catch (e) {\n console.error(\"Something went wrong while loading one of the Geoportal layer\")\n }\n\n // ---- OPEN DATA TREES (Paris 12)\n // @TODO : load this kind of data from db or conf files\n\n // var treeLayerStyle = new OpenLayers.StyleMap(new OpenLayers.Style(\n // {\n // 'externalGraphic': 'img/arbre.png',\n // 'graphicWidth': \"${dimension}\",\n // 'graphicHeight': \"${dimension}\"\n // },\n // {\n // context: {\n // dimension: function (feature)\n // {\n // if (typeof(feature.attributes.count) === 'undefined') { // not a cluster, atomic feature\n // return 15;\n // }\n // else\n // {\n // var featuresInCluster = feature.attributes.count;\n // if ( featuresInCluster >= 1000){\n // return 40;\n // }\n // else if (featuresInCluster >= 100) {\n // return 30;\n // }\n // else {\n // return 20;\n // }\n // }\n // }\n // }\n // })\n // );\n //\n //\n // try {\n // _viewer.getMap().addLayer(\n // \"WFS\",\n // 'Trees',\n // \"http://localhost/cgi-bin/mapserv.exe?map=..%5Cwfs.map&\", //@todo change hard coded address\n // {typename:'trees_wfs'},\n // {\n // featurePrefix:'ms',\n // featureNS:'http://mapserver.gis.umn.edu/mapserver',\n // geometryName:'msGeometry',\n // projection:'EPSG:2154',\n // maxExtent:new OpenLayers.Bounds(653227.687500,6858349.000000, 657171.625000, 6861778.000000),\n // styleMap:treeLayerStyle,\n // visibility:false,\n // strategies:[new OpenLayers.Strategy.Fixed(), new OpenLayers.Strategy.Cluster({\n // distance: 40,\n // threshold: 10\n // })]\n // });\n // }\n // catch (e) {\n // console.error(\"Unable to access open data on mapserver\");\n // console.error(e.message);\n // }\n\n //--- CURRENT POSITION\n _currentPosLayer = new OpenLayers.Layer.Vector(\"Current Position\");\n _viewer.getMap().addLayer(_currentPosLayer);\n\n var currentPosGeom = new OpenLayers.Geometry.Point(_currentPos.easting, _currentPos.northing);\n\n // converting from lambert93 to viewer srs\n currentPosGeom = currentPosGeom.transform(new OpenLayers.Projection(\"EPSG:2154\"), _viewer.getMap().getProjectionObject());\n var truckFeature = new OpenLayers.Feature.Vector(currentPosGeom, {},\n {\n externalGraphic: \"images/position.png\",\n graphicWidth: 35,\n graphicHeight: 71\n });\n\n /*var frustumFeature = new OpenLayers.Feature.Vector(currentPosGeom.clone(), {},\n {\n externalGraphic: \"images/frustum.png\",\n graphicWidth: 46,\n graphicHeight: 129\n });*/\n\n _currentPosLayer.addFeatures([/*frustumFeature,*/truckFeature]);\n\n // click on map move the current position and the position in the 3D world if possible\n // add the control enabling it there\n OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {\n defaultHandlerOptions: {\n 'single': true,\n 'double': true,\n 'pixelTolerance': 0,\n 'stopSingle': false,\n 'stopDouble': false\n },\n handleRightClicks: true,\n initialize: function(options) {\n\n\n // Get control of the right-click event:\n document.getElementById('geoportailDiv').oncontextmenu = function(e) {\n e = e ? e : window.event;\n if (e.preventDefault)\n e.preventDefault(); // For non-IE browsers.\n else\n return false; // For IE browsers.\n };\n\n\n this.handlerOptions = OpenLayers.Util.extend({}, this.defaultHandlerOptions);\n OpenLayers.Control.prototype.initialize.apply(this, arguments);\n this.handler = new OpenLayers.Handler.Click(\n this,\n {\n 'click': this.trigger,\n\n }, this.handlerOptions\n );\n },\n //@todo\n trigger: function(e) {\n\n var lonlat = _viewer.getMap().getLonLatFromPixel(e.xy);\n lonlat.transform(_viewer.getMap().getProjectionObject(), new OpenLayers.Projection(\"EPSG:2154\"));\n Navigation.goToClosestPosition({x: lonlat.lon, y: 0, z: lonlat.lat}, {distance: 100});\n\n },\n \n\n });\n\n var click = new OpenLayers.Control.Click();\n _viewer.getMap().addControl(click);\n click.activate();\n\n //--- PANORAMICS (dev helper @todo see how to exclude it when building)\n if (DEBUG === true) {\n _panoramicLayer = new OpenLayers.Layer.Vector(\"Zone Accquisition\");\n\n // _itineraryLayer **********************************************\n _itineraryLayer = new OpenLayers.Layer.Vector(\"Biking Navigation\");\n _viewer.getMap().addLayer(_itineraryLayer);\n\n _laserLayer = new OpenLayers.Layer.Vector(\"Laser Mesure\");\n _viewer.getMap().addLayer(_laserLayer);\n\n _geoveloLayer= new OpenLayers.Layer.Vector(\"geovelo\");\n _viewer.getMap().addLayer(_geoveloLayer);\n\n _selectControl = new OpenLayers.Control.SelectFeature(_panoramicLayer, {\n onSelect: function(feature)\n {\n _selectedFeature = feature;\n var popup = new OpenLayers.Popup.FramedCloud(\"Pano\",\n feature.geometry.getBounds().getCenterLonLat(),\n null,\n \"<div style='font-size:.8em'>\\n\\\n <p>Easting : \" + feature.attributes.easting + \"</p>\\n\\\n <p>Northing : \" + feature.attributes.northing + \"\\n\\\n <p>Distance to position : \" + feature.attributes.distance + \"<p>\\n\\\n <p>Orientation to position : \" + feature.attributes.orientation + \"<p>\\n\\\n </div>\",\n null, true, function(evt) {\n _selectControl.unselect(_selectedFeature)\n });\n feature.popup = popup;\n //_viewer.getMap().addPopup(popup);\n },\n onUnselect: function(feature) {\n _viewer.getMap().removePopup(feature.popup);\n feature.popup.destroy();\n feature.popup = null;\n },\n hover: false\n });\n _viewer.getMap().addLayer(_panoramicLayer);\n\n //_viewer.getMap().addControl(_selectControl);\n //_selectControl.activate();\n }\n\n var initPos = currentPosGeom.clone();\n initPos.transform(_viewer.getMap().getProjectionObject(), new OpenLayers.Projection(\"CRS:84\"))\n\n _viewer.getMap().setCenterAtLonLat(initPos.x, initPos.y, 17);\n\n _viewer.openToolsPanel(false);\n _viewer.openLayersPanel(false);\n _viewer.setInformationPanelVisibility(false);\n _viewer.setToolsPanelVisibility(false);\n\n _initialized = true;\n _initializing = false;\n\n // Cartography.rotatePositionMarker(-90);//_heading); console.log(\"HEADIIIING\",_heading);\n }", "function initMapParts(layers) { \n \n //The Search Filter class handles the user defined filters\n searchFilters = new SearchFilters();\n searchFilters.basicSearchChanged = updateFilteredSearch; //One of the filter parameters has changed\n searchFilters.advanceSearchChanged = updateAdanvceSearch;\n \n\n //The Provider List class builds the provider list on the left of the map\n providerList = new ProviderList();\n providerList.listItemSelected = openFeaturePopup //An Event that fires off when a user selects a provider item\n \n //A helper for working with the provider feature layer\n providerFeatureLayer = new ProviderFeatureLayer();\n \n //The Provider Feature Layer in the map.\n providerFS = layers[0].layer;\n \n //The event that is fired off when a feature is selected\n //In this case we want to select the provider list item when a feature is selected on the map\n providerFS.on(\"selection-complete\", featureServiceClicked); \n \n //We need the FeatureLayer for performing Searches, such as a drop down that populates with\n //results from a query\n searchFilters.setFeatureLayer(providerFS);\n\n //Add Geolocate Button\n geoLocate = new LocateButton({\n map: map\n }, dom.byId(\"LocateButton\"));\n geoLocate.startup();\n \n //Use Geolocation if available on the browser to find the current location\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n } \n }", "function edgtfOnDocumentReady() {\n\t\tedgtfShowGoogleMap();\n\t}", "function onRenderComplete (map, fn) {\n if (map.loaded()) {\n onRender()\n } else {\n map.on('load', onRender)\n }\n var hasCompleted = false\n function onRender () {\n process.nextTick(() => {\n if (map.areTilesLoaded() && map.isStyleLoaded()) {\n var timeout = setTimeout(() => {\n hasCompleted = true\n fn()\n }, 2000)\n map.once('render', () => {\n if (hasCompleted) {\n return console.error('a map tile emitted a render' +\n 'event after we saved the PNG image. This might be because your' +\n 'internet connection is very slow, and it means that some icons' +\n 'may be missing from the map')\n }\n clearTimeout(timeout)\n onRender()\n })\n } else {\n map.once('render', onRender)\n }\n })\n }\n}", "function init() {\n\n var layers = [\n new ol.layer.Tile({\n source: new ol.source.TileWMS({\n url: 'http://ows.terrestris.de/osm-gray/service',\n params: {\n LAYERS: 'OSM-WMS',\n VERSION: '1.1.1'\n },\n attributions: [new ol.Attribution({\n html: '&copy; WMS: ' +\n '<a href=\"http://terrestris.de/\">' +\n 'terrestris GmbH & Co. KG</a> <br>' + \n '&copy; Data: ' +\n '<a href=\"http://openstreetmap.org/\">' +\n 'OpenStreetMap and Contributors</a>'\n })\n ]\n })\n }),\n new ol.layer.Tile({\n source: new ol.source.TileWMS({\n url: 'http://localhost:10080/geoserver243/fossgis2014/wms',\n params: {\n LAYERS: 'bands',\n VERSION: '1.1.1'\n }\n })\n })\n ];\n\n var projection = new ol.proj.Projection({\n code: 'EPSG:900913',\n units: 'm'\n });\n \n map = new ol.Map({\n layers: layers,\n renderer: [/*\"webgl\",*/ \"canvas\", \"dom\"],\n target: 'map',\n view: new ol.View2D({\n center: [0, 0],\n projection: projection,\n zoom: 2\n })\n });\n}", "function fnMainMapEventListener() {\n\tdojo.connect(basemap, \"onUpdateStart\", function() {\n\t\tshowLoadingMap(); //로딩바 보이기\n\t\t\n\t\t//화살표 표시\n\t\tfnDispArrow();\n\t\t\n\t\t/*if ($(\"#map_graphics_layer\").find(\"text\").length != m_UserGraphicFontSize.length) {\n\t\t\tm_UserGraphicFontSize = [];\n\t\t\t$(\"#map_graphics_layer\").find(\"text\").each(function() {\n\t\t\t\tm_UserGraphicFontSize.push(Number($(this).attr(\"font-size\")));\n\t\t\t});\t\n\t\t}*/\n\t});\n\tdojo.connect(basemap, \"onUpdateEnd\", function() {\n\t\thideLoadingMap(); //로딩바 숨기기\n\t\t\n\t\t/*$(\"#map_graphics_layer\").find(\"text\").each(function(i, data) {\n\t\t\t$(this).attr(\"font-size\", 1 / m_MainMap.getScale() * m_UserGraphicFontSize[i]);\n\t\t});*/\n\t});\n\n\tm_MainMap.on(\"mouse-wheel\", function (res) {\n\t\tindexMapMoveYn = false;\n\t\tmainMapMoveYn = true;\n\t});\n\n\tm_MainMap.on(\"mouse-down\", function (res) {\n\t\tindexMapMoveYn = false;\n\t\tmainMapMoveYn = true;\n\t});\n\tm_MainMap.on(\"mouse-move\", function (res) {\n\t\tvar mapPt = res.mapPoint;\n\t\tvar curCoordX = formatLocalizedDecimal(mapPt.x, 4);\n\t\tvar curCoordY = formatLocalizedDecimal(mapPt.y, 4);\n\n\t\t$(\"#coord\").text(\"X:\" + curCoordX + \" Y:\" + curCoordY);\n\t});\n\n\t//축척변경 이벤트 - 축척View 변경/인덱스맵 변경/분할지도 변경\n\tm_MainMap.on(\"extent-change\", function (res) {\n\t\t//축척View변경\n\t\t$(\"#txt_Scale\").val(parseInt(m_MainMap.getScale()));\n\n\t\tif (indexMap.graphics == null)\n\t\t\treturn;\n\t\tindexMap.graphics.clear();\n\n\t\tvar xmax = m_MainMap.extent.xmax;\n\t\tvar xmin = m_MainMap.extent.xmin;\n\t\tvar ymax = m_MainMap.extent.ymax;\n\t\tvar ymin = m_MainMap.extent.ymin;\n\t\tvar extPolygon = new esri.geometry.Polygon([\n\t\t\t\t\t[xmin, ymin],\n\t\t\t\t\t[xmax, ymin],\n\t\t\t\t\t[xmax, ymax],\n\t\t\t\t\t[xmin, ymax],\n\t\t\t\t\t[xmin, ymin]]);\n\t\tvar indexGraphic = new esri.Graphic(extPolygon, new esri.symbol.SimpleFillSymbol(\n\t\t\t\t\tesri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(\n\t\t\t\t\t\tesri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 0, 0, 0])));\n\t\tindexMap.graphics.add(indexGraphic);\n\t});\n\n\t//범례 생성\n\tm_MainMap.on(\"layers-add-result\", function (evt) {\n\t\t$(\"#mapCtrl1\").click();\n\n\t\tesri.request({\n\t\t\turl : urlBasemap + \"/layers\",\n\t\t\tcontent : {\n\t\t\t\tf : \"json\"\n\t\t\t},\n\t\t\thandleAs : \"json\"\n\t\t}).then(function (res) {\n\t\t\tm_LayersInfo = res; //published map with noscale\n\n\t\t\tesri.request({\n\t\t\t\turl : urlBasemap_scale + \"/layers\",\n\t\t\t\tcontent : {\n\t\t\t\t\tf : \"json\"\n\t\t\t\t},\n\t\t\t\thandleAs : \"json\"\n\t\t\t}).then(function (res) {\n\t\t\t\tm_LayersInfo_scale = res; //published map with scale\n\n\t\t\t\t//drawing legend with user_config\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype : \"post\",\n\t\t\t\t\tdataType : \"json\",\n\t\t\t\t\tdata : {\n\t\t\t\t\t\tUSER_ID : $(\"#USER_ID\").val(),\n\t\t\t\t\t\tSYS_ID : $(\"#SYS_ID\").val()\n\t\t\t\t\t},\n\t\t\t\t\turl : \"/etc/etcMapUserConfigList.do\",\n\t\t\t\t\tsuccess : function (data) {\n\t\t\t\t\t\tif (data.list.length > 0) {\n\t\t\t\t\t\t\tm_IsSavedMap = true;\n\t\t\t\t\t\t\tm_UserConfigExtent = data.list[0].EXTENT;\n\t\t\t\t\t\t\tm_UserConfigLayers = data.list[0].LAYERS;\n\t\t\t\t\t\t\tm_UserConfigVisibles = data.list[0].VISIBLES;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror : function (xhr, status, error) {\n\t\t\t\t\t\talert(status);\n\t\t\t\t\t\talert(error);\n\t\t\t\t\t},\n\t\t\t\t\tcomplete : function (data) {\n\t\t\t\t\t\tif (m_IsSavedMap)\n\t\t\t\t\t\t\tm_MainMap.setExtent(new esri.geometry.fromJson(JSON.parse(m_UserConfigExtent)));\n\t\t\t\t\t\t// In aMapToc.js\n\t\t\t\t\t\tfnSetTocList();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}, function (error) {\n\t\t\t\talert(\"failed get m_LayersInfo_scale\\ncause :\" + error);\n\t\t\t});\n\t\t}, function (error) {\n\t\t\talert(\"failed get m_LayersInfo\\ncause :\" + error);\n\t\t});\n\t});\n}", "function initMap() {\n var uluru = getUserLocation();\n map = new google.maps.Map(document.getElementById('map'), {\n zoom: 8,\n center: uluru\n });\n\n getImages(uluru);\n\n map.addListener('dragend', function() {\n var center = map.getCenter();\n getImages({lat: center.lat(), lng: center.lng()});\n });\n}", "function amMapCompleted(map_id) {\n\tAmmap.publish('ammapcompleted', map_id);\n}", "function init() {\n\t\n initMap();\n initUI();\n}", "function canvasInitializedCallback() {\n var kineticCanvas = getKineticCanvas();\n kineticCanvas.add(drawLayer);\n // Note that we want 'contentClick', not 'click'\n kineticCanvas.on('contentClick', pointClickHandler);\n\n // location type button is set in html from controller. Use that to initialize\n setLocationTypeFromSelectedButton();\n drawInitialPoints();\n}", "function init_Mapa2() {\n //Crear mapa en el elemento DOM\n var bingApiKey = \"AoqHQ_lF0XVJw-wQgHZa-nD_s49vCYuKDLzXriH-cgFPpI0l8bVw_C__Af5BNLnM\";\n\n var mapa = new ol.Map({\n view: new ol.View({\n zoom: 4,\n center: [-223293, 5247800],\n }),\n target: 'Mapa2',\n layers: [new ol.layer.Tile({\n source: new ol.source.TileWMS({\n url: 'http://demo.mapserver.org/cgi-bin/wms',\n params: {\n 'LAYERS': 'bluemarble'\n },\n }),\n }),\n new ol.layer.Tile({\n source: new ol.source.BingMaps({\n key: bingApiKey,\n imagerySet: 'CanvasGray'\n }),\n title: 'CanvasGray',\n opacity: 0.5\n })\n ]\n });\n}", "function initMap() {\n // basic leaflet map setup\n CONFIG.map = L.map('map', {\n attributionControl:false,\n zoomControl: false,\n minZoom: CONFIG.minzoom, maxZoom: CONFIG.maxzoom,\n attributionControl: false,\n });\n\n // add zoom control, top right\n L.control.zoom({\n position:'topright'\n }).addTo(CONFIG.map);\n\n // map panes\n // - create panes for basemaps\n CONFIG.map.createPane('basemap');\n CONFIG.map.getPane('basemap').style.zIndex = 300;\n CONFIG.map.getPane('basemap').style.pointerEvents = 'none';\n CONFIG.map.createPane('hybrid');\n CONFIG.map.getPane('hybrid').style.zIndex = 301;\n CONFIG.map.getPane('hybrid').style.pointerEvents = 'none';\n CONFIG.map.createPane('satellite');\n CONFIG.map.getPane('satellite').style.zIndex = 302;\n CONFIG.map.getPane('satellite').style.pointerEvents = 'none';\n CONFIG.map.createPane('labels');\n CONFIG.map.getPane('labels').style.zIndex = 475;\n CONFIG.map.getPane('labels').style.pointerEvents = 'none';\n // - create map panes for county interactions, which will sit between the basemap and labels\n CONFIG.map.createPane('country-mask');\n CONFIG.map.getPane('country-mask').style.zIndex = 320;\n CONFIG.map.createPane('country-hover');\n CONFIG.map.getPane('country-hover').style.zIndex = 350;\n CONFIG.map.createPane('country-select');\n CONFIG.map.getPane('country-select').style.zIndex = 450;\n CONFIG.map.createPane('feature-pane');\n CONFIG.map.getPane('feature-pane').style.zIndex = 550;\n\n // add attribution\n var credits = L.control.attribution().addTo(CONFIG.map);\n credits.addAttribution('Interactive mapping by <a href=\"http://greeninfo.org\" target=\"_blank\">GreenInfo Network</a>. Data: <a href=\"https://globalenergymonitor.org/\" target=\"_blank\">Global Energy Monitor</a>');\n\n // Add a feature group to hold the mask, essentially a grey box covering the world minus the country in the view\n CONFIG.mask = L.featureGroup([L.polygon(CONFIG.outerring)], {pane: 'country-mask' }).addTo(CONFIG.map);\n CONFIG.mask.setStyle(CONFIG.maskstyle);\n\n // Add a layer to hold countries, for click and hover (not mobile) events on country features\n CONFIG.countries = L.featureGroup([], { pane: 'country-hover' }).addTo(CONFIG.map);\n L.geoJson(DATA.country_data,{ style: CONFIG.country_no_style, onEachFeature: massageCountryFeaturesAsTheyLoad });\n\n // add a layer to hold any selected country\n CONFIG.selected_country = {};\n CONFIG.selected_country.layer = L.geoJson([], {style: CONFIG.country_selected_style, pane: 'country-select'}).addTo(CONFIG.map);\n\n // add a feature group to hold the clusters\n CONFIG.cluster_layer = L.featureGroup([], {pane: 'feature-pane' }).addTo(CONFIG.map);\n\n // once the map is done loading, resize\n CONFIG.map.on('load', function() {\n resize();\n CONFIG.map.invalidateSize();\n });\n\n // create an instance of L.backButton()\n CONFIG.back = new L.backButton() // not added now, see initButtons()\n\n // zoom listeners\n CONFIG.map.on('zoomend', function() {\n let zoom = CONFIG.map.getZoom();\n });\n\n}", "function loadMap() {\r\n hideall();\r\n $(\"#map\").show();\r\n $(\"#sidebar\").show();\r\n deactiveAll();\r\n $(\"#side-map\").addClass(\"active\");\r\n $(\"#navbar\").show();\r\n\r\n // Additonal calls \r\n loadMain();\r\n\r\n}", "function firstMapLoad(){\n window.$( 'loading_div' ).parentNode.removeChild( window.$( 'loading_div' ) );\n window.$( 'zoom_control' ).style.visibility = 'visible';\n this.removeEventListener( 'load', firstMapLoad );\n \n \n // This primes the first history position so that there will be a \"state\" if the person\n // uses the back button, then sets the onPopState variable to true so that an identical \n // \"state\" won't be pushed onto the history stack.\n window.history.replaceState( {\n minxOld : this.presentMinX,\n maxxOld : this.presentMaxX,\n minyOld : this.presentMinY,\n maxyOld : this.presentMaxY,\n zoom: window.$( 'zoom_slider' ).style.top,\n title: \"SnoCo Interactive Map\"\n }, \n \"title 1\",\n ( !window.theMap.infoFromUrl )?'?={\"x\":'+ this.presentMinX +',\"mx\":'+ this.presentMaxX +',\"y\":'+ this.presentMinY +',\"my\":'+ this.presentMaxY +',\"z\":'+ this.sliderPosition +'}' \n : window.location.search\n );\n this.onPopState = true;\n window.cityCoordinates_module.resizeSvgCities();\n window.marker_module.makeInterStateShields();\n window.marker_module.isSimpleMarkerOnImage();\n window.scaleBarSvg_module.scaleBarInit();\n window.$('small_county_svg').style.opacity = 1;\n }", "function initMap() {\n // Constructor creates a new map - only center and zoom are required.\n map = new google.maps.Map(document.getElementById('container'), initialLocation);\n setMarkers();\n}", "function initMap() {\n //The api is loaded at this step\n //L'api est chargée à cette étape\n\n // add translations\n translate();\n\n var blyr= OpenLayers.Util.getElement('gpChooseBaseLayer');\n blyr.onchange= function() {\n _switchBL(this.options[this.selectedIndex].value);\n };\n\n //options for creating viewer:\n var options= {\n // default value\n // valeur par défaut\n //mode:'normal',\n // default value\n // valeur par défaut\n //territory:'FXX',\n // default value\n // valeur par défaut\n //displayProjection:'IGNF:RGF93G'\n // only usefull when loading external resources\n // utile uniquement pour charger des resources externes */\n proxy:'/geoportail/api/xmlproxy'+'?url='\n };\n\n // viewer creation of type <Geoportal.Viewer>\n // création du visualiseur du type <Geoportal.Viewer>\n // HTML div id, options\n viewer= new Geoportal.Viewer.Default('viewerDiv', OpenLayers.Util.extend(\n options,\n // API keys configuration variable set by\n // <Geoportal.GeoRMHandler.getConfig>\n // variable contenant la configuration des clefs API remplie par\n // <Geoportal.GeoRMHandler.getConfig>\n window.gGEOPORTALRIGHTSMANAGEMENT===undefined? {'apiKey':'nhf8wztv3m9wglcda6n6cbuf'} : gGEOPORTALRIGHTSMANAGEMENT)\n );\n if (!viewer) {\n // problem ...\n OpenLayers.Console.error(OpenLayers.i18n('new.instance.failed'));\n return;\n }\n\n viewer.addGeoportalLayers([\n 'ORTHOIMAGERY.ORTHOPHOTOS',\n 'GEOGRAPHICALGRIDSYSTEMS.MAPS'],\n {});\n // set zoom now to fix baseLayer ...\n viewer.getMap().setCenterAtLonLat(2.5, 46.6, 5);\n // cache la patience - hide loading image\n viewer.div.style[OpenLayers.String.camelize('background-image')]= 'none';\n\n //Ajout d'une couche KML : les frontières pour vérifier les reprojections\n var styles= new OpenLayers.StyleMap(OpenLayers.Feature.Vector.style[\"default\"]);\n var symb= {\n 'Frontière internationale':{strokeColor:'#ffff00', strokeWidth:5},\n 'Limite côtière' :{strokeColor:'#6600ff', strokeWidth:3}\n };\n styles.addUniqueValueRules('default', 'NATURE', symb);\n styles.addUniqueValueRules('select', 'NATURE', symb);\n var borders= viewer.getMap().addLayer(\"KML\",\n {\n 'borders.kml.name':\n {\n 'de':\"Limits\",\n 'en':\"Borders\",\n 'es':\"Límites\",\n 'fr':\"Limites\",\n 'it':\"Limiti\"\n }\n },\n \"../data/FranceBorders.kml\",\n {\n visibility: true,\n styleMap:styles,\n originators:[{\n logo:'ign',\n url:'http://professionnels.ign.fr/ficheProduitCMS.do?idDoc=5323861'\n }],\n minZoomLevel:0,\n maxZoomLevel:11\n }\n );\n\n //Ajout d'une couche WMS compatible Geoportail et Mercator Spherique\n var cadastro= viewer.getMap().addLayer(\"WMS\",\n {\n 'cadastro.layer.name':\n {\n 'de':'Spanisch kataster',\n 'en':'Spanish cadastre',\n 'es':'Cadastro español',\n 'fr':'Cadastre Espagnol',\n 'it':'Spagnolo Catasto'\n }\n },\n \"http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?\",\n {\n layers:'Catastro',\n format:'image/png',\n transparent:true\n },\n {\n singleTile:false,\n projection: 'EPSG:4326',\n srs:{'EPSG:4326':'EPSG:4326', 'EPSG:3857':'EPSG:3857'},//some supported SRS from capabilities\n // maxExtent expressed in EPSG:4326 :\n maxExtent: new OpenLayers.Bounds(-18.409876,26.275447,5.22598,44.85536),\n minZoomLevel:5,\n maxZoomLevel:15,\n opacity:1.0,\n units:'degrees',\n isBaseLayer: false,\n visibility:false,\n legends:[{\n style:'Default',\n href:'http://ovc.catastro.meh.es/Cartografia/WMS/simbolos.png',\n width:'160',\n height:'500'\n }],\n originators:[\n {\n logo:'catastro.es',\n pictureUrl:'http://www.catastro.meh.es/ayuda/imagenes/escudo.gif',\n url:'http://ovc.catastro.meh.es'\n }\n ]\n });\n\n //Ajout d'une couche WFS : les cours d'eau pour vérifier les reprojections\n var sandre= viewer.getMap().addLayer(\"WFS\",\n {\n 'sandre.layer.name':\n {\n 'de':\"Wasser kurses\",\n 'en':\"Water courses\",\n 'es':\"Cursos de agua\",\n 'fr':\"Cours d'eau\",\n 'it':\"Corsi d'acqua\"\n }\n },\n/* veille version\n \"http://services.sandre.eaufrance.fr/geo/zonage-shp?\",\n */\n/* url de test\n \"http://services.sandre.eaufrance.fr/geotest/mdo_metropole?\",\n */\n/* url sandre\n */\n \"http://services.sandre.eaufrance.fr/geo/mdo_FXX?\",\n {\n/* veille version\n typename: 'RWBODY'\n */\n typename:'MasseDEauRiviere'\n },\n {\n projection:'EPSG:2154',\n units:'m',\n // maxExtent expressed in EPSG:2154 :\n maxExtent: new OpenLayers.Bounds(-58253.71015916939,6031824.7296808595,1181938.177574663,7233428.222339219),\n minZoomLevel:11,\n maxZoomLevel:16,\n /**\n * wfs_options\n * optional: holds information about the wms layer behavior\n * optionnel: contient les informations permettant d'affiner le comportement de la couche wfs\n */\n protocolOptions:{\n featurePrefix:'sa',\n featureNS:'http://xml.sandre.eaufrance.fr/',\n geometryName:'msGeometry'\n },\n originators: [\n {\n logo:'sandre',\n pictureUrl: 'img/logo_sandre.gif',\n url: 'http://sandre.eaufrance.fr'\n }\n ],\n styleMap: new OpenLayers.StyleMap({\n \"default\": new OpenLayers.Style({strokeColor:'#0000ff', strokeWidth:3}),\n \"select\" : new OpenLayers.Style({strokeColor:'#3399ff', strokeWidth:3})\n }),\n hover: false\n });\n\n // See OpenLayers spherical-mercator.html :\n // In order to keep resolutions, projection, numZoomLevels,\n // maxResolution and maxExtent are set for each layer.\n\n // OpenStreetMap tiled layer :\n var osmarender= new OpenLayers.Layer.OSM(\n \"OpenStreetMap (Mapnik)\",\n \"http://tile.openstreetmap.org/${z}/${x}/${y}.png\",\n {\n projection: new OpenLayers.Projection(\"EPSG:900913\"),\n units: \"m\",\n numZoomLevels: 18,\n maxResolution: 156543.0339,\n maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508),\n visibility: false,\n originators:[{\n logo:'osm',\n pictureUrl:'http://wiki.openstreetmap.org/Wiki.png',\n url:'http://wiki.openstreetmap.org/wiki/WikiProject_France'\n }]\n });\n viewer.getMap().addLayers([osmarender]);\n}", "initialMap(){\n map = new BMap.Map(\"l-map\");\n map.centerAndZoom(\"武汉\",12); // 初始化地图,设置城市和地图级别。\n map.enableScrollWheelZoom(true);\n\n map.addEventListener('click', this.mapClick);\n\n new BMap.Autocomplete( //建立一个自动完成的对象\n {\n \"input\" : \"suggestId\",\n \"location\" : map,\n onSearchComplete: this.searchComplete\n },\n );\n }", "function _draw() {\n _map.baseLayer.container.appendChild(_self.container);\n _redraw();\n }", "function presentMap() {\n if (tracksDoneLoading()) {\n hideLoader();\n fitMapBounds();\n loadPhotos();\n }\n }", "function init() {\n map = new OpenLayers.Map(\"hotelMap\");\n var mapnik = new OpenLayers.Layer.OSM();\n var zoom = 15;\n var center = new OpenLayers.LonLat(1.17359, 52.59761).transform('EPSG:4326', 'EPSG:3857');\n map.addLayer(mapnik);\n map.setCenter(center, zoom);\n}", "initMap() {\n const position = [51.505, -0.09];\n const map = L.map(this._mapNode).setView(\n position,\n this.state.currentZoomLevel\n );\n const tileLayer = esri.basemapLayer('Topographic').addTo(map);\n\n this.setState({map, tileLayer});\n window.myMap = map;\n L.marker(position)\n .addTo(map)\n .bindPopup('A pretty CSS3 popup. <br> Easily customizable.');\n }", "function initMapLoadError() {\n alert('Fehler beim Laden der Google Maps API');\n console.log('Fehler beim Laden der Google Maps API');\n}", "function receiveTilesLoadedEvent() {\n map.tilesLoaded = true;\n if (!map.isCodeMarkerDisplayed()) {\n map.setCodeMarker(\n displayedCode.codeArea.latitudeLo,\n displayedCode.codeArea.longitudeLo,\n displayedCode.codeArea.latitudeHi,\n displayedCode.codeArea.longitudeHi);\n // Zooming in is easier than zooming out.\n zoomToCode();\n }\n}" ]
[ "0.72007793", "0.69397837", "0.6793498", "0.6711798", "0.67069906", "0.6685676", "0.66706115", "0.6648385", "0.6640614", "0.66198504", "0.6521417", "0.649485", "0.649349", "0.64130837", "0.64113635", "0.63870126", "0.6380731", "0.63685036", "0.6327631", "0.628617", "0.628531", "0.62830544", "0.6282456", "0.6280221", "0.627592", "0.62555164", "0.6255505", "0.6239416", "0.6214079", "0.62074065", "0.6200617", "0.6200193", "0.61954224", "0.61883587", "0.617725", "0.61719406", "0.6151374", "0.6139433", "0.6134582", "0.61336666", "0.61259097", "0.61210847", "0.611288", "0.61063975", "0.6095696", "0.6077078", "0.60680294", "0.6060448", "0.60483927", "0.60479", "0.6039741", "0.6037487", "0.60208917", "0.60199916", "0.6015733", "0.6014453", "0.60106194", "0.5993607", "0.5989759", "0.5989594", "0.59881556", "0.59854084", "0.5984011", "0.5974781", "0.59668845", "0.5964422", "0.5953639", "0.5953635", "0.59520745", "0.5938502", "0.59340733", "0.59319496", "0.59075063", "0.5891942", "0.58867496", "0.58815527", "0.5868368", "0.5868368", "0.5864611", "0.5843883", "0.5840264", "0.58399135", "0.583978", "0.5835114", "0.5823134", "0.5818631", "0.5814397", "0.5813507", "0.5811704", "0.58066154", "0.5798142", "0.57920325", "0.5785428", "0.57853204", "0.5781598", "0.5778395", "0.5778302", "0.57745427", "0.57737666", "0.57720613" ]
0.7122066
1
function to show feedback form when a user click to submit feedback on a site
function feedback(complexID) { dojo.byId("formDiv").innerHTML = '<div id="feedbackInfo">Submit comments here for site ID: <label id="feedbackID">1234</label></div><form><label for="emailInput">email: </label><br><input type="email" required name="email" id="emailInput" class="feedbackInput"/><br><label for="commentsInput">comments: </label><br><textarea id="commentsInput" rows="5" cols="25" required></textarea><br><div id="feedbackButtons"><button type="button" onclick="showFeedbackResult()" id="submitButton">Submit</button><button type="button" onclick="cancelFeedback()" title="Cancel" id="cancelButton">Cancel</button></div></form>'; dojo.byId("feedbackID").innerHTML = complexID; //dojo.style(dojo.byId("submittedInfo"),"visibility","hidden"); //dojo.style(dojo.byId("formDiv"),"visibility","visible"); dojo.style(dojo.byId("feedbackForm"),"visibility","visible"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function feedback_form_open(){\n document.getElementById('form-feedback-problem').style.display = \"block\";\n \n}", "function ShowFeedback() {\n // Show the comment in the feedback feed\n let article = document.getElementById(\"user-feedback\");\n article.classList.add(\"show\");\n\n // Change the display for the page\n let textbox = document.getElementById(\"feedback-textbox\");\n let submission = document.getElementById(\"feedback-submission\");\n textbox.classList.add(\"hide\");\n submission.classList.add(\"hide\");\n\n // Show the thank you message\n let message = document.getElementById(\"thank-message\");\n message.classList.add(\"show\");\n}", "function showFeedbackForm () {\n\tfeedbackForm.style.visibility = \"visible\";\n updateDiv.style.visibility = \"hidden\";\n}", "function feedback() {\n alert(\"Your feedback is submitted.\");\n}", "function sendFeedback() {\n\t// Make sure there's feedback text first\n\tif (!$.trim($(\"#feedbackTextArea\").val())) {\n\t\t$(\"#feedbackEmptyAlert\").removeClass(\"hidden\").hide().slideDown(\"fast\");\n\t\treturn;\n\t}\n\tvar feedbackText = $(\"#feedbackTextArea\").val() + \"\\n---\\n Sent from \" + window.location.href + \"\\n\" + navigator.userAgent;\n\tvar feedbackType = $(\"#feedbackTypeSelector\").val();\n\t$(\"#feedbackSpinner\").removeClass(\"hidden\");\n\t$(\"#feedbackForm\").slideUp();\n\t$.post(\"../feedback/submit\", {\"feedbackType\":feedbackType,\"feedback\":feedbackText}, function(data) {\n\t\t$(\"#feedbackResult\").removeClass(\"hidden\").text(data);\n\t\t$(\"#feedbackSpinner\").addClass(\"hidden\");\n\t});\n}", "function sendFeedback() {\n\t// Make sure there's feedback text first\n\tif (!$.trim($(\"#feedbackTextArea\").val())) {\n\t\t$(\"#feedbackEmptyAlert\").removeClass(\"hidden\").hide().slideDown(\"fast\");\n\t\treturn;\n\t}\n\tvar feedbackText = $(\"#feedbackTextArea\").val() + \"\\n---\\n Sent from \" + window.location.href + \"\\n\" + navigator.userAgent;\n\tvar feedbackType = $(\"#feedbackTypeSelector\").val();\n\t$(\"#feedbackSpinner\").removeClass(\"hidden\");\n\t$(\"#feedbackForm\").slideUp();\n\t$.post(\"../feedback/submit\", {\"feedbackType\":feedbackType,\"feedback\":feedbackText}, function(data) {\n\t\t$(\"#feedbackResult\").removeClass(\"hidden\").text(data);\n\t\t$(\"#feedbackSpinner\").addClass(\"hidden\");\n\t});\n}", "function SubmitFeedback() {\n // Check if user has submitted feedback\n let feedbackLand = parseInt(sessionStorage.getItem(\"feedbackLand\"));\n\n if(feedbackLand == 0) {\n document.getElementById(\"submit-feedback\").addEventListener(\"click\", function(button) {\n button.preventDefault();\n \n // Show the feedback window\n ShowFeedback();\n });\n } else {\n // Show the feedback window\n ShowFeedback();\n }\n}", "function activateFeedbackForm() {\n\t$(\"#submit_btn\").click(function() {\n\t\tvar user_name = $('input[name=name]').val();\n\t\tvar user_message = $('textarea[name=message]').val();\n\t\tvar proceed = true;\n\n\t\tif (proceed) {\n\t\t\tpost_data = {\n\t\t\t\t'userName': user_name,\n\t\t\t\t'userMessage': user_message\n\t\t\t};\n\t\t\t$.post('email.php', post_data, function(data) {\n\t\t\t\t$(\"#result\").hide()\n\t\t\t\t\t.html('<div class=\"success\">' + data + '</div>').slideDown();\n\t\t\t\t$('#contact_form input').val('');\n\t\t\t\t$('#contact_form textarea').val('');\n\n\t\t\t}).fail(function(err) {\n\t\t\t\t$(\"#result\").hide()\n\t\t\t\t\t.html('<div class=\"error\">' + err.statusText + '</div>').slideDown();\n\t\t\t});\n\t\t}\n\n\t});\n\n\t$(\"#contact_form input, #contact_form textarea\").keyup(function() {\n\t\t$(\"#contact_form input, #contact_form textarea\").css('border-color', '');\n\t\t$(\"#result\").slideUp();\n\t});\n}", "function onClickSubmit() {\n // Grab comment\n console.log(document.getElementById(\"comment_box\").value);\n var feedback = document.getElementById(\"feedback\");\n checkSelection();\n if (!noStoreSelected) {\n checkRating();\n }\n // Add or modify a review if selections are valid\n if (!noStoreSelected && !noRating) {\n addReview(store);\n // Display success message and direct users back to the main page\n document.getElementById(\"feedback\").innerHTML = \"Thanks for your feedback!\";\n $(feedback).css({\n color: \"green\"\n });\n $(feedback).show(0);\n $(feedback).fadeOut(2500);\n setTimeout(function () {\n location.href = \"/web/member/main.html\"\n }, 2300);\n }\n}", "function submitFeedbacks(mode) {\n\tif (mode == \"default\") {\n\t\talert(\"Your score will be available in the comments section...\");\n\t}\n\t//alert(mode);\n\tgetElements(mode);\n\treturn\n}", "function displayFeedback(message) {\n $(\"#feedback-block\").html(message);\n $(\"#feedback-container\").fadeIn(500).delay(2000).fadeOut(500);\n }", "function feedbackButton() {\n $( '#age-selector-response .thank-you' ).show();\n $( '#age-selector-response .helpful-btn' )\n .attr( 'disabled', true )\n .addClass( 'btn__disabled' ).hide();\n}", "function feedbackForm() {\n form.addEventListener(\"submit\", e => pushNewFeedback(e))\n}", "function loadFeedback() {\n fetch(`/feedback?timeZone=${getBrowserTimeZone()}&userTime=${getCurrentTime()}&interview=${getScheduledInterviewId()}&role=${getRole()}`)\n .then(response => response.text())\n .then(form => {\n document.getElementById('feedBackForm').innerHTML = form;\n }); \n}", "function submitRevisionRequest(){\n var request = document.getElementById(\"feedback-request-review\");\n request.innerHTML = \"Your request has been processed\";\n request.style.display=\"block\";\n}", "function showupdateForm () {\n\tupdateDiv.style.visibility = \"visible\";\n feedbackForm.style.visibility = \"hidden\";\n\t\n}", "function submitMessage() {\r\n\t$(\"#contact form input, #contact form textarea\").hide();\r\n\t$(\"#contact form\").append(\"<strong>Thank you, we'll be in touch shortly!</strong>\");\r\n _gaq.push(['_trackPageview', '/thankyou']);\r\n\tdocument.getElementById(\"google-adwords-fake-target\").src = \"thank-you.html\";\r\n}", "function contactView() {\n qs(\"main\").classList.add(\"hidden\");\n qs(\"#feedback textarea\").value = \"\";\n id(\"feedback\").classList.remove(\"hidden\");\n id(\"faq\").classList.add(\"hidden\");\n }", "function displayFeedback(){\n \n $(\"#feedback-wrapper\").show();\n $(\"#trivia-wrapper\").hide();\n $(\"#time-remaining\").empty();\n\n $(\"#correct-answer\").text(\"The correct answer is: \" + trivia_questions[indexCount].correctAnswer);\n $(\"#answer-img\").html(\"<img src=\" + trivia_questions[indexCount].imageUrl + \">\");\n\n if(answeredRight && clicked === true){\n $(\"#feedback\").text(\"You are correct!\");\n \n }\n\n else if (!answeredRight && clicked === true){\n $(\"#feedback\").text(\"You are Wrong!\");\n \n }\n else {\n $(\"#feedback\").text(\"You are out of time!\");\n }\n\n indexCount++;\n $(\"#trivia-question\").html(\"\");\n $(\".selection\").remove();\n $(\"#trivia-wrapper\").show(); \n \n}", "function setFeedback(feedback) {\n $('#feedback').text(feedback);\n }", "function renderFeedbackView () {\n $('.instructions, .questions, .final-view, .js-start-button, .js-submit-button, .js-replay-button').addClass('js-hide');\n $('.variable-content-container, score-question, .feedback, .js-next-button').removeClass(\"js-hide\");\n generateFeedback();\n}", "function displayFeedback(elem) {\n if (gHideFeedbackTimeout !== undefined) {\n clearTimeout(gHideFeedbackTimeout);\n }\n\n elem.removeClass('hidden');\n\n gHideFeedbackTimeout = setTimeout(function() {\n $('.js_feedback').addClass('hidden');\n }, FEEDBACK_DISPLAY_TIME);\n }", "function showFeedback(type, target, message) {\n if (type == \"error\") {\n if (target.match(/(^|\\s)#as-\\S+/g)) {\n $(target).removeClass(function(index, css) {\n return (css.match(/(^|\\s)label\\S+/g) || []).join(' ');\n });\n $(target).addClass(\"label-danger\").text(message).fadeIn(400);\n $('#webArchivesSearch button[type=\"submit\"]').prop(\"disabled\", true);\n $('#resourceid_0-search button[type=\"submit\"]').prop(\"disabled\", true);\n } else {\n $(target).removeClass(function(index, css) {\n return (css.match(/(^|\\s)alert\\S+/g) || []).join(' ');\n });\n $(target).addClass(\"alert alert-danger\").text(message).fadeIn(400);\n }\n } else if (type == \"success\") {\n if (target.match(/(^|\\s)#as-\\S+/g)) {\n $(target).removeClass(function(index, css) {\n return (css.match(/(^|\\s)label\\S+/g) || []).join(' ');\n });\n $(target).addClass('label-success').text(message).fadeIn(400);\n $(\"#webArchivesSearch button[type='submit']\").prop(\"disabled\", false);\n $(\"#resourceid_0-search button[type='submit']\").prop(\"disabled\", false);\n } else {\n $(target).removeClass(function(index, css) {\n return (css.match(/(^|\\s)alert\\S+/g) || []).join(' ');\n });\n $(target).addClass('alert-success').text(message).fadeIn(400);\n }\n } else if (type == \"warning\") {\n $(target).removeClass(function(index, css) {\n return (css.match(/(^|\\s)label\\S+/g) || []).join(' ');\n });\n $(target).addClass(\"label-warning\").text(\"Checking Status\").fadeIn(400);\n }\n}", "function show_user_feedback_dialog() {\n document.getElementById('user_feedback_pop_up_background').style.display = \"block\";\n}", "function renderFeedback() {\r\n let html = addHtmlFeedback();\r\n $('main').html(html);\r\n \r\n}", "function showFeedback(elementId){\n\t$(\"#editfb\"+elementId).hide();\n\t$(\"#feedback\"+elementId).fadeIn(\"slow\");\t\t\n}", "function handleAnswerFeedback() {\n // to open...\n $(\"#submit-answer\").on(\"click\", function (e) {\n e.preventDefault();\n var targetPopupClass = $(this).attr(\"data-popup-open\");\n $(`[data-popup=\"' + targetPopupClass + '\"]`).fadeIn(250);\n e.preventDefault();\n });\n //to close...\n $(\"#close-feedback-modal\").on(\"click\", function (e) {\n var targetPopupClass = $(this).attr(\"data-popup-close\");\n $(`[data-popup = \"' + targetPopupClass + '\"]`).fadeOut(250);\n e.preventDefault();\n renderQuestionFeedback();\n });\n}", "function storeFeedback() {\n let url = URL + \"feedback\";\n let params = new FormData(id(\"feedback\"));\n fetch(url, { method : \"POST\", body : params })\n .then(checkStatus)\n .then(response => response.text())\n .then(displaySuccess)\n .catch(handleRequestError);\n }", "function feedbackForm(e)\n{\n\tShowGrayScreen();\n\tvar div=$(\"<div id='feedbackDiv' style='position: absolute; z-index: 214748364; border-radius: 12px 12px 12px 12px; background-color: white; background-position: center top'>\");\n\t$(div).css(\"width\",\"300px\");\n\t$(div).css(\"height\",\"200px\");\n\tvar lpos=viewport.width/2 - 150;\n\tvar tpos=viewport.height/2 - 100;\n\t$(div).css(\"left\",lpos +\"px\");\n\t$(div).css(\"top\",tpos +\"px\");\n\t\n\tvar fbTable='<table cellspacing=\"0\" cellpadding=\"0\" style=\"height: 100%; width: 100%;\"><tr>';\n\t//first row\n\tfbTable +='<td style=\"height:40px\"><table cellspacing=\"0\" cellpadding=\"0\" style=\"width: 100%; height: 100%; border-top-left-radius: 8px; border-top-right-radius: 8px; background-image: url(&quot;images/feedhead.png&quot;); background-repeat: repeat-x;\"><tr>';\n\tfbTable +='<td style=\"width: 70px; height: 30px;\"><div id=\"cancelFdb\" style=\"margin: 5px; height: 25px; width: 70px;\" class=\"fdbBtnCls\">Cancel</div></td>';\n\tfbTable +='<td nowrap=\"nowrap\" class=\"fdbHeadingText\">Feedback</td>';\n\tfbTable +='<td id=\"sendFdbBtn\" style=\"width: 70px;\"><div class=\"fdbBtnCls\" style=\"float: right; margin: 5px; height: 25px; width:70px;\">Submit</div></td>';\n\tfbTable +='</tr></table></td></tr><tr>';\n\t//second row\n\tfbTable +='<td nowrap=\"nowrap\" style=\"height:30px;padding-left: 5px; padding-top: 5px; padding-bottom: 5px; border-bottom: 1px solid rgb(228, 212, 184);\">';\n\tfbTable +='<div class=\"fdbText\" style=\"float: left; xwidth: 100px; padding-top: 5px;\">Email Id(Optional):</div>';\n\tfbTable +='<input type=\"text\" style=\"border: medium none; xfloat: right; xwidth: 450px; margin-right: 5px; margin-left: 5px;\" class=\"fdbText\" id=\"emailtext\"></td></tr><tr>';\n\t//third row\n\tfbTable +='<td style=\"height:99%;width:99%\"><textarea style=\"overflow-y: auto; margin: 5px 5px 5px 5px; height: 98%; min-width:96%; width: auto; border: medium none;\" class=\"fdbText\" id=\"feedbackDescription\"></textarea></td></tr><tr>';\n\t//fourth row\n\tfbTable +='<td valign=\"top\"><div align=\"center\" id=\"errorMsg\" style=\"display: block;\" class=\"reporttextbold\"></div></td></tr><tr>';\n\t//fifth row\n\tfbTable +='<td height=\"20px\" style=\"padding-left: 5px; color: red;\"><div id=\"feedbackErrorDiv\" style=\"display: none; font-size: 12px;\" class=\"errortext\">Describe here and then click the Submit button.</div></td></tr></table>';\n\t\n\t$(div).append(fbTable);\n\t\n\tjQuery(\"body\").find(\"div:eq(1)\").append(div);\n\t//jQuery(\"#feedbackDescription\").focus();\n\t\n\t$(\"#feedbackDescription\").live(\"keydown\",function(event){\n\t\ttry {\n if (event.keyCode == 9)\n return false;\n }\n catch (err) {\n if (e.keyCode == 9)\n return false;\n }\n\t});\n\t\n\t/*$(\"#feedbackDescription\").live(\"focusin\",function(){\n\t\tisFeedbackVisible=false;\n\t});\n\t$(\"#emailtext\").live(\"focusin\",function(){\n\t\tisFeedbackVisible=false;\n\t});\n\t$(\"#feedbackDescription\").live(\"focusout\",function(){\n\t\tisFeedbackVisible=true;\n\t});\n\t$(\"#emailtext\").live(\"focusout\",function(){\n\t\tisFeedbackVisible=true;\n\t});*/\n\t\n\t$(\"#sendFdbBtn\").live(\"click\",function(){\n\t\tsendFeedback();\n\t});\n\t$(\"#cancelFdb\").live(\"click\",function(){\n\t\tcancelFeedback();\n\t});\n}", "function changeFeedbackMessage() {\n document.querySelector(\"#sendfeedbacksection\").style.display = \"none\";\n document.querySelector(\"#thankyousection\").style.display = \"flex\";\n}", "function feedback(index) {\n document.getElementById('vote-feedback' + index).style.display = 'none';\n document.getElementById('tak-feedback' + index).style.display = 'block';\n}", "function showGeneralFeedback(id){\n \tif($(\"#editgeneralFb\"+id).html()==\"edit general feedback\"){\n\t$(\"#editgeneralFb\"+id).html(\" close general feedback\");\n \t$(\"#genFb\"+id).fadeIn(\"slow\");\n\t}\n\telse{\n\t\t $(\"#editgeneralFb\"+id).html(\"edit general feedback\");\n\t \t $(\"#genFb\"+id).fadeOut(\"slow\");\n\t\t}\n}", "function provide_feedback(is_correct, notice_text, qid) {\n $.ajax({\n url: window.location.pathname + \"/\" + q_id + \"/feedback\",\n type: \"POST\",\n data: { correct: is_correct }\n })\n .done(function( data ) {\n if ( console && console.log ) {\n console.log( \"Sample of data:\", data.slice( 0, 100 ) );\n }\n $('#alert_text').text(notice_text);\n $('.alert').slideDown();\n });\n }", "function submit_feedback() {\n // this function is called when submit button clicked\n // algorithm:\n // - check if text box has content\n // - check if happy/sad filled out\n\n var smile_active = $('#modal-feedback-smile-div').hasClass('smile-active');\n var frown_active = $('#modal-feedback-frown-div').hasClass('frown-active');\n if( !( smile_active || frown_active ) ) {\n alert('Please pick the smile or the frown.')\n } else if( $('#modal-feedback-textarea').val()=='' ) {\n alert('Please provide us with some feedback.')\n } else {\n var user_sentiment = '';\n if(smile_active) {\n user_sentiment = 'smile';\n } else {\n user_sentiment = 'frown';\n }\n var escaped_text = $('#modal-feedback-textarea').val();\n\n // prepare form data \n var data = {\n sentiment : user_sentiment,\n content : escaped_text\n };\n // post the form. the callback function resets the form\n $.post(\"/feedback\", \n data, \n function(response) {\n $('#myModal').modal('hide');\n $('#myModalForm')[0].reset();\n add_alert(response);\n frown_unclick();\n smile_unclick();\n });\n }\n}", "function showFeedbackForm(c)\n{\n // variables can be accessed here as\n // c.x, c.y, c.x2, c.y2, c.w, c.h\n $(\".feedback-bar\").show();\n $(\"input[id=x_coordinate]\").val(c.x);\n $(\"input[id=y_coordinate]\").val(c.y);\n $(\"input[id=width]\").val(c.w);\n $(\"input[id=height]\").val(c.h);\n $(\"#feedback_first_answer\").focus();\n}", "function requestFeedback() {\r\n localStorage.setItem(\"requestFeedback\",\"true\");\r\n}", "function displayFeedback(difference) {\n\t\t//here we are using one more function called feedback(x)\n\t\t//so that we don't have to write $(\"#feedback\").html() \n\t\t//over and over again to select the #feedback section \n\t\t//of the form where we want to display the feedback message\n\t\tif (difference >= 50) {\n\t\t\tfeedback(\"Ice Ice Cold\");\n\t\t}\n\t\telse if (difference >= 30 && difference <= 49) {\n\t\t\tfeedback(\"Ice Cold\");\n\t\t}\n\t\telse if (difference >= 20 && difference <= 29) {\n\t\t\tfeedback(\"Cold\");\n\t\t}\n\t\telse if (difference >= 10 && difference <= 19) {\n\t\t\tfeedback(\"Warm\");\n\t\t}\n\t\telse if (difference >= 5 && difference <= 9) {\n\t\t\tfeedback(\"Hot\");\n\t\t}\n\t\telse {\n\t\t\tfeedback(\"Very Very Hot\");\n\t\t}\n\t}", "function toggleSubmission() {\n\n let form = document.getElementById('newMessageForm');\n if (form.style.display === 'none') return form.style.display = 'block';\n else form.style.display = 'none';\n}", "function _renderThanks() {\r\n el.form.hide();\r\n $('#thank-you').show();\r\n }", "function displayFeedback (message) {\n var message = message;\n var para = document.querySelector (\"#feedback\");\n clearContent(document.querySelector(\"#feedback\"));\n para.textContent = \"\\n\" + message;\n}", "function displaySuccessMessage() {\n $(\"#feedback\").html(\"Success! Please wait...\");\n $(\"#feedback\").css({\n color: \"green\"\n });\n $(\"#feedback\").show(0);\n $(\"#feedback\").fadeOut(1000);\n setTimeout(function () {\n // Refresh the page (will be redirected if there are no more quests to approve)\n location.reload();\n }, 1000);\n}", "function handleFeedback() {\n $('#submit-button').on('click', function(event) {\n event.preventDefault();\n $('.error-message').hide();\n let currentQuestion = STORE.questions[STORE.currentQuestionIndex];\n let scoreCounter = STORE.score + 1;\n let answerVal = currentQuestion.correctAnswer;\n let inputVal = $('input:radio[name=option]:checked').val();\n if (answerVal == inputVal) {\n $('#js-quiz-page').hide();\n $('#js-feedback-correct').show();\n $('.current-correct').html(\"\");\n $('.current-correct').append(`<h4>${scoreCounter} question(s)</h4>`);\n STORE.score++;\n }\n else if (inputVal === undefined) {\n $('.error-message').show();\n $('.error-message').text(\"Please select an answer!\");\n STORE.currentQuestionIndex--;\n }\n else {\n $('#js-quiz-page').hide();\n $('#js-feedback-incorrect').show();\n $('.number-correct').html(\"\");\n $('.number-correct').append(`<h4>\"${answerVal}\"</h4>`);\n STORE.wrong++;\n }\n STORE.currentQuestionIndex++;\n });\n console.log('`handleFeedback` ran');\n}", "function Checkfeedback()\r\n{\r\n\tif(document.feedback_email.emailaddress.value==\"\")\r\n\t{\r\n\t\talert(lng_feedjsenteremail);\r\n\t\tdocument.feedback_email.emailaddress.focus();\r\n\t\treturn false;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif(!validate_email_feedback(document.feedback_email.emailaddress.value,lng_entervalidemail))\r\n\t\t{\r\n\t\t\tdocument.feedback_email.emailaddress.select();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\tif(document.feedback_email.name.value==\"\")\r\n\t{\r\n\t\talert(lng_feedjsentername);\r\n\t\tdocument.feedback_email.name.focus();\r\n\t\treturn false;\r\n\t}\r\n\tif(document.feedback_email.subject.value==\"none\")\r\n\t{\r\n\t\talert(lng_feedjssubject);\r\n\t\tdocument.feedback_email.subject.focus();\r\n\t\treturn false;\r\n\t}\r\n\tif(document.feedback_email.messagecontent.value==\"\")\r\n\t{\r\n\t\talert(lng_feedjsentmess);\r\n\t\tdocument.feedback_email.messagecontent.focus();\r\n\t\treturn false;\r\n\t}\r\n}", "function showFeedback(result) {\n feedbackTimer = 3;\n answerResult.classList.remove(\"hidden\");\n answerResult.textContent = result;\n feedbackInterval = setInterval(() => {\n feedbackTimer--;\n if (feedbackTimer == 0) {\n answerResult.classList.add(\"hidden\");\n }\n }, 1000);\n}", "function showAddLinkForm(div_to_update, effect_time, height){\n\tif(!b_open_form){\n\t\t//HIDE THE THANK YOU DIV\n\t\tif(b_open_thank_you_div){\n\t\t\tfadeOut($('div_thanks'), .8);\n\t\t\tb_open_thank_you_div = false;\n\t\t}\n\n\t\t$('div_validate_response').innerHTML = '';\n\t\tfoldDown($(div_to_update), effect_time, height);\n\t\tb_open_form = true;\n\t}\n}", "function give_feedback_on_selected_hand(){\n $('.feedback').text( game_instance.determine_feedback_for_selected_hand() );\n }", "function showFeedback(postResponse, action) {\r\n console.log('post success');\r\n console.log(postResponse);\r\n\r\n // change button background to green\r\n switch (action) {\r\n case 'delete':\r\n $('#delete-one').css({\r\n 'background-color': 'green' \r\n }); \r\n break;\r\n\r\n case 'update':\r\n $('#update-one').css({\r\n 'background-color': 'green' \r\n }); \r\n break;\r\n\r\n case 'create':\r\n $('#create-one').css({\r\n 'background-color': 'green' \r\n }); \r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n}", "showFeedback(feedback) {\n if (feedback === \"phoneAndPasswords\") {\n confirmAlert({\n title: 'Feil',\n message: 'Telefonnummeret må være på 8 siffer og passordene må matche.',\n buttons: [\n {\n label: 'Ok',\n },\n ]\n });\n } else if (feedback === \"phone\") {\n confirmAlert({\n title: 'Feil',\n message: 'Telefonnummeret må være på 8 siffer.',\n buttons: [\n {\n label: 'Ok',\n },\n ]\n });\n } else if (feedback === \"passwords\") {\n confirmAlert({\n title: 'Feil',\n message: 'Passordene må matche.',\n buttons: [\n {\n label: 'Ok',\n },\n ]\n });\n } else if (feedback === \"successfullRegistration\") {\n confirmAlert({\n title: 'Suksess!',\n message: 'Bruker registrert!',\n buttons: [\n {\n label: 'Ok',\n },\n ]\n });\n } else if (feedback === \"samePhone\") {\n confirmAlert({\n title: 'Feil',\n message: 'Telefonnummeret er allerede i bruk.',\n buttons: [\n {\n label: 'Ok',\n },\n ]\n });\n } else if (feedback === \"sameEmail\") {\n confirmAlert({\n title: 'Feil!',\n message: 'Eposten er allerede i bruk!',\n buttons: [\n {\n label: 'Ok',\n },\n ]\n });\n } else if (feedback === \"email\") {\n confirmAlert({\n title: \"Feil!\",\n message: \"Eposten er ikke av gyldig format\",\n buttons: [\n {\n label: \"Ok\",\n }\n ]\n })\n } else if (feedback === \"pwLen\") {\n confirmAlert({\n title: \"Feil!\",\n message: \"Passordet må bestå av minst 8 tegn\",\n buttons: [\n {\n label: \"Ok\"\n }\n ]\n })\n } else if (feedback === \"tooLongData\") {\n confirmAlert({\n title: \"Feil!\",\n message: \"Navnet du har skrevet inn et for langt\",\n buttons: [\n {\n label: \"Ok\"\n }\n ]\n })\n }\n\n }", "async function handleSubmit(e, data,) {\n e.preventDefault();\n alert(`Thank you for your message from ${form.email}`)\n const templateId = 'template_q2f0g8w';\n const serviceID = 'my_gmail';\n sendFeedback(serviceID, templateId, { from_name: form.username, message_html: form.message, reply_to: form.email })\n }", "function formHelper(){\r\n this.setCallback(function(data){\r\n $('#feedback').html(data.feedback);\r\n });\r\n}", "function show_email_form()\n\t{\n\t\tvar info=\"Name:<br><input type='text' name='name'><br>Email:<br><textarea rows='1' cols='50'></textarea><br><input type='submit'value='comment'>\";\n\t\tdocument.getElementById(\"comment_email\").innerHTML=info;\n\t}", "function feedback(){\n var radio = $(this);\n var value = radio.val();\n var id = radio.attr(\"name\");\n if(value == 1){\n relevance = \"relevant\"\n }else if(value == -1){\n relevance = \"irrelevant\"\n }else if(value == 0){\n relevance = \"neutral\"\n }\n if(radio.is(\":checked\")){\n sentence_relevance[id] = value;\n removeSentence(id)\t\n addSentence(relevance, id, 'none')\t\t\n }else{\n sentence_relevance[id] = 0;\n removeSentence(id)\n }\n updateStoredValues();\n if(relevant.length + irrelevant.length > 0){\n $(\"div.task\"+currentTask).find(\".refine-results\").show();\n }else{\n $(\"div.task\"+currentTask).find(\".refine-results\").hide();\n }\n $('div.feedback').show();\n}", "giveFeedback() {\n this.dismiss();\n }", "function giveFeedback(){\n console.log('max')\n $('.customExtras').toggle();\n $('.customExtrasCard').toggle();\n}", "function submitForm() {\n //hide the form\n $submitForm.addClass(\"hidden\");\n\n //reset the form\n $submitForm.trigger(\"reset\");\n\n //show the stories\n $allStoriesList.removeClass(\"hidden\");\n $loadMore.removeClass(\"hidden\");\n }", "function onEnterFeedback(){\n self.fb_msg.value = '';\n self.fb_email.value = notificationSettings.email || '';\n self.ctrl.fb.success = false;\n }", "function submitConformation() {\n swal(\"Thanks For !\", \"Buying The Mega Bus Ticket!\", \"success\");\n}", "function status_anmtn(){\n\n var status = document.getElementById(\"my-form-status\");\n \n status.innerHTML = \"Thanks for your submission!\";\n status.style.display=\"block\";\n setTimeout(()=>{\n status.style.display=\"none\";\n },1000)\n\n}", "function userAnswerFeedbackCorrect () {\n let correctAnswer = `${STORE[questionNumber].correctAnswer}`;\n $('.questionAnswerForm').html(`<div class=\"correctFeedback\"><div class=\"icon\"><img src=\"${STORE[questionNumber].icon}\" alt=\"${STORE[questionNumber].alt}\"/></div><p>You got it right!</p><button type=button class=\"nextButton\">Next</button></div>`);\n}", "function renderForm(showFeedback) {\n $('form')\n .find('input')\n .val('')\n // end allows us to go back to our first query,\n // the form.\n .end()\n .prop('hidden', isLoggedIn);\n\n if (showFeedback) {\n $('.js-login-alert')\n .html(generateFeedback())\n .focus();\n }\n}", "function invisible(){\n feedback.style.visibility = 'hidden';\n}", "function subForm (e) {\n e.preventDefault();\n const userId = getUserId();\n $.ajax({\n url:'/submitFeedback',\n type:'POST',\n data: {\n feedback: $feedbackForm.serialize(),\n userId,\n },\n success: () => onSuccess(),\n error: () => onError()\n });\n }", "function feedbackForCorrect () {\r\n let answerExplain=`${data[questionNumber].answerExplain}`;\r\n $('.questionAnswerForm').html(`<p class=\"feedback\"><img src=\"https://icon-library.net/images/ok-icon/ok-icon-15.jpg\" alt=\"correct logo\"/><p><b>Correct!</b></p><p>${answerExplain}</p><button type=button class=\"nextButton\">Next</button></div>`);\r\n}", "function errorFeedbackMessage() {\n document.querySelector(\"#sendfeedbacksection\").style.display = \"none\";\n document.querySelector(\"#errorsection\").style.display = \"flex\";\n}", "function formEventHaveBeenSubmitted() {\n $('.event_not_yet').hide();\n $('.event_submitted').fadeIn();\n}", "function processForm(){\n\t\tvar name = formHandle.name;\n\t\tvar email = formHandle.email;\n\t\tvar comment = formHandle.comment;\n\t\tvar thanksMsgDiv = document.getElementById(\"section-div2\");\n\t\t//Validation\n\t\tif(name.value===\"\")\n\t\t{\n\t\t\tname.style.background=\"red\";\n\t\t\tname.focus();\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\tif(email.value===\"\")\n\t\t{\n\t\t\temail.style.background=\"red\";\n\t\t\temail.focus();\n\t\t\treturn false;\n\t\t}\n\t\tif(comment.value===\"\")\n\t\t{\n\t\t\tcomment.style.background=\"red\";\n\t\t\tcomment.focus();\n\t\t\treturn false;\n\t\t}\n\t\tformHandle.classList.add(\"section-div2\");\n\t\tthanksMsgDiv.innerHTML=\"<p>Thank you!! \" + name.value +\" </p>\" + \"<span>Your message has been sent.</span> \"\n\t\t\n\t}", "function generateFeedback () {\n let chosen = $('input:checked').val();\n let correct = STORE[questionNum-1]['correctIndex'];\n let response = STORE[questionNum-1]['correctExplanation'];\n $('span.js-correct-answer').text(response);\n if (chosen == correct) {\n updateScore();\n $('.incorrect').addClass('js-hide');\n } else {\n $('.correct').addClass('js-hide');\n };\n}", "function render_feedback(id, feedback, correct, ans){\n $(\".feedback_section\").val(\"\")\n $(\".feedback_section\").append(feedback);\n $(\".feedback_section\").removeClass(\"hidden\")\n $(\".feedback_section\").show()\n $(\".card\").css(\"cursor\", \"auto\");\n if (id == \"10\") {\n $(\"#finish_btn\").removeClass(\"hidden\")\n $(\"#finish_btn\").show()\n }\n else {\n $(\".next_q_btn\").removeClass(\"hidden\")\n $(\".next_q_btn\").show()\n console.log(\"hey\")\n }\n\n var c = \"#title_\"+id+\"_\"+correct\n $(c).addClass(\"green\")\n $(\"#body_\"+id+\"_\"+correct).addClass(\"green\")\n if (ans != correct){\n $(\"#title_\"+id+\"_\"+ans).addClass(\"red\")\n $(\"#body_\"+id+\"_\"+ans).addClass(\"red\")\n $(\".feedback_section\").addClass(\"lightred\")\n }\n else {\n $(\".feedback_section\").addClass(\"lightgreen\")\n }\n $(\".pic_correct\").removeClass(\"hidden\")\n $(\".pic_correct\").show()\n\n $(\".card\").hover(function() {\n $(this).css(\"background-color\", \"transparent\");},\n function() {\n $(this).css(\"background-color\", \"transparent\");\n });\n}", "function show_thank()\n{\n only_thankyou=1;\n}", "function handleAnswerSubmits() {\n $(\"#submit-answer\").click(function (e) {\n e.preventDefault();\n // $(\".popup-inner\").removeClass(\"hidden\");\n var userChoice = $(\"input[name='answerChoice']:checked\").val();\n renderQuestionFeedback();\n checkAnswer(userChoice);\n });\n}", "function mailChimp() {\n $('#mc_embed_signup').find('form').ajaxChimp();\n }", "function showSupportRequest() {\n retrieveSupportRequestList();\n standardShowContentPane('supportRequest', 'Support Request');\n if (isFormEmpty('supportRequestForm')) {\n toggleSaveMode('supportRequestForm', false);\n }\n\n}", "function feedback_check(){\r\n\tif(document.question.message.value==\"\"){\r\n\t\talert(\"请填写留言!\");\r\n\t\tdocument.question.message.focus();\r\n\t\treturn false;\r\n\t}\r\nif((!document.question.kind[0].checked)&&(!document.question.kind[1].checked)&&(!document.question.kind[2].checked)&&(!document.question.kind[3].checked)&&(!document.question.kind[4].checked)){\r\nalert(\"请选择意见性质!\");\r\ndocument.question.kind[0].focus();\r\nreturn false;\r\n}\r\nreturn true;\r\n}", "function handleSubmitButton() {\n $('#container').on('submit', 'form', function(event) {\n event.preventDefault()\n//instead do the below\n//userAnswer is a variable that listens for which input is selected within the span sibilings\n const userAnswer = $('input:checked').siblings('label');\n console.log(userAnswer.length);\n if (userAnswer.length == 0) {\n\talert(\"Please select an answer\");\n}\nelse {\n// create a variable that listens for a function that checks the user's answer\n const userIsCorrect = checkUserAnswer(userAnswer);\n//if the user is correct assign +1 to their score\n if(userIsCorrect) {\n \t// console.log(\"correct\")\n $('#container').html(generateCorrectFeedback());\n iterateCorrectAnswers();\n//if the user is incorrect assign nothing to their overall score\n } else {\n // generateIncorrectFeedback();\n //render this function into the html\n $('#container').html(generateIncorrectFeedback());\n }}\n });\n}", "function feedbackFocusFunction() {\n $(\".manual-feedback\").focusout(function () {\n var field = $(this).val();\n if (field == \"\") {\n $(this).siblings(\".alert-div\").removeClass(\"data-success-manual\").addClass(\"data-error-manual\").text(\"*required\");\n } else {\n $(this).siblings(\".alert-div\").removeClass(\"data-error-manual\").addClass(\"data-success-manual\").text(\"validated\");\n }\n });\n }", "function openAnnouncements() {\r\n document.getElementById(\"anmtForm\").style.display = \"block\";\r\n\r\n}", "function showReviewForm() {\n $(\"#review-window\").show();\n $(\"#add-review-button\").show();\n}", "function displayPopup(statusFlag, answer){\n $('.feedback-section').show();\n if(statusFlag){\n $(\".popup-box img\").attr(\"src\",correctAnswerIcon);\n $(\".popup-box #popup-text\").text(\"You are right!\");\n $(\".popup-box\").show();\n }\n else{\n if(answer === undefined) {\n questionCounter--;\n $(\".popup-box img\").attr(\"src\",warningIcon);\n $(\".popup-box #popup-text\").text('Please select an option');\n }\n else{\n $(\".popup-box img\").attr(\"src\",wrongAnswerIcon);\n $(\".popup-box #popup-text\").text(`Sorry, the correct answer was: ${answer}`);\n }\n }\n $(\".popup-box\").show();\n}", "function userFeedback(feedbackMessage) {\n return function () {\n // Provides feedback for the user.\n\n if (typeof chrome.runtime.lastError !== 'undefined') {\n feedbackMessage = chrome.runtime.lastError;\n }\n\n var userFeedback = document.getElementById('user-feedback');\n userFeedback.textContent = feedbackMessage;\n setTimeout(function () {\n userFeedback.textContent = '';\n }, 750);\n }\n}", "submitBudgetForm () {\n\t\t//Get the input value\n\t\tconst value = this.budgetInput.value;\n\n\t\t//If value is less than 0 or it is empty then add class showItem to the budgetfeedback which is an alert which will make its display to block from hidden\n\t\tif (value === '' || value < 0) {\n\t\t\tthis.budgetFeedback.classList.add('showItem');\n\t\t\tthis.budgetFeedback.innerHTML = `<p>Value cannot be negative or empty</p>`;\n\n\t\t\t//store reference of the class to self as for setTimeout function this refers to global window object\n\t\t\tconst self = this;\n\n\t\t\t//Make the feedback hidden after 2 secs\n\t\t\tsetTimeout(() => {\n\t\t\t\tself.budgetFeedback.classList.remove('showItem');\n\t\t\t}, 2000);\n\t\t} else {\n\t\t\tthis.budgetAmount.textContent = value;\n\t\t\tthis.budgetInput.value = '';\n\n\t\t\t//Update the balance amount by calling showBalance method\n\t\t\tthis.showBalance();\n\t\t}\n\t}", "function renderQuestionFeedback(response) {\n var feedback = $(\".popup-inner\");\n if (response === true) {\n feedback.find(\"h2\").text(\"That was correct!\");\n }\n else if (response === false) {\n feedback.find(\"h2\").text(\"Sorry your answer was not correct.\");\n }\n else if (response === \"unanswered\") {\n feedback.find(\"h2\").text(\"Must answer question\");\n }\n}", "openFeedbackDialog() {}", "function showCadFuncForm() {\r\n $(\"#cadFuncForm\").slideDown();\r\n $(\"#cadFuncFeedbackDiv\").hide();\r\n}", "function getFeedback() {\n //creates a jQuery object listening for the button \"questionForm\".submit event.\n //then...\n $(\"#getFeedback\").submit(e => {\n //prevents default behavior of submit button,\n e.preventDefault();\n //creates variable \"answer\" and sets it equal to a jQuery object\n //value for the checked radio button,\n const answer = $(\"input:checked\").val();\n //sets variable inquiry equal to the value stored in currentQuestion in\n //the array.\n const questionNo = STORE.questions[STORE.currentQuestion];\n //if the answer is the correct answer then...\n if (answer == questionNo.answer) {\n //adds one to the players score,\n STORE.score++\n //and tells the player they got the question right.\n STORE.lastQuestion = true;\n } else {//else the player got the question wrong and sets the value to false.\n STORE.lastQuestion = false;\n }\n //changes the page value of STORE to the feedback page\n STORE.page = \"feedback\";\n //calls the render function to display the correct feedback page\n render();\n //resets the html radio selector.\n e.target.reset();\n })\n}", "function afterSubmit(data) {\r\n\t var form = data.form;\r\n\t var wrap = form.closest('div.w-form');\r\n\t var redirect = data.redirect;\r\n\t var success = data.success;\r\n\r\n\t // Redirect to a success url if defined\r\n\t if (success && redirect) {\r\n\t Webflow.location(redirect);\r\n\t return;\r\n\t }\r\n\r\n\t // Show or hide status divs\r\n\t data.done.toggle(success);\r\n\t data.fail.toggle(!success);\r\n\r\n\t // Hide form on success\r\n\t form.toggle(!success);\r\n\r\n\t // Reset data and enable submit button\r\n\t reset(data);\r\n\t }", "handleFeedback() {\n\n let feedback = document.getElementById('feedback').value.trim();\n\n if (feedback === \"\") {\n this.setState({\n alertVisible: true,\n });\n } else {\n remote.call('reports.updateFeedback', this.props.report._id, feedback);\n remote.call('sendAEmail', this.props.report.user, this.props.report.text);\n //history.back();\n }\n this.closeModal();\n }", "function showCommentForm() {\n $('.comments__form-wrapper').hide().removeClass('hide').slideDown(600);\n $('.comments__new-link').slideUp(600);\n }", "function process_answer_submission() {\n var user_answer = given_answer();\n update_question_result(is_correct_answer(user_answer));\n document.getElementById(\"submitter\").style.visibility=\"hidden\";\n}", "function enableFastFeedback(formElement) {\n var nameInput = formElement.find(\"#name\");\n var passwordInput = formElement.find(\"#password\");\n var messageInput = formElement.find(\"#message\");\n var checkedInput = formElement.find(\"#checkbox\");\n\n nameInput.blur(function (event) {\n var name = $(this).val();\n validateNameField(name, event);\n\n if (!isValidName(name)) {\n $(this).css({\n \"box-shadow\": \"0 0 4px red\",\n border: \"1px solid #600\",\n });\n } else {\n $(this).css({\n \"box-shadow\": \"0 0 4px #181\",\n border: \"1px solid #060\",\n });\n }\n });\n\n passwordInput.blur(function (event) {\n var password = $(this).val();\n validatePasswordField(password, event);\n\n if (!isValidPassword(password)) {\n $(this).css({\n \"box-shadow\": \"0 0 4px red\",\n border: \"1px solid #600\",\n });\n } else {\n $(this).css({\n \"box-shadow\": \"0 0 4px #181\",\n border: \"1px solid #060\",\n });\n }\n });\n\n messageInput.blur(function (event) {\n var message = $(this).val();\n validateMessageField(message, event);\n\n if (!isValidMessageField(message)) {\n $(this).css({\n \"box-shadow\": \"0 0 4px red\",\n border: \"1px solid #600\",\n });\n } else {\n $(this).css({\n \"box-shadow\": \"0 0 4px #181\",\n border: \"1px solid #060\",\n });\n }\n });\n\n checkedInput.change(function (event) {\n var isChecked = $(this).is(\":checked\");\n validateCheckedField(isChecked, event);\n\n if (!isChecked) {\n $(this).add(\"label[for='cb']\").css({\n \"box-shadow\": \"0 0 4px red\",\n border: \"1px solid #600\",\n });\n } else {\n $(this).add(\"label[for='cb']\").css({\n \"box-shadow\": \"0 0 4px #181\",\n border: \"1px solid #060\",\n });\n }\n });\n}", "function checkFeedback(myForm)\n{\n //errMsg depends on the language context this form has been called in.\n var errMsg=\"$textLang->{errMsg}\";\n if(myForm.subject.value != \"\" && myForm.message2.value != \"\")\n {\n //The user has filled out the required fields, continue submission.\n\n //if a state has been selected, deselect the country\n if ( myForm.state[0].selected == false )\n {\n myForm.country[0].selected = true;\n }\n //now we return true to allow the form submission\n return true;\n }\n else\n {\n //user forgot to fill in one of the required fields\n alert(errMsg);\n //cancel submit\n return false;\n }\n}", "function displaySubmit() {\n $('main').on('click', 'form', event => {\n if ($('input[name=\"answer\"]:checked').val() !== undefined) {\n $('.submit').removeClass('hidden');\n }\n })\n}", "function feedbackPageHandler(){\n $('main').on('submit', 'form.radio-answers', function() {\n event.preventDefault();\n console.log('next question button clicked');\n STORE.questionNumber += 1;\n if (STORE.questionNumber === 6) {\n currentPage = 'resultsPage';\n return render();\n } else {\n currentPage = 'questionPage';\n return render();\n } \n });\n}", "function successfulSubmit() {\n console.log(\"Successful submit\");\n\n // Publish a \"form submitted\" event\n $.publish(\"successfulSubmit\");\n\n // Hide the form and show the thanks\n $('#form').slideToggle();\n $('#thanks').slideToggle();\n\n if($('#address-search-prompt').is(\":hidden\")) {\n $('#address-search-prompt').slideToggle();\n }\n if($('#address-search').is(\":visible\")) {\n $('#address-search').slideToggle();\n }\n\n // Reset the form for the next submission.\n resetForm();\n }", "function reportProblem(){\n var input = document.getElementById(\"text-area-report-problem\");\n var feedback = document.getElementById(\"feedback-report-problem\");\n // Check that the user introduced something\n if(input.value == \"\"){\n feedback.innerHTML = \"Be sure to type something first, please.\"\n feedback.style.display = \"block\";\n feedback.style.color = \"#ff0000\";\n }else{\n feedback.innerHTML = \"Thank you! Your message will be delivered to the adminsitrators.\"\n feedback.style.display = \"block\";\n feedback.style.color = \"#008000\";\n }\n}", "function feedback(message, guid){\n // var pid = getPidForUser(guid);\n var session = getSessionForUser(guid);\n var originalguid = getFirstGuid(guid);\n // send to session pages - control page can display\n io.to(session).emit('feedback', {\"message\": message, \"user\": originalguid});\n }", "function checkRating() {\n if (!rating) {\n feedback.innerHTML = \"Please rate your experience\"\n $(feedback).css({\n color: \"red\"\n });\n $(feedback).show(0);\n $(feedback).fadeOut(2500);\n noRating = true;\n console.log(\"Review not submitted - no rating.\");\n } else {\n noRating = false;\n }\n}", "function afterSubmit(data) {\n var form = data.form;\n var wrap = form.closest('div.w-form');\n var redirect = data.redirect;\n var success = data.success;\n\n // Redirect to a success url if defined\n if (success && redirect) {\n Webflow.location(redirect);\n return;\n }\n\n // Show or hide status divs\n data.done.toggle(success);\n data.fail.toggle(!success);\n\n // Hide form on success\n form.toggle(!success);\n\n // Reset data and enable submit button\n reset(data);\n }", "function showSuccess() {\r\n\r\n /*hides submit and preview buttons after clicking submit button*/\r\n document.getElementById('successMessage').innerHTML = \"Your changes have been saved!\";\r\n document.getElementById('previewMessage').style.display = 'none';\r\n document.getElementById('previewButton').style.display = 'none';\r\n document.getElementById('successButton').style.display = 'none';\r\n\r\n /*show refresh button to refresh page*/\r\n document.getElementById('refreshButton').style.display = 'block';\r\n\r\n\r\n /*hide last preview after submit*/\r\n document.getElementById('blogTitlePreview2').style.display = 'none';\r\n document.getElementById('blogContentPreview2').style.display = 'none';\r\n\r\n}", "function handleFeedbackIcon(){\n\tif(SOUNDS_MODE){\n\t\taudioClick.play();\t\n\t}\n\t\n\tmtbImport('feedback.js');\n\tbuildFeedbackPopup();\n}", "function display_welcome_message(event) {\n\t\t\t'use strict';\n\t\t\tevent.preventDefault();\n\t\t\t$('#form').hide();\n\t\t\t$('.title1').hide();\n\t\t\t$('#instructions').show();\n\n\t\t }" ]
[ "0.7643869", "0.7587085", "0.73846817", "0.7383526", "0.735089", "0.735089", "0.7327286", "0.7281764", "0.71290183", "0.7111905", "0.71079904", "0.7090412", "0.7075135", "0.70717365", "0.70472664", "0.6868846", "0.686746", "0.6862839", "0.6830329", "0.68250203", "0.67985755", "0.67894346", "0.67659295", "0.6741244", "0.67235184", "0.6719255", "0.67139906", "0.6689246", "0.6686084", "0.6682067", "0.6680564", "0.6641451", "0.66112906", "0.6603248", "0.657944", "0.654635", "0.6509831", "0.6491407", "0.6491371", "0.64783335", "0.6458632", "0.64499396", "0.6424933", "0.642237", "0.64208156", "0.63688046", "0.6361007", "0.63562703", "0.6353094", "0.63498855", "0.6348208", "0.6330979", "0.63214725", "0.6299076", "0.629728", "0.62935853", "0.6282791", "0.6280351", "0.6278398", "0.6268724", "0.6245816", "0.62413895", "0.6239448", "0.62118065", "0.6209204", "0.6183336", "0.6144227", "0.6139814", "0.6131419", "0.61214036", "0.61186326", "0.61110324", "0.6093758", "0.6091418", "0.60803175", "0.6064907", "0.6049296", "0.60489106", "0.60441256", "0.6044115", "0.60425794", "0.6040185", "0.6036461", "0.6032901", "0.60295725", "0.6024613", "0.60202366", "0.6017003", "0.6015297", "0.6014839", "0.6011618", "0.6007475", "0.6002744", "0.59928006", "0.5990246", "0.5984461", "0.5980997", "0.5979876", "0.59750354", "0.59616756" ]
0.62809247
57
USGS Logo click handler function
function showUSGSLinks(evt){ //check to see if there is already an existing linksDiv so that it is not build additional linksDiv. Unlikely to occur since the usgsLinks div is being destroyed on mouseleave. if (!dojo.byId('usgsLinks')){ //create linksDiv var linksDiv = dojo.doc.createElement("div"); linksDiv.id = 'usgsLinks'; //LINKS BOX HEADER TITLE HERE linksDiv.innerHTML = '<div class="usgsLinksHeader"><b>USGS Links</b></div>'; //USGS LINKS GO HERE linksDiv.innerHTML += '<p>'; linksDiv.innerHTML += '<a style="color:white" target="_blank" href="http://www.usgs.gov/">USGS Home</a><br />'; linksDiv.innerHTML += '<a style="color:white" target="_blank" href="http://www.usgs.gov/ask/">Contact USGS</a><br />'; linksDiv.innerHTML += '<a style="color:white" target="_blank" href="http://search.usgs.gov/">Search USGS</a><br />'; linksDiv.innerHTML += '<a style="color:white" target="_blank" href="http://www.usgs.gov/laws/accessibility.html">Accessibility</a><br />'; linksDiv.innerHTML += '<a style="color:white" target="_blank" href="http://www.usgs.gov/foia/">FOIA</a><br />'; linksDiv.innerHTML += '<a style="color:white" target="_blank" href="http://www.usgs.gov/laws/privacy.html">Privacy</a><br />'; linksDiv.innerHTML += '<a style="color:white" target="_blank" href="http://www.usgs.gov/laws/policies_notices.html">Policies and Notices</a></p>'; //place the new div at the click point minus 5px so the mouse cursor is within the div linksDiv.style.top = evt.clientY-5 + 'px'; linksDiv.style.left = evt.clientX-5 + 'px'; //add the div to the document dojo.byId('map').appendChild(linksDiv); //on mouse leave, call the removeLinks function dojo.connect(dojo.byId("usgsLinks"), "onmouseleave", removeLinks); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logoClick(){\r\n\t\tcallAjax(createSlideShow, \"slideshow\", \"get\"); //slideshow\r\n\t\tdocument.getElementById(\"slideshow\").style.display = \"block\";\r\n\t\tdocument.getElementById(\"alloptions\").style.display = \"none\";\r\n\t\tdocument.getElementById(\"headermid\").style.display = \"none\";\r\n\t}", "clickSiteLogo() {\n if (this.siteLogo.waitForExist()) {\n this.siteLogo.click();\n }\n }", "function watchLogo() {\n $('.logo').on('click', function() {\n location.reload();\n });\n}", "function onLogoClick(e) {\n e.preventDefault();\n render();\n fetchDataOfPopularFilms();\n}", "function route_logo(route_id) {\n\t$img = $('<img src=\"./images/routes/' + route_id.toLowerCase() + '.svg\">')\n\t$img.click({route_id : route_id}, load_route_from_event)\n\treturn $img\n}", "function handleUploadLogo($, meta_image_frame) {\n $('#lc_swp_upload_logo_button').click(function(e) {\n e.preventDefault();\n openAndHandleMedia($, meta_image_frame, '#lc_swp_logo_upload_value', '#lc_logo_image_preview img', \"Choose Custom Logo Image\", \"Use this image as logo\");\n });\n\n $('#lc_swp_remove_logo_button').click(function(){\n $('#lc_logo_image_preview img').attr('src', '');\n $('#lc_swp_logo_upload_value').val('');\n })\n}", "function logo_click() {\n if (pasos.paso1.aseguradoraSeleccionada != null && pasos.paso1.aseguradoraSeleccionada.id == pasos.paso1.listaAseguradoras[$(this).index()].id) {\n componentes.progreso.porcentaje = 0;\n componentes.progreso.barra.css({width: '0px'});\n pasos.paso1.aseguradoraSeleccionada = null;\n $(this).removeClass(\"seleccionada\");\n componentes.pasos.paso1.numero_siniestro.prop('readonly', true);\n } else {\n if (pasos.paso1.aseguradoraSeleccionada == null) {\n componentes.progreso.porcentaje = 5;\n componentes.progreso.barra.css({width: '5%'});\n }\n pasos.paso1.aseguradoraSeleccionada = pasos.paso1.listaAseguradoras[$(this).index()];\n $.get('http://localhost:8080/ReForms_Provider/wr/perito/buscarPeritoPorAseguradora/' + pasos.paso1.aseguradoraSeleccionada.id, respuesta_buscarPeritoPorAseguradora, 'json');\n $(this).siblings(\".seleccionada\").removeClass(\"seleccionada\");\n $(this).addClass(\"seleccionada\");\n componentes.pasos.paso1.numero_siniestro.prop('readonly', false);\n }\n componentes.pasos.paso1.numero_siniestro.val('').focus();\n componentes.pasos.paso1.numero_siniestro.keyup();\n }", "function TitleLogo({\n onClick,\n}) {\n return (\n <a href={'http://www.ca.gov'} onClick={onClick}>\n <Image src={logo} alt={'CA Gov Logo'} />\n </a>\n );\n}", "switchtoLogo() {\n this._setState('LogoState');\n }", "function mouseout_LinkHub(logo)\n {\n\t logo.classList.remove('logo-active');\n\t logo.classList.add('logo-in-active');\n }", "function fnLogo() {\n var platform = device.platform;\n \n if(platform === \"iOS\" || platform === \"Android\"){\n $('#platform').removeClass('phonegap').addClass(platform);\n }\n }", "function evtRoutine1( sender, parms )\n {\n var fld = this.FLD.D1_MAIN, ref = this.REF, rtn = Lansa.evtRoutine( this, COM_OWNER, \"#AppBar.IconClick\", 45 );\n\n //\n // EVTROUTINE Handling(#AppBar.IconClick)\n //\n rtn.Line( 45 );\n {\n\n //\n // #AppDrawer.ToggleDrawer\n //\n rtn.Line( 47 );\n ref.APPDRAWER.mthTOGGLEDRAWER();\n\n //\n // #std_textl := '1425'\n //\n rtn.Line( 48 );\n fld.STD_TEXTL.set( \"1425\" );\n\n }\n\n //\n // ENDROUTINE\n //\n rtn.Line( 50 );\n rtn.end();\n }", "function changeLogo(e) {\n console.log(\"mouse is over\");\n logo.setAttribute(\"src\", \"./images/flying-gif-shadow.gif\");\n}", "function imgClick(event) {\n\n}", "handleJDotterClick() {}", "onImageClick() {\n console.log('Clicked Image')\n }", "function logo() {\n \t\tSDLogo = new image(DEMO_ROOT + \"/def/resources/logo.gif\");\t\t\t// Get logo\n \t\tSDLogoScreen = SeniorDads.ScreenHandler.Codef(\t\t\t\t\t\t// Set up canvas for logo\n \t\t\t\tSDLogo.img.width,\n \t\t\t\tSDLogo.img.height,\n \t\t\t\tname, zIndex++, \n \t\t\t\t320 - (SDLogo.img.width /2),\t\t\t\t\t\t\t\t// Set center near-top\n \t\t\t\t20\n \t\t\t\t);\n \t\tSDLogoScreen.hide();\n \t\tSDLogo.draw(SDLogoScreen,0,0);\t\t\t\t\t\t\t\t\t\t// Draw logo on canvas\n \t\tSDLogoWobbler = new SeniorDads.Wobbler(\t\t\t\t\t\t\t\t// Set up wobbler for logo\n \t\t\t\t[\n \t\t\t\t \t{value: 0, amp: 3, inc:0.30},\n \t\t\t\t \t{value: 0.5, amp: 3, inc:0.40}\n \t\t\t\t],\n \t\t\t\t[\n\t \t\t\t\t \t{value: 0.5, amp: 3, inc:0.20},\n\t \t\t\t\t \t{value: 0, amp: 2, inc:0.10}\n\t \t\t\t\t]);\n \t}", "function mouseover_LinkHub(logo)\n{ \n logo.classList.remove('logo-in-active');\n logo.classList.add('logo-active');\n}", "function openInfobox(el){\n\n //Changes infoboc\n changeInfobox()\n\n // Scroll to top animation onclick\n $(\"#logoinfo-wrapper\").animate({\n scrollTop: 0\n }, 200);\n\n var image = el;\n var attribute = image.getAttribute(\"src\");\n\n //Creates selectedLogo for clicked image\n for(var i=0; i<logosList().length; i++){\n if(logosList()[i].img==attribute){\n selectedLogo(logosList()[i]);\n return;\n }\n }\n}", "function toggleLogo(footer, header) {\n const shouldHide = footer.getBoundingClientRect().top < window.innerHeight;\n if (shouldHide) {\n header.classList.remove('opacity-100');\n header.classList.add('opacity-0');\n header.style.pointerEvents = 'none';\n } else {\n header.classList.remove('opacity-0');\n header.classList.add('opacity-100');\n header.style.pointerEvents = 'auto';\n }\n}", "function logoOn() {\r\n\tif (document.getElementById(\"logo\").src == \"https://storage.googleapis.com/risemedialibrary-7fa5ee92-7deb-450b-a8d5-e5ed648c575f/YourLogo.png\") {\r\n\t\tdocument.getElementById(\"logo\").src = \"https://s3.amazonaws.com/Rise-Images/UI/logo.svg\";\r\n\t} \r\n}", "function clickHandler(e) {\n // Nur bei Linksklick\n if (e.button !== 0) return;\n clickAt(e.offsetX, e.offsetY);\n }", "function activateTechLogo() {\n \tvar wrs_tech = \"java\";\n \tdocument.getElementById(wrs_tech + \"_logo\").style.opacity = 0.9;\n }", "imageClick(e) {\n e.preventDefault();\n\n if (this.item.link) {\n window.open(this.item.link, '_blank');\n } else {\n this.shadowRoot.querySelector('#image-dialog').open();\n\n HhAnalytics.trackDialogOpen(this.item.internalTitle);\n }\n }", "_onClick({x,y,object}) {\n console.log(\"Clicked icon:\",object);\n }", "function letIt()\r\n\t{\r\n\t\theader.removeClass('mw-harlem_shake_me im_first');\r\n\t\t$(\"#logo a\").attr(\"href\",\"http://www.jeuxvideo.com/\").attr(\"target\",\"_self\");\r\n\t}", "function logoHandler() {\n if ($window.pageYOffset >= 100) {\n element.removeClass('translucent');\n }\n else {\n element.addClass('translucent');\n }\n scope.$apply();\n }", "function socNetLogo(e){\n\n\n\n\tif(e.target.className == 'innerLink'){\n\n\n\t\tif (e.type == \"mouseenter\") {\n\n\t\t\t$(e.target).animate({\"margin-top\":\"30px\"}, 250);\n\t\t\t$(e.target).animate({\"margin-top\":\"40px\"}, 250);\n\t\n\n\t}\n}\n\n}", "function addLogoAndAssignmentID(assignmentNr, exerciseNr)\n{\n //Add the Fingrafimi logo\n logoS = game.add.button(25, 25, 'logoS');\n //Add the click event that loads the home page\n logoS.events.onInputDown.add(function(){quitExercise(); loadHomePage();});\n\n //Add the assignment button\n assignmentBtn = game.add.button(25, 100, 'btnSprite');\n //Set the frame of the button to the current \n assignmentBtn.frame = assignmentNr;\n\n //Add the click event that loads the home page\n assignmentBtn.events.onInputDown.add(function()\n {\n initWarmUps();\n quitExercise(); \n Assignment(assignmentNr, exerciseNr);\n balloon.visible = false;\n });\n\n //Add the logo of Menntamálastofnun\n addLogo(30, 0.45);\n}", "render(){\n return (\n <div>\n <header>\n {/* <h1> {appName.name} started on {appName.startDate}</h1> */}\n<img src=\"https://assets.pokemon.com/assets/cms2/img/pokedex/full/016.png\"alt=\"\" onClick={this.logWhenClicked}>\n \n </img>\n </header>\n </div>\n )\n }", "function LogoHeaderComponent() {\n }", "function handleClick() {\n\t\t window.ctaClick();\n\t\t}", "function handleClick() {\n\t\t window.ctaClick();\n\t\t}", "function superbgimage_click(img) {\n\t\t\t\t\t\t$fullsize.nextSlide();\n\t\t\t\t\t\t$fullsizetimer.startTimer( 7000 );\n\t\t\t\t\t}", "render() {\r\n return (\r\n <header>\r\n <nav>\r\n <div className=\"nav-elem\"><a onClick = {this.aboutClick}>About</a></div>\r\n <div className=\"nav-circle\">&#183;</div>\r\n <div className=\"nav-elem\"><a onClick = {this.eventsClick}>Events</a></div>\r\n <div className=\"nav-circle\">&#183;</div>\r\n <div className=\"nav-elem\" onClick = {this.homeClick}>\r\n <img id=\"logo\" alt=\"logo\" src=\"images/logo.png\" /> \r\n </div>\r\n <div className=\"nav-circle\">&#183;</div>\r\n <div className=\"nav-elem\"><a onClick = {this.teamClick}>Team</a></div>\r\n <div className=\"nav-circle\">&#183;</div>\r\n <div className=\"nav-elem\"><a onClick = {this.joinClick}>Join</a></div>\r\n </nav>\r\n </header>\r\n );\r\n }", "function signupLinkClick() {\n closeSigninClick();\n signupClick();\n}", "clickHandler(evt) {\n if (evt.target.classList.contains('fa-check')) {\n gameApp.eventHandler(evt);\n }\n\n if (evt.target.classList.contains('assignment') || evt.target.parentElement.classList.contains('assignment')) {\n gameApp.activateContract(evt);\n }\n\n if (evt.target.classList.contains('loc')) {\n gameApp.addLoc();\n }\n\n if (evt.target.classList.contains('nav-button')) {\n let elem = evt.target;\n gameApp.gameView.changeMenue(elem);\n }\n }", "function menuHideLogo() {\n // Much sure the top bar is there\n if ($('.top-bar').length) {\n\n // If the menu icon is clicked\n $('.menu-icon a').click(function() {\n\n // Theres a small delay in the class we need to use being added so we set a time out\n setTimeout(function() {\n // if the top bar has the expanded class\n if ($('.top-bar').hasClass('expanded')) {\n // hide the logo and set nav to relative to pass content down\n $('.l-header__logo').css({'height' : '0','opacity' : '0'});\n $('.l-header__navigation').css('position','relative');\n } else {\n // else undo changes\n $('.l-header__navigation').css('position','absolute');\n $('.l-header__logo').css({'height' : 'auto','opacity' : '1'});\n }\n }, 0.1);\n\n });\n }\n }", "function logoSound() {\n this.logoUp.play('', 0, 0.1, false);\n }", "function initBoolflixClick() {\n var boolflixImg=$(\".header-wrapper>img\");\n\n boolflixImg.click(function(){\n window.location.reload(true);\n });\n}", "function galleryLogo() {\n\t\t$('body').on('click', '#remove_gallery_logo', function(e) {\n\t\t\te.preventDefault();\n\t\t\t$('.gallery-logo-preview').hide();\n\t\t\t$('#gallery_logo').val('');\n\t\t\t$('#remove_gallery_logo').hide();\n\t\t});\n\t\t\n\t\t// Runs when the image button is clicked.\n\t $('#upload_logo_trigger').click(function(e){\n\t // Prevents the default action from occuring.\n\t e.preventDefault();\n\t \n\t\t var button = $(this);\n\t\t var fieldLabel = 'Add logo';\n\t\n\t // Sets up the media library frame\n\t meta_image_frame = wp.media.frames.meta_image_frame = wp.media({\n\t title: fieldLabel,\n\t button: { text: 'Update logo' },\n\t library: { type: 'image' }\n\t });\n\t\n\t // Runs when an image is selected.\n\t meta_image_frame.on('select', function(){\n\t\n\t // Grabs the attachment selection and creates a JSON representation of the model.\n\t var media_attachment = meta_image_frame.state().get('selection').first().toJSON();\n\t \n\t // Update the hidden field with the media id\n\t $('#gallery_logo').val(media_attachment.id);\n\t \n\t // Update our preview image\n\t $('.gallery-logo-preview').attr('src', media_attachment.sizes.thumbnail.uhisrl);\n\t $('.gallery-logo-preview').fadeIn('fast');\n\t $('#remove_gallery_logo').fadeIn('fast');\n\t \n\t });\n\t\n\t // Opens the media library frame.\n\t meta_image_frame.open();\n\t });\n\t}", "handleLogoTouchTap() {\n browserHistory.push('/');\n }", "function show_as_image(e) {\n var me = $(e.target)\n , at = me.parents(sel_svgs)\n ;\n e.preventDefault(); // don't scroll to top\n me.parents('.actions').find('a').css('color', '');\n me.css('color', '#000');\n\n at.find(sel_num).hide(); // hide line numbers\n at.find(sel_raw).children('svg:first').show().siblings().hide(); // show svg\n}", "HAXCMSButtonClick(e) {\n // stub, the classes implementing this will actually do something\n // you always will call super.HAXCMS\n }", "function navBarIconClick(icon) {\n changeIcon(icon);\n openCloseNavBar();\n}", "function viewMobile_Master() {\n logoRender();\n}", "function welcomeDisplay1() {\n push();\n background(boxOffice1.image);\n imageMode(CENTER);\n image(sonicSign.image, sonicSign.x, sonicSign.y, 600, 180);\n pop();\n}", "function onClick(event) {\n\t\t//console.log(event);\t\t\n\t\tvar target = event.target;\n\t\tif (target.classList.contains(\"ui-selector-indicator\")) {\n\t\t\t//console.log(\"Indicator clicked\");\n\t\t\tvar ItemClicked = event.srcElement.textContent;\n\t\t\tconsole.log(\"Item Clicked on home page was: \" + ItemClicked);\n\n\t\t\t//Handel home page click events\n\t\t\tif(ItemClicked == \"Switches\"){\n\t\t\t\ttau.changePage(\"switchesPage\");\n\t\t\t}else if(ItemClicked == \"Clear Database\"){\n\t\t\t\t//------------------------------------------Clear Database\n\t\t\t\t//This should be moved to it's own function.\n\t\t\t\tconsole.log(\"Clearing Database\");\n\t\t\t\tlocalStorage.clear();\n\t\t\t\tAccess_Token = null;\n\t\t\t\tAccess_Url = null;\n\t\t\t\tswitches_DB = null;\n\t\t\t\talert(\"Database Cleared\");\n\t\t\t\t//Maybe we should exit here?\n\t\t\t\t//------------------------------------------Clear Database\n\t\t\t}else if(ItemClicked == \"Routines\"){\n\t\t\t\ttau.changePage(\"routinesPage\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}", "function navActions () {\n $navMain.slideToggle();\n toggleClassOnVisibility($siteLogo, classToToggle);\n}", "function onImgClick () {\n $ ('.img-wrap').one ('click', function (e) {\n console.log ('image clicked');\n console.log (characters);\n attackSound.play ();\n $ ('#selected-character-id').css ('border', 'solid 5px greenyellow');\n $ (this).off (e);\n });\n }", "expandLogo() {\n document.getElementById('logobg').classList.toggle('expand-logo');\n }", "function handTitleClick() {\n console.log('title was clicked!');\n}", "function zommClickImagem() {\r\n\t $('#paginas p>img:not([alt=\"logo\"])').each(function(){\r\n\t\t var alt = $(this).attr(\"alt\")\r\n\t\t if(alt != \"figAlteracaoSenha\" && alt != \"figLogin\" && alt !=\"figLoginRecuperacao\" && alt != \"figFT\" && alt != \"figacordos_convencoes\" && alt != \"figDef\" && alt != \"figManual\")\r\n\t\t $(this).wrap(\"<a class='imagem' href='\"+$(this).attr( \"src\" ) + \"' onclick='return hs.expand(this)'></a>\"); \r\n});\r\n}", "function menu(){\n background(img,0);\n //retangulo para selecionar a tela\n fill(255, 204, 0)\n rect(imgpont,xrectmenu,yrectmenu,larguramenu,alturamenu,20)\n image(imgpont,xrectmenu,yrectmenu,larguramenu,alturamenu,20)\n fill(233,495,67);\n textSize(26);\n text('JOGAR ', 250, 100)\n //detalhes do texto abaixo\n fill(233,495,67);\n textSize(26);\n text('INSTRUÇÕES', 230, 200);\n text('CREDITOS', 230, 300);\n }", "function clickImage (data){\n\t\t\n\t\t/*click function on each image*/\n\t\tdelegate(\"body\",\"click\",\".clickMe\",(event) => {\n\t\t\t\n\t\t\tevent.preventDefault();\n\t\t\tvar dataCaptionId=getKeyFromClosestElement(event.delegateTarget);\n\t\t\tvar dataCaption = data.caption;\n\t\t\tdataCaption = dataCaption.replace(/\\s+/g, \"\");\n\t\t\t\n\t\t\t//match the id and render pop up with the data\n\t\t\tif (dataCaption == dataCaptionId){\n\t\t\t\trenderPopup(data, container) \n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t}", "function showLogo() {\n // toggle center logo\n $(\".right-side\").css({\n animation: \"scaleX-display 1s forwards \"\n });\n $(\".left-side\").css({\n animation: \"scaleX-display 1s forwards \"\n });\n }", "menuButtonClicked() {}", "function imageClick(){\n\t$('.pic').click(function() { \n\t\tmenuModal.style.display = \"block\";\n\t\twindow.onclick = function(event) {\n\t\t\tif (event.target == menuModal) {\n\t\t\t\tmenuModal.style.display = \"none\";\n\t\t\t}\n\t\t}\n\t});\n}", "function resownerlogoUpdate(){\n\t\n\t\tdocument.resOwnerPhotoUpdate.action.value=\"resOwnerLogoUpdates\";\n\t\tdocument.resOwnerPhotoUpdate.submit();\t\n\t}", "function logoArt() {\n console.log(logo(config).render());\n start();\n}", "function logo() {\n document.getElementById(\"logo\").style.cursor = \"pointer\"\n}", "function ClickMe(e) {\n if (userjwt) {\n if (e.target.getAttribute('src') === 'https://img.icons8.com/android/24/ffffff/star.png') {\n e.target.setAttribute('src', 'https://img.icons8.com/ios-filled/25/ffffff/star--v1.png');\n } else if (e.target.getAttribute('src') === 'https://img.icons8.com/ios-filled/25/ffffff/star--v1.png') {\n e.target.setAttribute('src', 'https://img.icons8.com/android/24/ffffff/star.png');\n }\n }\n }", "function clickRegularViewFocusImg(e) {\n\n var clickedThing = e.target;\n\n // if clicked element is a single image or the focus img in a gallery\n if (clickedThing.classList.contains('clickme')) {\n\n // define imgToShow\n var imgToShow = clickedThing;\n\n // call NAMED lightbox function\n lightbox(imgToShow);\n\n // call NAMED function to populate lightbox dots\n populateLightboxDots(imgToShow);\n\n } // close if ('clickme')\n} // close function", "function changeLogoBack(e) {\n logo.setAttribute(\"src\", \"images/logo.png\");\n}", "function clickOnImage(event)\n{\n\tif ($(\"#country_selected\").val() != '0')\n\t{\n\t\tvar e = event || window.event;\n\t\tvar pos = getRelativeCoordinates(event, $(\"#reference\").get(0));\n\t\tvar m = $(\"#marker\").get(0);\n\t\tdisplayMarker(pos.x, pos.y);\n\t}\n}", "function InventoryItemMouth2CupholderGagClick() {\n\tInventoryItemMouthCupholderGagClick();\n}", "function setupHandler(){\n document.getElementById(\"svg2\").onclick = handleSVGTarget\n}", "function loggedOut() {\n $(\"input\").val(\"\");\n $(\"#content .business\").hide();\n $('.intro').fadeIn(300);\n $(\"header .picture\").empty();\n var l = $(\"header .login\").removeClass('clickable');\n l.html('<img src=\"i/persona_sign_in_blue.png\" alt=\"Sign in\">')\n .show().one('click', function() {\n $(\"header .login\").css('opacity', '0.5');\n navigator.id.get(gotVerifiedEmail, browseridArguments);\n }).addClass(\"clickable\").css('opacity','1.0');\n}", "function addNameClickListener(data) { //function to add CAS dev to Pixelbreeze and Zaro's userinfo popups\n $('.msg.cid-' + data.cid + ' .un.clickable').click( function(){\n $('.cas-dev-text').remove();\n if (data.uid === 5792994 || data.uid === 6175571){\n $('#user-rollover .meta').append('<span class=\"cas-dev-text\">CAS dev</span>');\n }\n });\n \n}", "function renderAppLogo() {\n\t$(\".app_logo\").html('<a href=\"'+getRootPath()+'\"><img alt=\"App Logo\" src=\"'+getAppLogoUrl()+'\"' +\n\t\t' class=\"img-fluid\"/></a>');\n}", "function shakeIt()\r\n\t{\r\n\t\theader.addClass('mw-harlem_shake_me im_first');\r\n\t\t$(\"#logo a\").attr(\"href\",\"http://www.jeuxvideo.com/messages-prives/boite-reception.php\").attr(\"target\",\"_blank\");\r\n\t}", "handleArrowClick(e) {\n e.preventDefault();\n this.changeMainImage(e.target.name);\n }", "function EventsViewer_NotificationClick( nponto, id, subest ) {\r\n window.open('screen.html?SELTELA=../svg/'+subest+'.svg','screen','dependent=no,height=1000,width=800,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=no');\r\n }", "function handleClick(e) {\n const src = e.currentTarget.querySelector('img').src;\n const href = this.childNodes[0].nextSibling.href;\n overlayLink.href = href;\n overlayLink.innerText = href;\n overlayImage.src = src;\n overlay.classList.add('open');\n }", "function imgEvent(){\n alert('This is Void Link');\n}", "function resownerlogoAdd(){\n\t\n\t\tdocument.resOwnerPhotoUpdate.action.value=\"resOwnerLogoAdd\";\n\t\tdocument.resOwnerPhotoUpdate.submit();\t\n\t}", "function setUpImageLogout(obj){\r\n\t//create a div to hold image\r\n\tvar div = document.createElement(\"div\");\r\n\tdiv.id = obj.id;\r\n\tdocument.body.appendChild(div);\r\n\r\n\t//add image for this light\r\n\tobj.image.src = imageBack;\r\n\tobj.image.id = \"image\";\r\n\tobj.image.onclick = function(){goLogin(obj);};\r\n\tdocument.getElementById(obj.id).appendChild(obj.image);\r\n\t\r\n\t//add title to image\r\n\tvar p = document.createElement(\"p\");\r\n\tp.innerHTML = obj.name;\r\n\tp.id = \"title\";\r\n\tdocument.getElementById(obj.id).appendChild(p);\r\n}", "function handler() {\n applyFishEye(\n sig.mousecaptor.mouseX,\n sig.mousecaptor.mouseY\n );\n }", "function handler() {\n applyFishEye(\n sig.mousecaptor.mouseX,\n sig.mousecaptor.mouseY\n );\n }", "function ClickGastarFeitico() {\n AtualizaGeral();\n}", "function ips_menu_events()\n{\n}", "function flyToHome() {\r\n $('#main').data('clicked', true);\r\n toggleSvgButton('#main', true);\r\n\r\n closePanel2();\r\n\r\n let selectedAsset = main;\r\n onPickedAsset(selectedAsset);\r\n }", "function onBrowserActionClick() {\n info(\"event: browser action icon was clicked\");\n click($(_ID_STATUS));\n}", "function closeDrawerMenu() {\n\t\t\t$('.pure-toggle-label').click();\n\t\t}", "function modifyLogo() {\n storage\n .get({\n [CHOSEN_LOGO_PRIMARY_KEY]:\n DEFAULT_SETTINGS[CHOSEN_LOGO_PRIMARY_KEY],\n })\n .then((response) => {\n let newLogoUrl = {\n satoriPremium: BANNER_URL,\n tcs: TCS_LOGO_URL,\n alternative: ALT_TCS_LOGO_URL,\n }[response[CHOSEN_LOGO_PRIMARY_KEY]];\n $('img[src=\"/files/satori_banner.png\"]').attr(\n 'src',\n newLogoUrl,\n );\n });\n }", "function burgerMenu(e) {\n $('.icon-one').click(function() {\n $('.sideSection nav ul li').toggle('show')\n })\n }", "function ClickGerarElite() {\n GeraElite();\n AtualizaGeral();\n}", "function headerGetHelpOpenCLose() { \n $('.header--get-help').on('click', function (e) {\n e.preventDefault();\n\n $(this).toggleClass('active');\n if ($(this).hasClass('active')) {\n $('.get-help-block').css({\n 'visibility': 'visible',\n 'opacity': '1'\n });\n $('.master-wrap--overlay').fadeIn(200);\n } else {\n $('.get-help-block').css({\n 'visibility': 'hidden',\n 'opacity': '0'\n });\n $('.master-wrap--overlay').fadeOut(200);\n }\n });\n\n $('.master-wrap--overlay').on('click', function (e) {\n e.preventDefault();\n\n $('.get-help-block').css({\n 'visibility': 'hidden',\n 'opacity': '0'\n });\n $('.master-wrap--overlay').fadeOut(200);\n\n $('.header--get-help').removeClass('active');\n });\n }", "function clickImage(object){\n document.location = page.PRODUCT + '?id=' + object.id;\n}", "function logClick() {\n ReactGA.event({\n category: 'Registration',\n action: 'Clicked Register Today',\n label: 'Challenge Text link',\n });\n}", "chooseNewLogo() {\n this.set('showEditLogo', true);\n }", "render () {\n return (\n <div>\n <img src={FacebookLogin} alt=\"Facebook Login\" onClick={this.handler} id=\"btnFacebookImage\"/>\n </div>\n )\n }", "handleClick() {}", "function onSkateSpotPageClick() {\n console.log('Hit the spot page!')\n}", "function C999_Common_Achievements_Click() {\n C999_Common_Achievements_ResetImage();\n\tClickInteraction(C999_Common_Achievements_CurrentStage);\n\tStopTimer(7.6666667 * 60 * 60 * 1000);\n}", "function menu() {\n// fancychange();\ndocument.getElementById('earth').src=\"themes/\"+theme+\"/menulogo.png\";\ndocument.getElementById('earth').onclick=\"\";\ndocument.getElementById('moon1').src=\"themes/\"+theme+\"/internet.png\";\ndocument.getElementById('moon1').onclick = internet;\n\ndocument.getElementById('moon2').src=\"themes/\"+theme+\"/work.png\";\ndocument.getElementById('moon2').onclick = work;\n\ndocument.getElementById('moon3').src=\"themes/\"+theme+\"/games.png\";\ndocument.getElementById('moon3').onclick = games;\n\ndocument.getElementById('moon4').src=\"themes/\"+theme+\"/media.png\";\ndocument.getElementById('moon4').onclick = media;\n\ndocument.getElementById('moon5').src=\"themes/\"+theme+\"/more.png\";\ndocument.getElementById('moon5').onclick = more;\n\ndocument.getElementById('text1').innerHTML=\"Internet\";\ndocument.getElementById('text2').innerHTML=\"Work\";\ndocument.getElementById('text3').innerHTML=\"Games\";\ndocument.getElementById('text4').innerHTML=\"Media\";\ndocument.getElementById('text5').innerHTML=\"More\";\n\n}", "function mouseClicked(){\n sim.checkMouseClick();\n}", "function runSA(){\nvar path = window.location.hash;\nvar Logo = document.querySelector(\"#logo\");\nif (path == '#home' || path == ''){\n Logo.classList.add(\"unscrolled\");\n Logo.style.top = '';\n Logo.style.left = '';\n Logo.style.width = '';\n Logo.style.margin = '';\n document.addEventListener('scroll', scrollAnim);\n window.addEventListener('load', scrollAnim);\n window.addEventListener('resize', scrollAnim);\n} else {\n //need to style inline or else it gets overwitten even though hashchange should be stopping it from being overwritten\n Logo.classList.remove(\"unscrolled\");\n document.querySelector(\".menu\").classList.remove(\"hidden\");\n Logo.style.top = '40px';\n Logo.style.left = '7vw';\n Logo.style.width = '80px';\n Logo.style.margin = '0 0 0 0';\n }\n}", "function initialize() {\n const logoText = logo({ name: \"Primary C M S\" }).render();\n console.log(logoText);\n mainOptions();\n}", "function handleFeatureLinkClick(evt)\n{\n console.log('a.feature.link was clicked');\n //set the image src to the anchor's href value\n featureImage.src = featureLink.href;\n\n //make the image visible\n featureImage.classList.remove('hidden');\n\n //dont want to load the image in the page\n evt.preventDefault();\n}", "function toClickNavicon() {\n\t\t\tcount++;\n\t\t\tif (count % 2 != 0) {\n\t\t\t\tsidebar.style.left = 0;\n\t\t\t\tmoveLayout.style.marginLeft = 200 + 'px'\n\t\t\t\twrapper.style.opacity = 0.2;\n\t\t\t\tnavicon.style.color = 'rgb(250,250,250)';\n\t\t\t\tdocument.body.style.overflow = 'hidden';\n\t\t\t} \n\t\t\tif (count % 2 == 0) {\n\t\t\t\tsidebar.style.left = -200 + 'px';\n\t\t\t\tmoveLayout.style.marginLeft = 0;\n\t\t\t\twrapper.style.opacity = 1;\n\t\t\t\tnavicon.style.color = 'rgb(88,77,57)';\n\t\t\t\tdocument.body.style.overflow = 'auto';\n\t\t\t}\n\t\t}" ]
[ "0.7047855", "0.64871645", "0.64079124", "0.631334", "0.629696", "0.62641424", "0.6222847", "0.6216063", "0.61945385", "0.6163782", "0.60537195", "0.6052129", "0.59730464", "0.59389526", "0.59354675", "0.59280235", "0.5918165", "0.59111345", "0.5838603", "0.5828612", "0.5811948", "0.5806925", "0.5799615", "0.5779538", "0.5750822", "0.5743405", "0.5738061", "0.5733321", "0.57310545", "0.57264006", "0.5723326", "0.5719019", "0.5719019", "0.5714253", "0.5714103", "0.57035506", "0.5686852", "0.5673226", "0.567239", "0.56667334", "0.56606853", "0.5657932", "0.5656891", "0.5648454", "0.5645865", "0.564113", "0.5637476", "0.56132966", "0.5603359", "0.5602972", "0.557004", "0.55617106", "0.55553025", "0.5551554", "0.55469877", "0.55353284", "0.5533332", "0.5531762", "0.55225325", "0.55198425", "0.55138195", "0.55120903", "0.5511193", "0.55088496", "0.5501747", "0.54996634", "0.5495451", "0.5492854", "0.54881096", "0.5484252", "0.5480052", "0.5479796", "0.54782057", "0.54737467", "0.54721993", "0.5464818", "0.54587704", "0.5456892", "0.5451509", "0.54512703", "0.5446275", "0.5442428", "0.54422", "0.54403234", "0.54393816", "0.543732", "0.5436548", "0.5435932", "0.5435435", "0.5430276", "0.54232544", "0.54218954", "0.5421581", "0.54198617", "0.5419505", "0.54170245", "0.54147947", "0.54129314", "0.5410995", "0.54071873", "0.5403878" ]
0.0
-1
remove (destroy) the usgs Links div (called on mouseleave event)
function removeLinks(){ dojo.destroy('usgsLinks'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeMega(elem){\n\t$(elem).removeClass(\"hovering\");\n\tdata.page = 0;\n\tupdate();\n}", "function addThumbnails(images,links,text){\r\n for(var x=0; x<images.length;x++){\r\n var nail = document.createElement('div');\r\n var image = document.createElement('img');\r\n var link = document.createElement('a');\r\n var title = document.createElement('div');\r\n title.innerHTML = text[x];\r\n link.href = links[x];\r\n image.src = images[x];\r\n title.className=\"thumbTitles\";\r\n image.className=\"thumbPhotos\";\r\n link.className=\"thumbLinks\";\r\n nail.className=\"thumbnail\";\r\n link.appendChild(image);\r\n nail.appendChild(link);\r\n link.appendChild(title); \r\n document.getElementById(\"thumbnails\").appendChild(nail);\r\n \r\n //here we want to make all of the fake links disappear when moused over hahahaha!!\r\n if(x!=0){\r\n nail.onmouseenter =function(){this.style.opacity = 0;\r\n this.style.transition = \"0.5s\"};\r\n nail.className=nail.className + \" disappear\";\r\n }\r\n }\r\n}//end addThumbnails function", "function unhoverizer() {\n\tclearInterval(interval);\n\t$(\".hoverizer\").remove();\n}", "function clearLinks() {\r\n document.getElementById('url').remove();\r\n let div = document.createElement('div');\r\n div.id = 'url';\r\n document.getElementById('URLs').appendChild(div);\r\n}", "destroy() {\n this.$element\n .find(`.${this.options.linkClass}`)\n .off('.zf.tabs').hide().end()\n .find(`.${this.options.panelClass}`)\n .hide();\n\n if (this.options.matchHeight) {\n if (this._setHeightMqHandler != null) {\n $(window).off('changed.zf.mediaquery', this._setHeightMqHandler);\n }\n }\n\n if (this.options.deepLink) {\n $(window).off('popstate', this._checkDeepLink);\n }\n\n Foundation.unregisterPlugin(this);\n }", "function handleVSPLinkVisibility()\n{\n\t$(\".handleVspHide\").remove();\n}", "function destroy() {\n // remove protected internal listeners\n removeEvent(INTERNAL_EVENT_NS.aria);\n removeEvent(INTERNAL_EVENT_NS.tooltips);\n Object.keys(options.cssClasses).forEach(function (key) {\n removeClass(scope_Target, options.cssClasses[key]);\n });\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n delete scope_Target.noUiSlider;\n }", "function resetHover() {\n if (placeh) {\n placeh.detach();\n ogrow.detach();\n }\n }", "destroy()\n {\n this.div = null;\n\n for (let i = 0; i < this.children.length; i++)\n {\n this.children[i].div = null;\n }\n\n window.document.removeEventListener('mousemove', this._onMouseMove);\n window.removeEventListener('keydown', this._onKeyDown);\n\n this.pool = null;\n this.children = null;\n this.renderer = null;\n }", "function clearScrollLink() {\n\t$('.scrollLink').css('display', 'none');\n}", "_mouseOut () {\n this.hide();\n this.html.remove.defer(this.html);\n }", "destroy () {\n\t\tthis.options.element.removeEventListener('click', this.onClickToElement);\n\t\tthis.options.element.removeChild(this.options.element.querySelector('.pollsr'));\n\t}", "function removeNavDropdownLinks() {\n $(\".nav-appended-dropdown\").each(function() {\n $(this).remove();\n });\n}", "function destroy() {\n\n for (var key in options.cssClasses) {\n if (!options.cssClasses.hasOwnProperty(key)) {\n continue;\n }\n removeClass(scope_Target, options.cssClasses[key]);\n }\n\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n\n delete scope_Target.noUiSlider;\n }", "function clearLinks(){\n let allLinks = document.getElementById('links')\n while (allLinks.firstChild) {\n allLinks.removeChild(allLinks.firstChild);\n }\n }", "function destroy() {\n for (var key in options.cssClasses) {\n if (!options.cssClasses.hasOwnProperty(key)) {\n continue;\n }\n removeClass(scope_Target, options.cssClasses[key]);\n }\n\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n\n delete scope_Target.noUiSlider;\n }", "function destroy() {\n for (var key in options.cssClasses) {\n if (!options.cssClasses.hasOwnProperty(key)) {\n continue;\n }\n removeClass(scope_Target, options.cssClasses[key]);\n }\n\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n\n delete scope_Target.noUiSlider;\n }", "function destroy() {\n for (var key in options.cssClasses) {\n if (!options.cssClasses.hasOwnProperty(key)) {\n continue;\n }\n removeClass(scope_Target, options.cssClasses[key]);\n }\n\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n\n delete scope_Target.noUiSlider;\n }", "function destroy() {\n for (var key in options.cssClasses) {\n if (!options.cssClasses.hasOwnProperty(key)) {\n continue;\n }\n removeClass(scope_Target, options.cssClasses[key]);\n }\n\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n\n delete scope_Target.noUiSlider;\n }", "function socialShareButtonHoveredOut()\n\t{\n\t\tSTTAFFUNC.hideHoverMap(this);\n\t}", "exitElements(){\n this.itemg.exit()\n .transition(this.transition)\n .style(\"opacity\", 0)\n .remove();\n }", "destroy() {\n this.$element.off('.zf.trigger .zf.magellan')\n .find(`.${this.options.activeClass}`).removeClass(this.options.activeClass);\n\n if(this.options.deepLinking){\n var hash = this.$active[0].getAttribute('href');\n window.location.hash.replace(hash, '');\n }\n\n Foundation.unregisterPlugin(this);\n }", "function destroy() {\n cssClasses.forEach(function(cls) {\n if (!cls) {\n return;\n } // Ignore empty classes\n removeClass(scope_Target, cls);\n });\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n delete scope_Target.noUiSlider;\n }", "destroy() {\n this.$element.find('[data-tab-content]').stop(true).slideUp(0).css('display', '');\n this.$element.find('a').off('.zf.accordion');\n if(this.options.deepLink) {\n $(window).off('popstate', this._checkDeepLink);\n }\n\n Foundation.unregisterPlugin(this);\n }", "destroy() {\n\t\tdocument.removeEventListener( 'click', this.onDocumentClick, true );\n\t\tthis.el.removeEventListener( 'click', this.onSubmenuToggleClick, false );\n\t\tthis.el.removeEventListener( 'mouseover', this.onMenuItemMouseEnter, false );\n\t\tthis.el.removeEventListener( 'mouseout', this.onMenuItemMouseLeave, false );\n\t\tthis.el.removeEventListener( 'focus', this.onMenuLinkFocus, true );\n\t\tthis.el.removeEventListener( 'blur', this.onMenuLinkBlur, true );\n\t}", "_removeEvents () {\n this.container.classList.remove(\"tooltiped\");\n\n this.container.removeEventListener(\"mouseenter\", this._mouseOver);\n this.container.removeEventListener(\"mousemove\", this._mouseMove);\n this.container.removeEventListener(\"mouseleave\", this._mouseOut);\n }", "function destroy ( ) {\n\t\n\t\t\tcssClasses.forEach(function(cls){\n\t\t\t\tif ( !cls ) { return; } // Ignore empty classes\n\t\t\t\tremoveClass(scope_Target, cls);\n\t\t\t});\n\t\n\t\t\twhile (scope_Target.firstChild) {\n\t\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t\t}\n\t\n\t\t\tdelete scope_Target.noUiSlider;\n\t\t}", "destroy() {\n this.destroyTouchHook();\n this.div = null;\n for (var i = 0; i < this.children.length; i++) {\n this.children[i].div = null;\n }\n window.document.removeEventListener('mousemove', this._onMouseMove, true);\n window.removeEventListener('keydown', this._onKeyDown);\n this.pool = null;\n this.children = null;\n this.renderer = null;\n }", "function cleanup() {\n callDiv.closed = true;\n callDiv.parent().remove();\n callMap.splice(callMap.indexOf(call), 1);\n }", "function CleanPage() {\r\n\tvar $adDiv = $($(\"body.menubg div\")[0]);\r\n\t$adDiv.next().remove();\r\n\t$adDiv.remove();\r\n\t$xitiDiv = $(\"#xiti-logo\");\r\n\t$xitiDiv.prev().remove();\r\n\t$xitiDiv.remove();\r\n\t$(\"#tabliste\").attr(\"style\", \"margin: 0.5em; width: 99%;\");\r\n}", "cleanNavigation() {\n // clean hammer bindings\n if (this.navigationHammers.length != 0) {\n for (let i = 0; i < this.navigationHammers.length; i++) {\n this.navigationHammers[i].destroy();\n }\n this.navigationHammers = [];\n }\n\n // clean up previous navigation items\n if (\n this.navigationDOM &&\n this.navigationDOM[\"wrapper\"] &&\n this.navigationDOM[\"wrapper\"].parentNode\n ) {\n this.navigationDOM[\"wrapper\"].parentNode.removeChild(\n this.navigationDOM[\"wrapper\"]\n );\n }\n\n this.iconsCreated = false;\n }", "destroy() {\n this.container.removeChild(this.inspiredSprite);\n this.container.removeChild(this.sprite);\n this.container.removeChild(this.halo);\n this.container.removeChild(this.highlight);\n delete this.container;\n }", "_destroy() {\n this.$element.off('click.zf.smoothScrollWithLinks', 'a[href*=\"#\"]', this._linkClickListener);\n }", "function closeMenu() {\n myLinks.style.display = \"none\";\n}", "function mouseout_LinkHub(logo)\n {\n\t logo.classList.remove('logo-active');\n\t logo.classList.add('logo-in-active');\n }", "destroy() {\n\t\tthis._container.removeEventListener('mousewheel',this._mouseWheelListener);\n\t\twindow.removeEventListener('resize',this._resizeListener);\n\t\tthis._mc.destroy();\n\t\tthis._container = null;\n\t}", "hide() {\n this.backgroundDiv.remove();\n this.MiscDiv.remove();\n }", "destroy() {\n if(this.options.scrollTop) this.$element.off('.zf.drilldown',this._bindHandler);\n this._hideAll();\n\t this.$element.off('mutateme.zf.trigger');\n Foundation.Nest.Burn(this.$element, 'drilldown');\n this.$element.unwrap()\n .find('.js-drilldown-back, .is-submenu-parent-item').remove()\n .end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu')\n .end().find('[data-submenu]').removeAttr('aria-hidden tabindex role');\n this.$submenuAnchors.each(function() {\n $(this).off('.zf.drilldown');\n });\n\n this.$submenus.removeClass('drilldown-submenu-cover-previous');\n\n this.$element.find('a').each(function(){\n var $link = $(this);\n $link.removeAttr('tabindex');\n if($link.data('savedHref')){\n $link.attr('href', $link.data('savedHref')).removeData('savedHref');\n }else{ return; }\n });\n Foundation.unregisterPlugin(this);\n }", "function adsRemovalReference() {\r\n if (!GM_config.get('remove_ads')) {\r\n return;\r\n }\r\n if (Boolean($('.aux-content-widget-2').first().text().match(\"IMDb Answers\"))) {\r\n $('.aux-content-widget-2').first().remove();\r\n }\r\n $('.cornerstone_slot').remove();\r\n $('.imdb-footer').remove();\r\n $('#social-share-widget').remove();\r\n $('.navbar__imdbpro').remove();\r\n $('[class^=Root__Separator]').remove();\r\n // To remove ad's background image\r\n $('#wrapper').attr('style', 'background: 000000 !important');\r\n}", "function showUSGSLinks(evt){\n\t//check to see if there is already an existing linksDiv so that it is not build additional linksDiv. Unlikely to occur since the usgsLinks div is being destroyed on mouseleave.\n\tif (!dojo.byId('usgsLinks')){\n\t\t//create linksDiv\n\t\tvar linksDiv = dojo.doc.createElement(\"div\");\n\t\tlinksDiv.id = 'usgsLinks';\n\t\t//LINKS BOX HEADER TITLE HERE\n\t\tlinksDiv.innerHTML = '<div class=\"usgsLinksHeader\"><b>USGS Links</b></div>';\n\t\t//USGS LINKS GO HERE\n\t\tlinksDiv.innerHTML += '<p>';\n\t\tlinksDiv.innerHTML += '<a style=\"color:white\" target=\"_blank\" href=\"http://www.usgs.gov/\">USGS Home</a><br />';\n\t\tlinksDiv.innerHTML += '<a style=\"color:white\" target=\"_blank\" href=\"http://www.usgs.gov/ask/\">Contact USGS</a><br />';\n\t\tlinksDiv.innerHTML += '<a style=\"color:white\" target=\"_blank\" href=\"http://search.usgs.gov/\">Search USGS</a><br />';\n\t\tlinksDiv.innerHTML += '<a style=\"color:white\" target=\"_blank\" href=\"http://www.usgs.gov/laws/accessibility.html\">Accessibility</a><br />';\n\t\tlinksDiv.innerHTML += '<a style=\"color:white\" target=\"_blank\" href=\"http://www.usgs.gov/foia/\">FOIA</a><br />';\n\t\tlinksDiv.innerHTML += '<a style=\"color:white\" target=\"_blank\" href=\"http://www.usgs.gov/laws/privacy.html\">Privacy</a><br />';\n\t\tlinksDiv.innerHTML += '<a style=\"color:white\" target=\"_blank\" href=\"http://www.usgs.gov/laws/policies_notices.html\">Policies and Notices</a></p>';\n\t\t\n\t\t//place the new div at the click point minus 5px so the mouse cursor is within the div\n\t\tlinksDiv.style.top = evt.clientY-5 + 'px';\n\t\tlinksDiv.style.left = evt.clientX-5 + 'px';\n\t\t\n\t\t//add the div to the document\n\t\tdojo.byId('map').appendChild(linksDiv);\n\t\t//on mouse leave, call the removeLinks function\n\t\tdojo.connect(dojo.byId(\"usgsLinks\"), \"onmouseleave\", removeLinks);\n\n\t}\n}", "function mouseout() { //Makes it difficult to click on the link if enabled\n //Hide the tooltip\n //d3.select(\"#tooltip\").classed(\"hidden\",true);\n }", "destroy() {\n const startAnchor = this._startAnchor;\n const endAnchor = this._endAnchor;\n if (startAnchor) {\n startAnchor.removeEventListener('focus', this.startAnchorListener);\n if (startAnchor.parentNode) {\n startAnchor.parentNode.removeChild(startAnchor);\n }\n }\n if (endAnchor) {\n endAnchor.removeEventListener('focus', this.endAnchorListener);\n if (endAnchor.parentNode) {\n endAnchor.parentNode.removeChild(endAnchor);\n }\n }\n this._startAnchor = this._endAnchor = null;\n this._hasAttached = false;\n }", "destroy() {\n const startAnchor = this._startAnchor;\n const endAnchor = this._endAnchor;\n if (startAnchor) {\n startAnchor.removeEventListener('focus', this.startAnchorListener);\n if (startAnchor.parentNode) {\n startAnchor.parentNode.removeChild(startAnchor);\n }\n }\n if (endAnchor) {\n endAnchor.removeEventListener('focus', this.endAnchorListener);\n if (endAnchor.parentNode) {\n endAnchor.parentNode.removeChild(endAnchor);\n }\n }\n this._startAnchor = this._endAnchor = null;\n this._hasAttached = false;\n }", "destroy() {\n const startAnchor = this._startAnchor;\n const endAnchor = this._endAnchor;\n if (startAnchor) {\n startAnchor.removeEventListener('focus', this.startAnchorListener);\n if (startAnchor.parentNode) {\n startAnchor.parentNode.removeChild(startAnchor);\n }\n }\n if (endAnchor) {\n endAnchor.removeEventListener('focus', this.endAnchorListener);\n if (endAnchor.parentNode) {\n endAnchor.parentNode.removeChild(endAnchor);\n }\n }\n this._startAnchor = this._endAnchor = null;\n this._hasAttached = false;\n }", "onMouseLeave() {\n\t\trenderQueue.delete(this.renderInner)\n\t\trenderQueue.add(this.destroyInner)\n\t}", "function destroy ( ) {\r\n\r\n\t\tfor ( var key in options.cssClasses ) {\r\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\r\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\r\n\t\t}\r\n\r\n\t\twhile (scope_Target.firstChild) {\r\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\r\n\t\t}\r\n\r\n\t\tdelete scope_Target.noUiSlider;\r\n\t}", "function destroy ( ) {\r\n\r\n\t\tfor ( var key in options.cssClasses ) {\r\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\r\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\r\n\t\t}\r\n\r\n\t\twhile (scope_Target.firstChild) {\r\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\r\n\t\t}\r\n\r\n\t\tdelete scope_Target.noUiSlider;\r\n\t}", "function removePlots() {\n d3.selectAll(\".nodes\").remove();\n d3.selectAll(\".link\").remove();\n}", "destroy () {\n // unbind event handlers and clear elements created\n }", "onLeave() {\n console.log('leave',this.id);\n //ResizeManager.unbind( this.id );\n\n if(this.menu) this.menu.destroy();\n\n //Destroy Partial Modules\n //if(this.header) this.header.destroy();\n //debugger;\n if(this.carousel) this.carousel.destroy();\n if(this.tabs) this.tabs.destroy();\n if(this.basket) this.basket.destroy();\n\n if(this.contactMap) {\n this.contactMap.destroy();\n }\n\n //fakeselect\n if (this.fakeselect) {\n for ( let i = 0; i < this.fakeselect.length; i++ ) {\n this.fakeselect[i].destroy();\n }\n this.fakeselect = null;\n }\n //Dropdowns\n if (this.dropdowns) {\n for ( let i = 0; i < this.dropdowns.length; i++ ) {\n this.dropdowns[i].destroy();\n }\n this.dropdowns = null;\n }\n\n if(this.liferayUI) {\n this.liferayUI.destroy();\n }\n\n\n\n }", "onremove() {\n // Slider and binder\n if(this.binder)\n this.binder.destroy();\n if(this.slider)\n this.slider.destroy();\n\n // Destroy classes & objects\n this.binder = this.slider = this.publication = this.series = this.ui = this.config = null;\n }", "function destroyStructure(){\n $('html,body').css({\n 'overflow' : 'visible',\n 'height' : 'initial'\n });\n\n $('#pp-nav').remove();\n\n //removing inline styles\n $('.pp-section').css({\n 'height': '',\n 'background-color' : '',\n 'padding': '',\n 'z-index': 'auto'\n });\n\n container.css({\n 'height': '',\n 'position': '',\n '-ms-touch-action': '',\n 'touch-action': ''\n });\n\n //removing added classes\n $('.pp-section').each(function(){\n $(this).removeData('index').removeAttr('style')\n .removeData('index').removeAttr('data-index')\n .removeData('anchor').removeAttr('data-anchor')\n .removeClass('pp-table active pp-easing pp-section');\n });\n\n if(options.menu){\n $(options.menu).find('[data-menuanchor]').removeClass('active');\n $(options.menu).find('[data-menuanchor]').removeData('menuanchor');\n }\n\n //removing previous anchor classes\n $('body')[0].className = $('body')[0].className.replace(/\\b\\s?pp-viewing-[^\\s]+\\b/g, '');\n\n //Unwrapping content\n container.find('.pp-tableCell').each(function(){\n //unwrap not being use in case there's no child element inside and its just text\n $(this).replaceWith(this.childNodes);\n });\n }", "function destroy ( ) {\r\n\r\n\t\t\tfor ( var key in options.cssClasses ) {\r\n\t\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\r\n\t\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\r\n\t\t\t}\r\n\r\n\t\t\twhile (scope_Target.firstChild) {\r\n\t\t\t\tscope_Target.removeChild(scope_Target.firstChild);\r\n\t\t\t}\r\n\r\n\t\t\tdelete scope_Target.noUiSlider;\r\n\t\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroy ( ) {\n\n\t\tfor ( var key in options.cssClasses ) {\n\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\n\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\n\t\t}\n\n\t\twhile (scope_Target.firstChild) {\n\t\t\tscope_Target.removeChild(scope_Target.firstChild);\n\t\t}\n\n\t\tdelete scope_Target.noUiSlider;\n\t}", "function destroyAll(){\n\n var pretyDestroy = $('.blog-main.active');\n $('.news-item').css('margin-bottom','25px');\n\n pretyDestroy.css('height','0px');\n\n pretyDestroy.removeClass('active show');\n\n setTimeout(function(){\n\n pretyDestroy.find('.blog-slider-big .slider-item').remove();\n if(pretyDestroy.find('.blog-slider-small').is('.slick-slider')){\n pretyDestroy.find('.blog-slider-small').slick('destroy').remove();\n\n }\n pretyDestroy.find('.blog-text h6').text('');\n pretyDestroy.find('.blog-text .blog-text-main').html('');\n\n pretyDestroy.find('.blog-chats-retwite span').text('');\n pretyDestroy.find('.likes-value').text('');\n if(pretyDestroy.find('.blog-comment-item').length != 0){\n pretyDestroy.find('.blog-comment-item').remove();\n }\n\n },500);\n\n }", "destroy()\n\t{\n\t\tthis.parentGroup.removeSprite(this);\n\t}", "destroy()\n\t{\n\t\tthis.parentGroup.removeSprite(this);\n\t}", "function removeShowAllLink() {\n\t$('.show-all').remove();\n}", "function mouseout() {\n self.hide(); // Hide the tooltip if it is displayed,\n window.clearTimeout(timer); // cancel any pending display,\n // and remove ourselves so we're called only once\n if (target.removeEventListener) \n target.removeEventListener(\"mouseout\", mouseout, false);\n else if (target.detachEvent) target.detachEvent(\"onmouseout\",mouseout);\n else target.onmouseout = null;\n }", "function deleteDivs () {\n $('.streamer-wrapper').remove();\n $('.link-to-twitch').remove();\n $('.streamer-image').remove();\n $('.channel-text').remove();\n $('.streamer-text').remove();\n $('.description-text').remove();\n $('.is-streaming-logo').remove();\n}", "function remove_sp(cont)\n{\n var a = cont.querySelector('a');\n a.parentNode.removeChild(a);\n}", "destroy() {\n // Remove this instance from the list of tooltips\n const tooltipIndex = tooltipsList.indexOf( this );\n if ( tooltipIndex > -1 ) {\n tooltipsList.splice( tooltipIndex, 1 );\n // TODO: + Unbind all events\n }\n\n if ( tooltipsList.length === 0 ) removeTooltipElement();\n }", "function hideTooltip(){\r\n\twarlcTooltip.style.visibility = \"hidden\";\r\n\tmouseoverLink = null;\r\n}", "function hoverOut(){\n //Mouseout\n $(\".main-nav ul\").finish();\n\n $('.st-menu').css({ \n \t'-webkit-transform' : 'translate3d(-200px, 0, 0)',\n \t'-moz-transform' : 'translate3d(-200px, 0, 0)',\n \t'-ms-transform' : 'translate3d(-200px, 0, 0)',\n \t'-o-transform' : 'translate3d(-200px, 0, 0)'\n });\n\n //Magic webkit 3D pan-tilt out\n\t$('.st-container').removeClass(\"st-menu-open\");\n\t$('.st-pusher').removeClass('magic').addClass('reverse-magic');\n\n\t//Scroll to top-left\n\t$.scrollTo({top: 0, left:0});\n\n\t$(\".main-nav ul\").animate({ 'width' : 50 }, 150);\n\n\t//pointer outside .main-nav\n\thover = false;\n}", "function removeLinks(){\n var linksToRemove = _$('aside div:last-child ol')\n linksToRemove.remove()\n}", "onRemove(){\n if (this.anchor.parentElement) {\n this.anchor.parentElement.removeChild(this.anchor);\n }\n }", "hide() {\n this.backgroundDiv.remove();\n this.BasementFloorDiv.remove();\n }", "function removeDropdownHoverability(){\n DOM.$hoverableDropdowns.removeClass(\"hoverable\");\n }", "destroy() {\n this.$element.find('[data-submenu]').slideDown(0).css('display', '');\n this.$element.find('a').off('click.zf.accordionMenu');\n\n Foundation.Nest.Burn(this.$element, 'accordion');\n Foundation.unregisterPlugin(this);\n }", "function removePlots() {\n d3.selectAll(\".nodes\").remove();\n d3.selectAll(\".link\").remove();\n d3.selectAll(\".axis-label\").remove();\n }", "removeSocialSharebuttons() \n {\n $(\".share-links li:not(.webshare-list-item)\").each(function(){\n $(this).remove();\n });\n }", "function removeUserSite() {\n\t$(this).parent().remove();\n}", "function removeAbout() {\n\tdocument.getElementById(\"about__element\").className = \"main__3 item--hidden item--gone\";\n}", "function destroy() {\n // remove and unlink the HTML5 player\n $('#' + domId).html();\n }", "function node_mouseout() {\n removeInfoBox(); // remove old info boxes\n}", "function releaseMonitoringElements(stream) {\n console.log(\"releaseMonitoringElements callId :\" + stream.callId)\n\n var QoSLogoId = 'logo-' + stream.streamId;\n $('#' + QoSLogoId).remove();\n\n var remoteQosInfoDivId = 'remote-qosInfo-' + stream.callId;\n $('#' + remoteQosInfoDivId).remove();\n }", "function hideLinks(){\n\t$body.classList.add('mcl-hide-links');\n\thidenLinks = true;\n}", "function hideControl()\n{\n\t$('.caption').show();\n $(\".largescr\").show();\n $('.cb-item-title-container').css({'margin-top':0});\n $(\".control\").hover(\n function() {\n $(this).unbind('mouseenter').unbind('mouseleave');\n });\n}", "removeWebSharebutton() \n {\n $(\".webshare-list-item\").remove();\n }", "function ungroup() {\n\n\t $(g).addClass(\"slideUp\");\n\t $(c).show().addClass(\"zoomFadeUp\");\n\n\t clearTimeout(groupTimeoutId);\n\t ungroupTimeoutId = setTimeout(function() {\n\t $(g).hide().removeClass(\"slideUp\");\n\t $(c).show().removeClass(\"zoomFadeUp\");\n\t }, 500);\n\n\t }", "destroy() {\n const startAnchor = this._startAnchor;\n const endAnchor = this._endAnchor;\n\n if (startAnchor) {\n startAnchor.removeEventListener('focus', this.startAnchorListener);\n startAnchor.remove();\n }\n\n if (endAnchor) {\n endAnchor.removeEventListener('focus', this.endAnchorListener);\n endAnchor.remove();\n }\n\n this._startAnchor = this._endAnchor = null;\n this._hasAttached = false;\n }", "destroy() {\n if (this._dom.tool !== null) {\n\n // Remove event listeners\n $.ignore(\n document,\n {\n 'mousemove touchmove': this._handlers.drag,\n 'mouseout mouseup touchend': this._handlers.endDrag\n }\n )\n\n $.ignore(\n document,\n {\n 'mousemove touchmove': this._handlers.resize,\n 'mouseout mouseup touchend': this._handlers.endResize\n }\n )\n\n // Remove the area, region, frame, image and controls\n this._dom.container.removeChild(this._dom.tool)\n this._dom.controls = null\n this._dom.frame = null\n this._dom.image = null\n }\n }", "function removeHoverState(){\n\t\t\t\t\n\t\tg_objHandleTip.removeClass(\"ug-button-hover\");\n\t}", "destroy() {\n\n if (this._navCubeCanvas) {\n\n this.viewer.camera.off(this._onCameraMatrix);\n this.viewer.camera.off(this._onCameraWorldAxis);\n this.viewer.camera.perspective.off(this._onCameraFOV);\n this.viewer.camera.off(this._onCameraProjection);\n\n this._navCubeCanvas.removeEventListener(\"mouseenter\", this._onMouseEnter);\n this._navCubeCanvas.removeEventListener(\"mouseleave\", this._onMouseLeave);\n this._navCubeCanvas.removeEventListener(\"mousedown\", this._onMouseDown);\n\n document.removeEventListener(\"mousemove\", this._onMouseMove);\n document.removeEventListener(\"mouseup\", this._onMouseUp);\n\n this._navCubeCanvas = null;\n this._cubeTextureCanvas.destroy();\n this._cubeTextureCanvas = null;\n\n this._onMouseEnter = null;\n this._onMouseLeave = null;\n this._onMouseDown = null;\n this._onMouseMove = null;\n this._onMouseUp = null;\n }\n\n this._navCubeScene.destroy();\n this._navCubeScene = null;\n this._cubeMesh = null;\n this._shadow = null;\n\n super.destroy();\n }", "destroy() {\n nodes.splice(nodes.indexOf(el), 1);\n }", "function unregister(anchor) {\r\n\r\n if (typeof self.activeElements[anchor] != 'undefined') {\r\n\r\n //remove the element from the dom,\r\n self.activeElements[anchor].instance.$element.remove();\r\n\r\n //remove any extra markup that may have been inserted with this widget\r\n self.activeElements[anchor].instance.removeMarkup();\r\n\r\n //unbind the events created by this widget (i.e. resize events are bound to the window)\r\n self.activeElements[anchor].instance.destroy();\r\n\r\n //then delete it from the active elements array\r\n delete self.activeElements[anchor];\r\n }\r\n\r\n }", "function delinkifyLink(link)\r\n\t{\r\n\t\tvar spanElm = document.createElement(\"span\");\r\n\t\tspanElm.className = link.className;\r\n\t\tspanElm.innerHTML = link.innerHTML;\r\n\r\n\t\tif (Display_tooltip_info)\r\n\t\t{\r\n\t\t\tspanElm.href = link.href;\r\n\t\t\tspanElm.warlc_error = link.warlc_error;\r\n\t\t\t\r\n\t\t\tswitch (link.className){\r\n\t\t\tcase \"alive_link\": spanElm.addEventListener(\"mouseover\", displayTooltipInfo, false); break\r\n\t\t\tcase \"adead_link\": spanElm.addEventListener(\"mouseover\", displayTooltipError, false); break;\r\n\t\t\tcase \"unava_link\": //reserved\r\n\t\t\tdefault: \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tlink.parentNode.replaceChild(spanElm, link);\r\n\t}", "function destroy(all){\r\n setAutoScrolling(false, 'internal');\r\n setAllowScrolling(true);\r\n setMouseHijack(false);\r\n setKeyboardScrolling(false);\r\n addClass(container, DESTROYED);\r\n\r\n [\r\n afterSlideLoadsId, \r\n afterSectionLoadsId,\r\n resizeId,\r\n scrollId,\r\n scrollId2,\r\n g_doubleCheckHeightId,\r\n resizeHandlerId,\r\n g_transitionLapseId\r\n ].forEach(function(timeoutId){\r\n clearTimeout(timeoutId);\r\n });\r\n\r\n window.removeEventListener('scroll', scrollHandler);\r\n window.removeEventListener('hashchange', hashChangeHandler);\r\n window.removeEventListener('resize', resizeHandler);\r\n\r\n document.removeEventListener('keydown', keydownHandler);\r\n document.removeEventListener('keyup', keyUpHandler);\r\n\r\n ['click', 'touchstart'].forEach(function(eventName){\r\n document.removeEventListener(eventName, delegatedEvents);\r\n });\r\n\r\n ['mouseenter', 'touchstart', 'mouseleave', 'touchend'].forEach(function(eventName){\r\n document.removeEventListener(eventName, onMouseEnterOrLeave, true); //true is required!\r\n });\r\n\r\n //lets make a mess!\r\n if(all){\r\n destroyStructure();\r\n }\r\n }", "function destroyInfoBox() {\n\t\tsvg.selectAll(\".popup\").remove()\n\t}" ]
[ "0.6678005", "0.64242864", "0.6367724", "0.6253172", "0.6163924", "0.6151484", "0.61369896", "0.60813254", "0.60661745", "0.6063021", "0.6060965", "0.60381854", "0.6002633", "0.5983508", "0.5982574", "0.59759516", "0.59759516", "0.59759516", "0.59759516", "0.59702", "0.5969452", "0.59670955", "0.59602654", "0.5925719", "0.59052205", "0.58756644", "0.58706903", "0.586049", "0.5847935", "0.58460563", "0.583576", "0.5830966", "0.58226854", "0.58215344", "0.58175045", "0.5807403", "0.57988656", "0.5782435", "0.5776793", "0.5770461", "0.5767559", "0.5754683", "0.5754683", "0.5754683", "0.575163", "0.57485634", "0.57485634", "0.574658", "0.57382864", "0.57346004", "0.57332736", "0.57268935", "0.5724998", "0.57204384", "0.57204384", "0.57204384", "0.57204384", "0.57204384", "0.57204384", "0.57204384", "0.57204384", "0.57204384", "0.57204384", "0.57204384", "0.57204384", "0.5714511", "0.5705243", "0.5705243", "0.5704564", "0.56988156", "0.569862", "0.56983733", "0.56898427", "0.56856257", "0.5677389", "0.56697416", "0.5652364", "0.5651432", "0.56490046", "0.56481755", "0.5646184", "0.5633657", "0.56266004", "0.56157213", "0.56145436", "0.56063586", "0.55991656", "0.5597995", "0.5595999", "0.55930656", "0.5583133", "0.5581725", "0.55809146", "0.55773205", "0.5568516", "0.5566006", "0.5562825", "0.5555415", "0.55484015", "0.55466264" ]
0.7380312
0
because javascript can't handle 64bit int bitwise opperations...
function decomposeBigInt(n) { const result = []; (function recur(bit) { if (n > bit) { n = recur(bit * 2) } if (n >= bit) { result.push(bit); return n - bit; } return n; })(1); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get64binary(int) {\n if (int>=0)\n return int\n .toString(2)\n .padStart(36, \"0\");\n // else\n return (-int-1)\n .toString(2)\n .replace(/[01]/g, function(d){return +!+d;}) // hehe: inverts each char\n .padStart(36, \"1\");\n}", "get is64Bit() {\n return true;\n }", "function int_64(msint_32, lsint_32)\n\t{\n\t\tthis.highOrder = msint_32;\n\t\tthis.lowOrder = lsint_32;\n\t}", "function smi(i32){return i32>>>1&0x40000000|i32&0xBFFFFFFF;}", "function smi(i32){return i32>>>1&0x40000000|i32&0xBFFFFFFF;}", "function smi(i32){return i32>>>1&0x40000000|i32&0xBFFFFFFF;}", "function convert32to64(id) {\n return new BigNumber('76561197960265728').plus(id);\n}", "function read64Bit(ba, o) {\n var val = ba[o] + ba[o+1]*M1 + ba[o+2]*M2 + ba[o+3]*M3 + ba[o+4]*M4;\n return val;\n }", "function int64(h, l) {\r\n this.h = h;\r\n this.l = l;\r\n //this.toString = int64toString;\r\n}", "function int64(h, l) {\n\t this.h = h;\n\t this.l = l;\n\t //this.toString = int64toString;\n\t }", "function intakeBits(amt){\r\n\r\n}", "function add32(a, b) {\nreturn (a + b) & 0xFFFFFFFF;\n}", "function add32(a, b) {\nreturn (a + b) & 0xFFFFFFFF;\n}", "function convert64to32(id) {\n return new BigNumber(id).minus('76561197960265728');\n}", "function sc_bitUrsh(x, y) {\n return x >>> y;\n}", "function safeAdd_64 (x, y) {\n\t\tvar lsw = (x.lowOrder & 0xFFFF) + (y.lowOrder & 0xFFFF);\n\t\tvar msw = (x.lowOrder >>> 16) + (y.lowOrder >>> 16) + (lsw >>> 16);\n\t\tvar lowOrder = ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF)\n\n\t\tlsw = (x.highOrder & 0xFFFF) + (y.highOrder & 0xFFFF) + (msw >>> 16);\n\t\tmsw = (x.highOrder >>> 16) + (y.highOrder >>> 16) + (lsw >>> 16);\n\t\tvar highOrder = ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\n\t\treturn new int_64(highOrder, lowOrder);\n\t}", "function FastIntegerCompression() {\n}", "getInt64() {\n var low, high;\n if (this.littleEndian) {\n low = this.getUint32();\n high = this.getUint32();\n }\n else {\n high = this.getUint32();\n low = this.getUint32();\n }\n // calculate negative value\n if (high & 0x80000000) {\n high = ~high & 0xFFFFFFFF;\n low = ~low & 0xFFFFFFFF;\n if (low === 0xFFFFFFFF)\n high = (high + 1) & 0xFFFFFFFF;\n low = (low + 1) & 0xFFFFFFFF;\n return -(high * 0x100000000 + low);\n }\n return high * 0x100000000 + low;\n }", "function integer(n) {\r\n return n % (0xffffffff + 1);\r\n}", "function caml_int64_mod (x, y)\n{\n if (caml_int64_is_zero (y)) caml_raise_zero_divide ();\n var sign = x[3] ^ y[3];\n if (x[3] & 0x8000) x = caml_int64_neg(x);\n if (y[3] & 0x8000) y = caml_int64_neg(y);\n var r = caml_int64_udivmod(x, y)[2];\n if (sign & 0x8000) r = caml_int64_neg(r);\n return r;\n}", "function unsafeBigInt() {\n return fLib.toBigInt();\n}", "function oflw32(n) {\n return n & 4294967295;\n }", "function smi(i32) {\n\t\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t\t }", "function smi(i32) {\n\t\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t\t }", "function wgint64(value, endian, buffer, offset)\n{\n\tif (endian == 'big') {\n\t\twgint32(value[0], endian, buffer, offset);\n\t\twgint32(value[1], endian, buffer, offset+4);\n\t} else {\n\t\twgint32(value[0], endian, buffer, offset+4);\n\t\twgint32(value[1], endian, buffer, offset);\n\t}\n}", "function e(o247) {\n try {\no247 = o247 | 0;\n}catch(e){}\n try {\no1071 = o247\n}catch(e){}\n }", "full_u64() {\n this.throw_if_less_than(8);\n\n let val = 0;\n for (let i = 0; i < 8; i++) {\n val = (val * 256) + this.buffer[this.pos];\n this.pos += 1;\n }\n return val;\n }", "function rsint64(buffer, endian, offset)\n{\n\tvar neg, val;\n\n\tif (endian === undefined)\n\t\tthrow (new Error('missing endian'));\n\n\tif (buffer === undefined)\n\t\tthrow (new Error('missing buffer'));\n\n\tif (offset === undefined)\n\t\tthrow (new Error('missing offset'));\n\n\tif (offset + 3 >= buffer.length)\n\t\tthrow (new Error('Trying to read beyond buffer length'));\n\n\tval = rgint64(buffer, endian, offset);\n\tneg = val[0] & 0x80000000;\n\n\tif (!neg)\n\t\treturn (val);\n\n\tval[0] = (0xffffffff - val[0]) * -1;\n\tval[1] = (0xffffffff - val[1] + 1) * -1;\n\n\t/*\n\t * If we had the key 0x8000000000000000, that would leave the lower 32\n\t * bits as 0xffffffff, however, since we're goint to add one, that would\n\t * actually leave the lower 32-bits as 0x100000000, which would break\n\t * our ability to write back a value that we received. To work around\n\t * this, if we actually get that value, we're going to bump the upper\n\t * portion by 1 and set this to zero.\n\t */\n\tmod_assert.ok(val[1] <= 0x100000000);\n\tif (val[1] == -0x100000000) {\n\t\tval[1] = 0;\n\t\tval[0]--;\n\t}\n\n\treturn (val);\n}", "function rsint64(buffer, endian, offset)\n{\n\tvar neg, val;\n\n\tif (endian === undefined)\n\t\tthrow (new Error('missing endian'));\n\n\tif (buffer === undefined)\n\t\tthrow (new Error('missing buffer'));\n\n\tif (offset === undefined)\n\t\tthrow (new Error('missing offset'));\n\n\tif (offset + 3 >= buffer.length)\n\t\tthrow (new Error('Trying to read beyond buffer length'));\n\n\tval = rgint64(buffer, endian, offset);\n\tneg = val[0] & 0x80000000;\n\n\tif (!neg)\n\t\treturn (val);\n\n\tval[0] = (0xffffffff - val[0]) * -1;\n\tval[1] = (0xffffffff - val[1] + 1) * -1;\n\n\t/*\n\t * If we had the key 0x8000000000000000, that would leave the lower 32\n\t * bits as 0xffffffff, however, since we're goint to add one, that would\n\t * actually leave the lower 32-bits as 0x100000000, which would break\n\t * our ability to write back a value that we received. To work around\n\t * this, if we actually get that value, we're going to bump the upper\n\t * portion by 1 and set this to zero.\n\t */\n\tmod_assert.ok(val[1] <= 0x100000000);\n\tif (val[1] == -0x100000000) {\n\t\tval[1] = 0;\n\t\tval[0]--;\n\t}\n\n\treturn (val);\n}", "function int64shr(dst, x, shift) {\n\t dst.l = (x.l >>> shift) | (x.h << (32 - shift));\n\t dst.h = (x.h >>> shift);\n\t }", "function u(e){var t=\"string\"==typeof e?parseInt(e,16):e;return t<65536?x(t):(t-=65536,x(55296+(t>>10),56320+(1023&t)))}", "function ml_z_to_int64(z1) {\n z1 = bigInt(z1)\n if(!ml_z_fits_int64(z1)) {\n caml_raise_constant(caml_named_value(\"ml_z_overflow\"));\n }\n var mask = bigInt(0xffffffff)\n var lo = z1.and(mask).toJSNumber();\n var hi = z1.shiftRight(32).and(mask).toJSNumber();\n var x = caml_int64_create_lo_hi(lo, hi);\n return x;\n}", "function writeInt(number) {\n do {\n encoded += URL64Code[(number & 0x1f) | (number > 0x1f ? 0x20 : 0)];\n number >>= 5;\n } while (number > 0);\n }", "function div64_32(a, b) {\n\t\tvar P = new Int32Array(128);\n\t\tfor (var i = 0; i < 64; i++)\n\t\t\tP[i] = a[i];\n\t\tvar D = new Int32Array(128);\n\t\tfor (var i = 0; i < 32; i++)\n\t\t\tD[i + 64] = b[i];\n\t\tvar bits = new Int32Array(64);\n\n\t\tfor (var i = 63; i >= 0; i--) {\n\t\t\tfor (var j = P.length - 1; j > 0; j--)\n\t\t\t\tP[j] = P[j - 1];\n\t\t\tP[0] = 0;\n\t\t\tvar borrow = new Int32Array(128);\n\t\t\tvar newP = new Int32Array(128);\n\t\t\tfor (var j = 0; j < P.length; j++) {\n\t\t\t\tvar ab = bdd.xor(P[j], D[j]);\n\t\t\t\tnewP[j] = ab;\n\t\t\t\tif (j > 0) {\n\t\t\t\t\tnewP[j] = bdd.xor(newP[j], borrow[j - 1]);\n\t\t\t\t\tborrow[j] = bdd.or(bdd.and(~ab, borrow[j - 1]), bdd.and(~P[j], D[j]));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tborrow[j] = bdd.and(~P[j], D[j]);\n\t\t\t}\n\t\t\tbits[i] = ~borrow[127];\n\t\t\tif (i != 0) {\n\t\t\t\tfor (var j = 127; j > 0; j--)\n\t\t\t\t\tP[j] = bdd.or(bdd.and(newP[j], ~borrow[127]), bdd.and(P[j], borrow[127]));\n\t\t\t}\n\t\t}\n\n\t\tvar res = new Int32Array(32);\n\t\tfor (var i = 0; i < 32; i++)\n\t\t\tres[i] = bits[i];\n\t\treturn res;\n\t}", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF\n}", "function add32(a, b) {\n return a + b & 0xFFFFFFFF;\n}", "function add32(a, b) {\n return a + b & 0xFFFFFFFF;\n}", "function mulberry32(a) {\n return function() {\n a |= 0; a = a + 0x6D2B79F5 | 0;\n var t = Math.imul(a ^ a >>> 15, 1 | a);\n t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\n }\n}", "function f(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}", "function sc_bitLsh(x, y) {\n return x << y;\n}", "function int32(x) {\n return x | 0;\n }", "function multiply64x2(left, right) {\n if (!left && !right) {\n return { high: long_1.Long.fromNumber(0), low: long_1.Long.fromNumber(0) };\n }\n const leftHigh = left.shiftRightUnsigned(32);\n const leftLow = new long_1.Long(left.getLowBits(), 0);\n const rightHigh = right.shiftRightUnsigned(32);\n const rightLow = new long_1.Long(right.getLowBits(), 0);\n let productHigh = leftHigh.multiply(rightHigh);\n let productMid = leftHigh.multiply(rightLow);\n const productMid2 = leftLow.multiply(rightHigh);\n let productLow = leftLow.multiply(rightLow);\n productHigh = productHigh.add(productMid.shiftRightUnsigned(32));\n productMid = new long_1.Long(productMid.getLowBits(), 0)\n .add(productMid2)\n .add(productLow.shiftRightUnsigned(32));\n productHigh = productHigh.add(productMid.shiftRightUnsigned(32));\n productLow = productMid.shiftLeft(32).add(new long_1.Long(productLow.getLowBits(), 0));\n // Return the 128 bit result\n return { high: productHigh, low: productLow };\n}", "function r64_x24(q) {\n \t\treturn (rord(q,0)<<18) | (rord(q,1)<<12) | (rord(q,2)<<6) | rord(q,3);\n \t}", "function bigint_add(base, rh) {\n var carry = false;\n for (var i = 0; i < base.length; i++) {\n var vc = full_add(base[i], rh[i], carry);\n base[i] = vc[0];\n carry = vc[1];\n }\n}", "function bigint_not(arr) {\n for (var i = 0; i < arr.length; i++) {\n arr[i] = ~arr[i] >>> 0;\n }\n}", "function add32(a, b) {\n return a + b & 0xFFFFFFFF;\n }", "function int64shr(dst, x, shift) {\r\n dst.l = (x.l >>> shift) | (x.h << (32 - shift));\r\n dst.h = (x.h >>> shift);\r\n}", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n}", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "function smi(i32) {\n\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t }", "_getBigNumberFrom64BitBinOctHex(number, radix) {\n let result = new JQX.Utilities.BigNumber(0);\n for (let i = number.length - 1; i >= 0; i--) {\n let current = new JQX.Utilities.BigNumber(parseInt(number.charAt(i), radix));\n result = result.add((current.multiply(new JQX.Utilities.BigNumber(radix).pow(number.length - 1 - i))));\n }\n return result;\n }", "function int64add(dst, x, y) {\n\t var w0 = (x.l & 0xffff) + (y.l & 0xffff);\n\t var w1 = (x.l >>> 16) + (y.l >>> 16) + (w0 >>> 16);\n\t var w2 = (x.h & 0xffff) + (y.h & 0xffff) + (w1 >>> 16);\n\t var w3 = (x.h >>> 16) + (y.h >>> 16) + (w2 >>> 16);\n\t dst.l = (w0 & 0xffff) | (w1 << 16);\n\t dst.h = (w2 & 0xffff) | (w3 << 16);\n\t }", "function rol64(_a, count) {\n var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])(_a, 2), hi = _b[0], lo = _b[1];\n var h = (hi << count) | (lo >>> (32 - count));\n var l = (lo << count) | (hi >>> (32 - count));\n return [h, l];\n}", "function rol64(_a, count) {\n var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])(_a, 2), hi = _b[0], lo = _b[1];\n var h = (hi << count) | (lo >>> (32 - count));\n var l = (lo << count) | (hi >>> (32 - count));\n return [h, l];\n}", "function rol64(_a, count) {\n var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])(_a, 2), hi = _b[0], lo = _b[1];\n var h = (hi << count) | (lo >>> (32 - count));\n var l = (lo << count) | (hi >>> (32 - count));\n return [h, l];\n}", "function safe_add(x, y) \n{ \nvar lsw = (x & 0xFFFF) + (y & 0xFFFF); \nvar msw = (x >> 16) + (y >> 16) + (lsw >> 16); \nreturn (msw << 16) | (lsw & 0xFFFF); \n}", "function sc_bitRsh(x, y) {\n return x >> y;\n}", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n\treturn (a + b) & 0xFFFFFFFF;\n}", "function int64_to_bytes (num) {\n\tconst return_value = [];\n\tfor (let i = 0; i < 8; i++) {\n\t\treturn_value.push(num & 0xFF);\n\t\tnum = num >>> 8;\n\t}\n\treturn return_value;\n}", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }", "function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }" ]
[ "0.681089", "0.6704781", "0.666521", "0.6598113", "0.6598113", "0.6598113", "0.65154624", "0.64823574", "0.64435786", "0.63510907", "0.63483924", "0.63459283", "0.63459283", "0.6312622", "0.63112754", "0.6274197", "0.6267864", "0.6257336", "0.6248223", "0.6235451", "0.62300444", "0.6226883", "0.6224474", "0.6224474", "0.6193242", "0.6178952", "0.61759585", "0.6175443", "0.6175443", "0.61568403", "0.61493504", "0.6127757", "0.61275655", "0.6126873", "0.61012447", "0.6095842", "0.6095842", "0.60943323", "0.6092677", "0.608694", "0.60825896", "0.60793185", "0.60620975", "0.6060786", "0.60404676", "0.60323775", "0.60167146", "0.60012996", "0.59952503", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59938186", "0.59910935", "0.5986402", "0.5968616", "0.5968616", "0.5968616", "0.5966858", "0.59559494", "0.5945735", "0.5945735", "0.5913422", "0.59043366", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695", "0.58939695" ]
0.0
-1
Helpers for interfacing realtime database
function writeCompanyData(query, callback) { var companyRef = db.ref('companies/' + query.company); companyRef.set({ employees: query.employees, industry: query.industry, location: query.location, imgUrl: query.imgUrl, description: query.description }); callback(NULL, "Added company to database!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DB (options) {}", "function notesDB() { }", "function CreateDatabaseQuery() {}", "function Database(){}", "static database_query(json, fcn) {\n if (window.Settings.enableLog)\n WebUtils.log(\"Web.database_query({0})\".format(json));\n Database.query(json, fcn);\n }", "static getDb (): any {\n return getDbInstance()\n }", "constructor() { this.leerDB(); }", "function startDatabaseQueries() {\n \n}", "function start_db () {\r\n dataref = firebase.database()\r\n read()\r\n}", "static openDbConnection() {\n const con = process.env.RETHINKDB_CONNECTION;\n this.indicatorTable = 'indicators';\n this.database = 'bitfinex';\n return r.connect(JSON.parse(con));\n }", "function retrieveData(){\ntrainsDatabase.on(\"value\", getData, error); \n}", "static dbPromise() {\n return idb.open('db', 2, function(upgradeDB) {\n switch(upgradeDB.oldVersion) {\n case 0:\n upgradeDB.createObjectStore('restaurants', {\n keyPath: 'id'\n });\n case 1:\n const reviewsStore = upgradeDB.createObjectStore('reviews', {\n keyPath: 'id'\n });\n // create an index for the reviews relative to restaurant ID\n reviewsStore.createIndex('restaurant', 'restaurant_id');\n }\n })\n }", "static dbPromise() {\n return idb.open('db', 2, function(upgradeDB) {\n switch(upgradeDB.oldVersion) {\n case 0:\n upgradeDB.createObjectStore('restaurants', {\n keyPath: 'id'\n });\n case 1:\n const reviewsStore = upgradeDB.createObjectStore('reviews', {\n keyPath: 'id'\n });\n // create an index for the reviews relative to restaurant ID\n reviewsStore.createIndex('restaurant', 'restaurant_id');\n }\n })\n }", "constructor(database) {\n this.database = database;\n }", "static openDatabase() {\r\n if(!navigator.serviceWorker){\r\n return Promise.resolve();\r\n }\r\n return idb.open('db', 2, function (upgradeDb) {\r\n switch (upgradeDb.oldVersion) {\r\n case 0:\r\n upgradeDb.createObjectStore('restaurants', {\r\n keyPath: 'id'\r\n });\r\n case 1:\r\n const reviewsStore = upgradeDb.createObjectStore('reviews', {\r\n keyPath: 'id'\r\n });\r\n reviewsStore.createIndex('restaurant', 'restaurant_id');\r\n }\r\n });\r\n }", "query() { }", "function getDB() {\n return db;\n}", "async prepareDatabase() {\n this.db = await this.addService('db', new this.DatabaseTransport(this.options.db));\n }", "static database_stmt(json, fcn) {\n if (window.Settings.enableLog)\n WebUtils.log(\"Web.database_stmt({0})\".format(json));\n Database.stmt(json, fcn);\n }", "getAll() {\n\t\tlet db = this.db;\n\n\t\treturn new Promise((resolve, reject)=>{\n\t\t\tresolve(db.value());\n\t\t});\t\t\n\t}", "async connect() {\n const instance = await lowDB(this._adapter);\n this._instance = instance;\n\n // Set the defaults\n await instance.defaults(dbDefaultData).write();\n }", "function dbInit() {\n window.modelcache = {};\n jsonEvalRegistry.register(\"dbmodel\", jsonDBCheck, jsonConvertRow);\n window.db = new PythonProxy(\"/storage/api/\");\n connectOnce(window.db, \"proxyready\", function () {\n var d = window.db.get_uidata();\n d.addCallback(function (uidata) {\n window.uiData = uidata;\n signal(window, \"dbready\");\n });\n }\n );\n}", "componentData() {\n db.transaction((tx) => {\n tx.executeSql('SELECT * FROM table_worker', [], (tx, results) => {\n this._isMounted = true;\n if (this._isMounted) {\n let rows = results.rows.raw();\n this.setState({ data: rows, isLoading: false });\n }\n });\n });\n }", "function readFromDbHandler() {\n var request = indexedDB.open('workerDB');\n var db;\n\n request.onerror = function(err) {\n alert(\"Why didn't you allow my web app to use IndexedDB?!\", err);\n };\n\n request.onsuccess = function(event) {\n db = event.target.result;\n\n db.transaction('devices').objectStore('devices').get(1).onsuccess = function(event) {\n dataHeader.textContent = event.target.result.type;\n };\n };\n }", "function getDb(db,node){\n \n var objectStore = db.transaction(\"task\", 'readwrite').objectStore(\"task\");\n objectStore.openCursor().onsuccess = function(event) {\n var cursor = event.target.result;\n if (cursor) {\n \n createLi(cursor.value.time,cursor.value.task,cursor.value.status,node, cursor.key);\n console.log(cursor);\n cursor.continue();\n }\n else {\n console.log(\"No more entries!\");\n \n }\n };\n \n \n \n }", "getLevelDBData(key){\n let self = this;\n return new Promise((resolve, reject) => {\n self.db.get(key, (error, block) => {\n if(error) { reject(error) } else { resolve(block) }\n });\n });\n }", "function DataStore() {}", "function DataStore() {}", "constructor (db) {\n super(db);\n }", "constructor (db) {\n super(db);\n }", "connectToDatabase () {\n this.database = pgp(connectionDatas)\n _checkDatabaseConnection(this.database)\n }", "function queryDatabase() {\n if (idb.isReady()) {\n idb.get(dbKeys.stations);\n idb.get(dbKeys.lastFrequency);\n }\n }", "get db() {\n return this._db;\n }", "function SqliteAdapter(dbFile) {\n var self = this;\n this.db = new sqlite3.Database(dbFile);\n \n var sql = this.db;\n sql.serialize(function() {\n sql.run(\"CREATE TABLE IF NOT EXISTS `sensor_info` (\" +\n \"`sensor_id` UNSIGNEDBIGINT NOT NULL PRIMARY KEY,\" +\n \"`sensor_hub_address` UNSIGNEDBIGINT NOT NULL,\" +\n \"`sensor_address` SMALLINT NOT NULL,\" +\n \"`sensor_name` VARCHAR(128) NOT NULL,\" +\n \"`sensor_family_type` SMALLINT NOT NULL,\" +\n \"`registration_datetime` INTEGER NOT NULL,\" +\n \"`update_interval` SMALLINT NOT NULL,\" +\n \"`available` TINYINT NOT NULL);\"); //remove available it is redundant\n\n sql.run(\"CREATE TABLE IF NOT EXISTS `sensor_data_history` (\" +\n \"`record_id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,\" +\n \"`sensor_id` UNSIGNEDBIGINT NOT NULL,\" +\n \"`time_stamp` INTEGER NOT NULL,\" +\n \"`value` INTEGER NOT NULL);\");\n\n sql.run(\"CREATE TABLE IF NOT EXISTS `sensor_data` (\" +\n \"`sensor_id` UNSIGNEDBIGINT NOT NULL PRIMARY KEY,\" +\n \"`time_stamp` UNSIGNEDBIGINT NOT NULL,\" +\n \"`value` INTEGER NOT NULL);\");\n });\n}", "function dbInitilization(){\n \n // Queries scheduled will be serialized.\n db.serialize(function() {\n \n // Queries scheduled will run in parallel.\n db.parallelize(function() {\n\n db.run('CREATE TABLE IF NOT EXISTS countries (id integer primary key autoincrement unique, name)')\n db.run('CREATE TABLE IF NOT EXISTS recipes (id integer primary key autoincrement unique, name, type, time, ingredient, method, id_Country)')\n })\n }) \n}", "getLevelDBData(key){\n let self = this;\n return new Promise(function(resolve,reject){\n self.db.get(key, function(err, value) {\n if (err) return reject(err);\n resolve(value);\n });\n });\n }", "function db() {\r\n\tthis.db_name = 'haccp';\r\n\tthis.db_version = '1.0';\r\n\tthis.db_size = 50;\r\n\tthis.database = localStorage.getItem('database');\r\n\tthis.appVersion = localStorage.getItem('app-version');\r\n\tthis.data = [];\r\n\tthis.query = false;\r\n\tthis.collections = [];\r\n\tthis.tables = ['tasks', 'haccp_items', 'forms', 'registration', 'form_item', 'sync_query', 'reports', 'flowchart', 'settings'];\r\n\tthis.localStore = ['app-version', 'company_join_date', 'company_name', 'contact_name', 'database', 'role', 'user_data', 'user_name'];\r\n\tPouchDB.plugin(Erase);\r\n}", "async function execSql(sql, params = [],action){\n console.log(\"start execSql....\\n\");\n\n try{\n let db = await connectToDB();\n db.loadExtension(\"./extension-functions\");//compiled extension for \n\n switch (action) {\n case 'select':\n return await select();\n case 'insert':\n return await insert();\n default:\n return false;\n }\n /*db.serialize(() => {\n // Queries scheduled here will be serialized.\n db.run(\n `CREATE TABLE IF NOT EXISTS sensors (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n device_id INTEGER,\n timestamp TEXT,\n latitude REAL,\n longitude REAL,\n value INTEGER\n )`);\n \n \n\n });*/\n\n async function select(){\n return new Promise(function(resolve, reject) {\n\n db.all(sql, params, (err,result) => {\n if (err) {\n console.error(err.message);\n reject(err.message);\n }\n resolve(result);\n\n }).close((err) => {\n if (err) {\n console.error(\"error\" , err.message);\n reject(err.message);\n }\n console.log('Close the database connection.');\n });\n \n }); \n }//end select\n\n async function insert(){\n return new Promise(function(resolve, reject) {\n\n db.run(sql, params, function(err){\n if (err){\n reject(err);\n throw err;\n }\n resolve(true);\n \n }).close((err) => {\n if (err) {\n console.error(\"error\" , err.message);\n }\n console.log('Close the database connection.');\n });\n\n }); \n }//end insert\n\n \n \n\n }catch(e){\n console.log(\"execSql Error\");\n throw e;\n }\n}", "function serverDB() {\n\n /**\n * GET parameter\n * @type {object}\n */\n var data = prepareData( { del: key }, user, password );\n\n // send dataset key to server interface\n if ( self.socket ) useWebsocket( data, onResponse ); else useHttp( data, onResponse );\n\n /**\n * callback for server response\n * @param {ccm.dataset} dataset - deleted dataset\n */\n function onResponse( dataset ) {\n\n // check server response\n if ( !checkResponse( dataset, user ) ) return;\n\n // perform callback with deleted dataset\n if ( callback ) callback( dataset );\n\n // delete dataset in local cache\n callback = undefined; localCache();\n\n }\n\n }", "mapToDb() {\n return {\n fullName: this.fullName,\n username: this.username,\n password: this.password,\n rank: this.rank,\n branch: this.branch,\n permissions: this.permissions || [PERMISSIONS.SOLDIER],\n isArchived: this.isArchived\n };\n }", "constructor(db) {\n this.db = db\n }", "getLevelDBData(key){\n const self = this;\n return new Promise(function(resolve, reject) {\n self.db.get(key, function(err, value) {\n if (err) return reject(err)\n else return resolve(value)\n })\n });\n }", "function getDb() {\n return db;\n }", "function dataSend() {\n let db;\n const request = indexedDB.open('my-db');\n request.onerror = (event) => {\n console.log('Error with IndexDB', event);\n };\n request.onsuccess = (event) => {\n db = event.target.result;\n getData(db);\n };\n }", "function pet_view_db(tx){\n tx.executeSql('SELECT * FROM Pet',[], pet_view_data, errorDB);\n}", "function handle_database(request,response) {\n\n// Make connection\npool.getConnection(function(e,connection){\nif (e) {\n\n //Send error message for unsuccessful connection and terminate\n response.json({\"code\" : 300, \"status\" : \"Database connection error\"});\n return;\n}\n\n// Display success message in the terminal\nconsole.log('Database connected');\n\n// Read particular records from book table\nconnection.query(\"SELECT hellocol FROM hello WHERE helloid=1;\",function(e,rows){ connection.release();\nif(!e) {\n\n // Return the resultset of the query if it is successfully executed\n response.json(rows);\n console.log(JSON.stringify(rows));\n //console.\n //console.log(\"rows=\"+JSON.parse(response.json(rows)));\n\n}\n});\n\n// Check the connection error occurs or not\nconnection.on('error', function(e) {\nresponse.json({\"code\" : 300, \"status\" : \"Database connection errror\"});\nreturn;\n});\n});\n}", "_loadInfoFromDatabase() {\n // default values\n this._prefix = \"\";\n this._enabled = true;\n\n db.select(\"Plugins\", [\"prefix\", \"disabled\"], {\n id: this.id\n }).then((rows) => {\n if (rows.length > 0) {\n this._prefix = rows[0].prefix;\n this._enabled = (rows[0].disabled === 0);\n } else {\n return db.insert(\"Plugins\", {\n id: this.id,\n prefix: \"\",\n disabled: 0\n });\n }\n }).catch(Logger.err);\n }", "getLevelDBData(key){\n let self = this;\n return new Promise(function(resolve, reject) {\n self.db.get(key, function(err, value) {\n if (err) reject(err);\n resolve(value);\n });\n });\n }", "init() {\n return sqlite\n .open(`${this.server.paths.data}/database.db`, { Promise })\n .then((db) => {\n const schema = fs.readFileSync(`${this.server.paths.root}/server/schema.sql`).toString();\n return db.exec(schema);\n })\n .then((db) => {\n this.db = db;\n });\n }", "getDatabase() {\n return this.__db;\n }", "static setup() {\n this.dbPromise = idb.open('mws-db', 2, upgradeDb => {\n switch (upgradeDb.oldVersion) {\n case 0:\n upgradeDb.createObjectStore('restaurants', { keyPath: 'id' });\n console.log('created db v1');\n case 1:\n let reviewsStore = upgradeDb.createObjectStore('reviews', { keyPath: 'id' });\n reviewsStore.createIndex('restaurant_id', 'restaurant_id', { unique: false });\n console.log('created db v2');\n }\n });\n }", "function queryDB(tx) {\r\n tx.executeSql(\"SELECT * FROM DEMO\", [], querySuccess, errorCB);\r\n}", "function DatabaseFactory() {}", "function DatabaseFactory() {}", "constructor(db) {\n this.db = db;\n }", "connection() {\n console.log('Estableciendo coneccion...');\n SQLite.openDatabase({ name: NAME_DB, location: LOCATION }, (db) => { \n console.log( 'Success: ', db );\n db.transaction((tx)=>{\n tx.executeSql(SQL_CREATE_TODO, [], (tx, results) =>{\n console.log('create db results' + results);\n this.getAllItems();\n })\n })\n }, (error) => {\n console.log( 'Error: ', success );\n } )\n }", "static openDatabase() {\r\n return idb.open(\"MWS\", 3, function(upgradeDb) {\r\n switch(upgradeDb.oldVersion) {\r\n case 0:\r\n case 1:\r\n var restaurants = upgradeDb.createObjectStore('restaurants', {\r\n keyPath: 'id'\r\n });\r\n restaurants.createIndex('cuisine','cuisine_type');\r\n restaurants.createIndex('neighborhood','neighborhood');\r\n case 2:\r\n console.log(\"Upgrading to DB v2.0\");\r\n var reviews = upgradeDb.createObjectStore('reviews', {\r\n keyPath: 'id'\r\n });\r\n reviews.createIndex('restaurant','restaurant_id');\r\n case 3:\r\n console.log(\"Upgrading to DB v3.0\");\r\n var offline_reviews = upgradeDb.createObjectStore('offline_reviews', {keyPath: 'id'});\r\n }\r\n });\r\n }", "function printDB() {\n db.transaction(function(tx) {\n\n var query = \"SELECT * FROM HeartRateData\";\n\n tx.executeSql(query, [], function(tx, resultSet) {\n var str = \"\";\n for (var x = 0; x < resultSet.rows.length; x++) {\n //console.log(\"Time stamp: \" + resultSet.rows.item(x).timestamp + \" :: Heart Rate \" + resultSet.rows.item(x).heartRate);\n str += JSON.stringify(resultSet.rows.item(x));\n }\n alert(\"database\" + str);\n },\n function(tx, error) {\n console.log('SELECT error: ' + error.message);\n });\n }, function(error) {\n console.log('transaction error: ' + error.message);\n }, function() {\n console.log('transaction ok');\n });\n }", "getState() {\r\n //ref is refering to the location of the database-gameState\r\n var gameStateRef = database.ref('gameState');\r\n\r\n //on is creating a listener which will keep listening to the changes in the database\r\n gameStateRef.on(\"value\", \r\n function(data) {\r\n gameState = data.val(); //val converts the datasnapshot into javascript object\r\n \r\n }\r\n );\r\n }", "connect() {\r\n return new Promise((res, rej) => {\r\n const request = indexedDB.open(\"toDoAppDatabase\", 1)\r\n request.onupgradeneeded = e => {\r\n console.log(\"Creating a new version of database...\");\r\n\r\n let db = request.result\r\n if (!db.objectStoreNames.contains(\"groups\")) {\r\n db.createObjectStore(\"groups\", { keyPath: 'id', autoIncrement: true });\r\n }\r\n if (!db.objectStoreNames.contains(\"notes\")) {\r\n db.createObjectStore(\"notes\", { keyPath: 'id', autoIncrement: true });\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n request.onsuccess = e => {\r\n // console.log(\"We successfully connected to the database.\");\r\n res(request.result)\r\n }\r\n\r\n request.onerror = e => {\r\n rej(request.error)\r\n }\r\n\r\n request.onerror = e => {\r\n console.log(\"Storage is blocked\");\r\n }\r\n });\r\n }", "constructor() {\n this._hasTimestamps = false;\n this._dbReseach = constants.DB.DB_RESEARCH;\n this.config = {\n host: PGHOST,\n port: PGPORT,\n database: PGDATABASE,\n user: PGUSER,\n password: PGPASSWORD,\n };\n }", "getState()\r\n {\r\n //creating a variable with the gameState from the database\r\n var gameStateRef = database.ref('gameState'); \r\n //making the database read the given value\r\n gameStateRef.on(\"value\",function(data){\r\n gameState = data.val();\r\n }); \r\n }", "connect() {\r\n return new Promise((res, rej) => {\r\n const request = indexedDB.open(\"toDoAppDatabase\", 1)\r\n request.onupgradeneeded = e => {\r\n console.log(\"Creating a new version of database...\");\r\n\r\n let db = request.result\r\n if (!db.objectStoreNames.contains(\"groups\")) {\r\n db.createObjectStore(\"groups\", { keyPath: 'id', autoIncrement: true });\r\n }\r\n if (!db.objectStoreNames.contains(\"notes\")) {\r\n db.createObjectStore(\"notes\", { keyPath: 'id', autoIncrement: true });\r\n }\r\n\r\n }\r\n\r\n\r\n request.onsuccess = e => {\r\n // console.log(\"We successfully connected to the database.\");\r\n res(request.result)\r\n }\r\n\r\n request.onerror = e => {\r\n rej(request.error)\r\n }\r\n\r\n request.onerror = e => {\r\n console.log(\"Storage is blocked\");\r\n }\r\n });\r\n }", "function V(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=\"string\"!=typeof e[r]?e[r].toString():e[r];var i=new ue(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(i){return r(i)}n.db.transaction(function(i){i.executeSql(\"CREATE TABLE IF NOT EXISTS \"+n.storeName+\" (id INTEGER PRIMARY KEY, key unique, value)\",[],function(){t._dbInfo=n,e()},function(e,t){r(t)})})});return n.serializer=Oe,i}", "function startDB() {\n return new Promise((resolve, reject) => {\n connection.on(\"connect\", (err) => {\n if (err) {\n console.log(\"connection failed\");\n reject(err);\n // request.addParameter(\"name\", TYPES.VarChar, name);\n throw err;\n } else {\n console.log(\"Connected\");\n resolve();\n }\n });\n connection.connect();\n });\n}", "function serverDB() {\n\n // get dataset by key?\n if ( !jQuery.isPlainObject( key ) ) {\n\n /**\n * local cached dataset\n * @type {ccm.dataset}\n */\n var dataset = checkLocal();\n\n // is dataset local cached? => return local cached dataset\n if ( dataset ) return dataset;\n\n }\n\n /**\n * GET parameter\n * @type {object}\n */\n var data = prepareData( { key: key }, user, password );\n\n // load dataset from server interface\n if ( self.socket ) useWebsocket( data, onResponse ); else useHttp( data, onResponse );\n\n /**\n * callback for server response\n * @param {ccm.dataset} results - result dataset(s)\n */\n function onResponse( results ) {\n\n // check server response\n if ( !checkResponse( results, user ) ) return;\n\n // no results? => abort\n if ( !results ) return callback( null );\n\n // save result dataset(s) in local cache\n if ( ccm.helper.isDataset( results ) )\n self.local[ results.key ] = results;\n else\n for ( var i = 0; i < results.length; i++ )\n if ( results[ i ].key !== undefined )\n self.local[ results[ i ].key ] = results[ i ];\n\n // perform callback with result dataset(s)\n callback( results );\n\n }\n\n }", "function Database() {\n // Initialise database\n this.db = window.sqlitePlugin.openDatabase({name: \"football.db\", location: \"default\"});\n\n // Create tables if they don't exist\n // The SQL schema for the mobile local database is defined here, since it is small\n // and enables it to be easily changed\n this.db.sqlBatch([\n \"CREATE TABLE IF NOT EXISTS tweets ( \\\n id INTEGER PRIMARY KEY AUTOINCREMENT, \\\n userName TEXT, \\\n tweetId TEXT, \\\n tweetText TEXT, \\\n tweetTimestamp TEXT, \\\n previousSearchId INTEGER );\",\n\n \"CREATE TABLE IF NOT EXISTS previousSearches ( \\\n id INTEGER PRIMARY KEY AUTOINCREMENT, \\\n isOrOperator INTEGER, \\\n playerQuery TEXT, \\\n teamQuery TEXT, \\\n searchTimestamp TEXT DEFAULT CURRENT_DATETIME);\",\n ], function() {\n console.log(\"db OK\");\n }, function(error) {\n console.log(\"db error: \", error);\n });\n\n}", "function TrelloDB() {\n var _table_name_cache = {};\n\n // Returns a Trello list ID for the given table\n //\n // Passes the ID to the given callback.\n this._with_list_id = function(table_name, cb) {\n if (_table_name_cache[table_name] !== undefined) {\n cb(_table_name_cache[table_name]);\n return;\n }\n\n trello_api.get('1/board/' + oscar_conf['trello_db_board'] + '/lists', function(err, data) {\n var db_lists = data.filter(function(db_list) {return (db_list['name'] == table_name)});\n\n if (db_lists.length == 0) {\n console.log('No list named \"' + table_name + '\"');\n res.send(500, 'No list named \"' + table_name + '\"');\n return;\n }\n _table_name_cache[table_name] = db_lists[0]['id'];\n cb(_table_name_cache[table_name]);\n });\n }\n}", "function DbResults() {\n\n const { db, useReturn, e } = useEasybase();\n\n const { frame } = useReturn(() => {\n return db('SENSOR-DATA').return()\n })\n\n const insertRecord = async () => {\n try {\n const inDate = prompt(\"Please enter the Date\", \"2021-08-27T10:00:00.000Z\");\n const inSensor1 = prompt(\"Please enter the data for Sensor 1\", \"59\");\n const inSensor2 = prompt(\"Please enter the data for Sensor 2\", \"12\");\n const inSensor3 = prompt(\"Please enter the data for Sensor 3\", \"95\");\n const inSensor4 = prompt(\"Please enter the data for Sensor 4\", \"590\");\n \n if (!inDate || !inSensor1 || !inSensor2 || !inSensor3 || !inSensor4) return;\n\n await db('SENSOR-DATA').insert({\n date: inDate,\n sensor1: inSensor1,\n sensor2: inSensor2,\n sensor3: inSensor3,\n sensor4: inSensor4,\n\n }).one();\n } catch (_) {\n alert(\"Error on input format\")\n }\n }\n \n return (\n <div>\n <button style={{ position: 'fixed',\n right: 5,\n top: 5, \n width: \"80px\",\n margin: 20,\n padding: 10,\n borderRadius: 100,\n backgroundColor: 'rgba(110, 236, 236, 0.5)' }} \n onClick={insertRecord}>\n + Add Record\n </button>\n\n <div style={{ marginLeft: 130, marginRight: 130, marginTop: 30 }}>\n <AppDB/> \n </div>\n\n <h1 style={{ textAlign: 'center', margin: 30 }}>Historical Data:</h1>\n <div style={{ marginLeft: 130, \n marginRight: 130, \n marginBottom: 30 }}>\n <div style={{ display: \"grid\", \n gridTemplateColumns: \"repeat(3, 1fr)\", \n gridGap: 20 }}>\n {frame.map(ele => <Card {...ele} />)}\n </div>\n </div>\n </div>\n )\n}", "function onBulkDataConnection() {\r\n return function(conn) {\r\n console.log(\"Data channel connected\");\r\n conn.on('close', function() {\r\n console.log(\"Data channel close\");\r\n });\r\n\r\n conn.on('data', function(data) { //This event is trigered when a request for data arrives from a browser.\r\n var requestObj = JSON.parse(data);\r\n var targetName = null;\r\n var out = {};\r\n\r\n cloudant.db.list(function(err, allDbs){ //this gets a list of all the databases \r\n if (err) {\r\n throw err;\r\n }\r\n for(var i = 0 ; i < allDbs.length ; i++ ) {\r\n if(allDbs[i].indexOf(\"iotp_4rxa4d_default_\") == -1 && requestObj.databaseName == allDbs[i]) {\r\n targetName = allDbs[i];\r\n break;\r\n }\r\n }//end of for loop\r\n if(targetName != null) {\r\n querryBulk(targetName); //make this function.\r\n }\r\n else {\r\n console.log(requestObj.databaseName + \" database not found.\");\r\n conn.write(JSON.stringify({update:\"done\"}));\r\n conn.write(JSON.stringify({message:requestObj.databaseName + \" database not found, try again.\"}));\r\n }\r\n });//end of list\r\n\r\n function querryBulk(targetName) {\r\n var clientUpdate = setInterval(function() {\r\n conn.write(JSON.stringify({update:\".\"}));\r\n }, 2000);\r\n console.log(\"Searching database \" + targetName);\r\n conn.write(JSON.stringify({message:targetName + \" database found, starting querry...\"}));\r\n var targetDatabase = cloudant.db.use(targetName);\r\n targetDatabase.find({ //this will get all the documents from the specified database.\r\n \"selector\": {\r\n },\r\n \"fields\": [\r\n \"timestamp\",\r\n \"data.d\",\r\n \"eventType\",\r\n \"localName\",\r\n \"deviceId\"\r\n\r\n ],\r\n \"sort\": [\r\n \r\n ]\r\n }, function(err, result) {\r\n if (err) {\r\n throw err;\r\n }\r\n else {\r\n data = result.docs;\r\n for(i in data) {\r\n //console.log(JSON.stringify(result[i]));\r\n thisResult = data[i];\r\n if(out[thisResult.localName]) {\r\n out[thisResult.localName].setReading(thisResult);\r\n }\r\n else {\r\n out[thisResult.localName] = new DeviceDataSet();\r\n out[thisResult.localName].setReading(thisResult);\r\n }\r\n }\r\n \r\n for(i in out) {// we go through each deviceData\r\n var thisDeviceData = out[i];\r\n for(j in thisDeviceData) { // we go through each characteristic\r\n var thisChar = thisDeviceData[j];\r\n for(k in thisChar) {\r\n var entry = thisChar[k];\r\n if (entry[0] != undefined && entry[0] != null && entry[0].length > 0) {\r\n entry[0] = parseTime(entry[0]);\r\n entry.splice(1, 0, entry[0].toString().split('-')[0]);\r\n }\r\n }\r\n }\r\n }\r\n \r\n for(i in out) {// we go throughh each deviceData\r\n var thisDeviceData = out[i];\r\n for(j in thisDeviceData) { // we go through each characteristic\r\n var thisChar = thisDeviceData[j];\r\n for(k in thisChar) {\r\n thisChar.sort(compareFunction);\r\n }\r\n }\r\n }\r\n \r\n for(i in out) {\r\n var thisDevice = out[i];\r\n removeAllFirstEntries(thisDevice);\r\n allCharToCSV(thisDevice);\r\n }\r\n \r\n clearInterval(clientUpdate);\r\n conn.write(JSON.stringify({update:\"done\"}));\r\n console.log(\"Sending bulk data back...\");\r\n conn.write(JSON.stringify(out));\r\n }\r\n });\r\n }\r\n });\r\n };\r\n}", "function openDatabase(){\r\n // If the browser doesn't support service worker,\r\n // then no need to have a database\r\n if (!navigator.serviceWorker) {\r\n return Promise.resolve();\r\n }\r\n \r\n return idb.open('currency-converter', 1, function(upgradeDb) {\r\n let currencyListStore = upgradeDb.createObjectStore('currency-list', {\r\n keyPath: 'id'\r\n });\r\n currencyListStore.createIndex('by-currencyName', 'currencyName');\r\n\r\n let rateListstore = upgradeDb.createObjectStore('rate-list', {\r\n keyPath: 'id'\r\n });\r\n rateListstore.createIndex('by-rateQuery', 'id')\r\n });\r\n}", "function startDatabaseQueries() {\n var myUserId = firebase.auth().currentUser.uid;\n var statusRef = firebase.database().ref('/kettle/status');\n var curWaterRef = firebase.database().ref('/kettle/cur_water');\n var reservationCountRef = firebase.database().ref('/reservations/');\n // Fetching and displaying all posts of each sections.\n updateValueByRef(statusRef, statusContainer);\n updateValueByRef(curWaterRef, currWaterContainer);\n refreshData(reservationCountRef, addReservationEntry);\n // Keep track of all Firebase refs we are listening to.\n listeningFirebaseRefs.push(statusRef);\n listeningFirebaseRefs.push(curWaterRef);\n listeningFirebaseRefs.push(reservationCountRef);\n}", "getScheduleFromDB() {\n return idbKeyval.get(\"schedule\").catch(err => console.err(err));\n }", "function initDB(){\n const db = new Localbase(\"TracerDB\");\n return db\n}", "function prepare_database() {\n // define the config persistence if it does not exist\n /*\n var createTabStr = \"CREATE TABLE IF NOT EXISTS flmconfig (sensor CHAR(32), name CHAR(32));\";\n // and send the create command to the database\n db.run(createTabStr, function(err) {\n if (err) {\n db.close();\n throw err;\n }\n console.log(\"Create/connect to config table successful...\");\n });\n*/\n // define the data persistence if it does not exist\n createTabStr = \"CREATE TABLE IF NOT EXISTS flmdata (sensor CHAR(32), timestamp CHAR(10), value CHAR(5), unit CHAR(5));\";\n // and send the create command to the database\n db.run(createTabStr, function(err) {\n if (err) {\n db.close();\n throw err;\n }\n console.log(\"Create/connect to data table successful...\");\n });\n}", "function module_sync() {\n\t//tycheesdb_syncDatabaseNow(APP_NAME_SETTINGS);\n} // .end of module_sync", "function successDB() { }", "function successDB() { }", "async function updateDatabaseOnInit () {}", "fillDb() {\n if (this.options.before) this.options.before();\n this._schemaRecursuveAdd('', this.schema);\n if (this.options.after) this.options.after();\n }", "getDatabase() {\n return this.database;\n }", "getState(){\r\n var gameStateRef= database.ref(\"gameState\");\r\n gameStateRef.on(\"value\", function(data){\r\n gameState= data.val();\r\n })\r\n }", "function readDatabase(){\n firebase\n .database()\n .ref('users')\n .on('value',(snap)=>{\n var usersData= snap.val()\n listIt(usersData)\n })\n}", "function queryInterviewDatabase() { \n console.log('Reading rows from the Table...');\n\n // Read all rows from table\n request = new Request(\"select * from interviewData;\", (err, rowCount, rows) => {\n console.log(rowCount + ' row(s) returned');\n process.exit();\n });\n\n request.on('row', function(columns) {\n columns.forEach(function(column) {\n console.log(\"%s\\t%s\", column.metadata.colName, column.value);\n });\n });\n\n connection.execSql(request);\n}", "function getEntries() {\r\n db.transaction(queryDB,dbErrorHandler);\r\n}", "loadDbData() {\n return idb_helper__WEBPACK_IMPORTED_MODULE_3__[\"default\"].cursor(\"wallet\", cursor => {\n if (!cursor) return false;\n let wallet = cursor.value; // Convert anything other than a string or number back into its proper type\n\n wallet.created = new Date(wallet.created);\n wallet.last_modified = new Date(wallet.last_modified);\n wallet.backup_date = wallet.backup_date ? new Date(wallet.backup_date) : null;\n wallet.brainkey_backup_date = wallet.brainkey_backup_date ? new Date(wallet.brainkey_backup_date) : null;\n\n try {\n (0,_tcomb_structs__WEBPACK_IMPORTED_MODULE_6__.WalletTcomb)(wallet);\n } catch (e) {\n console.log(\"WalletDb format error\", e);\n }\n\n this.state.wallet = wallet;\n this.setState({\n wallet\n });\n return false; //stop iterating\n });\n }", "async SyncDB() { // Sincroniza com as tabelas, colunas e todos os elementos do Banco de Dados\n await mysql.sync();\n }", "openConection() {\n if (window.indexedDB) {\n var req = window.indexedDB.open(\"Database\", 1);\n var db;\n req.onupgradeneeded = function(e) {\n var db = e.target.result;\n var store = db.createObjectStore(\"Formular\", { keyPath: \"name\" });\n var store2 = db.createObjectStore(\"Versions\", { keyPath: \"name\" });\n };\n req.onsuccess = function(e) {\n db = e.target.result;\n };\n req.onerror = function(e) {\n console.log(\"Error\" + e);\n };\n }\n }", "constructor(data) {\n this.filename = `dbfile_${(0xffffffff*Math.random())>>>0}`;\n if (data) { createDataFile('/', this.filename, data, true, true); }\n this.handleError(sqlite3_open(this.filename, apiTemp));\n this.db = getValue(apiTemp, 'i32');\n RegisterExtensionFunctions(this.db);\n this.statements = {}; // A list of all prepared statements of the database\n }", "getLevelDBData(key){\n let self = this; // because we are returning a promise we will need this to be able to reference 'this' inside the Promise constructor\n return new Promise(function(resolve, reject) {\n self.db.get(key, (err, value) => {\n if(err){\n if (err.type == 'NotFoundError') {\n resolve(undefined);\n }else {\n console.log('Block ' + key + ' get failed', err);\n reject(err);\n }\n }else {\n\t\t\t\t\tvalue = JSON.parse(value);\n resolve(value);\n }\n });\n });\n }", "function initialize() {\n var client = getClient();\n client.connect(() => {\n client.query('CREATE TABLE IF NOT EXISTS Item (ID SERIAL PRIMARY KEY, Name VARCHAR(32) NOT NULL, InsertDate TIMESTAMP NOT NULL);', (err) => {\n console.log('successfully connected to postgres!')\n client.end(); \n });\n });\n}", "getDb() {\n return db;\n }", "static get DATABASE_URL() {\r\n // const port = 8000 // Change this to your server port\r\n // return `http://localhost:${port}/data/restaurants.json`;\r\n return `http://localhost:${DBHelper.port}/restaurants`;\r\n }", "getState()\r\n {\r\n var gameStateRef= database.ref('gameState');\r\n gameStateRef.on(\"value\", function(data){\r\n gameState= data.val();\r\n })\r\n }", "addListener(...args) {\n return this.database.addListener(...args);\n }", "async loadDatabase() {\n this.__db =\n (await qx.tool.utils.Json.loadJsonAsync(this.__dbFilename)) || {};\n }", "guardarDB() {\n fs.writeFileSync(this.dbPath, JSON.stringify(this.historial));\n }", "static getPlayerInfo(){\n //refer to database for player info\n var playerInfoRef = database.ref('players');\n //repeatedly read database for player info\n playerInfoRef.on(\"value\",(data)=>{\n //for all the player in the game\n allPlayers = data.val();\n })\n }", "function dbSetup(){\n Entry.sync() // {force: true}) // using 'force' drops the table if it already exists, and creates a new one\n .then(function(){\n console.log('======= db synced =======');\n });\n }", "function clientDB() {\n\n /**\n * local cached dataset\n * @type {ccm.dataset}\n */\n var dataset = checkLocal();\n\n // is dataset local cached? => return local cached dataset\n if ( dataset ) return dataset;\n\n /**\n * object store from IndexedDB\n * @type {object}\n */\n var store = getStore();\n\n /**\n * request for getting dataset\n * @type {object}\n */\n var request = store.get( key );\n\n // set success callback\n request.onsuccess = function ( evt ) {\n\n /**\n * result dataset\n * @type {ccm.dataset}\n */\n var dataset = evt.target.result;\n\n // dataset not exist? => abort\n if ( !dataset ) return callback( null );\n\n // save result dataset in local cache\n if ( dataset.key !== undefined ) self.local[ key ] = dataset;\n\n // perform callback with result dataset\n if ( callback ) callback( dataset );\n\n };\n\n }", "function databaseInitialize() {\n /* var entries = db.getCollection(\"items\");\n if (entries === null) {\n entries = db.addCollection(\"items\");\n } */\n // kick off any program logic or start listening to external events\n runProgramLogic();\n}" ]
[ "0.6814865", "0.66586024", "0.6615573", "0.6520268", "0.6445476", "0.6437964", "0.6419784", "0.6410213", "0.6378224", "0.62852097", "0.6231181", "0.6165056", "0.6165056", "0.6129086", "0.61262757", "0.6079702", "0.60610706", "0.6042549", "0.60393554", "0.6027563", "0.6022031", "0.6013484", "0.599309", "0.5990265", "0.5978301", "0.59700924", "0.5965155", "0.5965155", "0.5959622", "0.5959622", "0.5956901", "0.5949618", "0.5928289", "0.59254944", "0.59151566", "0.58998346", "0.5896264", "0.58933526", "0.5887501", "0.58867794", "0.58849204", "0.58798295", "0.58789176", "0.5878478", "0.587809", "0.58693326", "0.5868048", "0.58590174", "0.58566797", "0.58561486", "0.5855628", "0.58553493", "0.5854516", "0.5854516", "0.58540213", "0.58525014", "0.5843092", "0.58230525", "0.58213764", "0.5821041", "0.5819521", "0.58104676", "0.580836", "0.58041877", "0.57945395", "0.5793533", "0.57922566", "0.57911265", "0.5789938", "0.5788681", "0.5783395", "0.57818985", "0.57781345", "0.57690006", "0.576303", "0.57617193", "0.57518816", "0.57518816", "0.57454216", "0.57353014", "0.5728014", "0.57262087", "0.5718757", "0.57132685", "0.5708637", "0.5705172", "0.5699402", "0.56977504", "0.5688682", "0.56880605", "0.56880563", "0.5685736", "0.5683894", "0.5668275", "0.56665754", "0.56607515", "0.5660073", "0.56577784", "0.564738", "0.5646001", "0.56407" ]
0.0
-1
Basic turtle graphics implementation: For more info on Javascript OOP: The turtle's coordinate system uses pixels for distance and degrees for rotations 0 degrees is straight right (east); positive degrees are clockwise Turtle constructor takes optional x, y starting coordinates (default is center of sketch)
function Turtle(x, y) { // assign default values to x and y if they were not passed if (typeof x === "undefined") { x = width * 0.5; } if (typeof y === "undefined") { y = height * 0.5; } this.x = x; this.y = y; this.bearingRadians = 0; this.isPenDown = true; this._stateStack = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Turtle() {\n // Construct new turtle.\n // Optional argument is passed to Init()\n // Define public properties\n this.log = '';\n this.logging = false;\n \n // Initialize (define and initialize remaining public properties\n if ( arguments.length >= 1 ) {\n this.Init(arguments[0]);\n }\n else {\n this.Init();\n }\n}", "function draw(){ //this bad boy will open up when we load node1.html.\r\n\tctx.fillStyle = \"rgba(155,155,155,.5)\"\r\n\tctx.fillRect(0,0,500,500);\r\n\tctx.lineWidth = \"5\";\r\n\tctx.lineJoin = \"round\";\r\n\tctx.strokeStyle = \"rgba(150,150,80,.5)\";\r\n\tctx.beginPath(); //turtle graphics. mit program language for little kids :'(\r\n\t\r\n\tradius = 80;\r\n\tcircle(x,y,radius);\r\n\tctx.beginPath();\r\n\tx-=20;\r\n\ty-=20;\r\n\tctx.moveTo(x,y);\r\n\tturn(160);\r\n\tforward(60);\r\n\tturn(220);\r\n\tforward(60);\r\n\t\r\n\t\r\n\tturn(70);\r\n\tforward(60);\r\n\tturn(220);\r\n\tforward(60);\r\n\t\r\n\tturn(70);\r\n\tforward(60);\r\n\tturn(215);\r\n\tforward(60);\r\n\t\r\n\tturn(70);\r\n\tforward(60);\r\n\tturn(220);\r\n\tforward(60);\r\n\t\r\n\tturn(70);\r\n\tforward(60);\r\n\tturn(220);\r\n\tforward(60);\r\n\t\r\n}", "function Turtle(x, y, w, h) {\n\tthis.origin = {x: x, y: y, z: 0};\n\tthis.current = {x: x, y: y, z: 0};\n\tthis.isDead = false;\n\t// makes cycles less likely\n\tthis.grids = [\n\t\tnew Grid(w, h),\n\t\tnew Grid(w, h)\n\t];\n\t\n\t// initialize to valid random values\n\tthis.initRandom = function() {\n\t\tvar x = Math.floor(this.grids[0].width / 2 * Math.random());\n\t\tvar y = 0;\n\t\t\n\t\tthis.origin.x = x;\n\t\tthis.origin.y = y;\n\t\tthis.current.x = x;\n\t\tthis.current.y = y;\n\t\t\n\t\t// initialize grid maps\n\t\tfor(var i = 0; i < this.grids.length; i++) {\n\t\t\tvar grid = this.grids[i];\n\t\t\t\n\t\t\tfor(x = 0; x < grid.width; x++) {\n\t\t\t\tfor(y = 0; y < grid.height; y++) {\n\t\t\t\t\tgrid.set(x, y, this.randomDest(x, y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\t// compute a random adjacent destination given a location\n\tthis.randomDest = function(x, y) {\n\t\tvar dest = {x: x, y: y, z: 0};\n\t\t\n\t\t// move horizontally or vertically\n\t\tif(Math.random() < 0.5) {\n\t\t\tdest.x = Math.floor(this.grids[0].width * Math.random());\n\t\t} else {\n\t\t\tdest.y = Math.floor(this.grids[0].height * Math.random());\n\t\t}\n\t\t\n\t\t// pick random grid map to use\n\t\tdest.z = Math.floor(this.grids.length * Math.random());\n\t\t\n\t\treturn dest;\n\t};\n\t// simulate the life cycle: calculate phenotype from genotype\n\tthis.run = function(neighborhood) {\n\t\t// only meant to run once\n\t\tif(this.isDead) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// flag lines\n\t\tfor(var i = 0; i < LIFE_SPAN; i++) {\n\t\t\tvar next = this.grids[this.current.z].get(this.current.x, this.current.y);\n\t\t\t\n\t\t\tthis.current.z = next.z;\n\t\t\t\n\t\t\t// flag from point to point\n\t\t\twhile(this.current.x != next.x || this.current.y != next.y) {\n\t\t\t\tneighborhood.set(this.current.x, this.current.y, true);\n\t\t\t\t\n\t\t\t\t// horizontal movement\n\t\t\t\tif(this.current.x != next.x) {\n\t\t\t\t\tthis.current.x += this.current.x < next.x ? 1 : -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// vertical movement\n\t\t\t\tif(this.current.y != next.y) {\n\t\t\t\t\tthis.current.y += this.current.y < next.y ? 1 : -1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// flag last cell (left unflagged)\n\t\tneighborhood.set(this.current.x, this.current.y, true);\n\t\t// kill turtle\n\t\tthis.isDead = true;\n\t};\n\t// fitness function: evaluates phenotype\n\tthis.getFitness = function(neighborhood) {\n\t\tvar counts = [0, 0, 0, 0, 0];\n\t\tvar score = 0;\n\t\tvar weight = 1;\n\t\t\n\t\t// count all cells with certain number of neighboring tunnel cells\n\t\tfor(var x = 0; x < neighborhood.width; x++) {\n\t\t\tfor(var y = 0; y < neighborhood.height; y++) {\n\t\t\t\tvar current = neighborhood.get(x, y);\n\t\t\t\t\n\t\t\t\t// count neighboring tunnel cells\n\t\t\t\tif(!current.flag) {\n\t\t\t\t\tcounts[current.neighbors]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// cells seen from fewer tunnel cells is better\n\t\tfor(var i = 1; i <= 4; i++) {\n\t\t\tscore += weight * counts[i];\n\t\t\tweight /= 2;\n\t\t}\n\t\t\n\t\treturn score;\n\t};\n\t// produces an offspring with a mixed genotype of its parents\n\tthis.crossover = function(turtle) {\n\t\tvar x = Math.random() < 0.5 ? this.origin.x : turtle.origin.x;\n\t\tvar child = new Turtle(x, 0, this.grids[0].width, this.grids[0].height);\n\t\t\n\t\tfor(var i = 0; i < child.grids.length; i++) {\n\t\t\tvar grid = child.grids[i];\n\t\t\t\n\t\t\tfor(x = 0; x < grid.width; x++) {\n\t\t\t\tfor(var y = 0; y < grid.height; y++) {\n\t\t\t\t\t// perform uniform crossover\n\t\t\t\t\tvar dest = Math.random() < 0.5 ? this.grids[i].get(x, y) : turtle.grids[i].get(x, y);\n\t\t\t\t\t\n\t\t\t\t\tgrid.set(x, y, dest);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn child;\n\t};\n\t// introduces variation into the genotype\n\tthis.mutate = function(rate) {\n\t\tvar w = this.grids[0].width;\n\t\tvar h = this.grids[0].height;\n\t\t\n\t\tfor(var i = 0; i < this.grids.length; i++) {\n\t\t\tvar grid = this.grids[i];\n\t\t\t\n\t\t\tfor(var x = 0; x < grid.width; x++) {\n\t\t\t\tfor(var y = 0; y < grid.height; y++) {\n\t\t\t\t\tif(Math.random() < rate) {\n\t\t\t\t\t\tgrid.set(x, y, this.randomDest(x, y));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}", "function draw() {\n background(0)\n t = new Turtle();\n noLoop()\n\n noFill()\n stroke(255, 210)\n strokeWeight(1.5)\n\n unitW = width/scl;\n unitH = height/scl;\n\n\n //create a grid\n // for (var y=0; y<scl; y++){\n // for (var x=0; x<scl; x++){\n // push ()\n // stroke(70);\n // strokeWeight(.3)\n // rect(x*unitW, y*unitH, unitW, unitH)\n // pop ()\n // }\n // }\n\n\n //x, y location -- //size\n makePom(0, 3*unitH, unitW, 2*unitH, -1); \n // makePom(unitW*5, 6*unitH, unitW, 2*unitH, -1);\n // makePom(unitW*6, 6*unitH, unitW, 2*unitH, -1);\n\n makePine(unitW*.5, unitH*6.3, unitW, unitH); \n makePine(unitW*1.5, unitH*7, unitW, unitH); \n makePine(unitW*.5, unitH*7, unitW, unitH); \n makePine(unitW*3, unitH, unitW, unitH); \n\n makeLeafPlant(unitW*2, 4*unitH, unitW, 1.5*unitH, -1);\n makeLeafPlant(unitW*3, 7*unitH, unitW, 1.5*unitH, 1);\n makeLeafPlant(unitW*3, 7*unitH, unitW, 1.5*unitH, -1);\n makeLeafPlant(unitW*4, 7*unitH, unitW, 1.5*unitH, -1);\n\n makeNeedlePlant(unitW*3,unitH*5, unitW, unitH, 1);\n makeNeedlePlant(unitW*6,unitH, unitW, unitH, 1);\n\n var numSquiggles = random(2, 5);\n createPlantSquiggle(5*unitW, unitH*2, unitW, unitH, numSquiggles);\n createPlantSquiggle(6*unitW, unitH*2, unitW, unitH, numSquiggles);\n \n \n createPlantFlower(unitW*5, unitH*4, unitW, unitH, unitW*.5, random(1, 5), random(0, unitW*.005)); \n createPlantFlower(unitW*5, unitH*5, unitW, unitH, unitW*.5, random(1, 5), random(0, unitW*.005)); \n createPlantFlower(unitW*6, unitH*4, unitW, unitH, unitW*.5, random(1, 5), random(0, unitW*.005)); \n createPlantFlower(unitW*6, unitH*5, unitW, unitH, unitW*.5, random(1, 5), random(0, unitW*.005)); \n t.penUp();\n\n\n var startHt = 3*unitH\n for (var i=0; i<2; i++){\n t.pushState();\n createPond(4*unitW, startHt, unitW, unitH)\n t.popState();\n startHt += unitH*.05;\n }\n\n\n\n t.pushState();\n var numSquiggles = 4;\n createPlantSquiggle(unitW, unitH*3, unitW, unitH, numSquiggles);\n t.popState();\n\n t.pushState();\n var numSquiggles = 4;\n createPlantSquiggle(unitW, unitH*4, unitW, unitH*2, numSquiggles);\n t.popState();\n\n t.pushState();\n createPlantBushWide(0, 0, unitW, unitH);\n t.popState();\n\n //plant types: flower, squiggle, bush\n //also the pond one\n \n\n // for (x=0; x<scl; x++){\n // t.penUp();\n // t.pushState()\n // var size = random(.2*unitW, unitW*.6);\n // var gap = random(0, size*.005); //gap between petals\n // var numPetals = random(1, 5) \n // push ()\n // //centers along corner by default so add half unit\n // createPlantFlower(x*unitW, 0, unitW, unitH, size, numPetals, gap)\n // t.penDown()\n // pop ()\n \n // t.popState();\n // }\n \n // t.pushState();\n // for (x=0; x<scl; x++){\n // t.pushState();\n // var sizeFactor = random(0.8, 1.2);\n // createPlantLine(x*unitW, unitH, unitW, unitH);\n // t.penUp();\n // t.popState();\n // }\n // t.popState(); \n\n // t.pushState();\n // for (x=0; x<scl; x++){\n\n // var numSquiggles = random(2, 5);\n // createPlantSquiggle(x*unitW, unitH*2, unitW, unitH, numSquiggles);\n // t.penUp();\n // }\n // t.popState();\n\n \n // for (x=0; x<scl; x++){\n // t.penUp();\n // t.pushState()\n\n // var size = random(.1*unitW, unitW*.13);\n // var gap = random(size*.1, size*.15);\n // var numPetals = random(10, 30)\n // push ()\n // strokeWeight(2)\n // createPlantFlower(x*unitW, unitH*3, unitW, unitH, size, numPetals, gap)\n // t.penDown()\n // pop ()\n // t.penUp();\n // t.popState();\n // }\n \n // t.pushState();\n // for (x=0; x<scl; x++){ \n // createPlantBush(x*unitW, unitH*4, unitW, unitH);\n // t.penUp();\n // }\n // t.popState();\n\n\n // t.pushState();\n // for (x=0; x<scl; x++){\n // createPlantRound(x*unitW, unitH*5, unitW, unitH);\n // t.penUp();\n // }\n // t.popState();\n\n // var size = unitH;\n // var gap = size*0.015;\n // var numPetals = 3 \n // push ()\n // //centers along corner by default so add half unit\n // t.pushState();\n // createPlantFlower(0, unitH*6, unitW, unitH*2, unitW, numPetals, gap)\n // t.popState();\n // pop();\n\n // t.pushState();\n // var numSquiggles = 4;\n // createPlantSquiggle(unitW, unitH*6, unitW, unitH*2, numSquiggles);\n // t.popState();\n\n\n \n // t.pushState();\n // createPlantBushWide(unitW*2, unitH*6, unitW*2, unitH);\n // t.penUp();\n // t.popState(); \n\n\n // t.pushState();\n // createPlantLine(5*unitW, unitH*6, unitW, unitH*2);\n // t.popState();\n // t.penUp();\n\n\n // t.pushState();\n // createPlantBush(6*unitW, unitH*6, unitW, unitH*2);\n // t.popState(); \n\n // t.pushState();\n // createPlantRoundTall(7*unitW, unitH*6, unitW, unitH*2);\n // t.popState(); \n\n\n \n\n\n\n\n}", "function drawTurtleGraphic(x, y, index) {\n console.log(\"Graphic is being drawn.\");\n myTurtle.penUp();\n myTurtle.moveTo(x, y);\n myTurtle.penDown();\n myTurtle.turnRight(-45);\n myTurtle.moveForward(10);\n myTurtle.penUp();\n}", "constructor(x, y, angle) {\n this.x = x;\n this.y = y;\n this.angle = angle;\n this.dx = 10 * cos(angle);\n this.dy = 10 * sin(angle);\n }", "function setup() {\n\tcreateCanvas(windowWidth, windowHeight);\n\tbackground(255);\n\tnoFill();\n\tstroke(0);\n\n\td = 20;\n\tincr = radians(22.5);\n\tx[0] = width/2; // our x position\n\ty[0] = height; // our y position\n\ta[0] = -PI/2; // our angle\n\n\n}", "rotateTurtle(x, y, z) {\n x = x * this.angle;\n y = 45;\n z = z * this.angle ;\n var e = new THREE.Euler(\n x * 3.14/180,\n\t\t\t\ty * 3.14/180,\n\t\t\t\tz * 3.14/180);\n this.state.dir.applyEuler(e);\n }", "setupCoordinates(){\n // Starts the circle and square off screen to the bottom left\n // We divide their size by two because we're drawing from the center\n this.xPos = width + squareSize / 2;\n this.yPos = height + squareSize / 2;\n }", "function setup() {\n createCanvas(600, 600);\n noStroke();\n x = 20;\n y = 35;\n squareSize = 50;\n xSpeed = 2.5;\n ySpeed = 2.5;\n}", "setupCoordinates(){\n // Start the circle off screen to the bottom left.\n // We divide the size by two because we're drawing from the center.\n this.xPos = -circleSize / 2;\n this.yPos = height + circleSize / 2;\n }", "function draw() {\n ellipse(100, 100, 100, 100)\n rect(30, 20, 55, 55)\n triangle(30, 75, 58, 20, 86, 75)\n }", "function robotHead(){\n ctx.moveTo(800, 0);\n ctx.lineTo(800, 200);\n ctx.lineTo(1000, 200);\n ctx.moveTo(900, 100);\n ctx.arc(900, 100, 50, Math.PI, 2 * Math.PI, false);\n ctx.moveTo(850, 100);\n ctx.lineTo(950, 100);\n ctx.moveTo(900, 100);\n ctx.lineTo(950, 100);\n ctx.moveTo(852, 100);\n ctx.lineTo(900, 30);\n ctx.moveTo(948, 100);\n ctx.lineTo(900, 30);\n ctx.moveTo(890, 100);\n ctx.lineTo(890, 130);\n ctx.moveTo(910, 100);\n ctx.lineTo(910, 130);\n ctx.moveTo(890, 130);\n ctx.lineTo(910, 130);\n ctx.moveTo(870, 100);\n ctx.lineTo(870, 115);\n ctx.moveTo(870, 115);\n ctx.lineTo(890, 115);\n ctx.moveTo(930, 100);\n ctx.lineTo(930, 115);\n ctx.moveTo(930, 115);\n ctx.lineTo(910, 115);\n ctx.moveTo(890, 130);\n ctx.lineTo(870, 140);\n ctx.moveTo(870, 140);\n ctx.lineTo(860, 100);\n ctx.moveTo(910, 130);\n ctx.lineTo(930, 140);\n ctx.moveTo(930, 140);\n ctx.lineTo(940, 100);\n ctx.moveTo(930, 140);\n ctx.lineTo(930, 170);\n ctx.moveTo(870, 140);\n ctx.lineTo(870, 170);\n ctx.moveTo(870, 170);\n ctx.lineTo(930, 170);\n ctx.moveTo(885, 150);\n ctx.lineTo(885, 160);\n ctx.moveTo(915, 150);\n ctx.lineTo(915, 160);\n ctx.moveTo(885, 150);\n ctx.lineTo(915, 150);\n ctx.moveTo(885, 160);\n ctx.lineTo(915, 160);\n ctx.moveTo(850, 100);\n ctx.lineTo(850, 170);\n ctx.moveTo(850, 170);\n ctx.lineTo(870, 170);\n ctx.moveTo(950, 100);\n ctx.lineTo(950, 170);\n ctx.moveTo(950, 170);\n ctx.lineTo(930, 170);\n ctx.moveTo(850, 170);\n ctx.lineTo(870, 140);\n ctx.moveTo(950, 170);\n ctx.lineTo(930, 140);\n ctx.moveTo(850, 140);\n ctx.lineTo(815, 110);\n ctx.lineTo(815, 30);\n ctx.lineTo(835, 50);\n ctx.lineTo(835, 80);\n ctx.lineTo(850, 100);\n ctx.moveTo(950, 140);\n ctx.lineTo(985, 110);\n ctx.lineTo(985, 30);\n ctx.lineTo(965, 50);\n ctx.lineTo(965, 80);\n ctx.lineTo(950, 100);\n ctx.moveTo(800, 200);\n ctx.lineTo(800, 400);\n}", "function nodeTurtle(turtleCommands) {\n const tPos = turtleCommands.split('-');\n\n if (tPos[0][0] === 't') {\n const startPos = tPos.shift().substr(1).split(',')\n x = parseInt(startPos[0]);\n y = parseInt(startPos[1]);\n } else {\n x = 0;\n y = 0;\n }\n\n const ninjaTurtle = new Turtle(x, y);\n\n for (let movement of tPos) {\n if (movement[0] === 'f') {\n num = parseInt(movement.substr(1))\n ninjaTurtle.forward(num);\n } else if (movement[0] === 'r') {\n ninjaTurtle.right();\n } else if (movement[0] === 'l') {\n ninjaTurtle.left();\n }\n }\n\n ninjaTurtle.print();\n let drawing = ninjaTurtle.actualPrint;\n\n // print to file\n if (fileName === arr[1]) {\n fs.writeFile(fileName, drawing, err => {\n if (err) {\n console.log(err);\n return;\n }\n console.log(`🐢 Drawing written to ${fileName}.`);\n })\n } \n}", "function setup() {\n createCanvas(641, 904);\n angleMode(DEGREES);\n\n //Seting the variable of the cordinates of y so the shapes can move up and down,\n //for both Left side and right side.\n yLeftbrow = 336; \n yRightbrow = 381;\n\n }", "function Walker(){\n\n // Define x & y\n this.x = width/2;\n this.y = height/2;\n\n // Step Function\n this.step = function(){\n choice = int(random(4));\n\n if (choice == 0){\n this.x++;\n } else if (choice == 1){\n this.x--;\n } else if (choice == 2){\n this.y++;\n } else {\n this.y--;\n }\n\n this.x = constrain(this.x,0, width-1);\n this.y = constrain(this.y,0, height-1);\n }\n\n //Render Function\n this.render = function(){\n stroke(0);\n point(this.x,this.y);\n }\n}", "render() {\r\n fill(255);\r\n stroke(255);\r\n // ellipse(this.position.x, this.position.y, 16, 16);\r\n\r\n // fill(127);\r\n //stroke(127);\r\n // let theta = random(0,90);\r\n\r\n let theta = this.velocity.heading() + radians(90);\r\n\r\n push();\r\n translate(this.position.x,this.position.y);\r\n rotate(theta);\r\n beginShape(TRIANGLES);\r\n vertex(0, -r*2);\r\n vertex(-r, r*2);\r\n vertex(r, r*2);\r\n endShape();\r\n pop();\r\n \r\n }", "function setup()\n{\n //stage & initial setup\n createCanvas(500, 500);\n background(100);\n \n //starting point\n startX = width/5;\n startY = height/7;\n //movement\n directionX = 1;\n directionY = 2;\n}", "calc(lindenmayer_string, segment_length) {\n\n // Initialize shape path array\n // This stores the x,y coordinates for each step\n var path = new Array();\n\n var pos = 0;\n\n let x = 0;\n let y = 0;\n\n var current_angle = 0;\n\n while (pos < lindenmayer_string.length-1) {\n\n if (lindenmayer_string[pos] == 'F') {\n\n // Draw forward\n\n // polar to cartesian based on step and current_angle:\n let x1 = x + segment_length * cos(radians(current_angle));\n let y1 = y + segment_length * sin(radians(current_angle));\n\n path.push([x1, y1]);\n\n // update the turtle's position:\n x = x1;\n y = y1;\n\n } else if (lindenmayer_string[pos] == '+') {\n\n // Turn left\n current_angle += this.curve.draw.angle;\n\n } else if (lindenmayer_string[pos] == '-') {\n\n // Turn right\n current_angle -= this.curve.draw.angle;\n }\n\n pos++;\n }\n\n // Translate path to center of drawing area\n path = this.translate_to_center(path);\n\n // Rotate path around the center of drawing area\n if (this.config.rotate.value > 0) {\n path = this.rotate_around_center(path);\n path = this.translate_to_center(path);\n }\n\n return path;\n }", "function draw() {\n background(147,112,219);\n\n drawRects();\n drawCircles();\n drawEllipse();\n noStroke();\n drawTri();\n\n fill(204);\n quad(100,100,200,100,200,250,140,230);\n//white half of circle\n fill(255);\n arc(480,500,100,100,PI,TWO_PI);\n//larger arc \n fill(100,23,45);\n arc(480,650,200,200,0,PI + QUARTER_PI);\n\n //gray square with lining\n fill(120,120,120);\n stroke(23);\n strokeWeight(7);\n square(800,600,120);\n}", "function setup() {\n createCanvas(600, 600);\n\n frameRate(20);\n\n distX = endX - beginX; //code snippet from curved motion from p5js site\n distY = endY - beginY;\n\n distyellowX = endyellowX - beginyellowX; //code snippet from curved motion from p5js site\n distyellowY = endyellowY - beginyellowY;\n}", "function setup() {\n // Create our canvas\n\n createCanvas(640,640);\nbackground(0,210,89);\n\n\n // Start the circles off screen to the bottom left\n\n // We divide the size by two because we're drawing from the center\n\n circleX = -circleSize/2;\n\n circleY = height + circleSize/2;\n\n circle1X = -circle1Size/0.5;\n\n circle1Y = height + circle1Size/3;\n\n // Start the square off screen to the bottom right\n\n // We divide the size by two because we're drawing from the center\n\n squareX = width + squareSize/2;\n\n squareY = height + squareSize/2;\n//\n\n // We'll draw rectangles from the center\n\n rectMode(CENTER);\n\n // We won't have a stroke in this\n\n noStroke();\n}", "function setup() {\r\n\r\n const tree = createTree(treeSize);\r\n const dimension = Math.pow(PI, PI) * Math.pow(PI, PI);\r\n\r\n createCanvas(dimension, dimension - (dimension / PI));\r\n strokeWeight(HALF_PI);\r\n stroke(0, TWO_PI);\r\n noFill();\r\n\r\n var start;\r\n\r\n if (fullMode === true) { start = createVector(width / PI + Math.pow(PI, PI) + Math.pow(PI, PI), height / 2); }\r\n else { start = createVector(width / 2 + Math.pow(PI, PI) * PI, height - Math.pow(PI, PI) * 1.61803398875); }\r\n\r\n for (var i=0; i<tree.length; i++) {\r\n\r\n var v = start.copy();\r\n var z = createVector(0, -PI - PI / 1.61803398875);\r\n\r\n beginShape();\r\n vertex(v.x, v.y);\r\n\r\n for (var j=0; j<tree[i].length; j++) {\r\n\r\n if (tree[i][j] %2 === 0) { z.rotate(angle); }\r\n else { z.rotate(-angle); }\r\n\r\n v.add(z);\r\n vertex(v.x, v.y);\r\n\r\n }\r\n\r\n endShape();\r\n\r\n }\r\n\r\n}", "function setup() {\n createCanvas(windowWidth,windowHeight);\n angleMode(DEGREES);\n}", "function setup() {\n createCanvas(500, 500, SVG)\n noLoop()\n angleMode(DEGREES)\n rectMode(CENTER)\n}", "function draw(){\n\t//makes the background black since it is 0\n\tbackground(0);\n\t/*draws the ellipse which the positions are\n\tvariables to make them easy to change*/\n ellipse(xPos,yPos,50,50);\n\t/*The y and x position always change but \n\taccording to y or xspeed respectively*/\n\txPos=xPos+xSpeed;\n\tyPos=yPos+ySpeed;\n\n\t/*In this while loop the direction of the circle\n\tchanges horizontally while it reaches the furthest in the right hand\n\tside which is the width meaning 400,,, checkout function setup()\n\tin createCanvas*/\n\tif(xPos>=width){\n\t\txSpeed=xSpeed *-1;\n\t}\n\n\t/*In this while loop the direction of the circle\n\tchanges horizontally while it reaches the furthest in the left hand\n\tside which is the width meaning 0,,, checkout function setup()\n\tin createCanvas*/\n\tif(xPos<=0){\n\t\txSpeed*=-1;\n\t}\n\n\t/*In this while loop the direction of the circle\n\tchanges vertically while it reaches the furthest in the up\n\tside which is the height meaning 0,,, checkout function setup()\n\tin createCanvas*/\n\tif(yPos<=0){\n\t\tySpeed*=-1;\n\t}\n\n\\\t/*In this while loop the direction of the circle\n\tchanges horizontally while it reaches the furthest in the right hand\n\tside which is the height meaning 300,,, checkout function setup()\n\tin createCanvas*/\n\tif (yPos>=height){\n\t\tySpeed*=-1;\n\t}\n\n}", "function Turtle(left) {\n Frogger.ImageSprite.call(this, left);\n }", "function setup() {\n \n createCanvas(400,1200); \n \n background(255);\n colorMode(HSB,360,100,100);\n\n \n \tv = createVector(100,250);\n // v2 = createVector(v.x+150,v.y-75)\n tx = 107;\n ty=0;\n strokeWeight(2.0);\n v2 = createVector(v.x+170,v.y-75);\n \tanchorPoint = v2.copy();\n}", "constructor(x, y) {\n this.x = x; // X coordinate\n this.y = y; // Y coordinate\n this.r = width / 50; // Radius\n this.dx = this.x / 90; // X speed\n this.dy = -this.y / 90; // Y speed\n }", "function setup(){\r\ncreateCanvas(500,500);\r\ncolorMode(HSB,360,100,100);\r\nangleMode(DEGREES); // Need to be specified - RADIANS or DEGREES.\r\nnoStroke();\r\n}", "function setup() {\n createCanvas(600, 600);\n rectMode(CENTER);\n textAlign(CENTER);\n \n x = random(10, width-10);\n y = random(10, height-80);\n xSpeed = random(5, 5);\n ySpeed = random(5, 5);\n changeColor();\n}", "function setup() { \n createCanvas(parseInt(prompt(\"Insert a number for the Width\")),parseInt(prompt(\"Insert a number for the Height\"))); //Creates the screen for the object to appear\n background(20,255,46); //Create the screen background color\n frameRate(50); //Determines how fast the object moves\n makeCircles();\n}", "constructor(x, y, d, fallSpeed) {\n this.x = x; // x coordinate of raindrop\n this.y = y; // y coordinate of raindrop\n this.d = d; // diameter of the circle\n this.fallSpeed = fallSpeed;\n }", "constructor(x, y, direction, r, g, b) {\n this.x = x;\n this.y = y;\n this.r = r;\n this.g = g;\n this.b = b;\n this.direction = direction;\n }", "function Walker() {\n //create vector-line 18 replaces lines 19, 20\n //must add .pos (vector object) to the x and y positions\n this.pos = createVector(width/2, height/2);\n this.vel = createVector(0,0);\n this.acc = p5.Vector.fromAngle(random(TWO_PI));\n this.acc.setMag(0.2);\n //this.x = width/2;\n //this.y = height/2\n\n //change .walk to .update\n this.update = function() {\n // var mouse = createVector(mouseX, mouseY);\n // this.acc = p5.Vector.sub(mouse, this.pos);\n // this.acc.normalize();\n // this.acc.mult(0.5);\n\n // this.acc = createVector(random(-1, 1), random(-1, 1));\n // this.acc.mult(0.1);\n //added vector math; replaces lines 27&28; use .add()\n this.acc.rotate(0.1);\n this.vel.add(this.acc);\n this.pos.add(this.vel);\n // this.pos.x = this.pos.x + random(-10, 10);\n // this.pos.y = this.pos.y + random(-10, 10);\n }\n\n this.display = function() {\n fill(255);\n ellipse(this.pos.x, this.pos.y, 48, 48);\n }\n}", "function Spark(){\r\n\tthis.size = 50;\r\n\tthis.color = color(random(360), random(360), random(360));\r\n\tthis.x = 250;\r\n\tthis.y = 250;\r\n\tthis.xspeed = round(random(-10, 10));\r\n\tthis.speed = round(random(-10, 10));\r\n}", "onClick(mouseData) {\n\n var coords = {\n // normalize coordinates in terms of window size (after resizing)\n x: mouseData.x * (this.size / this.renderer.view.clientWidth),\n y: mouseData.y * (this.size / this.renderer.view.clientHeight)\n }\n var turtle_coords = this.translate_inv(coords);\n console.log(turtle_coords);\n\n var distance;\n if (this.shape.length > 1) {\n\n diff = {\n x: turtle_coords.x - this.shape[0].x,\n y: turtle_coords.y - this.shape[0].y\n };\n distance = Math.sqrt(diff.x * diff.x + diff.y * diff.y);\n }\n\n if (distance && distance < 0.1) {\n // the user clicked very close to the origin, close this shape\n this.shape.push(this.shape[0]);\n // teleport turtle to the start\n Meteor.call('teleport', this.shape[0], (function(err, res) {\n if (err) {\n console.log(\"not drawing, couldn't teleport: \", err);\n } else {\n // clear the canvas\n this.last = null;\n this.stage.removeChildren();\n // then order the turtle to draw this\n Meteor.call('draw', this.shape);\n this.shape = [];\n }\n }).bind(this));\n\n } else {\n\n this.shape.push(turtle_coords);\n var g = new PIXI.Graphics();\n g.lineStyle(0);\n g.beginFill(0xFFFF0B, 0.5);\n g.drawCircle(coords.x, coords.y, 10);\n g.endFill();\n this.stage.addChild(g);\n }\n }", "function body (x, y) {\n noStroke();\n fill(113, 65, 244); // purple\n triangle(x, y - 5, x - 15, y - 45, x + 15, y - 45);\n}", "function setup() {\n\n // create canvas\n let canvas = createCanvas(800, 800)\n canvas.parent('p5container')\n \n\n let cx = width/2\n let cy = height/2\n let d = width/2\n\n //draw circle\n circle(cx,cy,d)\n\n // get time\n let h = hour()\n let m = minute()\n let s = second()\n\n// rotation\nlet rotH = radians (h/60*360)\nlet rotM = radians (m/60*360)\nlet rotS = radians (s/60*360)\n\nconsole.log(rotH)\n\n\n//draw arms \npush()\ntranslate(cx,cy)\ncircle (0,0,d)\nrotate(s)\nline(0,0,0,-d/2)\npop()\n }", "function setup() {\n createCanvas(windowWidth, windowHeight);\n\n xPos = 200;\n yPos = 300;\n xSpeed = random(3, 8);\n ySpeed = random(3, 8);\n}", "function setup() {\n var canvas = createCanvas(594, 841);\n\n//Name the following code to make it link to my index file.\n canvas.parent(\"myContainer\");\n\n//On setup ellipse appears in the middle of the screen.\n x1 = width/2;\n y1 = height/2;\n x2 = width/2;\n y2 = width/2;\n\n//Re maps the value of x1 and y1. New values will be constrained within 0 and half the width and height.\n {let x1 = map(height, 0, width, 0, width/2);\n let y1 = map(width, 0, height, height/2, 0);}\n\n//Original background colour when the webpage is refreshed.\n background(00);\n }", "constructor() {\n this.x = random(width);\n this.y = random(-2000, -10);\n this.dx = random(-10, 10);\n this.dy = random(5, 6);\n this.size = random(20, 40);\n this.color = color(random(200, 255));\n this.touchingGround = false;\n this.shape = \"*\";\n //Very similar to raindrop\n }", "display() {\n push();\n fill(255, 255, 0);\n let angle = TWO_PI / this.points;\n let halfAngle = angle / 2.0;\n beginShape();\n for (let a = 0; a < TWO_PI; a += angle) {\n let sx = this.x + cos(a) * this.outerRadius;\n let sy = this.y + sin(a) * this.outerRadius;\n vertex(sx, sy);\n sx = this.x + cos(a + halfAngle) * this.innerRadius;\n sy = this.y + sin(a + halfAngle) * this.innerRadius;\n vertex(sx, sy);\n }\n endShape(CLOSE);\n pop();\n }", "function setup()\n{\n createCanvas(windowWidth, windowHeight);\n\n x = width/2;\n y = height/2;\n t = 100;\n vX = 3;\n vY = vX;\n}", "function draw() {\n// redraw background\nbackground(\"#000000\");\n\n// display the planets\n// planetPink.displayPlanet();\n// planetRed.displayPlanet();\n// planetOrange.displayPlanet();\n// planetYellow.displayPlanet();\n\n// make planets rotate\n planetPink.rotatePlanet();\n planetRed.rotatePlanet();\n\n// display the orbit paths\norbit1A = new orbit (planetPink.x,planetPink.y,10,10);\nconsole.log (orbit1A.x,orbit1A.y);\n orbit1A.displayOrbit();\n orbit1B.displayOrbit();\n}", "function setup() {\n createCanvas(displayWidth, displayHeight);\n // tile = new Tile(120, 60, 60, color(255, 0, 0), color(0, 255, 0), color(0, 0, 255), color(255, 255, 0), 1);\n grid = new Grid(50, 50);\n \n fillRotateList();\n fillMoveList();\n counter = 0;\n currentRotationPosition = rotateList.length - 1;\n currentRotation = 0;\n\n // rotateList[0].rotate(1);\n}", "function draw() {\n background(0);\n\n move(); /// moves the circle\n wrap(); /// wraps the cicle (makes it start at the beginning of the screen)\n display(); //displays the circle\n\n}", "function setup() {\n createCanvas(1000, 400);\n textFont(\"Courier\"); \n textAlign(LEFT);\n textSize(16);\n strokeWeight(0.1);\n\n // Train(color c_, float xpos_, float ypos_, float xspeed_, int serial_, float offset_, int direction_) \n\n for (var i = 0; i < trainLength; i++ ) {\n redtrains.push(new Train(color(250, 120, 120), width/2 - 4 - 70*i, 60, -1, i+1, i*.02, -1));\n }\n for (var i = 0; i < trainLength; i++ ) {\n bluetrains.push(new Train(color(120, 120, 250), width/2 + 4 + 70*i, 100, 1, i+1, i*.02, 1));\n }\n}", "function Walker() {\n this.pos = createVector(width/2, height/2); // v1\n this.vel = createVector(0,0);\n this.acc = p5.Vector.fromAngle(random(TWO_PI ));\n\n this.update = function() {\n // this.acc = createVector(random(-3,3), random(-3,3));\n // this.acc = p5.Vector.fromAngle(random(TWO_PI ));\n this.acc.rotate(random(3));\n this.acc.setMag(.1);\n; this.vel.add(this.acc);\n this.pos.add(this.vel);\n }\n\n this.display = function() {\n background(0);\n fill(200);\n ellipse(this.pos.x, this.pos.y, 50, 50);\n }\n}", "constructor() {\n // Angle from the center of the spiral that tells where to put the next shape\n this.angle = 2.0;\n // The radius of the spiral to say at what distance from the center the shape has to be displayed\n this.spiralRadius = 1;\n // Speed\n this.speed = 0.1;\n // Width and height of the shape\n this.shapeWidth = 10;\n this.shapeHeight = 10;\n // RGB colors filling the shape\n this.red = random(0, 255);\n this.green = random(0, 255);\n this.blue = random(0, 255);\n // Position of the shape\n this.x = 0;\n this.y = 0;\n }", "show()\n{\n\t var theta = this.vel.heading() + radians(90);\n\t fill(100, 100);\n\t stroke(0);\n\t strokeWeight(1);\n\t push();\n\t translate(this.pos.x,this.pos.y);\n\t rotate(theta);\n\t beginShape();\n\t vertex(0, -this.r*2);\n\t vertex(-this.r, this.r*2);\n\t vertex(this.r, this.r*2);\n\t endShape(CLOSE);\n\t pop();\n}", "function Turtle(unused_pipe_reference, canvas) {\n var dx, dy, xpos, ypos;\n this.canvas = canvas; // jQuery object\n\n this.items = [];\n this.canvas.off('click');\n\n let sendEvent = function (x, y) {\n CodeOceanEditorWebsocket.websocket.send(JSON.stringify({\n 'cmd': 'canvasevent',\n 'type': '<Button-1>',\n 'x': x,\n 'y': y\n }));\n CodeOceanEditorWebsocket.websocket.send('\\n');\n };\n\n $(document).keydown(function(e) {\n switch(e.which) {\n case 37: // left\n sendEvent(140, 160);\n break;\n\n case 38: // up\n sendEvent(160, 140);\n break;\n\n case 39: // right\n sendEvent(180, 160);\n break;\n\n case 40: // down\n sendEvent(160, 180);\n break;\n\n default: return; // exit this handler for other keys\n }\n e.preventDefault(); // prevent the default action (scroll / move caret)\n });\n\n this.canvas.click(function (e) {\n if (e.eventPhase !== 2) {\n return;\n }\n e.stopPropagation();\n dx = this.width / (2 * devicePixelRatio);\n dy = this.height / (2 * devicePixelRatio);\n if(e.offsetX===undefined)\n {\n var offset = canvas.offset();\n xpos = e.pageX-offset.left;\n ypos = e.pageY-offset.top;\n }\n else\n {\n xpos = e.offsetX;\n ypos = e.offsetY;\n }\n sendEvent(xpos - dx, ypos - dy);\n });\n}", "constructor(){\r\n this.width = WIDTH/10;\r\n this.height = HEIGHT/60;\r\n this.x = WIDTH/2 - (this.width/2);\r\n this.y = HEIGHT - this.height * 2;\r\n this.speed = WIDTH/100;\r\n this.dx = 0; // direction X\r\n\r\n }", "drawTurtle() {\n //CURRENT PATHS\n this.path.moveTo(this.CP.x, this.CP.y);\n this.points = this.path.getPoints();\n this.geometry = this.geometry.setFromPoints(this.points);\n // this.material = new THREE.LineBasicMaterial({ color: 0xffffff });\n this.line = new THREE.Line(this.geometry, this.material);\n // return this.line;\n return this.line;\n }", "function setup() {\n createCanvas(500,500);\n background(255);\n // rectMode(CENTER);\n // angleMode(DEGREES);\n // push();\n // translate(100,100);\n ellipse(width/2, height/2);\n // pop();\n\n // push();\n // rotateX();\n // rotateY();\n // rotateZ(0);\n // translate(-100, -100);\n // rect(width/2, height/2, 100, 100);\n // pop();\n}", "function generate_tc() {\n var r1 = 0.05;\n var r2 = 0.1;\n var theta = Math.PI / 6;\n var height = 1;\n var topx = [], topy = [];\n var bottomx = [], bottomy = [];\n for (var i = 0; i < 13; i++) {\n var top_x = r1 * Math.cos(i * theta);\n var top_y = r1 * Math.sin(i * theta);\n var bottom_x = r2 * Math.cos(i * theta);\n var bottom_y = r2 * Math.sin(i * theta);\n topx.push(top_x);\n topy.push(top_y);\n bottomx.push(bottom_x);\n bottomy.push(bottom_y);\n }\n for (var i = 0; i < 12; i++) {\n points.push(topx[i + 1]);\n points.push(topy[i + 1]);\n points.push(height);\n points.push(topx[i]);\n points.push(topy[i]);\n points.push(height);\n points.push(bottomx[i]);\n points.push(bottomy[i]);\n points.push(0.0);\n points.push(topx[i + 1]);\n points.push(topy[i + 1]);\n points.push(height);\n points.push(bottomx[i]);\n points.push(bottomy[i]);\n points.push(0.0);\n points.push(bottomx[i + 1]);\n points.push(bottomy[i + 1]);\n points.push(0.0);\n }\n}", "function setup() {\n createCanvas(500, 500);\n angleMode(DEGREES);\n background(255, 255, 255);\n colorMode(HSB, 360, 100, 100);\n noStroke();\n}", "display() {\n const { x, y, width, height } = this;\n rectMode(CENTER);\n fill('#323230');\n noStroke();\n // instead of a rectangle, use multiple vetices to draw the tank\n // using the width and height as a frame of reference\n beginShape();\n translate(CANVAS_WIDTH / 2, CANVAS_HEIGHT - PADDING_TANK);\n translate(this.x, -5);\n vertex(-this.width / 2, 0);\n vertex(this.width / 2, 0);\n vertex(this.width / 2, -this.height / 2.5);\n vertex(this.width / 2.5, -this.height / 2.5);\n vertex(this.width / 2.5, -this.height / 2);\n vertex(this.width / 8, -this.height / 2);\n vertex(this.width / 8, -this.height / 1.25);\n vertex(this.width / 30, -this.height / 1.25);\n vertex(this.width / 30, -this.height);\n vertex(-this.width / 30, -this.height);\n vertex(-this.width / 30, -this.height / 1.25);\n vertex(-this.width / 8, -this.height / 1.25);\n vertex(-this.width / 8, -this.height / 2);\n vertex(-this.width / 2.5, -this.height / 2);\n vertex(-this.width / 2.5, -this.height / 2.5);\n vertex(-this.width / 2, -this.height / 2.5);\n endShape();\n }", "function Circle ( x, y, r){\n Shape.call(this,x,y); //powiązanie x y koła z x y kształtu!!\n this.r = r; \n\n}", "function draw(x, y, length, direction) {\n var move;\n var headlen = 5;\n var angle;\n var fromx = x;\n var fromy = y;\n var tox, toy;\n var dx, dy;\n\n if (direction == \"forward\") {\n move = y - length;\n }\n if (direction == \"backward\") {\n move = y + length;\n }\n\n if (direction == \"right\") {\n move = x + length;\n }\n if (direction == \"left\") {\n move = x - length;\n }\n ctx.beginPath();\n ctx.moveTo(x, y);\n if (direction == \"forward\" || direction == \"backward\") {\n tox = x;\n toy = move;\n\n dx = tox - fromx;\n dy = toy - fromy;\n angle = Math.atan2(dy, dx);\n\n ctx.lineTo(tox, toy);\n ctx.lineTo(\n tox - headlen * Math.cos(angle - Math.PI / 6),\n toy - headlen * Math.sin(angle - Math.PI / 6)\n );\n ctx.moveTo(tox, toy);\n ctx.lineTo(\n tox - headlen * Math.cos(angle + Math.PI / 6),\n toy - headlen * Math.sin(angle + Math.PI / 6)\n );\n\n ctx.stroke();\n //update endpoint\n this.endpoint_x = x;\n this.endpoint_y = move;\n }\n if (direction == \"right\" || direction == \"left\") {\n tox = move;\n toy = y;\n\n dx = tox - fromx;\n dy = toy - fromy;\n angle = Math.atan2(dy, dx);\n\n ctx.lineTo(tox, toy);\n ctx.lineTo(\n tox - headlen * Math.cos(angle - Math.PI / 6),\n toy - headlen * Math.sin(angle - Math.PI / 6)\n );\n ctx.moveTo(tox, toy);\n ctx.lineTo(\n tox - headlen * Math.cos(angle + Math.PI / 6),\n toy - headlen * Math.sin(angle + Math.PI / 6)\n );\n\n ctx.stroke();\n //update endpoint\n this.endpoint_x = move;\n this.endpoint_y = y;\n }\n}", "constructor(x, y, speed, radius, pictureDisplay) {\n //Position\n this.x = x;\n this.y = y;\n this.speed = speed;\n this.pictureDisplay = pictureDisplay;\n this.radius = radius;\n this.vx = 0;\n this.vy = 0;\n this.tx = random(0,1000);\n this.ty = random(0,1000);\n }", "function setup() {\n createCanvas(800, 400);\n angleMode(DEGREES);\n \n hr = hour();\n mn = minute();\n sc = second();\n }", "function Shape() {\n this.x = 0;\n this.y = 0;\n}", "function drawDonut() {\n for (let i = 0; i <= 360; i += angleStep) {\n let x = width * sin(i);\n let y = height * cos(i);\n let z = 0;\n let center = { x, y, z };\n circlesVertices.push(createCircleVertices(center, i, 1));\n }\n drawVertices();\n}", "function setup() {\n createCanvas(windowWidth, windowHeight);\n\n shark.y = random(0, height);\n shark.vx = shark.speed;\n}", "function draw() {\n textSize(50);\n textFont(\"cooper\");\n text(\"art generates itself\", windowWidth / 2, windowHeight / 2);\n textAlign(CENTER, CENTER);\n\n r = random(0, 255);\n g = random(0, 255);\n b = random(0, 255);\n fill(r, g, b);\n rect(25 * horizontalp, 25 * verticalp, 100, 100);\n\n r = random(0, 255);\n g = random(0, 255);\n b = random(0, 255);\n fill(r, g, b);\n circle(25 * horizontalp, 25 * verticalp, 100, 100);\n\n //increasing the horizontal and vertical position so i can cover the whole screen with the shapes\n horizontalp = horizontalp + 2;\n if (horizontalp > 100) {\n verticalp = verticalp + 2;\n horizontalp = 1;\n }\n\n if (verticalp > 35) {\n horizontalp = horizontalp + 4;\n verticalp = 1;\n }\n}", "function OnMouseDown(){\n //Place the ant at another point\n generateCoordinates();\n\n //Increase the walking speed by 0.01\n walkingSpeed += 0.01;\n}", "constructor() {\n this.x = 200;\n this.y = 200;\n this.dx = -1; // currently only moving in x plane\n this.dy = 0;\n this.r = 5; // need to change his\n this.speed = 3;\n }", "function setup() {\n createCanvas (windowWidth, windowHeight);\n frameRate (30);\n colorMode (HSB,360,100,100);\n randomHue = random (1, 360);\n lastClickedPoint = createVector(windowWidth /2, windowHeight /2);\n}", "function Circle(x, y, dx, dy, radius) {\n this.x = x;\n this.y = y;\n // Step 4\n this.dx = dx;\n this.dy = dy;\n this.radius = radius;\n // Step 8 Add Color\n this.colors = [\"#16a085\", \"#e74c3c\", \"#34495e\"];\n\n // Step 3 Add Draw Function\n this.draw = function() {\n c.beginPath();\n c.arc(this.x, this.y, this.radius, 0, Math.PI * 2, false);\n // Step 8 Add Color\n c.strokeStyle = \"blue\";\n // c.strokeStyle = this.colors[Math.floor(Math.random() * 3)];\n c.stroke();\n // c.fillStyle = this.colors[Math.floor(Math.random() * 3)];\n };\n\n // Step 4 Update / Create Animation\n // Add dx, dy, radius\n this.update = function() {\n if (this.x + this.radius > innerWidth || this.x - this.radius < 0) {\n this.dx = -this.dx;\n }\n\n if (this.y + this.radius > innerHeight || this.y - this.radius < 0) {\n this.dy = -this.dy;\n }\n\n this.x += this.dx;\n this.y += this.dy;\n\n // Step 5 add draw\n this.draw();\n };\n}", "constructor(x, y, radius, color, xspeed, yspeed) {\n this.x = x;\n this.y = y;\n this.radius = radius;\n this.color = color;\n this.xspeed = xspeed;\n this.yspeed = yspeed;\n }", "function setup() {\n createCanvas(540, 540);\n initPositionAndColor();\n agentAngle = random(0, TWO_PI);\n background(255);\n timeOfLastUpdate = millis();\n}", "function spawn() {\n // reset ball position\n x = width*0.5;\n y = height*0.5;\n rot = 0;\n\n // choose random angle & speed\n let angle = Math.random() * 2 * Math.PI;\n let speed = 200 + Math.random() * 1000;\n\n // set initial speed\n dx = speed * Math.sin(angle);\n dy = speed * Math.cos(angle);\n\n // apply some rotation\n dr = (-0.5 + Math.random()) * 60;\n}", "function setup() {\r\n\tcreateCanvas(500, 500);\r\n\tframeRate(40);\r\n\tsing_width = 20;\r\n\r\n\tcolumns = width / sing_width;\r\n\trows = height / sing_width;\r\n\tcolumns = floor(columns);\r\n\trows = floor(rows);\r\n\r\n\tfor (let j = 0; j < rows; j++) {\r\n\t\tfor (let i = 0; i < columns; i++) {\r\n\t\t\tlet unit = new Unit(i, j);\r\n\t\t\tmaze_grid.push(unit);\r\n\t\t}\r\n\t}\r\n\r\n\t// sets up first position for both generation and path finding\r\n\tcurrent_unit = maze_grid[0];\r\n\tpath_iteration = maze_grid[0];\r\n}", "function setup() {\n createCanvas(windowWidth, windowHeight);\n // Extra comma inside the first parenthesis.\n tiger = new Predator(100, 100, 5, color(200, 200, 0), 40);\n antelope = new Prey(100, 100, 10, color(255, 100, 10), 50);\n // Missing the y position value. I assigned 100 to y parameter\n // so that the Zebra will have an intial value for y position just like other objects.\n zebra = new Prey(100, 100, 8, color(255, 255, 255), 60);\n bee = new Prey(100, 100, 20, color(255, 255, 0), 10);\n}", "function walkingCircle() {\n addCircle(150, \"green\");\n addCircle(300, \"blue\");\n addCircle(600, \"purple\");\n addCircle(searchRadius, \"black\");\n}", "function circle8(x, y, r){\n context.beginPath()\n for(let i=0; i<40; i++){\n let rt = Math.random()*Math.PI*2\n let cx = x + r * Math.cos(rt)\n let cy = x + r * Math.sin(rt)\n context.lineTo(cx, cy)\n }\n context.stroke()\n}", "constructor(){\n this.startingVelocity = p5.Vector.random2D();\n this.startingVelocity.mult(3);\n this.position = createVector(width/2, height/2); //starting position is center of canvas\n this.velocity = this.startingVelocity //calculate random inital starting velocity\n this.size = 20;\n this.color = {\n r: 0,\n g: 0,\n b: 0\n }\n }", "function draw() {\n background(220);\n \n for (let i = 0; i < antalBolde; i++) {\n if (xKoordinater[i] > width - d / 2 || xKoordinater[i] < 0 + d / 2) {\n xSpeed[i] = -xSpeed[i];\n }\n if (yKoordinater[i] > height - d / 2 || yKoordinater[i] < 0 + d / 2) {\n ySpeed[i] = -ySpeed[i];\n }\n xKoordinater[i] = xKoordinater[i] + xSpeed[i];\n yKoordinater[i] = yKoordinater[i] + ySpeed[i];\n \n }\n for (let i = 0; i < antalBolde; i++) {\n circle(xKoordinater[i], yKoordinater[i], d);\n fill(rød, grøn, blå);\n \n }\n}", "constructor(x, y, t, r, n, c) {\n\t\tsuper(x, y);\n\t\tthis.theta = t;\t//in degrees\n\t\tthis.circumRad = r;\n\t\tthis.vertexNum = n;\n\t\tthis.color = c;\n\t}", "function circle() {\n\n}", "constructor() {\n this.x = random(100, width - 100);\n this.y = -25;\n //devides the height of the screen into steps, where the bolt changes angles\n this.steps = ceil(random(15, 25));\n this.stepSize = ceil(height/this.steps);\n this.color = color(random(220, 255), random(220, 255), random(150, 220));\n //random yellow to white colour\n this.size = floor(random(3, 7));\n //thickness\n }", "constructor(x,y, speed){\r\n\t\tthis.x = x;\r\n this.y = y;\r\n this.speed = speed;\r\n this.direction = \"right\";\r\n\t}", "constructor(x, y) {\n this.v = new p5.Vector(x, y)\n this.r = 7\n\n this.offsetX = 0\n this.offsetY = 0\n this.dragging = false\n this.hovering = false\n }", "constructor(x, y) {\n this.size = windowWidth / 20;\n this.x = this.size * x;\n this.y = this.size * y;\n this.direction = this.size;\n this.nextMoveX = this.x + this.size;\n this.nextMoveY = this.y;\n this.nextDirectionX = 0;\n this.nextDirectionY = 0;\n this.nextMoveY = 0;\n }", "constructor(x1, y1, x2, y2, HeadSize){\n //x1 and y1 are coords of tail of arrow\n //x2 and y2 are coords of head of arrow\n //HeadSize sets the size of the arrowhead.\n this.TailPos = [x1, y1];\n this.HeadPos = [x2, y2];\n\n this.HeadSize = HeadSize;\n this.HeadAngle = Math.PI/4;\n\n this.r = this.GetLength(this.HeadPos, this.TailPos);\n this.theta = this.GetTheta(this.HeadPos, this.TailPos);\n\n }", "function setup() {\n // Create our canvas\n createCanvas(640,640);\n\n // Start the circle off screen to the bottom left\n // We divide the size by two because we're drawing from the center\n circleX = -circleSize/2;\n circleY = height + circleSize/2;\n\n // Start the square off screen to the bottom right\n // We divide the size by two because we're drawing from the center\n squareX = width + squareSize/2;\n squareY = height + squareSize/2;\n\n //*R Start the rectangle off the left side of the canvas\n //*R The negative width divided by two is to make sure it's first drawn outside the canvas\n //*R We divide the height by 2 to start drawing in the middle of the canvas\n rectX = -rectWidth/2;\n rectY = height/2;\n\n //*R Set the file path for John's head\n johnImg = loadImage(\"assets/images/john.png\");\n //*R Set the size for John\n johnSize = 80;\n\n //*R Set the file path for the prism\n prismImg = loadImage(\"assets/images/prism.png\");\n //*R Start the prism at the top of the canvas\n //*R We divide the width by 2 to start drawing in the center of the canvas\n //*R I'm using the negative value of the image's height divided by 2 to start it off the canvas\n prismX = width/2;\n prismY = -prismImg.height/2;\n\n //*R Set the file path for the javascript logo\n jsLogoImg = loadImage(\"assets/images/jsLogo.png\");\n //*R I'm using the negative value of the image's width divided by 2 to start it off the canvas\n //*R I want to start drawing the logo at 7/8 of the height\n jsLogoX = -jsLogoImg.width/2;\n\n //*R Set the values for the sine wave\n sineSpeed = 0.03;\n sineAngle = 0.0;\n sineScale = 80;\n //*R Set the offset to draw the sine wave, this is the value that the wave is going to \"orbit\"\n sineOffset = 500;\n\n // We'll draw rectangles from the center\n rectMode(CENTER);\n //*R We'll draw images from the center\n imageMode(CENTER);\n // We won't have a stroke in this\n noStroke();\n}", "function setup() {\n createCanvas(640,480);\n background(255,100,100);\n //Draw body\n fill(225, 225, 110);\n noStroke();\n rect(295,350,50,200);\n //Draw head\n fill(255, 255, 112);\n noStroke();\n arc(320,240,300,300,radians(0),radians(180),OPEN);\n fill(255,100,100);\n ellipse(320,240,250,200);\n fill(255, 255, 112);\n arc(320,240,250,200,radians(91),radians(91));\n //Draw eyes\n fill(255, 255, 112);\n noStroke();\n fill(255, 255, 112);\n ellipse(185,225,75,75);\n fill(255);\n ellipse(185,225,50,50);\n fill(0);\n ellipse(185,225,35,35);\n fill(255, 255, 112);\n ellipse(455,225,75,75);\n fill(255);\n ellipse(455,225,50,50);\n fill(0);\n ellipse(455,225,35,35);\n //Draw mouth\n fill(0);\n ellipse(320,375,20,20);\n}", "constructor ()\n\t{\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}", "wheels(x, y, size) {\r\n ctx.beginPath();\r\n ctx.arc(x, y, size, 0, 1 * Math.PI);\r\n ctx.fill();\r\n }", "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 }", "function create_circle() {\n\t\t//Random Position\n\t\tthis.x = Math.random()*W;\n\t\tthis.y = Math.random()*H;\n\t\t\n\t\t//Random Velocities\n\t\tthis.vx = 0.1+Math.random()*1;\n\t\tthis.vy = -this.vx;\n\t\t\n\t\t//Random Radius\n\t\tthis.r = 10 + Math.random()*50;\n\t}", "function Circle(x, y) {\r\n this.position = createVector(x, y); // Position of the circles\r\n this.getColor = floor(random(360)); // Random color of the circles. floor() rounds the random number down to the closest int.\r\n this.speed = random(-1, -3); // Randomized speed that only goes up\r\n this.sway = random(-2, 2); // An experimental speed for the x position, wasn't used in the end\r\n this.d = random(25,100); // The size of the circles is random\r\n\r\n this.show = function() {\r\n if(startCol == 0) {\r\n fill(this.getColor, 100, 100); // Fills with a random color\r\n this.getColor+=colorSpeed; // The color will change over time\r\n\r\n\t\t\tif (this.getColor >= 360) {\r\n\t\t\t\tthis.getColor = 0;\r\n\t\t\t}\r\n }\r\n\r\n this.move = function() {\r\n this.position.y += this.speed; // The random speed for the Circle\r\n //this.position.x += this.sway; // If this is activated the circles will go in directions other than straight\r\n }\r\n\r\n ellipse(this.position.x, this.position.y, this.d, this.d); // The circles are drawn\r\n }\r\n}", "function setup() {\n createCanvas(600, 400);\n for (var i = 0; i < 20; i++) {\n cars[i] = new Car();\n }\ncarspeed = random(40)\ntextSize(32);\nfill(255)\nconsole.log(sign);\n}", "function circle2(x, y, r){\n for(let a=Math.random(); a<180; a+=1+Math.random()*0.1234){\n context.beginPath()\n context.moveTo(x, y)\n const xoff = Math.cos(a) * r + x\n const yoff = Math.sin(a) * r + y\n context.lineTo(xoff, yoff)\n context.stroke()\n }\n}", "constructor(x, y) {\n this.x = x;\n this.y = y;\n this.size = 15;\n this.dx = random(3, 10);\n this.dy = random(0, 0);\n this.transparency = 255;\n this.color = color(150, this.transparency);\n }", "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 }", "spawnTetri() {\n this.rotation = 1;\n this.activeRow = 1;\n this.activeCol = 5;\n }", "function setup() {\n createCanvas(600, 600);\n frameRate(60);\n\n for (let i = 0; i < RECT_COUNT; i++) {\n rectangles.push(\n new Rectangle( \n (i+1) * (RECT_MAXSIZE / RECT_COUNT), \n colors.RECT_COLOR, \n (RECT_COUNT - i) * (0.3 / RECT_COUNT), \n RECT_ROTATION)\n );\n }\n\n /*for (let i in rectangles) {\n ellipses.push(new Ellipse_(rectangles[i].side * 3.75, colors.CIRCLE_COLOR, i * (75 / RECT_COUNT)));\n arcs.push(new Arc_(rectangles[i].side * 3, colors.CIRCLE_COLOR, i * (50 / RECT_COUNT), PI / 4 + random(PI * 1.2), random(PI * 2)));\n }*/\n}", "function Turtle(options) {\n Log.call(this, options);\n }" ]
[ "0.63799214", "0.6354133", "0.6305667", "0.62904775", "0.6257948", "0.6161578", "0.6117585", "0.6081102", "0.6075312", "0.603642", "0.59862715", "0.5982152", "0.59687954", "0.5965246", "0.59165823", "0.5901254", "0.585511", "0.58210444", "0.581", "0.58017135", "0.5794279", "0.57940334", "0.57694626", "0.5754336", "0.5752952", "0.5735342", "0.5727003", "0.57092774", "0.57029647", "0.57006663", "0.56946135", "0.5691185", "0.56824064", "0.5664298", "0.565386", "0.56431395", "0.5632516", "0.5620689", "0.56154454", "0.560676", "0.5606615", "0.56021327", "0.55942094", "0.5574284", "0.55622333", "0.555879", "0.5557777", "0.55448186", "0.554359", "0.55432343", "0.5535511", "0.5533933", "0.55273724", "0.55242157", "0.55201006", "0.5515327", "0.55118334", "0.5507065", "0.55064374", "0.5491563", "0.5490733", "0.5490569", "0.5487807", "0.54724956", "0.54714966", "0.546957", "0.5461792", "0.5437601", "0.5430689", "0.543022", "0.5429151", "0.54238826", "0.54189044", "0.5416435", "0.54077876", "0.5407243", "0.5400968", "0.5396619", "0.53833675", "0.5379144", "0.53769845", "0.53766197", "0.537216", "0.53717613", "0.53679085", "0.53672093", "0.53667414", "0.53647727", "0.5362618", "0.5362317", "0.53616184", "0.53603894", "0.53602815", "0.53599286", "0.53595364", "0.53589714", "0.53587115", "0.535771", "0.5357634", "0.5357226" ]
0.7448076
0
This is done to register the method called with moment() without creating circular dependencies.
function setHookCallback (callback) { hookCallback = callback; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(moment) {\n this.moment = moment;\n }", "moment(date) {\n return moment(date);\n }", "viewDateMoment () {\n const m = moment(this.props.viewDate)\n return function () {\n return m.clone()\n }\n }", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function DateHelper() {}", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"===typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(\n\t name,\n\t 'moment().' +\n\t name +\n\t '(period, number) is deprecated. Please use moment().' +\n\t name +\n\t '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n\t );\n\t tmp = val;\n\t val = period;\n\t period = tmp;\n\t }\n\t\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function oldMomentFormat(mom,formatStr){return oldMomentProto.format.call(mom,formatStr);// oldMomentProto defined in moment-ext.js\n}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(\n\t name,\n\t 'moment().' +\n\t name +\n\t '(period, number) is deprecated. Please use moment().' +\n\t name +\n\t '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n\t );\n\t tmp = val;\n\t val = period;\n\t period = tmp;\n\t }\n\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(\n\t name,\n\t 'moment().' +\n\t name +\n\t '(period, number) is deprecated. Please use moment().' +\n\t name +\n\t '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n\t );\n\t tmp = val;\n\t val = period;\n\t period = tmp;\n\t }\n\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "resetCalendarMoment(date =\"\"){\n if(date && /^([0-9]{4}-[0-9]{2}-[0-9]{2})/.test(date)){\n //if there is date string\n //and it is in date pattern\n //then create that moment\n this._moment = moment(date);\n }else{\n this._moment = moment();\n }\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "calcCurrentMoment() {\n return moment();\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function makeShortcut(name, key) {\n moment.fn[name] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function Sb(a, b) {\n return function (c, d) {\n var e, f;\n //invert the arguments, but complain about it\n return null === d || isNaN(+d) || (y(b, \"moment().\" + b + \"(period, number) is deprecated. Please use moment().\" + b + \"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"), f = c, c = d, d = f), c = \"string\" == typeof c ? +c : c, e = Ob(c, d), Tb(this, e, a), this\n }\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\treturn function (val, period) {\n\t\tvar dur, tmp;\n\t\t//invert the arguments, but complain about it\n\t\tif (period !== null && !isNaN(+period)) {\n\t\t\tdeprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t\t\t'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t\t\ttmp = val; val = period; period = tmp;\n\t\t}\n\n\t\tval = typeof val === 'string' ? +val : val;\n\t\tdur = createDuration(val, period);\n\t\taddSubtract(this, dur, direction);\n\t\treturn this;\n\t};\n}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = moment.duration(val, period);\n\t addOrSubtractDurationFromMoment(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');\n\t tmp = val;val = period;period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = moment.duration(val, period);\n\t addOrSubtractDurationFromMoment(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }" ]
[ "0.6808176", "0.61082673", "0.59246933", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5740086", "0.5740086", "0.5740086", "0.5735562", "0.5735562", "0.5735562", "0.5735562", "0.5735562", "0.5725336", "0.56975675", "0.56674", "0.56674", "0.56674", "0.56674", "0.56674", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.56427294", "0.56267935", "0.56143224", "0.5587938", "0.5575233", "0.55609953", "0.55609953", "0.5476486", "0.5476486", "0.5476486", "0.5476486", "0.5458085", "0.5458085", "0.5453357", "0.5435501", "0.543035", "0.543035", "0.5422996", "0.54126036", "0.54126036", "0.54126036", "0.54126036", "0.54126036", "0.5411312", "0.5411312", "0.5411312", "0.5411312", "0.5411312", "0.54086506", "0.53990215", "0.5375705", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.53700495", "0.53632814", "0.5356188", "0.53330636", "0.5331728", "0.53299034", "0.5328133", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745" ]
0.0
-1
compare two arrays, return the number of differences
function compareArrays(array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i; for (i = 0; i < len; i++) { if ((dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { diffs++; } } return diffs + lengthDiff; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function countDifferences(a, b) {\n let diffs = 0;\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) {\n ++diffs;\n }\n }\n return diffs;\n}", "function howmany_diff(ary1, ary2){\n for (var i = 0; i < ary1.length; i++){\n var a = ary1[i]\n var b = ary2[i]\n if (a != b){\n diff++\n }\n }\n }", "function howmany_diff(ary1, ary2) {\n for (var i = 0; i < ary1.length; i++) {\n var a = ary1[i]\n var b = ary2[i]\n if (a != b) {\n diff++\n }\n }\n }", "function arrayDiff(a1, a2) {\n\tvar totalDiff = 0;\n\ta2.forEach((elem, index) => {\n\t\ttotalDiff += Math.abs(elem - a1[index]);\n\t});\n\treturn totalDiff;\n}", "function compatibility(arr1, arr2) {\n var totalDiff = 0;\n for (let i in arr1) {\n totalDiff = totalDiff + difference(arr1[i], arr2[i])\n }\n return totalDiff\n}", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length);\n var lengthDiff = Math.abs(array1.length - array2.length);\n var diffs = 0;\n var i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i])\n || (!dontConvert && Object(__WEBPACK_IMPORTED_MODULE_0__type_checks__[\"k\" /* toInt */])(array1[i]) !== Object(__WEBPACK_IMPORTED_MODULE_0__type_checks__[\"k\" /* toInt */])(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }" ]
[ "0.82804155", "0.82804155", "0.82804155", "0.82804155", "0.82804155", "0.82804155", "0.82804155", "0.82804155", "0.82804155", "0.82804155", "0.82804155", "0.79988205", "0.7986667", "0.7953736", "0.7924851", "0.77121043", "0.7560073", "0.7548933", "0.75345767", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.75057775", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7502236", "0.7500686", "0.7500686", "0.7500686", "0.7499351", "0.7490073" ]
0.0
-1
format date using native date object
function formatMoment(m, format) { if (!m.isValid()) { return m.localeData().invalidDate(); } format = expandFormat(format, m.localeData()); formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); return formatFunctions[format](m); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "formatDate(date) {\n\t\treturn date.toString()\n\t\t.replace(/(\\d{4})(\\d{2})(\\d{2})/, (string, year, month, day) => `${year}-${month}-${day}`);\n\t}", "static formatDate(date) {\n return new Date(date).toLocaleDateString();\n }", "formatTheDate(date, format) {\n const [ year, month, day ] = (date.toISOString()).substr(0, 10).split('-');\n return dateFns.format(new Date(\n year,\n (month - 1),\n day,\n ), format);\n }", "function formatDate(obj) {\n const date = new Date(obj.date).toLocaleString(\"default\", {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n });\n obj.date = date;\n return obj;\n}", "function formatDate(date) {\n return format(new Date(date), 'yyyy-MM-dd')\n}", "getFormattedDate(date) {\n return dayjs(date).format(\"MMM MM, YYYY\");\n }", "function formatDate(date) {\n var d = new Date(date);\n d = d.toLocaleString();\n return d;\n }", "function formatDate(d) {\n return `${d.year}-${d.month}-${d.day}`\n }", "_format(dtf, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }", "_format(dtf, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }", "_format(dtf, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }", "function _getFormattedDate(date) {\n var year = date.getFullYear();\n var month = (1 + date.getMonth()).toString();\n month = month.length > 1 ? month : '0' + month;\n var day = date.getDate().toString();\n day = day.length > 1 ? day : '0' + day;\n return month + '/' + day + '/' + year;\n }", "function formatDate(date, format) {\n return format\n .replace(/yyyy/i, util_toString(date.getFullYear()))\n .replace(/MM/i, lpad(date.getMonth() + 1))\n .replace(/M/i, util_toString(date.getMonth()))\n .replace(/dd/i, lpad(date.getDate()))\n .replace(/d/i, util_toString(date.getDate()));\n}", "function formatDate(date) {\n var day = date.getDate();\n var month = date.getMonth() + 1; //Months are zero based\n var year = date.getFullYear();\n var formattedDate = year + \"-\" + month + \"-\" + day;\n return formattedDate;\n }", "function formatDate(date) {\n\tif (date == null) {\n\t\treturn null;\n\t}\n\tvar d = date.getDate();\n\tvar m = date.getMonth() + 1;\n\tvar y = date.getFullYear();\n\treturn '' + (d <= 9 ? '0' + d : d) + '-' + (m <= 9 ? '0' + m : m) + '-' + y;\n}", "function formatDate(date) {\n let source = new Date(date);\n let day = source.getDate();\n let month = source.getMonth() + 1;\n let year = source.getFullYear();\n\n return `${day}/${month}/${year}`;\n }", "function formatDate(date) {\n\treturn new Date(date.split(' ').join('T'))\n}", "function formatDate(date) {\r\n date = new Date(date);\r\n let DD = date.getDate();\r\n if (DD < 10) {\r\n DD = \"0\" + DD;\r\n }\r\n let MM = date.getMonth() +1;\r\n if (MM < 10) {\r\n MM = \"0\" + MM;\r\n }\r\n const YYYY = date.getFullYear();\r\n return DD + \"/\" + MM + \"/\" + YYYY;\r\n }", "getFormattedDate(date) {\n const year = date.getFullYear();\n const month = (date.getUTCMonth() + 1).toString().padStart(2, '0');\n const day = (date.getUTCDate()).toString().padStart(2, '0');\n // Logger.log(`Day: ${day}, Month: ${month}, Year:${year}`)\n const dateFormatted = `${year}-${month}-${day}`;\n return dateFormatted;\n }", "function formatDate(date) {\n \n var dd = date.getDate();\n if (dd < 10) {\n dd = '0' + dd;\n }\n \n var mm = date.getMonth() + 1;\n if (mm < 10) {\n mm = '0' + mm;\n }\n \n var yy = date.getFullYear();\n if (yy < 10) {\n yy = '0' + yy;\n }\n \n return mm + '/' + dd + '/' + yy;\n }", "function formatDate(date) {\r\n\r\n let dd = date.getDate();\r\n if (dd < 10) dd = '0' + dd;\r\n\r\n let mm = date.getMonth() + 1;\r\n if (mm < 10) mm = '0' + mm;\r\n\r\n let yy = date.getFullYear() % 100;\r\n if (yy < 10) yy = '0' + yy;\r\n\r\n return dd + '.' + mm + '.' + yy;\r\n}", "function formatDate(date) {\r\n date = new Date(date);\r\n let DD = date.getDate();\r\n if (DD < 10) {\r\n DD = \"0\" + DD;\r\n }\r\n let MM = date.getMonth() +1;\r\n if (MM < 10) {\r\n MM = \"0\" + MM;\r\n }\r\n const YYYY = date.getFullYear();\r\n return DD + \"/\" + MM + \"/\" + YYYY;\r\n}", "function formatDate(date){\n\t\tvar formatted = {\n\t\t\tdate:date,\n\t\t\tyear:date.getFullYear().toString().slice(2),\n\t\t\tmonth:s.months[date.getMonth()],\n\t\t\tmonthAbv:s.monthsAbv[date.getMonth()],\n\t\t\tmonthNum:date.getMonth() + 1,\n\t\t\tday:date.getDate(),\n\t\t\tslashDate:undefined,\n\t\t\ttime:formatTime(date)\n\t\t}\n\t\tformatted.slashDate = formatted.monthNum + '/' + formatted.day + '/' + formatted.year;\n\t\treturn formatted;\n\t}", "function formatDate(date) {\n var day = (\"0\" + date.getDate()).slice(-2);\n var month = (\"0\" + (date.getMonth() + 1)).slice(-2);\n var year = date.getFullYear().toString().slice(-2);\n return day + month + year;\n}", "function formatDate(date,formatStr){return renderFakeFormatString(getParsedFormatString(formatStr).fakeFormatString,date);}", "function formatDate(date)\n{\n g_date=date.getDate();\n if(g_date <=9)\n {\n g_date=\"0\"+g_date;\n }\n g_month=date.getMonth();\n g_year=date.getFullYear();\n if (g_year < 2000) g_year += 1900;\n return todaysMonthName(date)+\" \"+g_date+\", \"+g_year;\n}", "_stringify(date){\n date = date.toLocaleDateString();\n return date;\n }", "function getFormattedDate(date) {\n return $filter('date')(date, 'yyyy-MM-dd');\n }", "function formatDate(date, format){\n if(!date){\n return '0000-00-00';\n }\n var dd = date.substring(0, 2);\n var mm = date.substring(3, 5);\n var yy = date.substring(6);\n if (format == 'dmy') {\n return dd + '-' + mm + '-' + yy;\n } else {\n return yy + '-' + mm + '-' + dd;\n }\n }", "formatDate (date){\n var d = new Date(date),\n month = (d.getMonth() + 1),\n day = d.getDate(),\n year = d.getFullYear();\n if (month.length < 2)\n month = '0' + month;\n if (day.length < 2)\n day = '0' + day;\n return [year, month, day].join('-');\n }", "function formatDate(date) {\n var day = date.getDate();\n if (day < 10) {\n day = \"0\" + day;\n }\n\n var month = date.getMonth() + 1;\n if (month < 10) {\n month = \"0\" + month;\n }\n\n var year = date.getFullYear();\n\n return day + \".\" + month + \".\" + year;\n}", "function convertToFormat (dateObj, dateFormat) {\r\n var month = dateObj.getMonth() + 1;\r\n var date = dateObj.getDate();\r\n var year = dateObj.getFullYear();\r\n var dateString;\r\n switch (dateFormat) {\r\n case 'yyyy.m.d':\r\n dateString = year + '.' + month + '.' + date;\r\n break;\r\n case 'yyyy-m-d':\r\n dateString = year + '-' + month + '-' + date;\r\n break;\r\n case 'yyyy/m/d':\r\n dateString = year + '/' + month + '/' + date;\r\n break;\r\n case 'yyyy/mm/dd':\r\n dateString = year + '/' + _makeTwoDigits(month) + '/' + _makeTwoDigits(date);\r\n break;\r\n case 'dd/mm/yyyy':\r\n dateString = _makeTwoDigits(date) + '/' + _makeTwoDigits(month) + '/' + year;\r\n break;\r\n case 'dd-mm-yyyy':\r\n dateString = _makeTwoDigits(date) + '-' + _makeTwoDigits(month) + '-' + year;\r\n break;\r\n case 'd-m-yyyy':\r\n dateString = date + '-' + month + '-' + year;\r\n break;\r\n case 'd/m/yyyy':\r\n dateString = date + '/' + month + '/' + year;\r\n break;\r\n case 'd/mm/yyyy':\r\n dateString = date + '/' + _makeTwoDigits(month) + '/' + year;\r\n break;\r\n case 'dd.mm.yyyy':\r\n dateString = _makeTwoDigits(date) + '.' + _makeTwoDigits(month) + '.' + year;\r\n break;\r\n case 'm/d/yyyy':\r\n dateString = month + '/' + date + '/' + year;\r\n break;\r\n default:\r\n dateString = _makeTwoDigits(date) + '.' + _makeTwoDigits(month) + '.' + year;\r\n }\r\n return dateString;\r\n }", "function formatDate(){\n if (!Date.prototype.toISODate) {\n Date.prototype.toISODate = function() {\n return this.getFullYear() + '-' +\n ('0'+ (this.getMonth()+1)).slice(-2) + '-' +\n ('0'+ this.getDate()).slice(-2);\n }\n }\n }", "function formatDate(date) {\n const d = new Date(date);\n return d.getFullYear() + \"-\" + twoDigits(d.getMonth() + 1) + \"-\" + twoDigits(d.getDate());\n}", "function formattedDate(d) {\n let month = String(d.getMonth() + 1);\n let day = String(d.getDate());\n const year = String(d.getFullYear());\n\n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n\n return `${year}-${month}-${day}`;\n }", "function formatDate(d) {\n if (d === undefined){\n d = (new Date()).toISOString()\n }\n let currDate = new Date(d);\n let year = currDate.getFullYear();\n let month = currDate.getMonth() + 1;\n let dt = currDate.getDate();\n let time = currDate.toLocaleTimeString('en-SG')\n\n if (dt < 10) {\n dt = '0' + dt;\n }\n if (month < 10) {\n month = '0' + month;\n }\n\n return dt + \"/\" + month + \"/\" + year + \" \" + time ;\n }", "function formattedDate(date) {\r\n\t\t\t\t\tvar d = new Date(date),\r\n\t\t\t\t\t\tmonth = '' + (d.getMonth() + 1),\r\n\t\t\t\t\t\tday = '' + d.getDate(),\r\n\t\t\t\t\t\tyear = d.getFullYear();\r\n\r\n\t\t\t\t\tif (month.length < 2) month = '0' + month;\r\n\t\t\t\t\tif (day.length < 2) day = '0' + day;\r\n\t\t\t\t\treturn [year, month, day].join('-');\r\n\t\t\t\t}", "function getFormattDate(date) {\n let month = (1 + date.getMonth()).toString();\n month = month.length > 1 ? month : \"0\" + month;\n\n let day = date.getDate().toString();\n day = day.length > 1 ? day : \"0\" + day;\n\n return (date.getFullYear() + \"-\" + month + \"-\" + day);\n}", "function getFormattDate(date) {\n let month = (1 + date.getMonth()).toString();\n month = month.length > 1 ? month : \"0\" + month;\n\n let day = date.getDate().toString();\n day = day.length > 1 ? day : \"0\" + day;\n\n return (date.getFullYear() + \"-\" + month + \"-\" + day);\n}", "function formatDate(date) {\r\n var d = date ? new Date(date) : new Date()\r\n month = '' + (d.getMonth() + 1),\r\n day = '' + d.getDate(),\r\n year = d.getFullYear();\r\n if (month.length < 2)\r\n month = '0' + month;\r\n if (day.length < 2)\r\n day = '0' + day;\r\n\r\n return `${day}${month}${year}`;\r\n}", "function _formatDate(date) {\n\t//remove timezone GMT otherwise move time\n\tvar offset = date.getTimezoneOffset() * 60000;\n\tvar dateFormatted = new Date(date - offset);\n dateFormatted = dateFormatted.toISOString();\n if (dateFormatted.indexOf(\"T\") > 0)\n dateFormatted = dateFormatted.split('T')[0];\n return dateFormatted;\n}", "function formatDate(date) {\n const month = date.getMonth() + 1;\n const day = date.getDate();\n const year = date.getFullYear();\n \n return `${month}/${day}/${year}`;\n }", "function formatDate(date) {\r\n return date.getFullYear().toString() + (date.getMonth() + 1).toString().padStart(2, '0') + date.getDate().toString() \r\n + date.getHours().toString().padStart(2, '0') + date.getMinutes().toString().padStart(2, '0');\r\n }", "function formatDate(date) {\n var dd = date.getDate()\n if (dd < 10) dd = '0' + dd;\n var mm = date.getMonth() + 1\n if (mm < 10) mm = '0' + mm;\n var yy = date.getFullYear();\n if (yy < 10) yy = '0' + yy;\n return dd + '.' + mm + '.' + yy;\n}", "formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n if (month.length < 2) \n month = '0' + month;\n if (day.length < 2) \n day = '0' + day;\n return [year, month, day].join('-');\n }", "function formatDate(date) {\n // date is a date object\n const options = { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' };\n return date.toLocaleDateString('en-US', options);\n}", "function formatDate(date) {\n // date is a date object\n const options = { year: 'numeric', month: 'short', day: 'numeric', timeZone: 'UTC' };\n return date.toLocaleString('en-US', options);\n}", "function _date(obj) {\n return exports.PREFIX.date + ':' + obj.toISOString();\n}", "function get_formatted_date(date) {\n function get_formatted_num(num, expected_length) {\n var str = \"\";\n var num_str = num.toString();\n var num_zeros = expected_length - num_str.length;\n for (var i = 0; i < num_zeros; ++i) {\n str += '0';\n }\n str += num_str;\n return str;\n }\n var msg = get_formatted_num(date.getFullYear(), 4) + \"-\";\n msg += get_formatted_num(date.getMonth() + 1, 2) + \"-\";\n msg += get_formatted_num(date.getDate(), 2) + \" \";\n msg += get_formatted_num(date.getHours(), 2) + \":\";\n msg += get_formatted_num(date.getMinutes(), 2) + \":\";\n msg += get_formatted_num(date.getSeconds(), 2);\n return msg;\n}", "function formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n \n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n \n return [year, month, day].join('-');\n }", "function formattedDate(date) {\n\n // Récupération\n var month = String(date.getMonth() + 1);\n var day = String(date.getDate());\n var year = String(date.getFullYear());\n\n // Ajout du 0\n if (month.length < 2) \n month = '0' + month;\n\n // Ajout du 0\n if (day.length < 2) \n day = '0' + day;\n\n return day+'/'+month+'/'+year;\n }", "function formatDate(date,format) {\n if (!format){\n format = \"yyyy-MM-dd\";\n }\n if (date === null){\n return null;\n }\n if (!(date instanceof Date)){\n date = new Date(date);\n }\n let day = date.getDate();\n let month = date.getMonth();\n let year = date.getFullYear();\n let hour = date.getHours();\n let min = date.getMinutes();\n let sec = date.getSeconds();\n\n let str = format.replace(\"yyyy\",year)\n .replace(\"MM\",fillString(month+1,2,-1,\"0\"))\n .replace(\"dd\",fillString(day,2,-1,\"0\"))\n .replace(\"HH\",fillString(hour,2,-1,\"0\"))\n .replace(\"mm\",fillString(min,2,-1,\"0\"))\n .replace(\"ss\",fillString(sec,2,-1,\"0\"))\n ;\n return str;\n }", "function prettyFormatDate(date) {\n return Utilities.formatDate(new Date(date), \"GMT-7\", \"MM/dd/yy\").toString();\n}", "function formatDate(date) {\n var newDate = new Date(date);\n var dd = newDate.getDate();\n var mm = newDate.getMonth() + 1; // January is 0!\n\n var yyyy = newDate.getFullYear();\n\n if (dd < 10) {\n dd = \"0\".concat(dd);\n }\n\n if (mm < 10) {\n mm = \"0\".concat(mm);\n }\n\n var formatedDate = \"\".concat(dd, \"/\").concat(mm, \"/\").concat(yyyy);\n return formatedDate;\n}", "function formatDate(date) {\n var day = date.getDate();\n var month = date.getMonth();\n var year = date.getFullYear();\n month++;\n if (month < 10)\n month = '0' + month;\n if (day < 10)\n day = '0' + day;\n return [year, month, day].join('-').toString();\n}", "formatDate(date) {\n return date.toISOString().replaceAll(\"-\", \"\").substring(0, 8);\n }", "function formatDate(date) {\n\t\tvar day = date.getDate();\n\t\t\n\t\t// Add '0' if needed\n\t\tif (parseInt(day / 10) == 0) {\n\t\t\tday = \"0\" + day;\n\t\t}\n\t\t\n\t\tvar month = date.getMonth() + 1; // months start at 0\n\t\t\n\t\t// Add '0' if needed\n\t\tif (parseInt(month / 10) == 0) {\n\t\t\tmonth = \"0\" + month;\n\t\t}\n\t\t\n\t\tvar year = date.getFullYear();\n\t\t\n\t\treturn day + \"/\" + month + \"/\" + year;\n\t}", "function formatDate(date) {\n\t\treturn (date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear() + ' - ' + formatTime([date.getHours(), date.getMinutes()]));\n\t}", "_convertDateObjToString(obj) {\n\n let date = \"\";\n\n if (obj && obj.day && obj.month && obj.year) {\n let month = String(obj.month);\n let day = String(obj.day);\n let year = String(obj.year);\n\n if (month.length < 2) {\n month = \"0\" + month;\n }\n\n if (day.length < 2) {\n day = \"0\" + day;\n }\n\n if (year.length < 4) {\n var l = 4 - year.length;\n for (var i = 0; i < l; i++) {\n year = \"0\" + year;\n }\n }\n date = year + \"-\" + month + \"-\" + day;\n }\n\n return date;\n }", "function formatDate(date)\n{\n date = new Date(date * 1000);\n return '' + date.getFullYear() + '/' + lpad(date.getMonth(), 2, '0') + '/' + lpad(date.getDate(), 2, '0') + ' ' + lpad(date.getHours(), 2, '0') + ':' + lpad(date.getMinutes(), 2, '0');\n}", "function formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n\n if (month.length < 2) {\n month = '0' + month;\n }\n if (day.length < 2) {\n day = '0' + day;\n }\n\n return [year, month, day].join('-');\n}", "formatDate(x) {\n let date = new Date(x)\n let _month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1\n let _date = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()\n let _hour = date.getHours() < 10 ? `0${date.getHours()}` : date.getHours()\n let _minute = date.getMinutes() < 10 ? `0${date.getMinutes()}` : date.getMinutes()\n let _second = date.getSeconds() < 10 ? `0${date.getSeconds()}` : date.getSeconds()\n let dateStr = `${date.getFullYear()}-${_month}-${_date} ${_hour}:${_minute}:${_second}`\n return dateStr\n }", "returnDateFormat(date){\n var day = new Date(date);\n return day.toDateString();\n }", "function formatDate (date) {\n if (date) {\n const year = date.getFullYear()\n const month = date.getMonth() + 1\n const day = date.getDate()\n return year + '-' + month.toString().padStart(2, '0') + '-' + day.toString().padStart(2, '0')\n } else {\n return ''\n }\n}", "formatDateTime(date, format) {\n date = new Date(date);\n var result = format || 'y-m-d h:i:s';\n result = result.replace('y', date.getFullYear());\n result = result.replace('m', this.pad(date.getMonth() + 1, 2));\n result = result.replace('d', this.pad(date.getDate(), 2));\n result = result.replace('h', this.pad(date.getHours(), 2));\n result = result.replace('i', this.pad(date.getMinutes(), 2));\n result = result.replace('s', this.pad(date.getSeconds(), 2));\n return result;\n }", "function formatDate(date) {\n var date = new Date(date * 1000);\n return `${date.getMonth() + 1}/${date.getDate()}/${date.getUTCFullYear()}`;\n}", "static formatDate(date) {\n let formattedDate = '';\n\n formattedDate += date.getUTCFullYear();\n formattedDate += '-' + ('0' + (date.getUTCMonth() + 1)).substr(-2);\n formattedDate += '-' + ('0' + date.getUTCDate()).substr(-2);\n\n return formattedDate;\n }", "formatted_date() {\n return this.created_at.toLocaleDateString()\n }", "function formatDate(date) {\n var year = date.getFullYear()\n var month = (1 + date.getMonth()).toString()\n var day = date.getUTCDate()\n return month + \"/\" + day + \"/\" + year\n}", "function formatDate(date){\n var yr = date.getFullYear();\n var mnth = date.getMonth()+1;\n if(mnth < 10){\n mnth = `0${mnth}`;\n }\n var day = date.getDate()\n if(day < 10){\n day = `0${day}`;\n }\n return yr+\"-\"+mnth+\"-\"+day;\n}", "function formatDate(date){\n var dd = date.getDate(),\n mm = date.getMonth()+1, //January is 0!\n yyyy = date.getFullYear();\n\n if(dd<10) dd='0'+dd;\n if(mm<10) mm='0'+mm;\n\n return yyyy+'-'+mm+'-'+dd;\n}", "function dateformat(date) {\n \n // Main array that will be used to sort out the date.\n let dateArray = date.split('-');\n // Sorts days\n let dayArray = dateArray[2].split('T');\n let day = dayArray[0];\n // Sets up month and year months\n let month = dateArray[1];\n let year = dateArray[0];\n // Using the global standard or writing DOB\n let formatedDOB = [day, month, year].join('-');\n // Retuns the data from the formatted DOB.\n return formatedDOB;\n }", "function formatDate ( date ) {\n return date.getDate() + nth(date.getDate()) + \" \" +\n months[date.getMonth()] + \" \" +\n date.getFullYear();\n}", "function formatDate(date) {\n if (date) {\n var formattedDate = new Date(date);\n return formattedDate.toLocaleDateString();\n } else {\n return null;\n }\n}", "function formatDate(date) {\n return date.getFullYear() + '-' +\n (date.getMonth() < 9 ? '0' : '') + (date.getMonth()+1) + '-' +\n (date.getDate() < 10 ? '0' : '') + date.getDate();\n}", "function formatDate(date, formatStr) {\n\t\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n\t}", "function formatDate(date) {\n\t\t\t\treturn date.getDate() + \"-\" + (date.getMonth()+1) + \"-\" + date.getFullYear();\n\t\t\t}", "function pgFormatDate(date) {\n /* Via http://stackoverflow.com/questions/3605214/javascript-add-leading-zeroes-to-date */\n return String(date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate()); \n}", "function setFormatoDate(data) {\n let dd = (\"0\" + (data.getDate())).slice(-2);\n let mm = (\"0\" + (data.getMonth() + 1)).slice(-2);\n let yyyy = data.getFullYear();\n return dd + '/' + mm + '/' + yyyy;\n}", "function formatDate(date, format, options) {\n\treturn formatDates(date, null, format, options);\n}", "function formatDate(date, format, options) {\n\treturn formatDates(date, null, format, options);\n}", "function formatDate(date, format, options) {\n\treturn formatDates(date, null, format, options);\n}", "prettyBirthday() {//Can be put in method\n return dayjs(this.person.dob.date)\n .format('DD MMMM YYYY')//change in assignment to different format not default\n }", "function dateFormatter(date){\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n return year + '-' + ('0' + month).slice(-2) + '-' + day; // the '0' and the slicing is for left padding\n}", "static formatDate (date, format) {\n let year = date.getFullYear(),\n month = Timer.zero(date.getMonth()+1),\n day = Timer.zero(date.getDate()),\n hours = Timer.zero(date.getHours()),\n minute = Timer.zero(date.getMinutes()),\n second = Timer.zero(date.getSeconds()),\n week = date.getDay();\n return format.replace(/yyyy/g, year)\n .replace(/MM/g, month)\n .replace(/dd/g, day)\n .replace(/hh/g, hours)\n .replace(/mm/g, minute)\n .replace(/ss/g, second)\n .replace(/ww/g, Timer.weekName(week));\n }", "function formatDate(date){\n var yyyy = date.getFullYear();\n var mm = date.getMonth() + 1;\n var dd = date.getDate();\n //console.log(\"This is dd\" + dd);\n if(dd<10){\n dd='0'+ dd;\n }\n if(mm<10){\n mm='0'+mm;\n } \n return ( mm + '/' + dd + '/' + yyyy);\n \n }", "dateFormate(d) {\n const date = new Date(d)\n const j = date.getDate()\n const m = (date.getUTCMonth() + 1)\n const a = date.getUTCFullYear()\n return (\"0\" + j).slice(-2) + '/' + (\"0\" + m).slice(-2) + '/' + a\n }", "function format(d) {\n const month = d.getMonth() >= 9 ? d.getMonth() + 1 : `0${d.getMonth() + 1}`;\n const day = d.getDate() >= 10 ? d.getDate() : `0${d.getDate()}`;\n const year = d.getFullYear();\n return `${month}/${day}/${year}`;\n}", "function formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n return [year, month, day].join('-');\n }", "function formatDate(dateToConvert) {\n\treturn format(new Date(dateToConvert));\n}", "function formatDate(date) {\n let year = date.getFullYear();\n let month = date.getMonth() + 1;\n let day = date.getDate();\n return [year, month, day].join('-');\n}", "formatDate(value, format) {\n format = format || '';\n if (value) {\n return window.moment(value)\n .format(format);\n }\n return \"n/a\";\n }", "function formatDate(date) {\n result = \"\";\n if (date) {\n result += date.getDate() + \"/\"; // Day\n result += (date.getMonth() + 1) + \"/\";\n result += (date.getYear() + 1900);\n }\n return result;\n}", "formatDate(d) {\n return moment(d).format('DD/MM/YYYY')\n }", "function formattedDate(d = new Date()) {\n return [d.getDate(), d.getMonth() + 1, d.getFullYear()]\n .map((n) => (n < 10 ? `0${n}` : `${n}`))\n .join(\"/\")\n .concat(` at ${getTime(d)}`);\n }", "_formatDate(date, tzOffset) {\n let str = window.iotlg.dateFormat;\n let actualDate = new Date();\n actualDate.setTime(date.getTime() + this._getMilliseconds(tzOffset, UNIT_HOUR));\n let hours = (actualDate.getUTCHours());\n let day = (actualDate.getUTCDate());\n\n str = str.replace(\"yyyy\", actualDate.getUTCFullYear());\n str = str.replace(\"mm\", this._fillUp(actualDate.getUTCMonth() + 1, 2));\n str = str.replace(\"dd\", this._fillUp(day, 2));\n str = str.replace(\"hh\", this._fillUp(hours, 2));\n str = str.replace(\"MM\", this._fillUp(actualDate.getUTCMinutes(), 2));\n str = str.replace(\"ss\", this._fillUp(actualDate.getUTCSeconds(), 2));\n str = str.replace(\" \", \"\\n\");\n return str;\n }", "function formatDate(rawDate) {\n return rawDate.replace(/(\\d{4})[-/](\\d{2})[-/](\\d{2})/, '$3.$2.$1');\n}", "getDateFormated(date) {\n const formatDate = new Intl.DateTimeFormat('en-GB', {\n day: 'numeric',\n month: 'short',\n year: 'numeric'\n }).format;\n return formatDate(date);\n }", "function formatDate(val) {\n var d = new Date(val),\n day = d.getDate(),\n month = d.getMonth() + 1,\n year = d.getFullYear();\n\n if (day < 10) {\n day = \"0\" + day;\n }\n if (month < 10) {\n month = \"0\" + month;\n }\n return month + \"/\" + day + \"/\" + year;\n}", "function formattedDate(d = new Date) {\n\treturn [d.getDate(), d.getMonth()+1, d.getFullYear()]\n\t\t.map(n => n < 10 ? `0${n}` : `${n}`).join('/');\n }", "function reFormatDate(date) {\n const d= new Date(Date.parse(date));\n let mm = d.getMonth() + 1;\n const yyyy = d.getFullYear();\n let dd = d.getDate();\n\n if (dd < 10) {\n dd = `0${dd}`;\n }\n if (mm < 10) {\n mm = `0${mm}`;\n }\n return `${yyyy}-${mm}-${dd}`;\n }" ]
[ "0.75320816", "0.7421278", "0.7386446", "0.7386206", "0.73497903", "0.7336332", "0.73048234", "0.7300858", "0.7292591", "0.7292591", "0.7292591", "0.7221218", "0.7213261", "0.7210653", "0.7188191", "0.71826464", "0.71783525", "0.71683335", "0.71673006", "0.71582985", "0.7136396", "0.71351296", "0.7116119", "0.7094242", "0.706227", "0.70609725", "0.704927", "0.7048684", "0.703367", "0.70264095", "0.7026313", "0.7015168", "0.7003348", "0.6994713", "0.6985144", "0.6984923", "0.69840693", "0.6977675", "0.6977675", "0.6977597", "0.69757605", "0.6975543", "0.6970286", "0.6963518", "0.6961424", "0.69570905", "0.69568783", "0.69550544", "0.694989", "0.6949591", "0.6942341", "0.6942232", "0.6940583", "0.69388914", "0.6935119", "0.6934607", "0.6933395", "0.69221574", "0.69161093", "0.6916095", "0.69148", "0.6909679", "0.68973136", "0.6889287", "0.68878007", "0.6875211", "0.68711346", "0.6871014", "0.68709546", "0.68678564", "0.68650454", "0.6862945", "0.6851623", "0.68475795", "0.684524", "0.68389064", "0.6835438", "0.6835073", "0.6827606", "0.6824828", "0.6824828", "0.6824828", "0.6824674", "0.6817718", "0.6815951", "0.681486", "0.68108004", "0.68101245", "0.68099517", "0.6809602", "0.68090725", "0.68019825", "0.6801209", "0.67929906", "0.6790544", "0.6789918", "0.67863476", "0.6785376", "0.67850566", "0.67833906", "0.67782235" ]
0.0
-1
pick the locale from the array try ['enau', 'engb'] as 'enau', 'engb', 'en', as in move through the list trying each substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
function chooseLocale(names) { var i = 0, j, next, locale, split; while (i < names.length) { split = normalizeLocale(names[i]).split('-'); j = split.length; next = normalizeLocale(names[i + 1]); next = next ? next.split('-') : null; while (j > 0) { locale = loadLocale(split.slice(0, j).join('-')); if (locale) { return locale; } if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { //the next array item is better than a shallower substring of this one break; } j--; } i++; } return globalLocale; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n \n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n }", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}" ]
[ "0.7081012", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7076643", "0.7072475" ]
0.0
-1
This function will load locale and then set the global locale. If no arguments are passed in, it will simply return the current global locale key.
function getSetGlobalLocale (key, values) { var data; if (key) { if (isUndefined(values)) { data = getLocale(key); } else { data = defineLocale(key, values); } if (data) { // moment.duration._locale = moment._locale = data; globalLocale = data; } else { if ((typeof console !== 'undefined') && console.warn) { //warn user if arguments are passed but the locale could not be set console.warn('Locale ' + key + ' not found. Did you forget to load it?'); } } } return globalLocale._abbr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined$1(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\r\n var data;\r\n if (key) {\r\n if (isUndefined(values)) {\r\n data = getLocale(key);\r\n }\r\n else {\r\n data = defineLocale(key, values);\r\n }\r\n\r\n if (data) {\r\n // moment.duration._locale = moment._locale = data;\r\n globalLocale = data;\r\n }\r\n else {\r\n if ((typeof console !== 'undefined') && console.warn) {\r\n //warn user if arguments are passed but the locale could not be set\r\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\r\n }\r\n }\r\n }\r\n\r\n return globalLocale._abbr;\r\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn User if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }" ]
[ "0.7327511", "0.72994685", "0.72960633", "0.7250679", "0.7250679", "0.7250679", "0.7250679", "0.7250679", "0.7250679", "0.7242776", "0.7242776", "0.7231589", "0.72192186", "0.7215549", "0.72115666", "0.72115666", "0.72115666", "0.72115666", "0.72076297", "0.7207319", "0.72072697", "0.72072697", "0.72072697", "0.72072697", "0.72072697" ]
0.0
-1
Pick the first defined of two or three arguments.
function defaults(a, b, c) { if (a != null) { return a; } if (b != null) { return b; } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pick() {\n\tvar args = arguments,\n\t\ti,\n\t\targ,\n\t\tlength = args.length;\n\tfor (i = 0; i < length; i++) {\n\t\targ = args[i];\n\t\tif (typeof arg !== 'undefined' && arg !== null) {\n\t\t\treturn arg;\n\t\t}\n\t}\n}", "function pick() {\n\t\tvar args = arguments,\n\t\t\ti,\n\t\t\targ,\n\t\t\tlength = args.length;\n\t\tfor (i = 0; i < length; i++) {\n\t\t\targ = args[i];\n\t\t\tif (arg !== UNDEFINED && arg !== null) {\n\t\t\t\treturn arg;\n\t\t\t}\n\t\t}\n\t}", "function firstArg() {\n\treturn arguments != \"\" ? [...arguments].shift() : undefined;\n}", "function pick() {\n var args = arguments,\n i,\n arg,\n length = args.length;\n for (i = 0; i < length; i++) {\n arg = args[i];\n if (arg !== UNDEFINED && arg !== null) {\n return arg;\n }\n }\n }", "function getFirstDefined() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n for (var _i3 = 0, _args = args; _i3 < _args.length; _i3++) {\n var arg = _args[_i3];\n\n if (arg !== undefined) {\n return arg;\n }\n }\n\n return undefined;\n } // variable used to generate id", "function $pick() {\r\n\t\tfor (var i=0,l=arguments.length; i<l; i++) {\r\n\t\t\tif ($chk(arguments[i])) return arguments[i];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "function v1() {\r\n for (var args = arguments, i = 0, l = args.length; i < l && args[i] == undefined; i++);\r\n return has(args, i) ? args[i] : args[l - 1];\r\n }", "function or() {\r\n\t\t\tvar remain = _.without(arguments, undefined); \r\n\t\t\tif (remain.length === 0)\r\n\t\t\t\treturn undefined;\r\n\t\t\treturn remain[0];\r\n\t\t}", "function getFirstDefined(...args) {\n\t for (const arg of args) {\n\t if (arg !== undefined) {\n\t return arg;\n\t }\n\t }\n\t return undefined;\n\t}", "function f(x) {\n let firstArg = arguments[0];\n\n return firstArg;\n}", "function firstDefined() {\n var i = -1;\n while (++i < arguments.length) {\n if (arguments[i] !== undefined) {\n return arguments[i];\n }\n }\n return undefined;\n }", "function get_arg_2() { return arguments[2]; }", "function mrcPick(arg, def) {\n return (typeof arg !== \"undefined\" ? arg : def);\n}", "function firstString() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n for (var i = 0; i < args.length; i++) {\n var arg = args[i];\n if (typeof arg === \"string\") {\n return arg;\n }\n }\n}", "function firstString() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n for (var i = 0; i < args.length; i++) {\r\n var arg = args[i];\r\n if (typeof arg === \"string\") {\r\n return arg;\r\n }\r\n }\r\n}", "function f(a, b, c, d, e, f) {\n let sixthArg = arguments[5];\n let thirdArg = arguments[2];\n\n return sixthArg;\n}", "function myOtherFunction (first_argument = second_argument, second_argument) {}", "function RandomArg()\n{\n\tvar r = Math.floor(Math.random()*arguments.length);\n\treturn arguments[r];\n}", "function getArg(aArgs,aName,aDefaultValue){if(aName in aArgs){return aArgs[aName];}else if(arguments.length===3){return aDefaultValue;}else{throw new Error('\"'+aName+'\" is a required argument.');}}", "function doWhat(first, second, third) {\n if (arguments.length != 3) {\n throw new Error(\"Excepts 3 arguments, but invoke with \" +\n arguments.length + \" arguments\");\n }\n}", "function randomChoice()\n{\n assert (\n arguments.length > 0,\n 'must supply at least one possible choice'\n );\n\n var idx = randomInt(0, arguments.length - 1);\n\n return arguments[idx];\n}", "function isTwoPassed(){\n var args = Array.prototype.slice.call(arguments);\n return args.indexOf(2) != -1;\n}", "function getArg(args, type, number) {\n var count = 1, number = (number || 1);\n for (var i = 0; i < args.length; i++) {\n //Check for type, If function then ensure \"callee\" is excluded\n if (typeof args[i] == type && !(type == \"function\" && args[i].name == \"callee\")) {\n if (number == 1) return args[i];\n else number++;\n }\n }\n }", "function abc(a,b) {\n var c = 6;\n return arguments[0] + b + c;\n}", "function foo() {\n\tvar a = arguments[0] !== (void 0) ? arguments[0] : 2;\n\tconsole.log( a );\n}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName]\n } else if (arguments.length === 3) {\n return aDefaultValue\n } else {\n throw new Error('\"' + aName + '\" is a required argument.')\n }\n }", "function getFirstElement ([a, b]) {\n let getArray = [a, b] \n return getArray[0]\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function one(a,...rest){\n console.log(a,rest)\n}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t\t if (aName in aArgs) {\n\t\t return aArgs[aName];\n\t\t } else if (arguments.length === 3) {\n\t\t return aDefaultValue;\n\t\t } else {\n\t\t throw new Error('\"' + aName + '\" is a required argument.');\n\t\t }\n\t\t}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function sayArguments(first, second) {\n first = first || 'first';\n second = second || 'second'; // || Значение по умолчанию\n let args = '';\n\n for (let i = 0; i < arguments.length; i++) {\n args += arguments[i] + ' ';\n }\n console.log( 'Arguments: ' + args );\n}", "function smallestValue(){\n return Math.min(...arguments);\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n }\n throw new Error('\"' + aName + '\" is a required argument.');\n\n}", "function test() {\n return arguments.slice(arguments.length - 1)[0]; //ERROR, there is not slice method\n}", "function getThirdArgument() {\n\n // Stores all possible arguments in array\n argumentArray = process.argv;\n\n // Loops through words in node argument\n for (var i = 3; i < argumentArray.length; i++) {\n argument += argumentArray[i];\n }\n return argument;\n}", "function oneOf(args) { }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}" ]
[ "0.7627128", "0.755574", "0.7451226", "0.7446005", "0.6877117", "0.6670455", "0.6649569", "0.6639284", "0.6579108", "0.64876544", "0.64770585", "0.6404518", "0.629943", "0.62962943", "0.62828404", "0.61646676", "0.6150696", "0.5959921", "0.5959005", "0.59343785", "0.5931304", "0.5918146", "0.5885552", "0.5866602", "0.58449876", "0.584313", "0.584313", "0.584313", "0.584313", "0.58193606", "0.5815905", "0.5788336", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57758886", "0.57747585", "0.5764235", "0.5764235", "0.5764235", "0.5764235", "0.5764235", "0.5764235", "0.5764235", "0.5764235", "0.5764235", "0.5764235", "0.5764235", "0.5764235", "0.57553893", "0.57519925", "0.5741158", "0.5735402", "0.57283866", "0.57203263", "0.5668838", "0.5660165", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714", "0.5654714" ]
0.0
-1
convert an array to a date. the array should mirror the parameters below note: all values past the year are optional and will default to the lowest possible value. [year, month, day , hour, minute, second, millisecond]
function configFromArray (config) { var i, date, input = [], currentDate, expectedWeekday, yearToUse; if (config._d) { return; } currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { dayOfYearFromWeekInfo(config); } //if the day of the year is set, figure out what it is if (config._dayOfYear != null) { yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { getParsingFlags(config)._overflowDayOfYear = true; } date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } // Default to current date. // * if no year, month, day of month are given, default to today // * if day of month is given, default month and year // * if month is given, default only year // * if year is given, don't default anything for (i = 0; i < 3 && config._a[i] == null; ++i) { config._a[i] = input[i] = currentDate[i]; } // Zero out whatever was not defaulted, including time for (; i < 7; i++) { config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; } // Check for 24:00:00.000 if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { config._nextDay = true; config._a[HOUR] = 0; } config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if (config._nextDay) { config._a[HOUR] = 24; } // check for mismatching day of week if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { getParsingFlags(config).weekdayMismatch = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateFromArray(input) {\n return new Date(input[0], input[1] || 0, input[2] || 1, input[3] || 0, input[4] || 0, input[5] || 0, input[6] || 0);\n }", "function dateFromArray(input) {\n return new Date(input[0], input[1] || 0, input[2] || 1, input[3] || 0, input[4] || 0, input[5] || 0, input[6] || 0);\n }", "function datearray(num)\n{\n var ret = []\n var day = Math.floor(num/1000000)\n ret.push(day)\n num = num-(day*1000000)\n var month = Math.floor(num/10000)\n ret.push(month)\n num = num-(month*10000)\n var year = Math.floor(num)\n ret.push(year)\n return ret\n}", "function SP_CreateDateObject(arrDate)\n{\n\tvar oDate;\n\t\n\tif(arrDate.length == 3)\n\t{\n\t\t// Check First Element is either day or year\n\t\t\n\t\tif(arrDate[0].length == 4) //means year , passing array date is of format yyyy-mmm-dd\n\t\t{\n\t\t\toDate = new Date(arrDate[0], --arrDate[1], arrDate[2]);\n\t\t}\n\t\telse //means day, passing array date is of format dd-mmm-yyyy \n\t\t{\n\t\t\toDate = new Date(arrDate[2], SP_GetMonthNumber(arrDate[1]), arrDate[0]);\t\t\n\t\t}\n\t}\n\telse\n\t{\n\t\toDate = new Date();\n\t}\n\t\n\treturn oDate;\n}", "function formArray (array, oneRMArray) {\n var data = []\n for (var i = 0; i < array.length; i++) {\n var d;\n var monthString = array[i].month.toString();\n var dayString = array[i].day.toString();\n var yearString = array[i].year.toString();\n var d = new Date(monthString + \"-\" + dayString + \"-\" + yearString);\n var dParsed = Date.parse(d);\n\n data[i] = {\n x: dParsed,\n y: oneRMArray[i]\n } \n }\n return data\n }", "function formatDATADate(dateArr) {\r\n\r\n var val = [];\r\n\r\n for (date in dateArr) {\r\n val.push(new Date(formatDate(date)).getTime());\r\n }\r\n\r\n return val;\r\n}", "makeArray(d) {\n var da = new Date(d);\n return [da.getUTCFullYear(), da.getUTCMonth() + 1, da.getUTCDate(), 0, 0, 0, 0];\n }", "function fillDate(array) {\n var last = array.length - 1;\n var firstDate = array[0].datestamp;\n var lastDate = array[last].datestamp;\n\n var fullarray = betweenDate(firstDate, lastDate);\n\n return fullarray;\n }", "fromArray(a) {\n var d = [].concat(a);\n d[1]--;\n return Date.UTC.apply(null, d);\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function BuildDates(date){\r\n var array = new Array();\r\n array['day'] = (date.getDate() < 10) ?\r\n '0' + date.getDate().toString() :\r\n date.getDate().toString();\r\n \r\n array['month'] = (date.getMonth() < 9) ?\r\n '0' + (date.getMonth()+1).toString() :\r\n (date.getMonth()+1).toString();\r\n \r\n array['year'] = date.getFullYear().toString();\r\n return array;\r\n}", "function date() {\n return new Date(year, ...arguments)\n }", "function dateFromArray(config) {\n var i, date, input = [], currentDate;\n\n if (config._d) {\n return;\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n currentDate = currentDateArray(config);\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function createDateArray( date ) {\r\n return date.split( '-' ).map(function( value ) { return +value })\r\n }", "function makeFriendlyDates(arr) {\n var months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n var start = arr[0].split('-'), startStr = '';\n var end = arr[1].split('-'), endStr = '';\n var result = [];\n function toNum(str) {\n return +str;\n }\n // convert to readable day formant\n function dayFormat(day) {\n switch (day) {\n case 1:\n case 21:\n return day + 'st';\n case 2:\n case 22:\n return day + 'nd';\n case 3:\n case 23:\n return day + 'rd';\n default:\n return day + 'th';\n }\n }\n start = start.map(toNum);\n end = end.map(toNum);\n var startYear = start[0], startMonth = start[1], startDay = start[2];\n var endYear = end[0], endMonth = end[1], endDay = end[2];\n // ending date equals to starting date\n if (arr[0] === arr[1]) {\n result.push(months[startMonth - 1] + ' ' + dayFormat(startDay) + ', ' + startYear);\n return result;\n }\n startStr += months[startMonth - 1] + ' ' + dayFormat(startDay);\n if (endYear === startYear) {\n if (startYear !== 2016) {\n startStr += ', ' + startYear; \n }\n if (endMonth === startMonth ) {\n endStr += dayFormat(endDay); // two dates within a month, just output ending day\n } else {\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay);\n }\n } else if (endYear - startYear === 1) {\n if (endMonth === startMonth && endDay < startDay || endMonth < startMonth) { // within one year\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay);\n if (startYear !== 2016) {\n startStr += ', ' + startYear; \n }\n } else if (endMonth >= startMonth) { // exceed one year\n startStr += ', ' + startYear;\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay) + ', ' + endYear;\n }\n } else if (endYear - startYear > 1) { // exceed one year\n startStr += ', ' + startYear;\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay) + ', ' + endYear;\n }\n\n result.push(startStr, endStr);\n return result;\n}", "function makeDateArray(weatherData, array){\n weatherData.data.forEach((item, index) => {\n Object.keys(item).forEach(key => {\n if(key === \"datetime\") {\n array.push(dateFormat(weatherData.data[index][key]));\n return array;\n }\n });\n });\n}", "formatDateForArray(date, month, year) {\n //console.log('month-->'+month+'date-->'+date);\n if (month <= 9 ) \n month = '0' + (month+1);\n if (date <= 9) \n date = '0' + (date);\n\n return [year, month, date].join('-');\n }", "parseDate(arrayOfStrings)\n {\n let newStr=arrayOfStrings[3];\n newStr += '-';\n switch(arrayOfStrings[1])\n {\n case 'Jan':\n newStr+='01';\n break;\n case 'Feb':\n newStr+='02';\n break;\n case 'Mar':\n newStr+='03';\n break;\n case 'Apr':\n newStr+='04';\n break;\n case 'May':\n newStr+='05';\n break;\n case 'Jun':\n newStr+='06';\n break;\n case 'Jul':\n newStr+='07';\n break;\n case 'Aug':\n newStr+='08';\n break;\n case 'Sep':\n newStr+='09';\n break;\n case 'Oct':\n newStr+='10';\n break;\n case 'Nov':\n newStr+='11';\n break;\n case 'Dec':\n newStr+='12';\n break;\n default:\n break;\n }\n newStr+='-';\n newStr+=arrayOfStrings[2];\n\n return newStr;\n }", "function sortByYear\n(\n array\n) \n{\n return array.sort(function(a,b)\n {\n var x = parseInt(a.number.split('-')[1]);\n var y = parseInt(b.number.split('-')[1]);\n return ((x < y) ? -1 : ((x > y) ? 0 : 1));\n }).reverse();\n}", "function frmt_date(a,field) {\n for(var i=0; i < a.length; i++){\n if( ! a[i][field] ) { continue }\n var d = new Date(a[i][field] * 1000)\n a[i][field] = d.toISOString().substr(0,16).replace('T',' ')\n }\n return(a)\n}", "function date2arr(date)\r\n{\r\n\t//\tdate = yyyy-mm-dd\r\n\tif(date != null && date.length > 0 && date.toLowerCase() != \"null\")\r\n\t{\r\n\t\tvar tmp = date.split(\"-\");\r\n\t\tvar arr = new Array();\r\n\t\tarr[0] = tmp[2];\r\n\t\tarr[1] = tmp[1];\r\n\t\tarr[2] = Number(tmp[0]);\r\n\t\treturn arr;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn null;\r\n\t}\r\n}", "function normalizeDate(year, month, day) {\n return [year.padStart(4, '2000'), month.padStart(2, '0'), day.padStart(2, '0')];\n }", "function transformSortDate(arr) {\n const sortedArray = arr.sort((a, b) => {\n return b.timestamp + a.timestamp;\n });\n return sortedArray;\n}", "function dateStringToObject(date){\n var splitString = date.split(\"-\");// gonna set up our YYYY-MM-DD format\n var dateObject = {}; // object variable we will push results to\n // date should have a year(1), month(2), day(3) array input\n dateObject.year = splitString[0];\n dateObject.month = splitString[1];\n dateObject.day = splitString[2];\n return dateObject;\n} //(OPTION 1)", "function textifyDates(myArr){\n \n \n for(var r=0; r < myArr.length; r++){\n for(var c=0; c < myArr[r].length; c++){\n if (Object.prototype.toString.call(myArr[r][c]) === '[object Date]'){\n try { \n //myArr[r] = myArr[r].toString();\n myArr[r] = Utilities.formatDate(myArr[r], \"GMT+08:00\", \"dd-MMM-yyyy\")\n } \n catch(err) { myArr[r][c] = err};\n }\n }\n }\n return myArr;\n}", "function dateToUnix(dateArr){\n var d = new Date(dateArr[2],months.indexOf(getMonth(dateArr)),dateArr[1].substr(0,dateArr[1].length-1),0,0,0,0);\n return d.valueOf() / 1000 -18000;\n}", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function gregorianDateArrToStr([year, month, day]): string {\n return moment.utc([year, month - 1, day]).format('YYYY-MM-DD');\n}", "function toDate(value){if(isDate(value)){return value;}if(typeof value==='number'&&!isNaN(value)){return new Date(value);}if(typeof value==='string'){value=value.trim();var parsedNb=parseFloat(value);// any string that only contains numbers, like \"1234\" but not like \"1234hello\"\nif(!isNaN(value-parsedNb)){return new Date(parsedNb);}if(/^(\\d{4}-\\d{1,2}-\\d{1,2})$/.test(value)){/* For ISO Strings without time the day, month and year must be extracted from the ISO String\n before Date creation to avoid time offset and errors in the new Date.\n If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n date, some browsers (e.g. IE 9) will throw an invalid Date error.\n If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n is applied.\n Note: ISO months are 0 for January, 1 for February, ... */var _a=Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__read\"])(value.split('-').map(function(val){return+val;}),3),y=_a[0],m=_a[1],d=_a[2];return new Date(y,m-1,d);}var match=void 0;if(match=value.match(ISO8601_DATE_REGEX)){return isoStringToDate(match);}}var date=new Date(value);if(!isDate(date)){throw new Error(\"Unable to convert \\\"\"+value+\"\\\" into a date\");}return date;}", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function convertDates(d) {\n\tfor (var i = d.length; i--;)\n\t\tconvertDateObj(d[i]);\n\treturn d;\n}", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [],\n currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [],\n currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [],\n currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function makeDateObjects(data){\r\n\t\tconsole.log(\"makeDateObjects\");\r\n\t\tfor (i = 0; i < data.length; i++){\r\n\t\t\tvar datestring = data[i][selectedOptions.dateField];\r\n\t\t\tvar thisYear = parseInt(datestring.substring(0,4));\r\n\t\t\tvar thisMonth = parseInt(datestring.substring(5,7));\r\n\t\t\tvar thisDay = parseInt(datestring.substring(8,10));\r\n\t\t\tvar thisDateComplete = new Date(thisYear, thisMonth-1, thisDay); // JS-Date Month begins at 0\r\n\t\t\tzaehlstellen_data[i][selectedOptions.dateField] = thisDateComplete;\r\n\t\t}\r\n\t}", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }" ]
[ "0.70562154", "0.70562154", "0.69697267", "0.6848421", "0.6635893", "0.6460555", "0.61294675", "0.6126646", "0.6066878", "0.60141927", "0.60141927", "0.60141927", "0.60141927", "0.60141927", "0.5960733", "0.5960733", "0.5960733", "0.5900434", "0.5883834", "0.58756566", "0.5868737", "0.5801809", "0.5768743", "0.5683228", "0.5648625", "0.5616403", "0.5611409", "0.55981857", "0.5559822", "0.55173147", "0.550106", "0.5437537", "0.5385925", "0.52918386", "0.5290659", "0.52872455", "0.52858603", "0.52858603", "0.52858603", "0.52858603", "0.52729636", "0.52587104", "0.5258395", "0.5257521", "0.5257521", "0.5257521", "0.5255037", "0.52537835", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076", "0.52474076" ]
0.0
-1
date from iso format
function configFromISO(config) { var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat; if (match) { getParsingFlags(config).iso = true; for (i = 0, l = isoDates.length; i < l; i++) { if (isoDates[i][1].exec(match[1])) { dateFormat = isoDates[i][0]; allowTime = isoDates[i][2] !== false; break; } } if (dateFormat == null) { config._isValid = false; return; } if (match[3]) { for (i = 0, l = isoTimes.length; i < l; i++) { if (isoTimes[i][1].exec(match[3])) { // match[2] should be 'T' or space timeFormat = (match[2] || ' ') + isoTimes[i][0]; break; } } if (timeFormat == null) { config._isValid = false; return; } } if (!allowTime && timeFormat != null) { config._isValid = false; return; } if (match[4]) { if (tzRegex.exec(match[4])) { tzFormat = 'Z'; } else { config._isValid = false; return; } } config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); configFromStringAndFormat(config); } else { config._isValid = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isoDate(date)\n{\n\treturn date.getFullYear() + \"-\" + (date.getMonth() + 1) + \"-\" + date.getDate()\n}", "function dateFromISO8601(isostr) {\n var parts = isostr.match(/\\d+/g);\n var date = new Date(parts[0], parts[1] - 1, parts[2], parts[3], parts[4], parts[5]);\n var mm = date.getMonth() + 1;\n mm = (mm < 10) ? '0' + mm : mm;\n var dd = date.getDate();\n dd = (dd < 10) ? '0' + dd : dd;\n var yyyy = date.getFullYear();\n var finaldate = mm + '/' + dd + '/' + yyyy;\n return finaldate;\n }", "function parseIsoDate(dateStr) {\n \tif(dateStr.length <10) return null;\n \tvar d = dateStr.substring(0,10).split('-');\t\n \tfor(var i in d) { \n \t\td[i]=parseInt(d[i]);\n \t};\n \td[1] = d[1] -1;//month;\n \tvar t = dateStr.substring(11,19).split(':');\n \treturn new Date(d[0],d[1],d[2],t[0],t[1],t[2]);\n }", "function ISOdate(d) {\r\n\ttry {\r\n\t\treturn d.toISOString().slice(0,10);\r\n\t}catch(e){\r\n\t\treturn 'Invalid ';\r\n\t}\r\n}", "function isoStringToDate(match){var date=new Date(0);var tzHour=0;var tzMin=0;// match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\nvar dateSetter=match[8]?date.setUTCFullYear:date.setFullYear;var timeSetter=match[8]?date.setUTCHours:date.setHours;// if there is a timezone defined like \"+01:00\" or \"+0100\"\nif(match[9]){tzHour=Number(match[9]+match[10]);tzMin=Number(match[9]+match[11]);}dateSetter.call(date,Number(match[1]),Number(match[2])-1,Number(match[3]));var h=Number(match[4]||0)-tzHour;var m=Number(match[5]||0)-tzMin;var s=Number(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}", "function datetoisostring() { // @return String:\r\n return uudate(this).ISO();\r\n}", "function parseISODate(str) {\n pieces = /(\\d{4})-(\\d{2})-(\\d{2})/g.exec(str);\n if (pieces === null)\n return null;\n var year = parseInt(pieces[1], 10),\n month = parseInt(pieces[2], 10),\n day = parseInt(pieces[3], 10);\n return new Date(year, month - 1, day); // In ISO, months are 1-12; in JavaScript, months are 0-11.\n }", "function toISODate(date) {\n return date.toISOString().split('T')[0];\n }", "convertISOToCalendarFormat(ISOdate) {\n const isoArray = ISOdate.toString().split(' ');\n let day = isoArray[2];\n const monthStr = isoArray[1];\n const year = isoArray[3];\n\n const month = convertMonthStringtoNumber(monthStr);\n\n day = day.length === 2 ? day : '0' + day;\n\n return year + '-' + month + '-' + day;\n }", "function dateFromIsoString(isoDateString) {\r\n return fastDateParse.apply(null, isoDateString.split(/\\D/));\r\n }", "function isoToDate(s) {\n if (s instanceof Date) { return s; }\n if (typeof s === 'string') { return new Date(s); }\n}", "function iso8601Decoder(isoStr) {\n return Date.parse(isoStr);\n }", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function parseIsoToTimestamp(_date) {\n if ( _date !== null ) {\n var s = $.trim(_date);\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/:00.000/, \"\");\n s = s.replace(/T/, \" \").replace(/Z/, \" UTC\");\n s = s.replace(/([\\+\\-]\\d\\d)\\:?(\\d\\d)/, \" $1$2\"); // -04:00 -> -0400\n return Number(new Date(s));\n }\n return null;\n }", "function convertDate( date ){\n\tvar day;\n\tvar month;\n\tvar year;\n\n\t//Extract year, month and day\n\tmonth = date.substr(0,2);\n\tday = date.substr(3,2);\n\tyear = date.substr(6);\n\n\t//compile the ynab compatible format\n\tdate = (year + \"-\" + month + \"-\" + day);\n\t\n\treturn date;\n}", "function amzDate(date, short) {\n const result = date.toISOString().replace(/[:\\-]|\\.\\d{3}/g, '').substr(0, 17)\n if (short) {\n return result.substr(0, 8)\n }\n return result\n}", "function parseISOString(s) {\n var b = s.split(/\\D+/);\n return new Date(Date.UTC(b[0], --b[1], b[2], b[3], b[4], 0, 0));\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function convertDate(date) {\n let day = date.substr(8, 2);\n let month = date.substr(5, 2);\n let year = date.substr(0, 4);\n date = day + \"/\" + month + \"/\" + year;\n return date;\n }", "function parseDate(isoString) {\n // Parse isoDateTimeString to JavaScript date object\n isoString = isoString.split('.', 1);\n return new Date(isoString[0] + '+00:00');\n }", "function isoDateFormat(strDateView) {\n return moment(strDateView, \"DD/MM/YYYY HH:mm\").format(\"YYYY-MM-DD HH:mm\")\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function _dateCoerce(obj) {\n return obj.toISOString();\n}", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 }", "function formatDateIso(date) {\n\tif (!date || date == null) {\n\t\treturn \"\";\n\t}\n\t\n\tvar jsDate = new Date(date);\n\t\n\t// get the calendar-date components of the iso date. \n\tvar YYYY = jsDate.getFullYear();\n\tvar MM = (jsDate.getMonth() + 1) < 10 ? '0' + (jsDate.getMonth() + 1) : (jsDate.getMonth() + 1); // month should be in the form 'MM'.\n\tvar DD = jsDate.getDate() < 10 ? '0' + jsDate.getDate() : jsDate.getDate(); // day should be in the form 'DD'.\n\t\n\t// get the clock-time components of the iso date.\n\tvar hh = jsDate.getHours() < 10 ? '0' + jsDate.getHours() : jsDate.getHours(); // hours should be in the form 'hh'.\n\tvar mm = jsDate.getMinutes() < 10 ? '0' + jsDate.getMinutes() : jsDate.getMinutes(); // minutes should be in the form 'mm'.\n\tvar ss = jsDate.getSeconds() < 10 ? '0' + jsDate.getSeconds() : jsDate.getSeconds(); // seconds should be in the form 'ss'.\n\tvar sss = '000'; //just hardcoded 000 for milliseconds...\n\t\n\t// assemble the iso date from the date and time components.\n\tvar isoDate = YYYY + '-' + MM + '-' + DD + 'T' + // add the date components.\n\t\thh + ':' + mm + ':' + ss + '.' + sss + 'Z'; // add the time components.\n\t\t\n\t// return the iso-formatted version of the date.\n\treturn isoDate;\n}", "function getDate(dateISO){ \n let appointmentDate = new Date(dateISO);\n const date = appointmentDate.getDate() +'/' + appointmentDate.getMonth() + '/'+ appointmentDate.getFullYear();\n return date;\n }", "static isoDateTime(date) {\n var pad;\n console.log('Util.isoDatetime()', date);\n console.log('Util.isoDatetime()', date.getUTCMonth().date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes, date.getUTCSeconds);\n pad = function(n) {\n if (n < 10) {\n return '0' + n;\n } else {\n return n;\n }\n };\n return date.getFullYear()(+'-' + pad(date.getUTCMonth() + 1) + '-' + pad(date.getUTCDate()) + 'T' + pad(date.getUTCHours()) + ':' + pad(date.getUTCMinutes()) + ':' + pad(date.getUTCSeconds()) + 'Z');\n }", "makeDateRFC3339(date) {\n var ret = this.dateStrings(date)\n return ret.year + \"-\" + ret.month + \"-\" + ret.day\n }", "function dateConverter(date){\r\n dateF = date.trim();\r\n let d = dateF.substring(0, 2);\r\n let m = dateF.substring(3,5);\r\n let y = dateF.substring(6,10);\r\n return(y +\"-\"+m+\"-\"+d);\r\n}", "function formatDateToISO(date) {\n return date.toISOString().split('T')[0];\n}", "function ISODateString(a){function b(a){return a<10?\"0\"+a:a}return a.getUTCFullYear()+\"-\"+b(a.getUTCMonth()+1)+\"-\"+b(a.getUTCDate())+\"T\"+b(a.getUTCHours())+\":\"+b(a.getUTCMinutes())+\":\"+b(a.getUTCSeconds())+\"Z\"}", "function isoToFormattedDate(timestamp) {\n\tvar date = new Date(timestamp);\n\treturn (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear();\n}", "isIsoFormat(value) {\n let dateRegex = RegExp('[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]$');\n return dateRegex.test(value);\n }", "function parseDateFormat(date) {\n return $filter('date')(date, 'yyyy-MM-dd');\n }", "function isoDateString(date, extended) {\n date = (date === undefined ? new Date() : date);\n var dash = (extended === 1 ? \"-\" : \"\");\n var yr = date.getFullYear();\n var dd = (\"0\" + date.getDate()).slice(-2);\n var mm = (\"0\" + (date.getMonth()+1)).slice(-2);\n \n return yr.toString() + dash +\n mm.toString() + dash +\n dd.toString();\n}", "function ISO_2022() {}", "function ISO_2022() {}", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 3; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return makeDateFromStringAndFormat(string, format + 'Z');\n }\n return new Date(string);\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n var ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }", "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 }", "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 }", "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 }", "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 }", "function get_date(d) {\n var date1 = new Date(d.substr(0, 4), d.substr(5, 2) - 1, d.substr(8, 2), d.substr(11, 2), d.substr(14, 2), d.substr(17, 2));\n return date1;\n }", "function convert_date(str){var tmp=str.split(\".\");return new Date(tmp[1]+\"/\"+tmp[0]+\"/\"+tmp[2])}", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function convertBritishToISO(date) {\r\n dateF = date.trim();\r\n let d = dateF.substring(0, 2);\r\n let m = dateF.substring(3,5);\r\n let y = dateF.substring(6,10);\r\n return(y +\"/\"+m+\"/\"+d);\r\n}", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n \n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function toISODate(date) { // yyyy-mm-dd\n \"use strict\";\n var yyyy, mm, dd;\n // JavaScript provides no simple way to format a date-only\n yyyy = \"\" + date.getFullYear();\n mm = date.getMonth() + 1; // Months go from 0 .. 11\n dd = date.getDate();\n // Need leading zeroes to form the yyyy-mm-dd pattern.\n if (mm < 10) {\n mm = \"0\" + mm; // This converts it to a string\n }\n if (dd < 10) {\n dd = \"0\" + dd; // This converts it to a string\n }\n return \"\" + yyyy + \"-\" + mm + \"-\" + dd;\n}", "function formatDate(isoDateStr) {\n var date = new Date(isoDateStr);\n var monthNames = [\n \"Jan\", \"Feb\", \"Mar\",\n \"Apr\", \"May\", \"Jun\", \"Jul\",\n \"Aug\", \"September\", \"Oct\",\n \"Nov\", \"Dec\"\n ];\n\n var day = date.getDate();\n var monthIndex = date.getMonth();\n var year = date.getFullYear();\n var yearStr = \"\";\n if (year != (new Date()).getFullYear()) {\n yearStr = \", \" + String(year);\n }\n\n return \" \" + monthNames[monthIndex] + \" \" + day + \" \" + yearStr;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function parseDate (date) {\n var d = '';\n var t = date.indexOf('T');\n let index = date.indexOf('-');\n \n if(index === -1 && t === 8){\n d += date.substring(0, 4) + '-';\n d += date.substring(4, 6) + '-';\n d += date.substring(6, 8) + date.substr(8);\n } else if (index > -1 && t === 10) {\n return date;\n } else {\n console.error('invalid date');\n return null;\n }\n return d;\n }", "function iso8601date() {\n var date = new Date();\n\n function pad(number) {\n return (number < 10 ? '0' : '') + number;\n }\n function pad3(number) {\n return (number < 10 ? '0' : (number < 100 ? '00' : '')) + number;\n }\n\n return date.getUTCFullYear() + '-' +\n pad(date.getUTCMonth() + 1) + '-' +\n pad(date.getUTCDay()) + ' ' +\n pad(date.getUTCHours()) + ':' +\n pad(date.getUTCMinutes()) + ':' +\n pad(date.getUTCSeconds()) + '.' +\n pad3(date.getUTCMilliseconds());\n}", "function toIsoDate(dateString) {\n var splitted = dateString.split(\"/\");\n return new Date(splitted[2], splitted[1] - 1, splitted[0]);\n}", "extractDateFormat() {\n const isoString = '2018-12-31T12:00:00.000Z' // example date\n\n const intlString = this.props.intl.formatDate(isoString) // generate a formatted date\n const dateParts = isoString.split('T')[0].split('-') // prepare to replace with pattern parts\n\n return intlString\n .replace(dateParts[2], 'dd')\n .replace(dateParts[1], 'MM')\n .replace(dateParts[0], 'yyyy')\n }", "makeDateObjectFromCompact(datestring) {\n if (datestring !== undefined && datestring.length === 8) {\n let year = parseInt(datestring.substring(0, 4))\n let month = parseInt(datestring.substring(4, 6)) - 1\n let day = parseInt(datestring.substring(6, 8))\n return new Date(year, month, day)\n } else {\n return \"\"\n }\n }", "function ISODateString(d){\n function pad(n){return n<10 ? '0'+n : n}\n return d.getUTCFullYear()+'-'\n + pad(d.getUTCMonth()+1)+'-'\n + pad(d.getUTCDate())+'T'\n + pad(d.getUTCHours())+':'\n + pad(d.getUTCMinutes())+':'\n + pad(d.getUTCSeconds())+'Z'}", "getFormattedDate ({ date }) {\n if (typeof date === 'string') {\n return format(parseISO(date), \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }\n return format(date, \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function FormatDate(date) {\n return new Date( parseInt( date.substr(6) ) );\n}", "function convertDate(dateIn)\n{\n let dateYear = dateIn.charAt(0);\n dateYear += dateIn.charAt(1);\n dateYear += dateIn.charAt(2);\n dateYear += dateIn.charAt(3);\n\n let dateMonth = dateIn.charAt(5) + dateIn.charAt(6);\n let dateDay = dateIn.charAt(8) + dateIn.charAt(9);\n\n let dateOut = dateDay + '-' + dateMonth + '-' + dateYear;\n return dateOut;\n}", "function convertDate(date) {\n let day = date.substring(8);\n let month = date.substring(5, 7);\n let year = date.substring(2,4);\n let newDate = `${month} /${day} /${year}`;\n return newDate;\n}", "function to_date(x){\n return new Date(x.substring(0,4), x.substring(5,7)-1, x.substring(8,10), x.substring(11,13), x.substring(14,16), x.substring(17,19));\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }" ]
[ "0.7161587", "0.7084152", "0.69561076", "0.68181574", "0.66757625", "0.66372114", "0.6559707", "0.6525335", "0.6466161", "0.6465599", "0.644205", "0.64171946", "0.6406543", "0.6406543", "0.6406543", "0.6406543", "0.63656497", "0.63241196", "0.6322188", "0.62742394", "0.62635076", "0.62635076", "0.62635076", "0.62635076", "0.6256379", "0.62237656", "0.6219025", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6187698", "0.6187633", "0.618634", "0.618634", "0.61794", "0.61792564", "0.6172095", "0.613812", "0.61320627", "0.6129032", "0.609373", "0.6090011", "0.6071324", "0.60647243", "0.6062863", "0.60613644", "0.60613644", "0.606091", "0.606091", "0.606091", "0.606091", "0.606091", "0.6034974", "0.6000997", "0.5995632", "0.5995632", "0.5995632", "0.5995632", "0.5985886", "0.59761006", "0.5967464", "0.5967464", "0.59647685", "0.59567374", "0.59377056", "0.5936541", "0.5930827", "0.5930827", "0.5930827", "0.5930827", "0.5930827", "0.5930065", "0.5928079", "0.59234697", "0.5912456", "0.5900138", "0.5890115", "0.5882479", "0.58786935", "0.58786935", "0.58709115", "0.58588386", "0.5855063", "0.585465", "0.58419347", "0.58419347", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354" ]
0.0
-1
date and time from ref 2822 format
function configFromRFC2822(config) { var match = rfc2822.exec(preprocessRFC2822(config._i)); if (match) { var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); if (!checkWeekday(match[1], parsedArray, config)) { return; } config._a = parsedArray; config._tzm = calculateOffset(match[8], match[9], match[10]); config._d = createUTCDate.apply(null, config._a); config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); getParsingFlags(config).rfc2822 = true; } else { config._isValid = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDrupalDateFromPieces(date, hour, minute, marker) {\n //Build time\n var time = hour + ':' + minute + ' ' + marker;\n //Build full date\n var dateTime = moment(date + ' ' + time, 'YYYY-MM-DD hh:mm A');\n //Return date in 24-hour format\n return moment(dateTime);\n }", "function createdOnParser(data) {\n let str = data.split('T');\n let date = str[0];\n let time = str[1].split('.')[0];\n return `${ date } at ${ time }`;\n }", "function render_datetime(data){\n\t var datetime = data.split(' ');\n\t var date = datetime[0].split('-').reverse().join('/');\n\t var time = datetime[1].substring(0,5);\n\t return date+' às '+time;\n\t}", "function longForm(){\n return Date.parse(date.split(\",\")[1].match(/[a-zA-Z0-9 \\:]+/)[0].trim().replace(\" at \", \" \"));\n }", "function dl(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function formatDate(date, format) {\n format = format + \"\";\n var result = \"\";\n var i_format = 0;\n var c = \"\";\n var token = \"\";\n var y = date.getYear() + \"\";\n var M = date.getMonth() + 1;\n var d = date.getDate();\n var E = date.getDay();\n var H = date.getHours();\n var m = date.getMinutes();\n var s = date.getSeconds();\n var yyyy, yy, MMM, MM, dd, hh, h, mm, ss, ampm, HH, H, KK, K, kk, k;\n // Convert real date parts into formatted versions\n var value = new Object();\n if (y.length < 4) {\n y = \"\" + (y - 0 + 1900);\n }\n value[\"y\"] = \"\" + y;\n value[\"yyyy\"] = y;\n value[\"yy\"] = y.substring(2, 4);\n value[\"M\"] = M;\n value[\"MM\"] = LZ(M);\n value[\"MMM\"] = MONTH_NAMES[M - 1];\n value[\"NNN\"] = MONTH_NAMES[M + 11];\n value[\"d\"] = d;\n value[\"dd\"] = LZ(d);\n value[\"E\"] = DAY_NAMES[E + 7];\n value[\"EE\"] = DAY_NAMES[E];\n value[\"H\"] = H;\n value[\"HH\"] = LZ(H);\n if (H == 0) {\n value[\"h\"] = 12;\n } else if (H > 12) {\n value[\"h\"] = H - 12;\n } else {\n value[\"h\"] = H;\n }\n value[\"hh\"] = LZ(value[\"h\"]);\n if (H > 11) {\n value[\"K\"] = H - 12;\n } else {\n value[\"K\"] = H;\n }\n value[\"k\"] = H + 1;\n value[\"KK\"] = LZ(value[\"K\"]);\n value[\"kk\"] = LZ(value[\"k\"]);\n if (H > 11) {\n value[\"a\"] = \"PM\";\n } else {\n value[\"a\"] = \"AM\";\n }\n value[\"m\"] = m;\n value[\"mm\"] = LZ(m);\n value[\"s\"] = s;\n value[\"ss\"] = LZ(s);\n while (i_format < format.length) {\n c = format.charAt(i_format);\n token = \"\";\n while ((format.charAt(i_format) == c) && (i_format < format.length)) {\n token += format.charAt(i_format++);\n }\n if (value[token] != null) {\n result = result + value[token];\n } else {\n result = result + token;\n }\n }\n return result;\n}", "function transformDateAndTime(datetime) {\n\t//console.log(\"Date Initial: \" + datetime);\n\tdatetime = datetime.replace(/[^0-9]/g, '');\n\t//console.log(\"Date First: \" + datetime);\n\tdatetime = datetime.substring(4,8) + datetime.substring(2, 4) + datetime.substring(0, 2) + \"T\" \n\t\t\t\t+ datetime.substring(8,14) + \"Z\";\n\treturn datetime;\n}", "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "makeDateRFC3339(date) {\n var ret = this.dateStrings(date)\n return ret.year + \"-\" + ret.month + \"-\" + ret.day\n }", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function gh_time(str, format) {\r\n if (!str) {\r\n return 'invalid date';\r\n }\r\n return str.replace(/T.+/, '');\r\n //var d = new Date(str.replace(/T/, ' ').replace(/Z/, ''));\r\n //return this.date(d, format);\r\n}", "function t(e,t,r){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[r]}", "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var o=\" \";return(e%100>=20||e>=100&&e%100==0)&&(o=\" de \"),e+o+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,a){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[a]}", "function readTime(){\n checkLen(8);\n var low = buf.readUInt32LE(pos);\n var high = buf.readUInt32LE(pos + 4) & 0x3FFFFFFF;\n var tz = (buf[pos + 7] & 0xc0) >> 6;\n pos += 8;\n return formDateString(high, low, tz);\n }", "function formatDate(date,format) {\r\n\tformat=format+\"\";\r\n\tvar result=\"\";\r\n\tvar i_format=0;\r\n\tvar c=\"\";\r\n\tvar token=\"\";\r\n\tvar y=date.getYear()+\"\";\r\n\tvar M=date.getMonth()+1;\r\n\tvar d=date.getDate();\r\n\tvar E=date.getDay();\r\n\tvar H=date.getHours();\r\n\tvar m=date.getMinutes();\r\n\tvar s=date.getSeconds();\r\n\tvar yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;\r\n\t// Convert real date parts into formatted versions\r\n\tvar value=new Object();\r\n\tif (y.length < 4) {y=\"\"+(y-0+1900);}\r\n\tvalue[\"y\"]=\"\"+y;\r\n\tvalue[\"yyyy\"]=y;\r\n\tvalue[\"yy\"]=y.substring(2,4);\r\n\tvalue[\"M\"]=M;\r\n\tvalue[\"MM\"]=LZ(M);\r\n\tvalue[\"MMM\"]=MONTH_NAMES[M-1];\r\n\tvalue[\"NNN\"]=MONTH_NAMES[M+11];\r\n\tvalue[\"d\"]=d;\r\n\tvalue[\"dd\"]=LZ(d);\r\n\tvalue[\"E\"]=DAY_NAMES[E+7];\r\n\tvalue[\"EE\"]=DAY_NAMES[E];\r\n\tvalue[\"H\"]=H;\r\n\tvalue[\"HH\"]=LZ(H);\r\n\tif (H==0){value[\"h\"]=12;}\r\n\telse if (H>12){value[\"h\"]=H-12;}\r\n\telse {value[\"h\"]=H;}\r\n\tvalue[\"hh\"]=LZ(value[\"h\"]);\r\n\tif (H>11){value[\"K\"]=H-12;} else {value[\"K\"]=H;}\r\n\tvalue[\"k\"]=H+1;\r\n\tvalue[\"KK\"]=LZ(value[\"K\"]);\r\n\tvalue[\"kk\"]=LZ(value[\"k\"]);\r\n\tif (H > 11) { value[\"a\"]=\"PM\"; }\r\n\telse { value[\"a\"]=\"AM\"; }\r\n\tvalue[\"m\"]=m;\r\n\tvalue[\"mm\"]=LZ(m);\r\n\tvalue[\"s\"]=s;\r\n\tvalue[\"ss\"]=LZ(s);\r\n\twhile (i_format < format.length) {\r\n\t\tc=format.charAt(i_format);\r\n\t\ttoken=\"\";\r\n\t\twhile ((format.charAt(i_format)==c) && (i_format < format.length)) {\r\n\t\t\ttoken += format.charAt(i_format++);\r\n\t\t\t}\r\n\t\tif (value[token] != null) { result=result + value[token]; }\r\n\t\telse { result=result + token; }\r\n\t\t}\r\n\treturn result;\r\n\t}", "function gexfDateString(date) {\n\tvar ye = '' + date.getFullYear();\n\tvar mo = '' + (date.getMonth() + 1);\n\tvar da = '' + date.getDate();\n\tvar ho = '' + date.getHours();\n\tvar mi = '' + date.getMinutes();\n\tvar se = '' + date.getSeconds();\n\twhile (mo.length < 2) mo = '0' + mo;\n\twhile (da.length < 2) da = '0' + da;\n\twhile (ho.length < 2) ho = '0' + ho;\n\twhile (mi.length < 2) mi = '0' + mi;\n\twhile (se.length < 2) se = '0' + se;\n\treturn [ye,'-',mo,'-',da,'T',ho,':',mi,':',se].join('');\n}", "function formatDate(date,format) {\r\n\tformat=format+\"\";\r\n\tvar result=\"\";\r\n\tvar i_format=0;\r\n\tvar c=\"\";\r\n\tvar token=\"\";\r\n\tvar y=date.getYear()+\"\";\r\n\tvar M=date.getMonth()+1;\r\n\tvar d=date.getDate();\r\n\tvar E=date.getDay();\r\n\tvar H=date.getHours();\r\n\tvar m=date.getMinutes();\r\n\tvar s=date.getSeconds();\r\n\tvar yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;\r\n\t// Convert real date parts into formatted versions\r\n\tvar value=new Array();\r\n\tif (y.length < 4) {\t\r\n\t\ty=\"\"+(y-0+1900);\r\n\t}\r\n\tvalue[\"y\"]=\"\"+y;\r\n\tvalue[\"yyyy\"]=y;\r\n\tvalue[\"yy\"]=y.substring(2,4);\r\n\tvalue[\"M\"]=M;\r\n\tvalue[\"MM\"]=LZ(M);\r\n\tvalue[\"MMM\"]=MONTH_NAMES[M-1];\r\n\tvalue[\"NNN\"]=MONTH_NAMES[M+11];\r\n\tvalue[\"d\"]=d;\r\n\tvalue[\"dd\"]=LZ(d);\r\n\tvalue[\"E\"]=DAY_NAMES[E+7];\r\n\tvalue[\"EE\"]=DAY_NAMES[E];\r\n\tvalue[\"H\"]=H;\r\n\tvalue[\"HH\"]=LZ(H);\r\n\tif (H==0){value[\"h\"]=12;}\r\n\telse if (H>12){value[\"h\"]=H-12;}\r\n\telse {value[\"h\"]=H;}\r\n\tvalue[\"hh\"]=LZ(value[\"h\"]);\r\n\tif (H>11){value[\"K\"]=H-12;} else {value[\"K\"]=H;}\r\n\tvalue[\"k\"]=H+1;\r\n\tvalue[\"KK\"]=LZ(value[\"K\"]);\r\n\tvalue[\"kk\"]=LZ(value[\"k\"]);\r\n\tif (H > 11) { value[\"a\"]=\"PM\"; }\r\n\telse { value[\"a\"]=\"AM\"; }\r\n\tvalue[\"m\"]=m;\r\n\tvalue[\"mm\"]=LZ(m);\r\n\tvalue[\"s\"]=s;\r\n\tvalue[\"ss\"]=LZ(s);\r\n\twhile (i_format < format.length) {\r\n\t\tc=format.charAt(i_format);\r\n\t\ttoken=\"\";\r\n\t\twhile ((format.charAt(i_format)==c) && (i_format < format.length)) {\r\n\t\t\ttoken += format.charAt(i_format++);\r\n\t\t\t}\r\n\t\tif (value[token] != null) { result=result + value[token]; }\r\n\t\telse { result=result + token; }\r\n\t\t}\r\n\treturn result;\r\n\t}", "function process_date(date) {\n var ts = date.split('-'), dpart=[], hpart=[];\n\n function t2s(t) {\n if (!t) { return '00'; }\n return ( +t < 10 ? '0' : '' ) + t;\n }\n\n for (i=0; i<3; i++) { //u\n dpart.push(t2s(ts[i]));\n }\n for (i=3; i<6; i++) {\n hpart.push(t2s(ts[i]));\n }\n\n return dpart.join('/') + ' ' + hpart.join(':');\n }", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,r){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[r]}", "function t(e,t,a){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[a]}", "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,n){var r=\" \";return(t%100>=20||t>=100&&t%100==0)&&(r=\" de \"),t+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,r){var n=\" \";return(t%100>=20||t>=100&&t%100==0)&&(n=\" de \"),t+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[r]}", "function convertDate(time) {\n\tif (time == undefined || time.length != 19) {\n\t\tconsole.log(\"Time is not valid!\" + \" (1064)\");\n\t\treturn new Date();\n\t}\n\tvar d = new Date(time.substring(6,10), time.substring(3,5), time.substring(0,2), time.substring(11,13), time.substring(14,16), time.substring(17,19));\n\tconsole.log(\"Converted time from \" + time + \" to \" + d + \" (1065)\");\n\treturn d;\n}", "function e(t,e,n){var r=\" \";return(t%100>=20||t>=100&&t%100==0)&&(r=\" de \"),t+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function cubism_graphiteFormatDate(time) {\n return Math.floor(time / 1000);\n}", "function cubism_graphiteFormatDate(time) {\n return Math.floor(time / 1000);\n}", "function a(e,a,t){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[t]}", "static _extractDateParts(date){return{day:date.getDate(),month:date.getMonth(),year:date.getFullYear()}}", "function t(a,r,_){var l={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"s\\u0103pt\\u0103m\\xE2ni\",MM:\"luni\",yy:\"ani\"},h=\" \";return(a%100>=20||a>=100&&a%100==0)&&(h=\" de \"),a+h+l[_]}", "function dateFormat(datum){\n \t\t\tvar day = datum.getDay();\n \t\t\tvar date = datum.getDate();\n \t\t\tvar month = datum.getMonth();\n \t\t\tvar year = datum.getYear();\n \t\t\tvar hour = datum.getHours();\n \t\t\tvar minutes = datum.getMinutes();\n\t\t}", "toFinnishTime(date) {\n //var date = new Date();\n date.setHours(date.getHours()+2);\n return date.toJSON().replace(/T/, ' ').replace(/\\..+/, '');\n }", "parseOracleDate(buf, useLocalTime = true) {\n let fseconds = 0;\n if (buf.length >= 11) {\n fseconds = Math.floor(buf.readUInt32BE(7) / (1000 * 1000));\n }\n const year = (buf[0] - 100) * 100 + buf[1] - 100;\n return settings._makeDate(useLocalTime, year, buf[2], buf[3], buf[4] - 1,\n buf[5] - 1, buf[6] - 1, fseconds, 0);\n }", "getReadableDate (timestamp) {\n try {\n const _date = new Date(timestamp * 1000).toISOString().slice(0, 10)\n const _time = new Date(timestamp * 1000).toISOString().slice(11, 19)\n\n return `${_date} ${_time}`\n } catch (error) {\n console.error(error)\n }\n }", "function convertDate(date, time) {\n\tvar y = eval(date.substring(0, 4));\n\tvar m = eval(date.substring(5, 7));\n\tvar d = eval(date.substring(8, 10));\n\t\n\t// Assume toDateString() returns a string like 'Thu Jul 08 2010'\n\tvar str = new Date(y, m - 1, d).toDateString().substring(0, 10);\n\t\n\tif (time.indexOf(':') >= 0) {\n\t\tstr += ', ' + twentyFourHourToTwelveHour(time.substring(0, 5));\t\n\t}\n\treturn str;\n}", "function get_formatted_date(date) {\n function get_formatted_num(num, expected_length) {\n var str = \"\";\n var num_str = num.toString();\n var num_zeros = expected_length - num_str.length;\n for (var i = 0; i < num_zeros; ++i) {\n str += '0';\n }\n str += num_str;\n return str;\n }\n var msg = get_formatted_num(date.getFullYear(), 4) + \"-\";\n msg += get_formatted_num(date.getMonth() + 1, 2) + \"-\";\n msg += get_formatted_num(date.getDate(), 2) + \" \";\n msg += get_formatted_num(date.getHours(), 2) + \":\";\n msg += get_formatted_num(date.getMinutes(), 2) + \":\";\n msg += get_formatted_num(date.getSeconds(), 2);\n return msg;\n}", "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";if(e%100>=20||e>=100&&e%100===0){o=\" de \"}return e+o+r[n]}", "function datehashrfc() { // @return RFC1123DateString: \"Wed, 16 Sep 2009 16:18:14 GMT\"\r\n var rv = (new Date(this.time)).toUTCString();\r\n\r\n if (uu.ie && rv.indexOf(\"UTC\") > 0) {\r\n // http://d.hatena.ne.jp/uupaa/20080515\r\n\r\n rv = rv.replace(/UTC/, \"GMT\");\r\n (rv.length < 29) && (rv = rv.replace(/, /, \", 0\")); // [IE] fix format\r\n }\r\n return rv;\r\n}", "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},a=\" \";if(e%100>=20||e>=100&&e%100===0){a=\" de \"}return e+a+r[n]}", "function filenameToReadableDate(filename) {\n var split = filename.split('T');\n var date = split[0].split('_')[2].split('-');\n var time = split[1].substr(0, 4);\n return date[2] + '/' + date[1] + '/' + date[0] + ' at ' + time.substr(0, 2) + ':' + time.substr(2, 4);\n }", "function ms(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function formatDateAndTime(datetime)\n{\n\treturn datetime.substring(9, 11)+\":\"+datetime.substring(11,13)+\":\"+datetime.substring(13,15)\n\t\t\t+\" \"+datetime.substring(6,8)+\"-\"+datetime.substring(4,6)+\"-\"+datetime.substring(0,4);\n}", "function getTime(time) {\n time = time.toString().split(' ');\n var month = new Date(Date.parse(time[1] +\" 1, 2000\")).getMonth()+1\n var hms = time[4].split(':');\n var new_time = time[3] + '-' + (\"00\" + month).slice(-2) + '-' + time[2] + 'T' + hms[0] + ':' + hms[1] + ':' + hms[2] + '.000Z';\n return new_time;\n }", "function parseDate (date) {\n var d = '';\n var t = date.indexOf('T');\n let index = date.indexOf('-');\n \n if(index === -1 && t === 8){\n d += date.substring(0, 4) + '-';\n d += date.substring(4, 6) + '-';\n d += date.substring(6, 8) + date.substr(8);\n } else if (index > -1 && t === 10) {\n return date;\n } else {\n console.error('invalid date');\n return null;\n }\n return d;\n }", "function parse_external_time(text, success) {\n var time = TIME_RE.exec(text);\n if (time != null) {\n time = new Date(time[1].trim()).getTime();\n success(time);\n }\n}", "function cut_date(register_date){\n let register_date_string = register_date.toISOString();\n let split_date = register_date_string.split(\"T\")[1];\n let split_time = split_date.split(\".\")[0];\n return split_time;\n}", "function e(e,t,n){return e+(20<=e%100||100<=e&&e%100==0?\" de \":\" \")+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}" ]
[ "0.653082", "0.63895303", "0.6154629", "0.6096161", "0.60804975", "0.605977", "0.60540193", "0.605324", "0.605324", "0.605324", "0.605324", "0.6040541", "0.6028883", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.60169667", "0.59945226", "0.59771127", "0.597495", "0.597495", "0.596328", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5933974", "0.59314626", "0.5928641", "0.59284973", "0.59065413", "0.5901136", "0.58995897", "0.58995897", "0.58995897", "0.58995897", "0.58909506", "0.58909506", "0.58909506", "0.58909506", "0.5867927", "0.5867427", "0.5847704", "0.5847463", "0.58446264", "0.5814297", "0.58098656", "0.5782785", "0.5782785", "0.5782707", "0.5776116", "0.57668716", "0.57485163", "0.5724437", "0.5722063", "0.5720733", "0.5718697", "0.5715817", "0.5714077", "0.56996375", "0.56862354", "0.56841004", "0.56840295", "0.56804836", "0.5677643", "0.56740606", "0.567262", "0.5671365", "0.56699353" ]
0.0
-1
date from iso format or fallback
function configFromString(config) { var matched = aspNetJsonRegex.exec(config._i); if (matched !== null) { config._d = new Date(+matched[1]); return; } configFromISO(config); if (config._isValid === false) { delete config._isValid; } else { return; } configFromRFC2822(config); if (config._isValid === false) { delete config._isValid; } else { return; } // Final attempt, use Input Fallback hooks.createFromInputFallback(config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isoToDate(s) {\n if (s instanceof Date) { return s; }\n if (typeof s === 'string') { return new Date(s); }\n}", "function isoStringToDate(match){var date=new Date(0);var tzHour=0;var tzMin=0;// match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\nvar dateSetter=match[8]?date.setUTCFullYear:date.setFullYear;var timeSetter=match[8]?date.setUTCHours:date.setHours;// if there is a timezone defined like \"+01:00\" or \"+0100\"\nif(match[9]){tzHour=Number(match[9]+match[10]);tzMin=Number(match[9]+match[11]);}dateSetter.call(date,Number(match[1]),Number(match[2])-1,Number(match[3]));var h=Number(match[4]||0)-tzHour;var m=Number(match[5]||0)-tzMin;var s=Number(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}", "function parseIsoDate(dateStr) {\n \tif(dateStr.length <10) return null;\n \tvar d = dateStr.substring(0,10).split('-');\t\n \tfor(var i in d) { \n \t\td[i]=parseInt(d[i]);\n \t};\n \td[1] = d[1] -1;//month;\n \tvar t = dateStr.substring(11,19).split(':');\n \treturn new Date(d[0],d[1],d[2],t[0],t[1],t[2]);\n }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function ISOdate(d) {\r\n\ttry {\r\n\t\treturn d.toISOString().slice(0,10);\r\n\t}catch(e){\r\n\t\treturn 'Invalid ';\r\n\t}\r\n}", "function isoDate(date)\n{\n\treturn date.getFullYear() + \"-\" + (date.getMonth() + 1) + \"-\" + date.getDate()\n}", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "isIsoFormat(value) {\n let dateRegex = RegExp('[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]$');\n return dateRegex.test(value);\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n\t\tparseISO(config);\n\t\tif (config._isValid === false) {\n\t\t\tdelete config._isValid;\n\t\t\tmoment.createFromInputFallback(config);\n\t\t}\n\t}", "function parseISODate(str) {\n pieces = /(\\d{4})-(\\d{2})-(\\d{2})/g.exec(str);\n if (pieces === null)\n return null;\n var year = parseInt(pieces[1], 10),\n month = parseInt(pieces[2], 10),\n day = parseInt(pieces[3], 10);\n return new Date(year, month - 1, day); // In ISO, months are 1-12; in JavaScript, months are 0-11.\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function dateFromISO8601(isostr) {\n var parts = isostr.match(/\\d+/g);\n var date = new Date(parts[0], parts[1] - 1, parts[2], parts[3], parts[4], parts[5]);\n var mm = date.getMonth() + 1;\n mm = (mm < 10) ? '0' + mm : mm;\n var dd = date.getDate();\n dd = (dd < 10) ? '0' + dd : dd;\n var yyyy = date.getFullYear();\n var finaldate = mm + '/' + dd + '/' + yyyy;\n return finaldate;\n }", "function validateDateFormat(sDateToBeProcressed) {\r\n \"use strict\";\r\n var oDates = new Date(sDateToBeProcressed);\r\n if (isNaN(oDates)) {\r\n var arrSplitedDate = sDateToBeProcressed.replace(/[-]/g, \"/\");\r\n arrSplitedDate = arrSplitedDate.split(\"/\");\r\n var sFormattedDate = arrSplitedDate[1] + \"-\" + arrSplitedDate[0] + \"-\" + arrSplitedDate[2];\r\n oDates = new Date(sFormattedDate);\r\n }\r\n return oDates.toISOString();\r\n}", "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 }", "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 }", "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 }", "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 }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function parseIsoToTimestamp(_date) {\n if ( _date !== null ) {\n var s = $.trim(_date);\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/:00.000/, \"\");\n s = s.replace(/T/, \" \").replace(/Z/, \" UTC\");\n s = s.replace(/([\\+\\-]\\d\\d)\\:?(\\d\\d)/, \" $1$2\"); // -04:00 -> -0400\n return Number(new Date(s));\n }\n return null;\n }", "function dateFromIsoString(isoDateString) {\r\n return fastDateParse.apply(null, isoDateString.split(/\\D/));\r\n }", "deserialize(value) {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }", "deserialize(value) {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }", "deserialize(value) {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }", "getFormattedDate ({ date }) {\n if (typeof date === 'string') {\n return format(parseISO(date), \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }\n return format(date, \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }", "function universal() {\n return doFormat(date, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'long',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit'\n });\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n var ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function configFromISO(config) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils_type_checks__[\"b\" /* isString */])(config._i)) {\n return config;\n }\n var input = config._i;\n var match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);\n var allowTime;\n var dateFormat;\n var timeFormat;\n var tzFormat;\n if (!match) {\n config._isValid = false;\n return config;\n }\n // getParsingFlags(config).iso = true;\n var i;\n var l;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return config;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return config;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return config;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n }\n else {\n config._isValid = false;\n return config;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__from_string_and_format__[\"a\" /* configFromStringAndFormat */])(config);\n}", "function parseDateFormat(date) {\n return $filter('date')(date, 'yyyy-MM-dd');\n }", "function configFromISO(config) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__utils_type_checks__[\"i\" /* isString */])(config._i)) {\n return config;\n }\n var input = config._i;\n var match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);\n var allowTime;\n var dateFormat;\n var timeFormat;\n var tzFormat;\n if (!match) {\n config._isValid = false;\n return config;\n }\n // getParsingFlags(config).iso = true;\n var i;\n var l;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return config;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return config;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return config;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n }\n else {\n config._isValid = false;\n return config;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n return Object(__WEBPACK_IMPORTED_MODULE_2__from_string_and_format__[\"a\" /* configFromStringAndFormat */])(config);\n}", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 3; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return makeDateFromStringAndFormat(string, format + 'Z');\n }\n return new Date(string);\n }", "normalize(str) {\n if (str && !CommonUtils.isDate(str)) {\n var match = str.match(/^(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})$/);\n if (match) {\n return new Date(match[3], match[2] - 1, match[1]);\n }\n match = str.match(/^(\\d{4})-(\\d{1,2})-(\\d{1,2})$/);\n if (match) {\n return new Date(match[1], match[2] - 1, match[3]);\n }\n }\n }", "function parseDate (date) {\n var d = '';\n var t = date.indexOf('T');\n let index = date.indexOf('-');\n \n if(index === -1 && t === 8){\n d += date.substring(0, 4) + '-';\n d += date.substring(4, 6) + '-';\n d += date.substring(6, 8) + date.substr(8);\n } else if (index > -1 && t === 10) {\n return date;\n } else {\n console.error('invalid date');\n return null;\n }\n return d;\n }", "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 }", "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 }", "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 }", "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 }", "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 }", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "convertDateToISOString(date) {\n if (date) return moment(date, defaultDateFormat).toISOString();\n return date;\n }", "function isoDateFormat(strDateView) {\n return moment(strDateView, \"DD/MM/YYYY HH:mm\").format(\"YYYY-MM-DD HH:mm\")\n}", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n \n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n var ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function _dateCoerce(obj) {\n return obj.toISOString();\n}", "function configFromISO(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat;if(match){getParsingFlags(config).iso=true;for(i=0,l=isoDates.length;i<l;i++){if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0];allowTime=isoDates[i][2]!==false;break;}}if(dateFormat==null){config._isValid=false;return;}if(match[3]){for(i=0,l=isoTimes.length;i<l;i++){if(isoTimes[i][1].exec(match[3])){// match[2] should be 'T' or space\r\n\ttimeFormat=(match[2]||' ')+isoTimes[i][0];break;}}if(timeFormat==null){config._isValid=false;return;}}if(!allowTime&&timeFormat!=null){config._isValid=false;return;}if(match[4]){if(tzRegex.exec(match[4])){tzFormat='Z';}else{config._isValid=false;return;}}config._f=dateFormat+(timeFormat||'')+(tzFormat||'');configFromStringAndFormat(config);}else{config._isValid=false;}}// date from iso format or fallback", "function configFromISO(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat;if(match){getParsingFlags(config).iso=true;for(i=0,l=isoDates.length;i<l;i++){if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0];allowTime=isoDates[i][2]!==false;break;}}if(dateFormat==null){config._isValid=false;return;}if(match[3]){for(i=0,l=isoTimes.length;i<l;i++){if(isoTimes[i][1].exec(match[3])){// match[2] should be 'T' or space\r\n\ttimeFormat=(match[2]||' ')+isoTimes[i][0];break;}}if(timeFormat==null){config._isValid=false;return;}}if(!allowTime&&timeFormat!=null){config._isValid=false;return;}if(match[4]){if(tzRegex.exec(match[4])){tzFormat='Z';}else{config._isValid=false;return;}}config._f=dateFormat+(timeFormat||'')+(tzFormat||'');configFromStringAndFormat(config);}else{config._isValid=false;}}// date from iso format or fallback", "function ISO_2022() {}", "function ISO_2022() {}", "function iso8601Decoder(isoStr) {\n return Date.parse(isoStr);\n }", "function parseISO(config) {\n\t var i, l,\n\t string = config._i,\n\t match = isoRegex.exec(string);\n\n\t if (match) {\n\t config._pf.iso = true;\n\t for (i = 0, l = isoDates.length; i < l; i++) {\n\t if (isoDates[i][1].exec(string)) {\n\t // match[5] should be 'T' or undefined\n\t config._f = isoDates[i][0] + (match[6] || ' ');\n\t break;\n\t }\n\t }\n\t for (i = 0, l = isoTimes.length; i < l; i++) {\n\t if (isoTimes[i][1].exec(string)) {\n\t config._f += isoTimes[i][0];\n\t break;\n\t }\n\t }\n\t if (string.match(parseTokenTimezone)) {\n\t config._f += 'Z';\n\t }\n\t makeDateFromStringAndFormat(config);\n\t } else {\n\t config._isValid = false;\n\t }\n\t }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }" ]
[ "0.6913624", "0.6697844", "0.6643611", "0.6552669", "0.6552669", "0.6519266", "0.6491801", "0.64860713", "0.64487875", "0.6430311", "0.6430311", "0.6409434", "0.6409434", "0.6405906", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.64035094", "0.6384894", "0.6371263", "0.6366427", "0.6366427", "0.6366427", "0.6366427", "0.6366427", "0.63095236", "0.6302484", "0.6295522", "0.6295522", "0.6295522", "0.6295522", "0.6294574", "0.6294574", "0.6294574", "0.6294574", "0.62373596", "0.6227967", "0.6222042", "0.6222042", "0.6222042", "0.62173617", "0.61798114", "0.61659384", "0.6165577", "0.6165577", "0.6165577", "0.6165577", "0.6165577", "0.615875", "0.615875", "0.6147575", "0.61240005", "0.6118749", "0.6117109", "0.6109845", "0.61082906", "0.610221", "0.610221", "0.610221", "0.610221", "0.610221", "0.6069877", "0.60561746", "0.60528284", "0.6049872", "0.6009127", "0.6007327", "0.60049343", "0.60049343", "0.5987299", "0.5987299", "0.59798896", "0.59737253", "0.59708536", "0.59708536", "0.59708536", "0.5970643", "0.5970643", "0.5970643", "0.5970643", "0.5970643", "0.5970643" ]
0.0
-1
date from string and format string
function configFromStringAndFormat(config) { // TODO: Move this to another part of the creation flow to prevent circular deps if (config._f === hooks.ISO_8601) { configFromISO(config); return; } if (config._f === hooks.RFC_2822) { configFromRFC2822(config); return; } config._a = []; getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` var string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0; tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; for (i = 0; i < tokens.length; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, // 'regex', getParseRegexForToken(token, config)); if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { getParsingFlags(config).unusedInput.push(skipped); } string = string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength += parsedInput.length; } // don't parse if it's not a known token if (formatTokenFunctions[token]) { if (parsedInput) { getParsingFlags(config).empty = false; } else { getParsingFlags(config).unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { getParsingFlags(config).unusedTokens.push(token); } } // add remaining unparsed input length to the string getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { getParsingFlags(config).unusedInput.push(string); } // clear _12h flag if hour is <= 12 if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { getParsingFlags(config).bigHour = undefined; } getParsingFlags(config).parsedDateParts = config._a.slice(0); getParsingFlags(config).meridiem = config._meridiem; // handle meridiem config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); configFromArray(config); checkOverflow(config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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];\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 }", "function format_date(d_str) {\n return new Date(d_str.replace(/(\\d{2}).(\\d{2}).(\\d{4})/, \"$2/$1/$3\"))\n}", "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 }", "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 }", "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 }", "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 }", "function makeDateFromStringAndFormat(config) {\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;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens);\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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "function get_date_from_string(date_str){\n var parts =date_str.split('-');\n if(parts[0].length == 6){\n // working with date format DDMMYY\n var date_list = parts[0].match(/.{1,2}/g);\n var result_date = new Date(date_list[2].padStart(4, '20'), date_list[1]-1, date_list[0])\n return result_date;\n }else if(parts[0].length == 2){\n var result_date = new Date(parts[2].padStart(4, '20'), parts[1]-1, parts[0]);\n return result_date;\n }else{\n // unknown format. Do nothing\n return\n }\n}", "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 }", "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 }", "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 }", "function parseDate(str) {\n var m = str.match(/^(\\d{4})\\-(\\d{1,2})\\-(\\d{1,2})/);\n return (m) ? `${m[2]}/${m[3]}/${m[1]}` : null;\n}", "function convert_date(str){var tmp=str.split(\".\");return new Date(tmp[1]+\"/\"+tmp[0]+\"/\"+tmp[2])}", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "function str2date(str) {\n\t\t\ttry {\n\t\t\t\tvar t = (str).split(/[- :]/);\n\t\t\t\treturn new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);\n\t\t\t} catch (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t}", "function str2date(str) {\n\t\t\ttry {\n\t\t\t\tvar t = (str).split(/[- :]/);\n\t\t\t\treturn new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);\n\t\t\t} catch (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t}", "function makeDateFromStringAndFormat(string, format) {\n var inArray = [0, 0, 1, 0, 0, 0, 0],\n timezoneHours = 0,\n timezoneMinutes = 0,\n isUsingUTC = false,\n inputParts = string.match(inputCharacters),\n formatParts = format.match(tokenCharacters),\n len = Math.min(inputParts.length, formatParts.length),\n i,\n isPm;\n\n // function to convert string input to date\n function addTime(format, input) {\n var a;\n switch (format) {\n // MONTH\n case 'M' :\n // fall through to MM\n case 'MM' :\n inArray[1] = ~~input - 1;\n break;\n case 'MMM' :\n // fall through to MMMM\n case 'MMMM' :\n for (a = 0; a < 12; a++) {\n if (moment.monthsParse[a].test(input)) {\n inArray[1] = a;\n break;\n }\n }\n break;\n // DAY OF MONTH\n case 'D' :\n // fall through to DDDD\n case 'DD' :\n // fall through to DDDD\n case 'DDD' :\n // fall through to DDDD\n case 'DDDD' :\n inArray[2] = ~~input;\n break;\n // YEAR\n case 'YY' :\n input = ~~input;\n inArray[0] = input + (input > 70 ? 1900 : 2000);\n break;\n case 'YYYY' :\n inArray[0] = ~~Math.abs(input);\n break;\n // AM / PM\n case 'a' :\n // fall through to A\n case 'A' :\n isPm = (input.toLowerCase() === 'pm');\n break;\n // 24 HOUR\n case 'H' :\n // fall through to hh\n case 'HH' :\n // fall through to hh\n case 'h' :\n // fall through to hh\n case 'hh' :\n inArray[3] = ~~input;\n break;\n // MINUTE\n case 'm' :\n // fall through to mm\n case 'mm' :\n inArray[4] = ~~input;\n break;\n // SECOND\n case 's' :\n // fall through to ss\n case 'ss' :\n inArray[5] = ~~input;\n break;\n // TIMEZONE\n case 'Z' :\n // fall through to ZZ\n case 'ZZ' :\n isUsingUTC = true;\n a = (input || '').match(timezoneParseRegex);\n if (a && a[1]) {\n timezoneHours = ~~a[1];\n }\n if (a && a[2]) {\n timezoneMinutes = ~~a[2];\n }\n // reverse offsets\n if (a && a[0] === '+') {\n timezoneHours = -timezoneHours;\n timezoneMinutes = -timezoneMinutes;\n }\n break;\n }\n }\n for (i = 0; i < len; i++) {\n addTime(formatParts[i], inputParts[i]);\n }\n // handle am pm\n if (isPm && inArray[3] < 12) {\n inArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (isPm === false && inArray[3] === 12) {\n inArray[3] = 0;\n }\n // handle timezone\n inArray[3] += timezoneHours;\n inArray[4] += timezoneMinutes;\n // return\n return isUsingUTC ? new Date(Date.UTC.apply({}, inArray)) : dateFromArray(inArray);\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function dateParser(strDate, format){\nif(!checkValidDate(strDate))\nreturn new Date();\n\nvar slash1 = strDate.indexOf(\"/\");\nif (slash1 == -1) { slash1 = strDate.indexOf(\"-\"); }\n// if no slashes or dashes, invalid date\nif (slash1 == -1) { return false; }\nvar dateYear = strDate.substring(0, slash1);\nvar dateYearAndMonth = strDate.substring(slash1+1, strDate.length);\nvar slash2 = dateYearAndMonth.indexOf(\"/\");\nif (slash2 == -1) { slash2 = dateYearAndMonth.indexOf(\"-\"); }\n// if not a second slash or dash, invalid date\nif (slash2 == -1) { return false; }\nvar dateMonth = dateYearAndMonth.substring(0, slash2);\nvar dateDay = dateYearAndMonth.substring(slash2+1, dateYearAndMonth.length);\nvar retDate = new Date(dateYear,dateMonth-1,dateDay);\nreturn retDate;\n}", "function stringToDate(_date,_format,_delimiter)\r\n{\r\n var formatLowerCase=_format.toLowerCase();\r\n var formatItems=formatLowerCase.split(_delimiter);\r\n var dateItems=_date.split(_delimiter);\r\n var monthIndex=formatItems.indexOf(\"mm\");\r\n var dayIndex=formatItems.indexOf(\"dd\");\r\n var yearIndex=formatItems.indexOf(\"yyyy\");\r\n var month=parseInt(dateItems[monthIndex]);\r\n month-=1;\r\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\r\n return formatedDate;\r\n}", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return parseTokenTimezone.exec(string) ? \n makeDateFromStringAndFormat(string, format + ' Z') :\n makeDateFromStringAndFormat(string, format);\n }\n return new Date(string);\n }", "function stringToDate(_date,_format,_delimiter)\n{\n var formatLowerCase=_format.toLowerCase();\n var formatItems=formatLowerCase.split(_delimiter);\n var dateItems=_date.split(_delimiter);\n var monthIndex=formatItems.indexOf(\"mm\");\n var dayIndex=formatItems.indexOf(\"dd\");\n var yearIndex=formatItems.indexOf(\"yyyy\");\n var month=parseInt(dateItems[monthIndex]);\n month-=1;\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\n return formatedDate;\n}", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 3; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return makeDateFromStringAndFormat(string, format + 'Z');\n }\n return new Date(string);\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function $dateFromString(obj, expr, options) {\n var args = core_1.computeValue(obj, expr, null, options);\n args.format = args.format || _internal_1.DATE_FORMAT;\n args.onNull = args.onNull || null;\n var dateString = args.dateString;\n if (util_1.isNil(dateString))\n return args.onNull;\n // collect all separators of the format string\n var separators = args.format.split(/%[YGmdHMSLuVzZ]/);\n separators.reverse();\n var matches = args.format.match(/(%%|%Y|%G|%m|%d|%H|%M|%S|%L|%u|%V|%z|%Z)/g);\n var dateParts = {};\n // holds the valid regex of parts that matches input date string\n var expectedPattern = \"\";\n for (var i = 0, len = matches.length; i < len; i++) {\n var formatSpecifier = matches[i];\n var props = _internal_1.DATE_SYM_TABLE[formatSpecifier];\n if (util_1.isObject(props)) {\n // get pattern and alias from table\n var m = props.re.exec(dateString);\n // get the next separtor\n var delimiter = separators.pop() || \"\";\n if (m !== null) {\n // store and cut out matched part\n dateParts[props.name] = /^\\d+$/.exec(m[0]) ? parseInt(m[0]) : m[0];\n dateString =\n dateString.substr(0, m.index) +\n dateString.substr(m.index + m[0].length);\n // construct expected pattern\n expectedPattern +=\n _internal_1.regexQuote(delimiter) + _internal_1.regexStrip(props.re.toString());\n }\n else {\n dateParts[props.name] = null;\n }\n }\n }\n // 1. validate all required date parts exists\n // 2. validate original dateString against expected pattern.\n if (util_1.isNil(dateParts.year) ||\n util_1.isNil(dateParts.month) ||\n util_1.isNil(dateParts.day) ||\n !new RegExp(\"^\" + expectedPattern + \"$\").exec(args.dateString))\n return args.onError;\n var tz = _internal_1.parseTimezone(args.timezone);\n // create the date. month is 0-based in Date\n var d = new Date(Date.UTC(dateParts.year, dateParts.month - 1, dateParts.day, 0, 0, 0));\n if (!util_1.isNil(dateParts.hour))\n d.setUTCHours(dateParts.hour);\n if (!util_1.isNil(dateParts.minute))\n d.setUTCMinutes(dateParts.minute);\n if (!util_1.isNil(dateParts.second))\n d.setUTCSeconds(dateParts.second);\n if (!util_1.isNil(dateParts.millisecond))\n d.setUTCMilliseconds(dateParts.millisecond);\n // The minute part is unused when converting string.\n // This was observed in the tests on MongoDB site but not officially stated anywhere\n tz.minute = 0;\n _internal_1.adjustDate(d, tz);\n return d;\n}", "formatDate(str) {\n let string = str.slice(0, str.lastIndexOf('T'))\n let fields = string.split('-');\n let finalString = fields[2] + '-' + fields[1] + '-' + fields[0]\n return finalString\n }", "formatDate(str) {\n let string = str.slice(0, str.lastIndexOf('T'))\n let fields = string.split('-');\n let finalString = fields[2] + '-' + fields[1] + '-' + fields[0]\n return finalString\n }", "function formatDate(date, formatStr) {\n\t\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n\t}", "function format_date(date_string, data_source) {\n var date = new Date(date_string);\n return {v: date, f: date_string};\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "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 }", "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 }", "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 }", "function formatDate(date, formatStr) {\n return formatDateWithChunks(date, getFormatStringChunks(formatStr));\n }", "function formatDate(string){\n var options = { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' };\n return new Date(string).toLocaleDateString([],options);\n}", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function getFormatDate(date) {\n\t\tvar arr = date.split('/');\n\t\treturn new Date(parseInt(arr[2]), parseInt(arr[1])-1, parseInt(arr[0]));\n\t}", "function makeDateFromStringAndFormat(config) {\n\t if (config._f === moment.ISO_8601) {\n\t parseISO(config);\n\t return;\n\t }\n\n\t config._a = [];\n\t config._pf.empty = true;\n\n\t // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t var string = '' + config._i,\n\t i, parsedInput, tokens, token, skipped,\n\t stringLength = string.length,\n\t totalParsedInputLength = 0;\n\n\t tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t for (i = 0; i < tokens.length; i++) {\n\t token = tokens[i];\n\t parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[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\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\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\n\t dateFromConfig(config);\n\t checkOverflow(config);\n\t }", "function makeDateFromStringAndFormat(config) {\n\t\tif (config._f === moment.ISO_8601) {\n\t\t\tparseISO(config);\n\t\t\treturn;\n\t\t}\n\n\t\tconfig._a = [];\n\t\tconfig._pf.empty = true;\n\n\t\t// This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t\tvar string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0;\n\n\t\ttokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t\tfor (i = 0; i < tokens.length; i++) {\n\t\t\ttoken = tokens[i];\n\t\t\tparsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t\t\tif (parsedInput) {\n\t\t\t\tskipped = string.substr(0, string.indexOf(parsedInput));\n\t\t\t\tif (skipped.length > 0) {\n\t\t\t\t\tconfig._pf.unusedInput.push(skipped);\n\t\t\t\t}\n\t\t\t\tstring = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t\t\t\ttotalParsedInputLength += parsedInput.length;\n\t\t\t}\n\t\t\t// don't parse if it's not a known token\n\t\t\tif (formatTokenFunctions[token]) {\n\t\t\t\tif (parsedInput) {\n\t\t\t\t\tconfig._pf.empty = false;\n\t\t\t\t} else {\n\t\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t\t}\n\t\t\t\taddTimeToArrayFromToken(token, parsedInput, config);\n\t\t\t} else if (config._strict && !parsedInput) {\n\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t}\n\t\t}\n\n\t\t// add remaining unparsed input length to the string\n\t\tconfig._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t\tif (string.length > 0) {\n\t\t\tconfig._pf.unusedInput.push(string);\n\t\t}\n\n\t\t// clear _12h flag if hour is <= 12\n\t\tif (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n\t\t\tconfig._pf.bigHour = undefined;\n\t\t}\n\t\t// handle am pm\n\t\tif (config._isPm && config._a[HOUR] < 12) {\n\t\t\tconfig._a[HOUR] += 12;\n\t\t}\n\t\t// if is 12 am, change hours to 0\n\t\tif (config._isPm === false && config._a[HOUR] === 12) {\n\t\t\tconfig._a[HOUR] = 0;\n\t\t}\n\t\tdateFromConfig(config);\n\t\tcheckOverflow(config);\n\t}", "function makeDateFromStringAndFormat(config) {\n\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 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 }", "function makeDateFromStringAndFormat(config) {\n\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 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 }", "function makeDateFromStringAndFormat(config) {\n\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 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 }", "function makeDateFromStringAndFormat(config) {\n\t if (config._f === moment.ISO_8601) {\n\t parseISO(config);\n\t return;\n\t }\n\n\t config._a = [];\n\t config._pf.empty = true;\n\n\t // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t var string = '' + config._i,\n\t i,\n\t parsedInput,\n\t tokens,\n\t token,\n\t skipped,\n\t stringLength = string.length,\n\t totalParsedInputLength = 0;\n\n\t tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t for (i = 0; i < tokens.length; i++) {\n\t token = tokens[i];\n\t parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[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 } else {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t addTimeToArrayFromToken(token, parsedInput, config);\n\t } else if (config._strict && !parsedInput) {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t }\n\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\n\t // clear _12h flag if hour is <= 12\n\t if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n\t config._pf.bigHour = undefined;\n\t }\n\t // handle meridiem\n\t config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\t dateFromConfig(config);\n\t checkOverflow(config);\n\t }", "function unformatDate(datestr) {\n var y = parseInt(datestr.slice(0, 4)),\n m = parseInt(datestr.slice(5, 7)) - 1,\n dy = parseInt(datestr.slice(8));\n\n return (new Date(y, m, dy));\n}", "function unformatDate(datestr) {\n var y = parseInt(datestr.slice(0, 4)),\n m = parseInt(datestr.slice(5, 7)) - 1,\n dy = parseInt(datestr.slice(8));\n\n return (new Date(y, m, dy));\n}", "function parseDate(str) {\n \t\t//var m = str.match(/^(\\d{1,2})-(\\d{1,2})-(\\d{4})$/);\n \t\tvar m = str.match(/^(0?[1-9]|[12][0-9]|3[01])[\\.\\-](0?[1-9]|1[012])[\\.\\-]\\d{4}$/);\n \t\treturn (m) ? new Date(m[3], m[2]-1, m[1]) : null;\n\t}", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "function getDateFromString(str)\n{\n var dateRE1 = /([0-9]{1,4})(?:\\-|\\/|\\.|\\u5e74|\\u6708|\\u65e5)([0-9]{1,2})(?:\\-|\\/|\\.|\\u5e74|\\u6708|\\u65e5)*([0-9]{1,4})*/i;\n var dateRE2 = /(on)?\\s*(([0-9]*)(?:st|th|rd|nd)*(?:\\s|of|\\-a|\\-|,|\\.)*(january|jan|february|feb|march|mar|april|apr|may|june|jun|july|jul|august|aug|september|sept|sep|october|oct|november|nov|december|dec)(?:\\s|\\-|\\.)*([0-9]*))/i;\n var dateRE3 = /(on)?\\s*((january|jan|february|feb|march|mar|april|apr|may|june|jun|july|jul|august|aug|september|sept|sep|october|oct|november|nov|december|dec)(?:\\s|,|\\.|\\-)*([0-9]+)(?:st|th|rd|nd)*(?:\\s|,|\\.|\\-a|\\-)*([0-9]*))/i;\n var dateRE4 = /(on)?\\s*((next)?\\s*(monday|mon|tuesday|tue|wednesday|wed|thursday|thu|friday|fri|saturday|sat|sunday|sun))/i;\n var dateRE5 = /(in)?\\s*(one|two|three|four|five|six|seven|eight|nine|ten|[0-9]+)\\s*(years|year|yrs|yr|months|month|mons|mon|weeks|week|wks|wk|days|day)/i;\n var dateRE6 = /end\\s*of\\s*(?:the)*\\s*(week|w|month|m)/i;\n var dateRE7 =/(on)?\\s*([0-9]+)(?:st|th|rd|nd)/i;\n var dateRE8 = /\\s*(yesterday|tod|today|tom|tomorrow)/i;\n \n \n if (DEBUG) log(\"getDateFromString: Looking for date in '\" + str + \"'\");\n var dateRE1match = dateRE1.exec(str);\n var dateRE2match = dateRE2.exec(str);\n var dateRE3match = dateRE3.exec(str);\n var dateRE4match = dateRE4.exec(str);\n var dateRE5match = dateRE5.exec(str);\n var dateRE6match = dateRE6.exec(str);\n var dateRE7match = dateRE7.exec(str);\n var dateRE8match = dateRE8.exec(str);\n \n if (dateRE1match)\n {\n if (DEBUG) log(\"dateRE1 match for '\" + str + \"' = '\" + dateRE1match[0] + \"'\");\n return dateRE1match[0];\n }\n \n if (dateRE2match)\n {\n if (DEBUG) log(\"dateRE2 match for '\" + str + \"' = '\" + dateRE2match[0] + \"'\");\n return dateRE2match[0];\n }\n \n if (dateRE3match)\n {\n if (DEBUG) log(\"dateRE3 match for '\" + str + \"' = '\" + dateRE3match[0] + \"'\");\n return dateRE3match[0];\n }\n \n if (dateRE4match)\n {\n if (DEBUG) log(\"dateRE4 match for '\" + str + \"' = '\" + dateRE4match[0] + \"'\");\n return dateRE4match[0];\n }\n \n if (dateRE5match)\n {\n if (DEBUG) log(\"dateRE5 match for '\" + str + \"' = '\" + dateRE5match[0] + \"'\");\n return dateRE5match[0];\n }\n \n if (dateRE6match)\n {\n if (DEBUG) log(\"dateRE6 match for '\" + str + \"' = '\" + dateRE6match[0] + \"'\");\n return dateRE6match[0];\n }\n \n if (dateRE7match)\n {\n if (DEBUG) log(\"dateRE7 match for '\" + str + \"' = '\" + dateRE7match[0] + \"'\");\n return dateRE7match[0];\n }\n \n if (dateRE8match)\n {\n if (DEBUG) log(\"dateRE8 match for '\" + str + \"' = '\" + dateRE8match[0] + \"'\");\n return dateRE8match[0];\n }\n \n if (DEBUG) log(\"NO MATCH FOR DATE STRING '\" + str + \"'!!!!!\");\n return;\n}", "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 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 }", "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 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 }", "function parseStringToDate(string) {\n if (string) {\n var parts = string.match(/(\\d+)/g);\n // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])\n return new Date(parts[0], parts[1] - 1, parts[2]); // months are 0-based\n }\n }", "function formatDate(string) {\n var date = new Date(string);\n let options = {\n day: \"numeric\",\n month: \"long\",\n };\n return date.toLocaleString(\"en-US\", options);\n }", "function formatDate(date, format){\n if(!date){\n return '0000-00-00';\n }\n var dd = date.substring(0, 2);\n var mm = date.substring(3, 5);\n var yy = date.substring(6);\n if (format == 'dmy') {\n return dd + '-' + mm + '-' + yy;\n } else {\n return yy + '-' + mm + '-' + dd;\n }\n }", "function castStringToDate(str) {\n if (str !== undefined && str.length === 16) {\n let day = str.slice(0, 2);\n let month = str.slice(3, 5);\n let americanDateString = month + '-' + day + str.slice(5); // MM-DD-YYYY HH:MM\n return new Date(americanDateString);\n } else {\n console.error('Error casting ' + str + ' to date.')\n }\n return new Date()\n}", "normalize(str) {\n if (str && !CommonUtils.isDate(str)) {\n var match = str.match(/^(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})$/);\n if (match) {\n return new Date(match[3], match[2] - 1, match[1]);\n }\n match = str.match(/^(\\d{4})-(\\d{1,2})-(\\d{1,2})$/);\n if (match) {\n return new Date(match[1], match[2] - 1, match[3]);\n }\n }\n }", "function formatDate(date,formatStr){return renderFakeFormatString(getParsedFormatString(formatStr).fakeFormatString,date);}", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }" ]
[ "0.7544057", "0.7378126", "0.71777546", "0.71777546", "0.71777546", "0.71777546", "0.71671367", "0.7163808", "0.7163808", "0.7163808", "0.7163808", "0.7163808", "0.71498096", "0.71486294", "0.71486294", "0.71486294", "0.70893186", "0.7086403", "0.70293576", "0.70293576", "0.70195943", "0.70195943", "0.70195943", "0.70195943", "0.70195943", "0.7002717", "0.7002717", "0.69697803", "0.6963666", "0.69486713", "0.6941472", "0.6931618", "0.69212186", "0.68995607", "0.68969715", "0.68969715", "0.68969715", "0.68969715", "0.68969715", "0.6896638", "0.68942904", "0.68942904", "0.68848205", "0.6881519", "0.68802357", "0.68802357", "0.6860201", "0.68580484", "0.68580484", "0.68559957", "0.68525356", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.6838409", "0.6838409", "0.6838409", "0.6838409", "0.6838409", "0.6829404", "0.6784215", "0.6758764", "0.6727878", "0.6727878", "0.6727878", "0.6726412", "0.6726379", "0.6726379", "0.6725158", "0.6717375", "0.6717375", "0.6717375", "0.6717375", "0.6717375", "0.6717375", "0.6695233", "0.66870695", "0.66870695", "0.6683349", "0.6683229", "0.6678988", "0.66708475", "0.66647357", "0.6660571", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495" ]
0.0
-1
date from string and array of format strings
function configFromStringAndArray(config) { var tempConfig, bestMoment, scoreToBeat, i, currentScore; if (config._f.length === 0) { getParsingFlags(config).invalidFormat = true; config._d = new Date(NaN); return; } for (i = 0; i < config._f.length; i++) { currentScore = 0; tempConfig = copyConfig({}, config); if (config._useUTC != null) { tempConfig._useUTC = config._useUTC; } tempConfig._f = config._f[i]; configFromStringAndFormat(tempConfig); if (!isValid(tempConfig)) { continue; } // if there is any input that was not parsed add a penalty for that format currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; getParsingFlags(tempConfig).score = currentScore; if (scoreToBeat == null || currentScore < scoreToBeat) { scoreToBeat = currentScore; bestMoment = tempConfig; } } extend(config, bestMoment || tempConfig); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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];\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 }", "function makeDateFromStringAndArray(string, formats) {\n var output,\n inputParts = string.match(inputCharacters),\n scores = [],\n scoreToBeat = 99,\n i,\n curDate,\n curScore;\n for (i = 0; i < formats.length; i++) {\n curDate = makeDateFromStringAndFormat(string, formats[i]);\n curScore = compareArrays(inputParts, formatMoment(new Moment(curDate), formats[i]).match(inputCharacters));\n if (curScore < scoreToBeat) {\n scoreToBeat = curScore;\n output = curDate;\n }\n }\n return output;\n }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "function makeDateFromStringAndFormat(config) {\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;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens);\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 }", "parseDate(arrayOfStrings)\n {\n let newStr=arrayOfStrings[3];\n newStr += '-';\n switch(arrayOfStrings[1])\n {\n case 'Jan':\n newStr+='01';\n break;\n case 'Feb':\n newStr+='02';\n break;\n case 'Mar':\n newStr+='03';\n break;\n case 'Apr':\n newStr+='04';\n break;\n case 'May':\n newStr+='05';\n break;\n case 'Jun':\n newStr+='06';\n break;\n case 'Jul':\n newStr+='07';\n break;\n case 'Aug':\n newStr+='08';\n break;\n case 'Sep':\n newStr+='09';\n break;\n case 'Oct':\n newStr+='10';\n break;\n case 'Nov':\n newStr+='11';\n break;\n case 'Dec':\n newStr+='12';\n break;\n default:\n break;\n }\n newStr+='-';\n newStr+=arrayOfStrings[2];\n\n return newStr;\n }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "function $dateFromString(obj, expr, options) {\n var args = core_1.computeValue(obj, expr, null, options);\n args.format = args.format || _internal_1.DATE_FORMAT;\n args.onNull = args.onNull || null;\n var dateString = args.dateString;\n if (util_1.isNil(dateString))\n return args.onNull;\n // collect all separators of the format string\n var separators = args.format.split(/%[YGmdHMSLuVzZ]/);\n separators.reverse();\n var matches = args.format.match(/(%%|%Y|%G|%m|%d|%H|%M|%S|%L|%u|%V|%z|%Z)/g);\n var dateParts = {};\n // holds the valid regex of parts that matches input date string\n var expectedPattern = \"\";\n for (var i = 0, len = matches.length; i < len; i++) {\n var formatSpecifier = matches[i];\n var props = _internal_1.DATE_SYM_TABLE[formatSpecifier];\n if (util_1.isObject(props)) {\n // get pattern and alias from table\n var m = props.re.exec(dateString);\n // get the next separtor\n var delimiter = separators.pop() || \"\";\n if (m !== null) {\n // store and cut out matched part\n dateParts[props.name] = /^\\d+$/.exec(m[0]) ? parseInt(m[0]) : m[0];\n dateString =\n dateString.substr(0, m.index) +\n dateString.substr(m.index + m[0].length);\n // construct expected pattern\n expectedPattern +=\n _internal_1.regexQuote(delimiter) + _internal_1.regexStrip(props.re.toString());\n }\n else {\n dateParts[props.name] = null;\n }\n }\n }\n // 1. validate all required date parts exists\n // 2. validate original dateString against expected pattern.\n if (util_1.isNil(dateParts.year) ||\n util_1.isNil(dateParts.month) ||\n util_1.isNil(dateParts.day) ||\n !new RegExp(\"^\" + expectedPattern + \"$\").exec(args.dateString))\n return args.onError;\n var tz = _internal_1.parseTimezone(args.timezone);\n // create the date. month is 0-based in Date\n var d = new Date(Date.UTC(dateParts.year, dateParts.month - 1, dateParts.day, 0, 0, 0));\n if (!util_1.isNil(dateParts.hour))\n d.setUTCHours(dateParts.hour);\n if (!util_1.isNil(dateParts.minute))\n d.setUTCMinutes(dateParts.minute);\n if (!util_1.isNil(dateParts.second))\n d.setUTCSeconds(dateParts.second);\n if (!util_1.isNil(dateParts.millisecond))\n d.setUTCMilliseconds(dateParts.millisecond);\n // The minute part is unused when converting string.\n // This was observed in the tests on MongoDB site but not officially stated anywhere\n tz.minute = 0;\n _internal_1.adjustDate(d, tz);\n return d;\n}", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "function makeDateFromStringAndFormat(config) {\n\t\tif (config._f === moment.ISO_8601) {\n\t\t\tparseISO(config);\n\t\t\treturn;\n\t\t}\n\n\t\tconfig._a = [];\n\t\tconfig._pf.empty = true;\n\n\t\t// This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t\tvar string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0;\n\n\t\ttokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t\tfor (i = 0; i < tokens.length; i++) {\n\t\t\ttoken = tokens[i];\n\t\t\tparsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t\t\tif (parsedInput) {\n\t\t\t\tskipped = string.substr(0, string.indexOf(parsedInput));\n\t\t\t\tif (skipped.length > 0) {\n\t\t\t\t\tconfig._pf.unusedInput.push(skipped);\n\t\t\t\t}\n\t\t\t\tstring = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t\t\t\ttotalParsedInputLength += parsedInput.length;\n\t\t\t}\n\t\t\t// don't parse if it's not a known token\n\t\t\tif (formatTokenFunctions[token]) {\n\t\t\t\tif (parsedInput) {\n\t\t\t\t\tconfig._pf.empty = false;\n\t\t\t\t} else {\n\t\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t\t}\n\t\t\t\taddTimeToArrayFromToken(token, parsedInput, config);\n\t\t\t} else if (config._strict && !parsedInput) {\n\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t}\n\t\t}\n\n\t\t// add remaining unparsed input length to the string\n\t\tconfig._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t\tif (string.length > 0) {\n\t\t\tconfig._pf.unusedInput.push(string);\n\t\t}\n\n\t\t// clear _12h flag if hour is <= 12\n\t\tif (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n\t\t\tconfig._pf.bigHour = undefined;\n\t\t}\n\t\t// handle am pm\n\t\tif (config._isPm && config._a[HOUR] < 12) {\n\t\t\tconfig._a[HOUR] += 12;\n\t\t}\n\t\t// if is 12 am, change hours to 0\n\t\tif (config._isPm === false && config._a[HOUR] === 12) {\n\t\t\tconfig._a[HOUR] = 0;\n\t\t}\n\t\tdateFromConfig(config);\n\t\tcheckOverflow(config);\n\t}", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "function makeDateFromStringAndArray(config) {\n\t var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\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\n\t for (i = 0; i < config._f.length; i++) {\n\t currentScore = 0;\n\t tempConfig = copyConfig({}, config);\n\t if (config._useUTC != null) {\n\t tempConfig._useUTC = config._useUTC;\n\t }\n\t tempConfig._pf = defaultParsingFlags();\n\t tempConfig._f = config._f[i];\n\t makeDateFromStringAndFormat(tempConfig);\n\n\t if (!_isValid(tempConfig)) {\n\t continue;\n\t }\n\n\t // if there is any input that was not parsed add a penalty for that format\n\t currentScore += tempConfig._pf.charsLeftOver;\n\n\t //or tokens\n\t currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n\t tempConfig._pf.score = currentScore;\n\n\t if (scoreToBeat == null || currentScore < scoreToBeat) {\n\t scoreToBeat = currentScore;\n\t bestMoment = tempConfig;\n\t }\n\t }\n\n\t extend(config, bestMoment || tempConfig);\n\t }", "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 }", "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 }", "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 }", "parseDate(value, format) {\n if (format == null || value == null) {\n throw \"Invalid arguments\";\n }\n value = (typeof value === \"object\" ? value.toString() : value + \"\");\n if (value === \"\") {\n return null;\n }\n let iFormat, dim, extra, iValue = 0, shortYearCutoff = (typeof this.shortYearCutoff !== \"string\" ? this.shortYearCutoff : new Date().getFullYear() % 100 + parseInt(this.shortYearCutoff, 10)), year = -1, month = -1, day = -1, doy = -1, literal = false, date, lookAhead = (match) => {\n let matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n if (matches) {\n iFormat++;\n }\n return matches;\n }, getNumber = (match) => {\n let isDoubled = lookAhead(match), size = (match === \"@\" ? 14 : (match === \"!\" ? 20 :\n (match === \"y\" && isDoubled ? 4 : (match === \"o\" ? 3 : 2)))), minSize = (match === \"y\" ? size : 1), digits = new RegExp(\"^\\\\d{\" + minSize + \",\" + size + \"}\"), num = value.substring(iValue).match(digits);\n if (!num) {\n throw \"Missing number at position \" + iValue;\n }\n iValue += num[0].length;\n return parseInt(num[0], 10);\n }, getName = (match, shortNames, longNames) => {\n let index = -1;\n let arr = lookAhead(match) ? longNames : shortNames;\n let names = [];\n for (let i = 0; i < arr.length; i++) {\n names.push([i, arr[i]]);\n }\n names.sort((a, b) => {\n return -(a[1].length - b[1].length);\n });\n for (let i = 0; i < names.length; i++) {\n let name = names[i][1];\n if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n index = names[i][0];\n iValue += name.length;\n break;\n }\n }\n if (index !== -1) {\n return index + 1;\n }\n else {\n throw \"Unknown name at position \" + iValue;\n }\n }, checkLiteral = () => {\n if (value.charAt(iValue) !== format.charAt(iFormat)) {\n throw \"Unexpected literal at position \" + iValue;\n }\n iValue++;\n };\n if (this.view === 'month') {\n day = 1;\n }\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n literal = false;\n }\n else {\n checkLiteral();\n }\n }\n else {\n switch (format.charAt(iFormat)) {\n case \"d\":\n day = getNumber(\"d\");\n break;\n case \"D\":\n getName(\"D\", this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].DAY_NAMES_SHORT), this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].DAY_NAMES));\n break;\n case \"o\":\n doy = getNumber(\"o\");\n break;\n case \"m\":\n month = getNumber(\"m\");\n break;\n case \"M\":\n month = getName(\"M\", this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].MONTH_NAMES_SHORT), this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].MONTH_NAMES));\n break;\n case \"y\":\n year = getNumber(\"y\");\n break;\n case \"@\":\n date = new Date(getNumber(\"@\"));\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n case \"!\":\n date = new Date((getNumber(\"!\") - this.ticksTo1970) / 10000);\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n case \"'\":\n if (lookAhead(\"'\")) {\n checkLiteral();\n }\n else {\n literal = true;\n }\n break;\n default:\n checkLiteral();\n }\n }\n }\n if (iValue < value.length) {\n extra = value.substr(iValue);\n if (!/^\\s+/.test(extra)) {\n throw \"Extra/unparsed characters found in date: \" + extra;\n }\n }\n if (year === -1) {\n year = new Date().getFullYear();\n }\n else if (year < 100) {\n year += new Date().getFullYear() - new Date().getFullYear() % 100 +\n (year <= shortYearCutoff ? 0 : -100);\n }\n if (doy > -1) {\n month = 1;\n day = doy;\n do {\n dim = this.getDaysCountInMonth(year, month - 1);\n if (day <= dim) {\n break;\n }\n month++;\n day -= dim;\n } while (true);\n }\n date = this.daylightSavingAdjust(new Date(year, month - 1, day));\n if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n throw \"Invalid date\"; // E.g. 31/02/00\n }\n return date;\n }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "function makeDateFromStringAndArray(config) {\n\t\tvar tempConfig, bestMoment,\n\n\t\tscoreToBeat, i, currentScore;\n\n\t\tif (config._f.length === 0) {\n\t\t\tconfig._pf.invalidFormat = true;\n\t\t\tconfig._d = new Date(NaN);\n\t\t\treturn;\n\t\t}\n\n\t\tfor (i = 0; i < config._f.length; i++) {\n\t\t\tcurrentScore = 0;\n\t\t\ttempConfig = copyConfig({}, config);\n\t\t\tif (config._useUTC != null) {\n\t\t\t\ttempConfig._useUTC = config._useUTC;\n\t\t\t}\n\t\t\ttempConfig._pf = defaultParsingFlags();\n\t\t\ttempConfig._f = config._f[i];\n\t\t\tmakeDateFromStringAndFormat(tempConfig);\n\n\t\t\tif (!isValid(tempConfig)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// if there is any input that was not parsed add a penalty for that format\n\t\t\tcurrentScore += tempConfig._pf.charsLeftOver;\n\n\t\t\t//or tokens\n\t\t\tcurrentScore += tempConfig._pf.unusedTokens.length * 10;\n\n\t\t\ttempConfig._pf.score = currentScore;\n\n\t\t\tif (scoreToBeat == null || currentScore < scoreToBeat) {\n\t\t\t\tscoreToBeat = currentScore;\n\t\t\t\tbestMoment = tempConfig;\n\t\t\t}\n\t\t}\n\n\t\textend(config, bestMoment || tempConfig);\n\t}", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "function makeDateFromStringAndArray(config) {\n\t var tempConfig,\n\t bestMoment,\n\n\t scoreToBeat,\n\t i,\n\t currentScore;\n\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\n\t for (i = 0; i < config._f.length; i++) {\n\t currentScore = 0;\n\t tempConfig = copyConfig({}, config);\n\t if (config._useUTC != null) {\n\t tempConfig._useUTC = config._useUTC;\n\t }\n\t tempConfig._pf = defaultParsingFlags();\n\t tempConfig._f = config._f[i];\n\t makeDateFromStringAndFormat(tempConfig);\n\n\t if (!isValid(tempConfig)) {\n\t continue;\n\t }\n\n\t // if there is any input that was not parsed add a penalty for that format\n\t currentScore += tempConfig._pf.charsLeftOver;\n\n\t //or tokens\n\t currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n\t tempConfig._pf.score = currentScore;\n\n\t if (scoreToBeat == null || currentScore < scoreToBeat) {\n\t scoreToBeat = currentScore;\n\t bestMoment = tempConfig;\n\t }\n\t }\n\n\t extend(config, bestMoment || tempConfig);\n\t }", "function makeDateFromStringAndFormat(config) {\n\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 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 }", "function makeDateFromStringAndFormat(config) {\n\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 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 }", "function makeDateFromStringAndFormat(config) {\n\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 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 }", "function makeDateFromStringAndFormat(config) {\n\t if (config._f === moment.ISO_8601) {\n\t parseISO(config);\n\t return;\n\t }\n\n\t config._a = [];\n\t config._pf.empty = true;\n\n\t // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t var string = '' + config._i,\n\t i, parsedInput, tokens, token, skipped,\n\t stringLength = string.length,\n\t totalParsedInputLength = 0;\n\n\t tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t for (i = 0; i < tokens.length; i++) {\n\t token = tokens[i];\n\t parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[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\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\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\n\t dateFromConfig(config);\n\t checkOverflow(config);\n\t }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\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 }", "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 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 }", "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 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 }", "function stringToDate(_date,_format,_delimiter)\r\n{\r\n var formatLowerCase=_format.toLowerCase();\r\n var formatItems=formatLowerCase.split(_delimiter);\r\n var dateItems=_date.split(_delimiter);\r\n var monthIndex=formatItems.indexOf(\"mm\");\r\n var dayIndex=formatItems.indexOf(\"dd\");\r\n var yearIndex=formatItems.indexOf(\"yyyy\");\r\n var month=parseInt(dateItems[monthIndex]);\r\n month-=1;\r\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\r\n return formatedDate;\r\n}", "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 }", "function stringToDate(_date,_format,_delimiter)\n{\n var formatLowerCase=_format.toLowerCase();\n var formatItems=formatLowerCase.split(_delimiter);\n var dateItems=_date.split(_delimiter);\n var monthIndex=formatItems.indexOf(\"mm\");\n var dayIndex=formatItems.indexOf(\"dd\");\n var yearIndex=formatItems.indexOf(\"yyyy\");\n var month=parseInt(dateItems[monthIndex]);\n month-=1;\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\n return formatedDate;\n}" ]
[ "0.6992324", "0.6912437", "0.6811143", "0.67375225", "0.67375225", "0.67375225", "0.67375225", "0.67375225", "0.67109895", "0.67109895", "0.67109895", "0.66975677", "0.65970886", "0.65863997", "0.65863997", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65625644", "0.6480043", "0.64605933", "0.64605933", "0.64605933", "0.64605933", "0.64605933", "0.6419801", "0.6419801", "0.6419801", "0.6419801", "0.6419088", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.6400969", "0.6393603", "0.6393603", "0.6393603", "0.6392714", "0.6371693", "0.6371693", "0.6371693", "0.6371693", "0.6371693", "0.6371693", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6356297", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6349246", "0.6341507", "0.63415045", "0.63415045", "0.63415045", "0.6331202", "0.63261753", "0.63261753", "0.6323412", "0.6323412", "0.6299627", "0.6275333", "0.62741286" ]
0.0
-1
Pick a moment m from moments so that m[fn](other) is true for all other. This relies on the function fn to be transitive. moments should either be an array of moment objects or an array, whose first element is an array of moment objects.
function pickBy(fn, moments) { var res, i; if (moments.length === 1 && isArray(moments[0])) { moments = moments[0]; } if (!moments.length) { return createLocal(); } res = moments[0]; for (i = 1; i < moments.length; ++i) { if (!moments[i].isValid() || moments[i][fn](res)) { res = moments[i]; } } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n\t\tvar res, i;\n\t\tif (moments.length === 1 && isArray(moments[0])) {\n\t\t\tmoments = moments[0];\n\t\t}\n\t\tif (!moments.length) {\n\t\t\treturn moment();\n\t\t}\n\t\tres = moments[0];\n\t\tfor (i = 1; i < moments.length; ++i) {\n\t\t\tif (moments[i][fn](res)) {\n\t\t\t\tres = moments[i];\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "function pickBy(fn, moments) {\n\t var res, i;\n\t if (moments.length === 1 && isArray(moments[0])) {\n\t moments = moments[0];\n\t }\n\t if (!moments.length) {\n\t return moment();\n\t }\n\t res = moments[0];\n\t for (i = 1; i < moments.length; ++i) {\n\t if (moments[i][fn](res)) {\n\t res = moments[i];\n\t }\n\t }\n\t return res;\n\t }", "function pickBy(fn, moments) {\n\t var res, i;\n\t if (moments.length === 1 && isArray(moments[0])) {\n\t moments = moments[0];\n\t }\n\t if (!moments.length) {\n\t return moment();\n\t }\n\t res = moments[0];\n\t for (i = 1; i < moments.length; ++i) {\n\t if (moments[i][fn](res)) {\n\t res = moments[i];\n\t }\n\t }\n\t return res;\n\t }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }" ]
[ "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.76116085", "0.7576051", "0.75522864", "0.7440175", "0.7440175", "0.72956324" ]
0.0
-1
TODO: Use [].sort instead?
function min () { var args = [].slice.call(arguments, 0); return pickBy('isBefore', args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sort() {\n\t}", "sort() {\n\t}", "function Sort() {}", "sort(){\n\n }", "function sortItems(arr) {\r\n return arr.sort();\r\n}", "function sort(theArray){\n\n}", "function arrangeElements( array ) {\r\n\tarray = array.sort();\r\n\treturn array;\r\n}", "function alfa (arr){\n\tfor (var i = 0; i< arr.length;i++){\n\t\tarr[i].sort();\n\t}\n\treturn arr;\n}", "Sort() {\n\n }", "function Sort(arr)\n{\n\n}", "sort() {\n const ret = [].sort.apply(this, arguments);\n this._registerAtomic('$set', this);\n return ret;\n }", "sort() {\n const ret = [].sort.apply(this, arguments);\n this._registerAtomic('$set', this);\n return ret;\n }", "function sortFunction(val){\n return val.sort();\n}", "function dd(a){a=a.ob();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].Lf;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(ed);b.sort(ed);return[c,b]}", "function sort() {\n // // parse arguments into an array\n var args = [].slice.call(arguments);\n\n // // .. do something with each element of args\n // // YOUR CODE HERE\n var sortedargs = args.sort(function(a, b) {\n return a > b ? 1 : -1\n })\n return sortedargs\n}", "function Zc(a){a=a.Xb();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].Zg;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort($c);b.sort($c);return[c,b]}", "function yg(a){a=a.Zb();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].ah;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(zg);b.sort(zg);return[c,b]}", "function sortArr(a, b){\n return a - b ;\n }", "function sort(argument) {\r\n return argument.sort();\r\n}", "function copySorted(arr) {\n return arr.slice().sort();\n}", "function sortData(data)\n\t{\n\t\tfor (let i = 0; i < data.length; i++)\n \t{\n\t \tfor (let j = 0; j < data.length - i - 1; j++)\n\t \t{\n\t \t\tif (+data[j].subCount < +data[j + 1].subCount)\n\t \t\t{\n\t \t\t\tlet tmp = data[j];\n\t \t\t\tdata[j] = data[j + 1];\n\t \t\t\tdata[j + 1] = tmp;\n\t \t\t}\n\t \t}\n \t}\n \treturn data;\n\t}", "function sortMyList() {\n seanBeanMovies.forEach(function(movie) {\n newar.push(movie);\n });\n console.log(newar.sort());\n}", "function sortArray(arr) {\r\n var temp = 0;\r\n for (var i = 0; i < arr.length; ++i) {\r\n for (var j = 0; j < arr.length - 1; ++j) {\r\n if (arr[j].name.charCodeAt(0) < arr[j + 1].name.charCodeAt(0)) {\r\n temp = arr[j + 1];\r\n arr[j + 1] = arr[j];\r\n arr[j] = temp;\r\n }\r\n }\r\n }\r\n console.log(arr);\r\n}", "function sortFunction(){\r\n // parse arguments into an array\r\n var args = [].slice.call(arguments);\r\n return args.sort();\r\n}", "sortBy(arr, compare) {\n let sorted = [];\n sorted = arr.sort(compare);\n return sorted;\n }", "function sortedUUIDs(arr) {\n return arr.map(function (el) {\n return el.uuid;\n }).sort();\n}", "function sortNameUp(arr) {\n return arr.sort()\n }", "function subSort(arr) {\n // didnt get this one. try again\n}", "function mergeSort(array) {\n\n}", "getSortArray() {\n const sortable = []; // {\"1\": 10, \"49\": 5}\n for (const key in this.numberPool) \n sortable.push([Number(key), this.numberPool[key]]);\n \n sortable.sort((a, b) => b[1] - a[1]); // Descending\n return sortable;\n }", "__getArray (sort) {\n sort = sort || 'id'\n\n let items = []\n\n this.state.data.forEach((item) => items.push(item))\n\n items.sort((a, b) => {\n if (a[sort] > b[sort]) return -1\n if (a[sort] < b[sort]) return 1\n return 0\n })\n\n return items\n }", "sort(callback) {\r\n return this.array.sort(callback);\r\n }", "function show(a) {\n a.sort();\n a.map( e => console.log(e) );\n}", "function sortArr2(arr) {\n console.table(arr.sort((a, b) => a - b)\n );\n}", "function mergeSort(arr) {\n\n}", "sortSpecies() {\n //Sortira igrace po vrsti\n for (let s of this.species) {\n s.sortSpecies();\n }\n\n //Sortira vrste po fitnesu najboljeg igraca\n let temp = [];\n for (let i = 0; i < this.species.length; i++) {\n let max = 0;\n let maxIndex = 0;\n for (let j = 0; j < this.species.length; j++) {\n if (this.species[j].bestFitness > max) {\n max = this.species[j].bestFitness;\n maxIndex = j;\n }\n }\n temp.push(this.species[maxIndex]);\n this.species.splice(maxIndex, 1);\n i--;\n }\n this.species = [];\n arrayCopy(temp, this.species);\n }", "function sortArray1(arr) {\n return arr.sort((a, b) => a-b)\n}", "function Ob(){for(var a=J.vb(),b=[],c=[],d=0;d<a.length;d++){var e=a[d].Ak;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(Pb);b.sort(Pb);return[c,b]}", "sort() {\n for (let i = 0; i < this.values.length - 1; i++) {\n let min = i;\n for (let j = i + 1; j < this.values.length; j++) {\n if (this.values[j] < this.values[min]) min = j;\n }\n\n this.swap(i, min);\n }\n }", "_sortBy(array, selectors) {\n return array.concat().sort((a, b) => {\n for (let selector of selectors) {\n let reverse = selector.order ? -1 : 1;\n\n a = selector.value ? JP.query(a, selector.value)[0] : JP.query(a,selector)[0];\n b = selector.value ? JP.query(b, selector.value)[0] : JP.query(b,selector)[0];\n\n if (a.toUpperCase() > b.toUpperCase()) {\n return reverse;\n }\n if (a.toUpperCase() < b.toUpperCase()) {\n return -1 * reverse;\n }\n }\n return 0;\n });\n }", "function sortData (data) {\n ...\n}", "function start()\n{\n var a = [ 10, 1, 9, 2, 8, 3, 7, 4, 6, 5 ];\n\n outputArray( \"Data items in original order: \", a,\n document.getElementById( \"originalArray\" ) ); \n a.sort( compareIntegers ); // sort the array\n outputArray( \"Data items in ascending order: \", a,\n document.getElementById( \"sortedArray\" ) ); \n} // end function start", "sortedItems() {\n return this.childItems.slice().sort((i1, i2) => {\n return i1.index - i2.index;\n });\n }", "function sortJson() {\r\n\t \r\n}", "function myarrayresult(){\r\narray2.sort(function (a,b) {\r\n return a-b; //For assending order \r\n return b-a; //For descendening Order // Correct \r\n});\r\n}", "sort() {\n let a = this.array;\n const step = 1;\n let compares = 0;\n for (let i = 0; i < a.length; i++) {\n let tmp = a[i];\n for (var j = i; j >= step; j -= step) {\n this.store(step, i, j, tmp, compares);\n compares++;\n if (a[j - step] > tmp) {\n a[j] = a[j - step];\n this.store(step, i, j, tmp, compares);\n } else {\n break;\n }\n }\n a[j] = tmp;\n this.store(step, i, j, tmp, compares);\n }\n this.array = a;\n }", "function task14_16_10(){\n var scores =[320,230,480,120];\n document.write(\"Scores of Students : \"+scores + \"<br>\");\n scores.sort();\n document.write(\"Ordered Score of Students : \"+scores);\n}", "function baseSortBy(array, comparer) {\n var length = array.length;\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}", "function copySorted(arr){\n let a=arr.slice(0);\n return a.sort();\n}", "function sortKids(mmdKidsList) {\r\n\t\tvar sortedList = [];\r\n\t\tif (mmdKidsList && mmdKidsList instanceof Array) {\r\n\t\t\tfor (var i = 0; i < mmdKidsList.length; i++){\r\n\t\t\t\tif (mmdKidsList[i].scalar){\r\n\t\t\t\t\tsortedList.push(mmdKidsList[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (var j = 0; j < mmdKidsList.length; j++){\r\n\t\t\t\tif (!mmdKidsList[j].scalar){\r\n\t\t\t\t\tsortedList.push(mmdKidsList[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sortedList;\r\n \t}", "function sortVersionArray(arr) {\n return arr.map( a => a.replace(/\\d+/g, n => +n+100000 ) ).sort()\n .map( a => a.replace(/\\d+/g, n => +n-100000 ) );\n}", "function sortArray() {\n\n //PRZYPISANIE WARTOSCI DO TABLICY\n var points = [41, 3, 6, 1, 114, 54, 64];\n\n //SORTOWANIE OD NAJMNIEJSZEJ DO NAJWIEKSZEJ\n points.sort(function (a, b) {\n //POROWNANIE DWOCH ELEM. TABLICY - MNIEJSZY STAWIA PO LEWEJ, WIEKSZY PO PRAWEJ\n return a - b;\n });\n\n //ZWROCENIE POSORTOWANEJ TABLICY\n return points;\n}", "function sort(unsortedArray) {\n // Your code here\n}", "function testSorts()\n{\n\n\tconsole.log(\"============= original googleResults =============\");\n\tconsole.log(googleResults);\n\t\n\tconsole.log(\"==== before sort array element index name rating ====\");\n\t\n\tgoogleResults.forEach(function(element,index)\n\t{\n\t\t console.log(index + \": name: \" + element.name + \" rating: \" + element.rating);\n\n\t});\n\n\t\t// commented for testing\n\t\t//googleResults.sortByRatingAscending();\n\t\t\n\t\t// commented for testing\n\t\tgoogleResults.sortByRatingDescending();\n\t\t\n\t//===============================================================\t\n\n\tconsole.log(\"============= after sort =============\");\n\n\tgoogleResults.forEach(function(element,index)\n\t{\n\t\t console.log(index + \": name: \" + element.name + \" rating: \" + element.rating);\n\n\t});\n\t\n}//END test", "function sort(arr) {\n return null; \n}", "nameSort() {\n orders.sort( \n function(a,b) {\n return (a[0] < b[0]) ? -1 : (a[0] > b[0]) ? 1 : 0; \n }\n ); \n }", "function alphabeticalOrder(arr) {\n // Add your code below this line\n return arr.sort()\n\n // Add your code above this line\n}", "sort(){\n\t\tvar sortable = [];\n\t\tfor (var vehicle in this.primes) {\n\t\t sortable.push([vehicle, this.primes[vehicle]]);\n\t\t}\n\t\treturn sortable.sort(function(a, b) {\n\t\t return a[1] - b[1];\n\t\t});\n\t}", "itemsToSort() {\n return [];\n }", "function sortContacts(arr){\n arr.sort(function(a,b){\n if (a < b) return -1;\n else if (a > b) return 1;\n return 0;\n });\n return arr;\n }", "function sortMin(arr){\n arr = arr.sort(function(a, b){\n return a>b;\n });\n return arr; \n}", "sort() {\n const a = this.dict;\n const n = a.length;\n\n if( n < 2 ) { // eslint-disable-line \n } else if( n < 100 ) {\n // insertion sort\n for( let i = 1; i < n; i += 1 ) {\n const item = a[ i ];\n let j = i - 1;\n while( j >= 0 && item[ 0 ] < a[ j ][ 0 ] ) {\n a[ j + 1 ] = a[ j ];\n j -= 1;\n }\n a[ j + 1 ] = item;\n }\n } else {\n /**\n * Bottom-up iterative merge sort\n */\n for( let c = 1; c <= n - 1; c = 2 * c ) {\n for( let l = 0; l < n - 1; l += 2 * c ) {\n const m = l + c - 1;\n const r = Math.min( l + 2 * c - 1, n - 1 );\n if( m > r ) continue;\n merge( a, l, m, r );\n }\n }\n }\n }", "function sortArray(arr)\n{\n var abc = 'abcdefghijklmnopqrstuvwxyz';\n var dummy = [];\n\n var assignPriority = function (e)\n {\n if (e === \"...\")\n return ((27 + 1) * 26);\n\n var content = e.split('');\n if (isNaN(content[1]))\n return (((abc.indexOf(content[0]) + 1) * 26) * 100);\n\n return (content[1] * 10) + abc.indexOf(content[0]);\n }\n\n arr.forEach(function (e)\n {\n dummy.push(e);\n dummy.sort(function (a, b)\n {\n return assignPriority(a) - assignPriority(b);\n })\n });\n\n arr.length = 0;\n dummy.forEach(function (e)\n {\n if (arr.indexOf(e) === -1)\n {\n arr.push(e);\n }\n });\n}", "function treatArray(raw_arr)\n{\n var arr;\narr=sortArray(raw_arr)\narr=filterArray(arr)\nreturn arr\n}", "function sortedArr(arr) {\n const sortedArray = arr.slice().sort((a, b) => a - b)\n return sortedArray\n}", "function sortArguments(...args) {\n return args.sort();\n}", "sort() {\n if(this.data.length >= 2){\n for (var i = 0; i < this.data.length - 1; i++){\n for (var j = i + 1; j < this.data.length; j++){\n if (this.data[i].users.length < this.data[j].users.length){\n let tmp = this.data[i];\n this.data[i] = this.data[j];\n this.data[j] = tmp;\n \n }\n }\n \n }\n }\n }", "function sortArray() {\n //Twoj komentarz ...\n //deklaracje tablicy z elemtami\n var points = [41, 3, 6, 1, 114, 54, 64];\n\n //Twoj komentarz ...\n points.sort(function(a, b) {\n //Twoj komentarz ...\n\n return a - b;\n });\n\n //Twoj komentarz ...\n //zwrócenie tablicy points\n return points;\n}", "function bc(){for(var a=B.Za(),b=[],c=[],d=0;d<a.length;d++){var e=a[d].Hf;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(cc);b.sort(cc);return[c,b]}", "sorted(x) {\n super.sorted(0, x);\n }", "sort () {\r\n this._data.sort((a, b) => a.sortOrder !== b.sortOrder ? b.sortOrder - a.sortOrder : a.value.localeCompare(b.value))\r\n }", "sortListItems() {\n let sortedItems = this.props.listItems.slice();\n return sortedItems.sort((a, b) => {\n if (a.value > b.value) {\n return -1;\n } else if (a.value < b.value) {\n return 1;\n }\n return 0;\n });\n }", "function sortPlaylist() {\n playlistArr = Object.entries(livePlaylist);\n\n if (playlistArr.length > 2) {\n var sorted = false;\n while (!sorted) {\n sorted = true;\n for (var i = 1; i < playlistArr.length - 1; i++) {\n if ((playlistArr[i][1].upvote < playlistArr[i + 1][1].upvote)) {\n sorted = false;\n var temp = playlistArr[i];\n playlistArr[i] = playlistArr[i + 1];\n playlistArr[i + 1] = temp;\n // })\n }\n // playlistArr[i][1].index = i;\n }\n }\n }\n return playlistArr;\n}", "function alphabetSort(){\n const tilesArr = [\"Caribbean\", \"The Bahamans\", \"Mexico\", \"Europe\", \"Bermuda\", \"Alaska\", \"Canada & New England\", \"Hawaii\", \"Panama Canal\", \"Transatlantic\", \"Transpacific\", \"Australia\"];\n tilesArr.sort()\n console.log(tilesArr);\n}", "function _sort(array) {\n array.sort(function (a, b) {\n return b.length - a.length;\n });\n }", "function sort() {\n elementArray.sort(function (x, y) {\n return x.elem - y.elem;\n });\n render(elementArray);\n }", "function sort(compare, elements) {\n //let property = elements[property];\n \n if (Array.isArray(elements)) {\n if (elements.length <= 1) {\n return elements;\n }\n else {\n const middle = Math.floor(elements.length /2);\n \n const left = elements.slice(0, middle);\n const right = elements.slice(middle, elements.length);\n \n const leftSorted = sort(compare, left);\n const rightSorted = sort(compare, right);\n return merge(compare, leftSorted, rightSorted);\n }\n }\n return elements;\n}", "function byAge(arr){\n return arr.sort(function(a, b){\n return a.age - b.age;\n });\n}", "function sort() {\n renderContent(numArray.sort());\n}", "function ed(a){a=a.tc();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].cA;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(fd);b.sort(fd);return[c,b]}", "_orderSort(l, r) {\n return l.order - r.order;\n }", "function sortList(a,b) {\n if (a.total < b.total)\n return -1;\n if (a.total > b.total)\n return 1;\n return 0;\n }", "function sortList(a,b) {\n if (a.total < b.total)\n return -1;\n if (a.total > b.total)\n return 1;\n return 0;\n }", "function ls (lista) {\nreturn lista.sort(function(x, y) {\n return y.length - x.length; \n })\n}", "function solution(nums){\n return Array.isArray(nums) ? nums.sort((a, b) => a - b) : [];\n}", "serialize() {\n //creates array with spread syntax, then sorts\n //not cross-compatible with some older versions of browsers like IE11\n const sorted = [...this.data];\n sorted.sort((a , b) => {\n return a.comparator - b.comparator;\n });\n return JSON.stringify(sorted);\n }", "serialize() {\n //creates array with spread syntax, then sorts\n //not cross-compatible with some older versions of browsers like IE11\n const sorted = [...this.data];\n sorted.sort((a , b) => {\n return a.comparator - b.comparator;\n });\n return JSON.stringify(sorted);\n }", "function qsort(l){\r\n return sortBy(compare, l);\r\n}", "function quickersort(a){\n var left = []\n , right = []\n , pivot = a[0]\n if(a.length == 0){\n return []\n }\n for(var i = 1; i < a.length; i++){\n a[i] < pivot ? left.push(a[i]) : right.push(a[i])\n }\n return quickersort(left).concat(pivot, quickersort(right))\n}", "function sort(a, b) {\n return a - b;\n}", "function sort(array) {\n var buf;\n\n for (var j = 0; j < array.length-1; j++)\n for (var i = 0; i < array.length-j; i++) {\n if (array[i] > array[i+1]) {\n buf = array[i];\n array[i] = array[i+1];\n array[i+1] = buf;\n }\n }\n\n return array;\n }", "function urutAscending(array) {\r\n array.sort((a, b) => {\r\n return a - b\r\n })\r\nreturn array;\r\n}", "function mSort (array) {\n if (array.length === 1) {\n return array // return once we hit an array with a single item\n }\n const middle = Math.floor(array.length / 2) // get the middle item of the array rounded down\n const left = array.slice(0, middle) // items on the left side\n const right = array.slice(middle) // items on the right side\n return merge(\n mSort(left),\n mSort(right)\n )\n }", "function sortAsc(a, b) {\n return a[1] - b[1];\n }", "function sortScores(){\n //basically this function will take the two arrays, sort the scores, and set the index of the other\n //To print the high score page in order\n var tempScores = highScoreScores.slice(0);\n var tempNames = highScoreNames.slice(0);\n\n highScoreScores.sort(function(a,b){return b-a});\n for(i=0;i<tempNames.length;i++){\n //Have to admit, the following line of code gave me a headache, but I got it to work\n highScoreNames[i] = tempNames[tempScores.indexOf(highScoreScores[i])];\n }\n}", "async function TopologicalSort(){}", "sorted(matches) {\n // sort on i primary, j secondary\n return matches.sort((m1, m2) => (m1.i - m2.i) || (m1.j - m2.j));\n }", "function asc(arr) {\n\t arr.sort(function (a, b) {\n\t return a - b;\n\t });\n\t return arr;\n\t }", "function sortArray(){\n\n /*Uses the built in sort -method that can accept a function that specifies\n how the array should be sorted. In this case we want the array to be sorted\n based on the object's price. Lower priced cars go first.*/\n function compare(a,b) {\n if (a.price < b.price) return -1;\n if (a.price > b.price) return 1;\n return 0;\n }\n listOfCars.sort(compare);\n console.table(listOfCars);\n\n }", "function rankitup(array) {\narray.sort(function(a, b){return a-b});\n}", "function sortUnique(a, aRef) {\n return a.filter(function (s, i) {\n return (s && a.indexOf(s) === i);\n }).sort((aRef instanceof Array) ? function (a, b) {\n // Sort by reference string array\n var nA = aRef.indexOf(a),\n nB = aRef.indexOf(b);\n if (nA > -1 && nB > -1)\n return nA - nB;\n else\n return ascendNumeric(a, b);\n } : ascendNumeric);\n}" ]
[ "0.76896363", "0.76896363", "0.7431174", "0.7381352", "0.7223031", "0.7044736", "0.7002338", "0.697896", "0.69405884", "0.68795085", "0.6870758", "0.6870758", "0.68334246", "0.68275315", "0.6821634", "0.67999935", "0.6789589", "0.67690444", "0.6720508", "0.67083323", "0.67058194", "0.67039376", "0.6700412", "0.6697119", "0.6688845", "0.6673332", "0.6653218", "0.66435057", "0.66203755", "0.6614913", "0.66057926", "0.65821624", "0.65745586", "0.6573785", "0.657377", "0.65668243", "0.6564629", "0.6563167", "0.6546535", "0.65367883", "0.653225", "0.6480524", "0.6477283", "0.64771694", "0.64656717", "0.6437952", "0.6422067", "0.6411035", "0.64067", "0.6404812", "0.6391857", "0.6390683", "0.638328", "0.6378063", "0.6364115", "0.63592887", "0.63579386", "0.63530433", "0.6351624", "0.63512295", "0.6348263", "0.6342214", "0.63359976", "0.6334614", "0.63318104", "0.6331063", "0.6330091", "0.63279617", "0.631836", "0.6315173", "0.6310934", "0.63080466", "0.63073653", "0.6305542", "0.6304096", "0.6303879", "0.63032264", "0.630265", "0.6302476", "0.6296374", "0.62940747", "0.6293306", "0.6293306", "0.6291778", "0.6284418", "0.62799466", "0.62799466", "0.62742066", "0.6273841", "0.62726045", "0.6268466", "0.62684375", "0.6263077", "0.62618864", "0.62481016", "0.6246355", "0.6242385", "0.6242021", "0.62397605", "0.6236279", "0.6235783" ]
0.0
-1
Return a moment from input, that is local/utc/zone equivalent to model.
function cloneWithOffset(input, model) { var res, diff; if (model._isUTC) { res = model.clone(); diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. res._d.setTime(res._d.valueOf() + diff); hooks.updateOffset(res, false); return res; } else { return createLocal(input).local(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeAs(input, model) {\n\t return model._isUTC ? moment(input).zone(model._offset || 0) :\n\t moment(input).local();\n\t }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n\t var res, diff;\n\t if (model._isUTC) {\n\t res = model.clone();\n\t diff = (moment.isMoment(input) || isDate(input) ? +input : +moment(input)) - +res;\n\t // Use low-level api, because this fn is low-level api.\n\t res._d.setTime(+res._d + diff);\n\t moment.updateOffset(res, false);\n\t return res;\n\t } else {\n\t return moment(input).local();\n\t }\n\t }", "function makeAs(input, model) {\n\t\tvar res, diff;\n\t\tif (model._isUTC) {\n\t\t\tres = model.clone();\n\t\t\tdiff = (moment.isMoment(input) || isDate(input) ? +input : +moment(input)) - (+res);\n\t\t\t// Use low-level api, because this fn is low-level api.\n\t\t\tres._d.setTime(+res._d + diff);\n\t\t\tmoment.updateOffset(res, false);\n\t\t\treturn res;\n\t\t} else {\n\t\t\treturn moment(input).local();\n\t\t}\n\t}", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function momentify(source) {\r\n return moment.utc(source);\r\n}", "parse(value) {\n return +moment.utc(value);\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n var input = args[0];\n var isSingleString = args.length == 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n\n if (moment.isMoment(input)) {\n mom = moment.apply(null, args); // clone it\n transferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n }\n else if (isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args); // will be local\n }\n else { // \"parsing\" is required\n isAmbigTime = false;\n isAmbigZone = false;\n\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) { // let's record the inputted zone somehow\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n if (mom.utcOffset) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n else {\n mom.zone(input); // for moment-pre-2.9\n }\n }\n }\n }\n\n mom._fullCalendar = true; // flag for extended functionality\n\n return mom;\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n\t\tvar input = args[0];\n\t\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\t\tvar isAmbigTime;\n\t\tvar isAmbigZone;\n\t\tvar ambigMatch;\n\t\tvar mom;\n\n\t\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\t\telse { // \"parsing\" is required\n\t\t\tisAmbigTime = false;\n\t\t\tisAmbigZone = false;\n\n\t\t\tif (isSingleString) {\n\t\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\t\tinput += '-01';\n\t\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\t\tisAmbigTime = true;\n\t\t\t\t\tisAmbigZone = true;\n\t\t\t\t}\n\t\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\t\tisAmbigZone = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($.isArray(input)) {\n\t\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\t// otherwise, probably a string with a format\n\n\t\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\t\tmom = moment.utc.apply(moment, args);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmom = moment.apply(null, args);\n\t\t\t}\n\n\t\t\tif (isAmbigTime) {\n\t\t\t\tmom._ambigTime = true;\n\t\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t\t}\n\t\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\t\tif (isAmbigZone) {\n\t\t\t\t\tmom._ambigZone = true;\n\t\t\t\t}\n\t\t\t\telse if (isSingleString) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tmom._fullCalendar = true; // flag for extended functionality\n\n\t\treturn mom;\n\t}", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar output; // an object with fields for the new FCMoment object\n\n\tif (moment.isMoment(input)) {\n\t\toutput = moment.apply(null, args); // clone it\n\n\t\t// the ambig properties have not been preserved in the clone, so reassign them\n\t\tif (input._ambigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t}\n\t\tif (input._ambigZone) {\n\t\t\toutput._ambigZone = true;\n\t\t}\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\toutput = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC) {\n\t\t\toutput = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\toutput = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t\toutput._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\toutput._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\toutput.zone(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\treturn new FCMoment(output);\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar output; // an object with fields for the new FCMoment object\n\n\tif (moment.isMoment(input)) {\n\t\toutput = moment.apply(null, args); // clone it\n\n\t\t// the ambig properties have not been preserved in the clone, so reassign them\n\t\tif (input._ambigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t}\n\t\tif (input._ambigZone) {\n\t\t\toutput._ambigZone = true;\n\t\t}\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\toutput = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC) {\n\t\t\toutput = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\toutput = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t\toutput._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\toutput._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\toutput.zone(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\treturn new FCMoment(output);\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function cloneWithOffset(input, model) {\n\tvar res, diff;\n\tif (model._isUTC) {\n\t\tres = model.clone();\n\t\tdiff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n\t\t// Use low-level api, because this fn is low-level api.\n\t\tres._d.setTime(res._d.valueOf() + diff);\n\t\thooks.updateOffset(res, false);\n\t\treturn res;\n\t} else {\n\t\treturn createLocal(input).local();\n\t}\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else { // \"parsing\" is required\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) { // let's record the inputted zone somehow\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (constructor_1.isMoment(input) || is_date_1.default(input) ? input.valueOf() : local_1.createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks_1.hooks.updateOffset(res, false);\n return res;\n }\n else {\n return local_1.createLocal(input).local();\n }\n}" ]
[ "0.8500792", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.84180975", "0.7952661", "0.79354805", "0.7898799", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7850577", "0.7113369", "0.6599144", "0.6559592", "0.65441686", "0.6515401", "0.65118587", "0.65118587", "0.65118587", "0.65118587", "0.65118587", "0.65118587", "0.65118587", "0.65118587", "0.65118587", "0.65118587", "0.65118587", "0.65118587", "0.65118587", "0.64756083", "0.64756083", "0.64756083", "0.64756083", "0.64756083", "0.640383", "0.640383", "0.6384391", "0.6384391", "0.6384391", "0.637736", "0.6365682", "0.6364875", "0.6364875", "0.6345072", "0.6329096", "0.6329096", "0.6329096", "0.632356" ]
0.0
-1
MOMENTS keepLocalTime = true means only change the timezone, without affecting the local hour. So 5:31:26 +0300 [utcOffset(2, true)]> 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset +0200, so we adjust the time as needed, to be valid. Keeping the time actually adds/subtracts (one hour) from the actual represented time. That is why we call updateOffset a second time. In case it wants us to change the offset again _changeInProgress == true case, then we have to adjust, because there is no such time in the given timezone.
function getSetOffset (input, keepLocalTime, keepMinutes) { var offset = this._offset || 0, localAdjust; if (!this.isValid()) { return input != null ? this : NaN; } if (input != null) { if (typeof input === 'string') { input = offsetFromString(matchShortOffset, input); if (input === null) { return this; } } else if (Math.abs(input) < 16 && !keepMinutes) { input = input * 60; } if (!this._isUTC && keepLocalTime) { localAdjust = getDateOffset(this); } this._offset = input; this._isUTC = true; if (localAdjust != null) { this.add(localAdjust, 'm'); } if (offset !== input) { if (!keepLocalTime || this._changeInProgress) { addSubtract(this, createDuration(input - offset, 'm'), 1, false); } else if (!this._changeInProgress) { this._changeInProgress = true; hooks.updateOffset(this, true); this._changeInProgress = null; } } return this; } else { return this._isUTC ? offset : getDateOffset(this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSetOffset(input,keepLocalTime){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);}else if(Math.abs(input)<16){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){add_subtract__addSubtract(this,create__createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;utils_hooks__hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset(input,keepLocalTime){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);}else if(Math.abs(input)<16){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){add_subtract__addSubtract(this,create__createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;utils_hooks__hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\r\n var offset = this._offset || 0,\r\n localAdjust;\r\n if (input != null) {\r\n if (typeof input === 'string') {\r\n input = offsetFromString(input);\r\n }\r\n if (Math.abs(input) < 16) {\r\n input = input * 60;\r\n }\r\n if (!this._isUTC && keepLocalTime) {\r\n localAdjust = getDateOffset(this);\r\n }\r\n this._offset = input;\r\n this._isUTC = true;\r\n if (localAdjust != null) {\r\n this.add(localAdjust, 'm');\r\n }\r\n if (offset !== input) {\r\n if (!keepLocalTime || this._changeInProgress) {\r\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\r\n } else if (!this._changeInProgress) {\r\n this._changeInProgress = true;\r\n utils_hooks__hooks.updateOffset(this, true);\r\n this._changeInProgress = null;\r\n }\r\n }\r\n return this;\r\n } else {\r\n return this._isUTC ? offset : getDateOffset(this);\r\n }\r\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(input);\n\t }\n\t if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(input);\n\t }\n\t if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);if(input===null){return this;}}else if(Math.abs(input)<16&&!keepMinutes){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){addSubtract(this,createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);if(input===null){return this;}}else if(Math.abs(input)<16&&!keepMinutes){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){addSubtract(this,createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset || 0,localAdjust;if(!this.isValid()){return input != null?this:NaN;}if(input != null){if(typeof input === 'string'){input = offsetFromString(matchShortOffset,input);if(input === null){return this;}}else if(Math.abs(input) < 16 && !keepMinutes){input = input * 60;}if(!this._isUTC && keepLocalTime){localAdjust = getDateOffset(this);}this._offset = input;this._isUTC = true;if(localAdjust != null){this.add(localAdjust,'m');}if(offset !== input){if(!keepLocalTime || this._changeInProgress){addSubtract(this,createDuration(input - offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress = true;hooks.updateOffset(this,true);this._changeInProgress = null;}}return this;}else {return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\r\n var offset = this._offset || 0,\r\n localAdjust;\r\n if (!this.isValid()) {\r\n return input != null ? this : NaN;\r\n }\r\n if (input != null) {\r\n if (typeof input === 'string') {\r\n input = offsetFromString(matchShortOffset, input);\r\n } else if (Math.abs(input) < 16) {\r\n input = input * 60;\r\n }\r\n if (!this._isUTC && keepLocalTime) {\r\n localAdjust = getDateOffset(this);\r\n }\r\n this._offset = input;\r\n this._isUTC = true;\r\n if (localAdjust != null) {\r\n this.add(localAdjust, 'm');\r\n }\r\n if (offset !== input) {\r\n if (!keepLocalTime || this._changeInProgress) {\r\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\r\n } else if (!this._changeInProgress) {\r\n this._changeInProgress = true;\r\n utils_hooks__hooks.updateOffset(this, true);\r\n this._changeInProgress = null;\r\n }\r\n }\r\n return this;\r\n } else {\r\n return this._isUTC ? offset : getDateOffset(this);\r\n }\r\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}" ]
[ "0.6656456", "0.6656456", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6616619", "0.6590338", "0.6589671", "0.6586812", "0.6544682", "0.6544682", "0.65343285", "0.65343285", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.6440321", "0.64356685", "0.6431669", "0.64305687", "0.6423491", "0.6421313", "0.6421313", "0.6386715", "0.6386715", "0.6386715", "0.6386715", "0.6386715", "0.6386715", "0.6386715", "0.6386715", "0.6386715", "0.6386715", "0.63768554", "0.63590896", "0.6352254", "0.6352254", "0.6352254", "0.6352254", "0.6352254", "0.6352254", "0.6352254", "0.6352254", "0.6352254", "0.6352254", "0.6352254", "0.6352254" ]
0.0
-1
TODO: remove 'name' arg after deprecation is removed
function createAdder(direction, name) { return function (val, period) { var dur, tmp; //invert the arguments, but complain about it if (period !== null && !isNaN(+period)) { deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); tmp = val; val = period; period = tmp; } val = typeof val === 'string' ? +val : val; dur = createDuration(val, period); addSubtract(this, dur, direction); return this; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setName(name) { }", "constructor(name) {\n super(name);\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this._name = name;\n }", "constructor(name) {\n this._name = name;\n }", "constructor(name) {\n this._name = name;\n }", "constructor(name){\n this._name = name;\n }", "setName( name ) {\n this.name = name;\n }", "getName(newName) {\n this.name = newName;\n }", "setName(name) {\n\t\tthis.name = name;\n\t}", "constructor(name){\n this.name = name\n }", "constructor(name){\n this.name = name;\n }", "setName(name) {\n this.name = name;\n }", "setName(name) {\n this._name = name;\n }", "set type(name) {\n console.warn(\"prototype.type = 'ModelName' is deprecated, use static __name__ instead\");\n this.constructor.__name__ = name;\n }", "set name(x) { this._name = x; }", "get name() {return this._name;}", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "setName(name){\n this.name = name;\n }", "set name(value) { this._name = value || \"unknown\"; }", "constructor({ name }) { // { name } is bringing in a object and deconstructing/ unpacking the object into the class \n this.name = name // name is the object you bring in, and this.name is this specific instance of the class is the name of it \n }", "getName() {}", "function getName() { return name; }", "get name() {\n return this.use().name;\n }", "function name(name) {\n return name;\n }", "setName(value){\n\t\tthis.name = value;\n\t}", "constructor(name='test') {\n this.name = name;\n }", "constructor() {\n super();\n this.name = 'none';\n }", "set setName(name){\n _name=name;\n }", "set name(newName) {\n this.setName(newName);\n }", "get name(): string { throw new Error(\"Member class not implemented\"); }", "set name(value) {\n\t\tthis._name = value;\n\t}", "name(name) {\n\t\tthis._name = name;\n\t\treturn this;\n\t}", "get name() {\r\n\t\treturn this._name;\r\n\t}", "name() { }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "getName() {\r\n return this.name;\r\n }", "name(str) {\n this._name = str;\n return this;\n }", "constructor(name) { // méthode constructor avec pour paramètre name\n super(name); // utiliser super pour appeler name\n this.name = \"Kuma\"; // le name devient Kuma\n }", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name () {\n console.warn(\n 'Deprecation warning: \"channel.name\" is deprecated, use channel.channelName instead'\n )\n return this.channelName\n }", "get name() {\n \treturn 'Stephanie';\n }", "get name() {\r\n return this._name;\r\n }", "get name() {\n\t return this._name;\n\t }", "function getName() {\n\treturn name;\n}", "setName(namePicked) {\n this.name = namePicked; //refer to the object itself using 'this'\n }", "set name(newName) {\n if (newName) {\n this._name = newName;\n }\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "set name(newName) {\n this.setName(newName);\n }", "get name() {\n\t\treturn this._name;\n\t}", "get name() {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "_$name() {\n super._$name();\n this._value.name = this._node.key.name;\n }", "function getName(name) {\n return name\n}", "constructor(transport, name) {\n super(transport);\n this.name = name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "function ensureNameField(desc) {\n desc.name = '';\n }", "get getName() {\n return this._name;\n }", "get name () {\n return this._name;\n }", "['@_name']() {\n super['@_name']();\n if (this._value.name) return;\n\n this._value.name = this._node.declarations[0].id.name;\n }", "function name() {}", "set name(newName) {\n\t this.setName(newName);\n\t }", "constructor () {\n this._name = 'u1';\n }", "get name() {}", "get name() {}", "get name() {}", "get name() {}" ]
[ "0.67782986", "0.6759405", "0.67381084", "0.67381084", "0.67381084", "0.67381084", "0.6733258", "0.6733258", "0.67120683", "0.66484624", "0.6612438", "0.6540716", "0.65202653", "0.65195", "0.6489472", "0.6465985", "0.6462259", "0.6415414", "0.6381141", "0.6297654", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6185439", "0.6112878", "0.60964316", "0.60552776", "0.6050006", "0.60477877", "0.60141873", "0.5992784", "0.5989703", "0.5979093", "0.5960276", "0.59392995", "0.5917421", "0.5909178", "0.5909035", "0.59078485", "0.59005576", "0.5888179", "0.5888179", "0.5888179", "0.5888179", "0.58705187", "0.58636767", "0.5862385", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.58525527", "0.58471906", "0.5845746", "0.58370185", "0.58324045", "0.5831436", "0.5828061", "0.5827184", "0.5827184", "0.58205706", "0.5813581", "0.5813581", "0.5809684", "0.5809684", "0.5809684", "0.5809684", "0.5809684", "0.5809684", "0.5802686", "0.58016807", "0.57931566", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.5757861", "0.575781", "0.5756826", "0.5755341", "0.57532394", "0.5749995", "0.57188797", "0.5716756", "0.5716756", "0.5716756", "0.5716756" ]
0.0
-1
Return a human readable representation of a moment that can also be evaluated to get a new moment which is the same
function inspect () { if (!this.isValid()) { return 'moment.invalid(/* ' + this._i + ' */)'; } var func = 'moment'; var zone = ''; if (!this.isLocal()) { func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; zone = 'Z'; } var prefix = '[' + func + '("]'; var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; var datetime = '-MM-DD[T]HH:mm:ss.SSS'; var suffix = zone + '[")]'; return this.format(prefix + year + datetime + suffix); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inspect(){if(!this.isValid()){return'moment.invalid(/* '+this._i+' */)';}var func='moment';var zone='';if(!this.isLocal()){func=this.utcOffset()===0?'moment.utc':'moment.parseZone';zone='Z';}var prefix='['+func+'(\"]';var year=0<=this.year()&&this.year()<=9999?'YYYY':'YYYYYY';var datetime='-MM-DD[T]HH:mm:ss.SSS';var suffix=zone+'[\")]';return this.format(prefix+year+datetime+suffix);}", "function inspect(){if(!this.isValid()){return'moment.invalid(/* '+this._i+' */)';}var func='moment';var zone='';if(!this.isLocal()){func=this.utcOffset()===0?'moment.utc':'moment.parseZone';zone='Z';}var prefix='['+func+'(\"]';var year=0<=this.year()&&this.year()<=9999?'YYYY':'YYYYYY';var datetime='-MM-DD[T]HH:mm:ss.SSS';var suffix=zone+'[\")]';return this.format(prefix+year+datetime+suffix);}", "function inspect(){if(!this.isValid()){return 'moment.invalid(/* ' + this._i + ' */)';}var func='moment';var zone='';if(!this.isLocal()){func = this.utcOffset() === 0?'moment.utc':'moment.parseZone';zone = 'Z';}var prefix='[' + func + '(\"]';var year=0 <= this.year() && this.year() <= 9999?'YYYY':'YYYYYY';var datetime='-MM-DD[T]HH:mm:ss.SSS';var suffix=zone + '[\")]';return this.format(prefix + year + datetime + suffix);}", "function inspect () {\n\tif (!this.isValid()) {\n\t\treturn 'moment.invalid(/* ' + this._i + ' */)';\n\t}\n\tvar func = 'moment';\n\tvar zone = '';\n\tif (!this.isLocal()) {\n\t\tfunc = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t\tzone = 'Z';\n\t}\n\tvar prefix = '[' + func + '(\"]';\n\tvar year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\tvar datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\tvar suffix = zone + '[\")]';\n\n\treturn this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\t\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\t\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\t\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\t\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}" ]
[ "0.7135807", "0.7135807", "0.71200997", "0.70935315", "0.70811427", "0.70811427", "0.70811427", "0.70811427", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.70571965", "0.7053813", "0.7053813", "0.70498693", "0.70498693" ]
0.0
-1
If passed a locale key, it will set the locale for this instance. Otherwise, it will return the locale configuration variables for this instance.
function locale (key) { var newLocaleData; if (key === undefined) { return this._locale._abbr; } else { newLocaleData = getLocale(key); if (newLocaleData != null) { this._locale = newLocaleData; } return this; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key === undefined){return this._locale._abbr;}else {newLocaleData = getLocale(key);if(newLocaleData != null){this._locale = newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=locale_locales__getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=locale_locales__getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}" ]
[ "0.7286929", "0.7286929", "0.723348", "0.7206655", "0.7206655", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514", "0.7091514" ]
0.0
-1
actual modulo handles negative numbers (for dates before 1970):
function mod$1(dividend, divisor) { return (dividend % divisor + divisor) % divisor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mod (x, y) {return x < 0? y - (-x % y) : x % y;}", "function testRemainder_17() {\n assertEquals(-0, -0 % Number.MAX_VALUE);\n}", "function moduloWithNegativeZeroDividend(a, b, c)\n{\n var temp = a * b;\n return temp % c;\n}", "function modulo(dividend, divisor)\n{\n var epsilon = divisor / 10000;\n var remainder = dividend % divisor;\n\n if (Math.abs(remainder - divisor) < epsilon || Math.abs(remainder) < epsilon) {\n remainder = 0;\n }\n\n return remainder;\n}", "function modulo(dividend, divisor)\n{\n var epsilon = divisor / 10000;\n var remainder = dividend % divisor;\n\n if (Math.abs(remainder - divisor) < epsilon || Math.abs(remainder) < epsilon) {\n remainder = 0;\n }\n\n return remainder;\n}", "function modulo(dividend, divisor)\n{\n var epsilon = divisor / 10000;\n var remainder = dividend % divisor;\n\n if (Math.abs(remainder - divisor) < epsilon || Math.abs(remainder) < epsilon) {\n remainder = 0;\n }\n\n return remainder;\n}", "function positiveMod(quotient, divisor) {\n var regularMod = quotient % divisor;\n return regularMod < 0 ? regularMod + Math.abs(divisor) : regularMod; \n}", "function modulo(dividend, divisor) {\n var epsilon = divisor / 10000;\n var remainder = dividend % divisor;\n\n if (Math.abs(remainder - divisor) < epsilon || Math.abs(remainder) < epsilon) {\n remainder = 0;\n }\n\n return remainder;\n}", "function safe_mod(a, b) {\n if (b === 0) {\n return 0\n }\n\n return a % b\n}", "_mod(val) {\n if (this.pillar === false) return val\n return (val + this.largezero) % this.width\n }", "function mod( a, b ){ let v = a % b; return ( v < 0 )? b+v : v; }", "function mod(v, d) { return ((v % d) + d) % d; }", "function __Mod(a, b)\n{\n return a - (b * Math.floor(a / b));\n}", "function fixedModulus(a, b) {\n return ((a % b) + b) % b;\n}", "function mod(a, b) {\n\t return a - (b * Math.floor(a / b));\n\t}", "function mod(a, b) {\n\t return a - (b * Math.floor(a / b));\n\t}", "function mod(a, b) {\n\t return a - (b * Math.floor(a / b));\n\t}", "function mod(a, b){\r\n return a - (b * Math.floor(a / b));\r\n}", "function moduloWithNegativeZeroDivisor(a, b, c)\n{\n var temp = a * b;\n return c % temp;\n}", "function mod(a, b)\n{\n return a - (b * Math.floor(a / b));\n}", "function modulo (x,y){\nif( x< y){\n\treturn x;\n }\n\twhile(x >=0){\n x= x-y;\n }\n return y+x;\n\t}", "function mathModulo(n, d) {\n return ((n % d) + d) % d;\n}", "function caml_mod(x,y) {\n if (y == 0) caml_raise_zero_divide ();\n return x%y;\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b){return ((a%b)+b)%b;}", "function mod(a, b) {\n\n return a - (b * Math.floor(a / b));\n\n}", "function mod$1(dividend,divisor){return (dividend % divisor + divisor) % divisor;}", "function evansMod(i, mod) {\n while (i < 0) {\n i += mod;\n }\n return i % mod;\n}", "function moduloWithUnusedNegativeZeroDividend(a, b, c)\n{\n var temp = a * b;\n return (temp % c) | 0;\n}", "function mod(dividend, divisor) {\n let value = dividend % divisor;\n if (value < 0) value += divisor;\n return value;\n }", "_mod(val) {\r\n if (this.pillar === false) return val\r\n return (val + this.largezero) % this.grid.length\r\n }", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function sc_modulo(x, y) {\n var remainder = x % y;\n // if they don't have the same sign\n if ((remainder * y) < 0)\n\treturn remainder + y;\n else\n\treturn remainder;\n}", "function remainder(x, y) {\nreturn x%y;\n}", "function fmod(a, n) {\n\treturn a - n * Math.floor(a / n);\n}", "function remainder(x, y) {\n return x % y;\n }", "function modnum(duration,num,sub){\n\n if(num - sub < 0){\n\treturn duration + (num - sub)%duration;\n }\n else{\n\treturn (num - sub)%duration;\n }\n \n}", "function goodMod(a, b)\n{\n return (b + (a%b)) % b;\n}", "remainder(seconds) {\n return (this.timestamp / (seconds * 1000)) % 1;\n }", "function Modulo(lastNum, secondToLastNum)\n{\n\n // Initialize result\n let result = 0;\n\n // calculating mod of b with a to make\n // b like 0 <= b < a\n for (let i = 0; i < secondToLastNum.length; i++)\n result = (result * 10 + secondToLastNum[i] - '0') % lastNum;\n\n return result; // return modulo\n}", "function modNoBug(num,den){\n\t\treturn ( (num % den ) + den ) % den;\n\t}", "function remainder(x, y) {\n return x % y;\n}", "function remainder(x, y) {\n var z = x/y\n if (z == 1){\n return 0\n } else {\n return x;\n }\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function remainder(n, d) {\n return n % d;\n}", "function mod(v, d) {\n var out = v % d;\n return out < 0 ? out + d : out;\n}", "function mod (num, m) { return ((num % m) + m) % m; }", "function mod (num, m) { return ((num % m) + m) % m; }", "function mod (num, m) { return ((num % m) + m) % m; }", "function amod(a, b) {\n\t return mod(a - 1, b) + 1;\n\t}", "function mod(v, d) {\n var out = v % d;\n return out < 0 ? out + d : out;\n}", "function remainder(x,y){\n return x%y;\n}", "function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }", "function sc_remainder(x, y) {\n return x % y;\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function modulus (x, y) {\n\treturn x % y;\n}", "static monthMod(month) {\n return month % 12\n }", "function mod(x, n) {\n const m = x % n;\n return m + (m && x * n < 0 ? n : 0); // add n when m is not 0 and x and n have different signs\n}", "function gmod(n,m){ return ((n%m)+m)%m; }", "function mod$1(dividend, divisor) {\n\t return (dividend % divisor + divisor) % divisor;\n\t }", "function mod(n,m){\n n = n%m;\n if(n<0) n+=m;\n return n;\n}", "function mod(dividend, divisor) {\r\n return (dividend % divisor + divisor) % divisor;\r\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n\t return ((dividend % divisor) + divisor) % divisor;\n\t }", "function mod$1(dividend, divisor) {\n\t return ((dividend % divisor) + divisor) % divisor;\n\t }", "function mod$1(dividend, divisor) {\n\t return ((dividend % divisor) + divisor) % divisor;\n\t }", "function modul(x=null, y=null){\n\treturn x % y;\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n}", "function isOddWithoutModulo(num) {\n // your code here\n if(num === 0) {\n return false;\n }\n // gets rid of negative signs\n num = Math.abs(num);\n\n while(num >= 2) {\n num -= 2;\n }\n if(num === 1) {\n return true;\n } else {\n return false;\n }\n }", "function mod(x, range) {\n if (x < range) return x;\n if (x >= range) return Math.abs(range - x);\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n}", "function mod(a, b) {\n\treturn (a % b + b) % b\n}", "function mod(a, b) {\n return (a % b + b) % b\n}", "function amod(a, b)\n{\n return mod(a - 1, b) + 1;\n}", "function amod(a, b) {\n return mod(a - 1, b) + 1;\n}", "function amod(a, b) {\n return mod(a - 1, b) + 1;\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function reminderOf(number, number2){\n console.log(number % number2);\n}", "function caml_int64_mod (x, y)\n{\n if (caml_int64_is_zero (y)) caml_raise_zero_divide ();\n var sign = x[3] ^ y[3];\n if (x[3] & 0x8000) x = caml_int64_neg(x);\n if (y[3] & 0x8000) y = caml_int64_neg(y);\n var r = caml_int64_udivmod(x, y)[2];\n if (sign & 0x8000) r = caml_int64_neg(r);\n return r;\n}", "function resteDiv(a, b) {\n //% modulo divise a par b et donne le reste\n return a % b;\n}", "function mod(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n}" ]
[ "0.70104235", "0.69869745", "0.6744497", "0.6722426", "0.6722426", "0.6722426", "0.6700196", "0.66672075", "0.6644362", "0.66419977", "0.6620504", "0.6617394", "0.6583436", "0.65654695", "0.65529805", "0.65529805", "0.65529805", "0.6544862", "0.65278447", "0.64930606", "0.6484832", "0.6481587", "0.6455089", "0.6442077", "0.6442077", "0.6442077", "0.6442077", "0.6442077", "0.6442077", "0.6434006", "0.6426837", "0.6423723", "0.64107347", "0.63913226", "0.6389403", "0.6374993", "0.6365343", "0.6365343", "0.6365343", "0.6365343", "0.6365343", "0.6365343", "0.6365343", "0.6365343", "0.6365343", "0.6355669", "0.6354277", "0.6345023", "0.63427377", "0.6339278", "0.63354933", "0.62846583", "0.6254532", "0.6252184", "0.62013197", "0.6167098", "0.61639553", "0.61627847", "0.6158697", "0.61539656", "0.61539656", "0.61539656", "0.61526525", "0.61398065", "0.61349726", "0.613354", "0.6121446", "0.61057043", "0.61020917", "0.6099858", "0.6091839", "0.60902333", "0.6087709", "0.6070369", "0.6069149", "0.6069136", "0.6069136", "0.6065071", "0.6065071", "0.6065071", "0.60638285", "0.60547805", "0.60547805", "0.6051782", "0.60463053", "0.60442245", "0.60376817", "0.60342896", "0.60240245", "0.602075", "0.602075", "0.60122365", "0.60122365", "0.60122365", "0.60122365", "0.60122365", "0.60122365", "0.6010005", "0.60021555", "0.6002122", "0.59991115" ]
0.0
-1
() (5) (fmt, 5) (fmt) (true) (true, 5) (true, fmt, 5) (true, fmt)
function listWeekdaysImpl (localeSorted, format, index, field) { if (typeof localeSorted === 'boolean') { if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } else { format = localeSorted; index = format; localeSorted = false; if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } var locale = getLocale(), shift = localeSorted ? locale._week.dow : 0; if (index != null) { return get$1(format, (index + shift) % 7, field, 'day'); } var i; var out = []; for (i = 0; i < 7; i++) { out[i] = get$1(format, (i + shift) % 7, field, 'day'); } return out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function foo5(a /* : number */, a2 /* : number */) /* : string => boolean => Foo */ {\n return s => b => ({\n moom: b,\n soup: s,\n nmb: a + a2 + 1\n })\n}", "function P$4(t){return t?[l$b(t[0]),l$b(t[1]),l$b(t[2]),l$b(t[3]),l$b(t[4]),l$b(t[5])]:[l$b(),l$b(),l$b(),l$b(),l$b(),l$b()]}", "function n$1(n,t){return n?t?4:3:t?3:2}", "function foo4(a /* : number */) /* : string => boolean => Foo */ {\n return s => b => ({\n moom: b,\n soup: s,\n nmb: a + 1\n })\n}", "function te(){var e;return Y(\"(\"),e=ge(),Y(\")\"),e}", "function cb_true_2(num) {\n print(\"element \" + num); // B3 B6 B9 B15 B18 B21 B27 B30 B33\n return true; // B4 B7 B10 B16 B19 B22 B28 B31 B34\n} // B5 B8 B11 B17 B20 B23 B29 B32 B35", "function P(a,c){return b.fn.format.call(a,c)}", "function example2 () {\n\n let sum = (a, b) => a + b\n \n function strParse (strings, ...params) {\n console.log(strings);\n console.log(strings.raw);\n console.log(params);\n }\n\n let a = 'test'\n let b = 13\n\n let s = strParse`Some ${a}\n string with another param ${b}\n and sum of 5 and 4, that is ${sum(5,4)}`\n}", "function show() {\n return x => x + arguments[0];\n}", "function process(tpl,state) {\n\tconst t = tpl.t, v = tpl.v, r = state.r;\n\tconst d = state.depth;\n\t// reset WS every time\n\tconst ws = state.ws;\n\tconst hasTag = state.hasTag;\n\t//console.log(t,v,ws,hasTag);\n\tstate.ws = false;\n\tstate.hasTag = 0;\n\t//console.log(t,v,tpl.o);\n\tif(t == 1) {\n\t\tif(v == 1) {\n\t\t\tconst last = r.lastChild();\n\t\t\tif(last && last.t === 2 && last.v == 2) {\n\t\t\t\t// 1. mark call\n\t\t\t\tstate.call[d] = true;\n\t\t\t\t//console.log(\"opencall\",d,_strip(r.peek()));\n\t\t\t\t// nest entire tree\n\t\t\t\t// 2. push comma\n\t\t\t\t// TODO add original position to comma\n\t\t\t\tr.mark(\"call\"+d).push(comma());\n\t\t\t} else {\n\t\t\t\tconst cur = r.peek();\n\t\t\t\tif(v == 1 && cur.t !== 6 && cur.t !== 10 && !(cur.t == 4 && (cur.v < 300 || cur.v > 2000))) {\n\t\t\t\t\t//console.log(cur.t,cur.v,cur.o);\n\t\t\t\t\tr.push(seq());\n\t\t\t\t}\n\t\t\t\tr.open(tpl);\n\t\t\t}\n\t\t} else if(v == 3 && state.xml) {\n\t\t\tr.open(tpl);\n\t\t} else {\n\t\t\tr.open(tpl);\n\t\t}\n\t} else if(t == 2) {\n\t\t// FIXME treat all infix-ops in same depth, not just on close\n\t\tstate.r.push(tpl).close();\n\t\tconst cd = d - 1;\n\t\tif(state.call[cd]) {\n\t\t\t// $(x)(2) => call($(x),2)\n\t\t\tstate.call[cd] = false;\n\t\t\t//console.log(\"call\",r.peek());\n\t\t\tr.unmark(\"call\"+cd).insertBefore(openParen()).openBefore({t:6,v:\"call\"}).close();\n\t\t}\n\t\t/*\n\t\t* 1 * 2 + 3\n\t\t* mult(1,2) + 3\n\t\t* 1 + 2 * 3\n\t\t* add(1,2) * 3 => pre, so nest in last\n\t\t* add(1,2 * 3))\n\t\t* add(1,mult(2,3)) => pre, so next in last (we're in subs, so openBefore )\n\t\t */\n\t\tif(state.infix[d]) {\n\t\t\t//console.log(\"peek-close\",_strip(r.peek()));\n\t\t\t// mark close so we can return to it\n\t\t\tr.mark(\"close\");\n\t\t\thandleInfix(state,d);\n\t\t\tr.unmark(\"close\");\n\t\t\tstate.infix[d] = null;\n\t\t}\n\t} else if(t == 4){\n\t\tif(v == 802 || v == 904 || v == 2005) {\n\t\t\tconst last = r.peek();\n\t\t\tconst test = last && (last.o || last.v);\n\t\t\tconst isEmpty = x => x && Triply.nextSibling(Triply.firstChild(x)) == Triply.lastChild(x);\n\t\t\tif(test && ((simpleTypes.includes(test) && isEmpty(last)) || complexTypes.includes(test) || kinds.includes(test))) {\n\t\t\t\ttpl.o = opMap[ v + 3000];\n\t\t\t\tstate.r.insertAfter(closeParen()).movePreviousSibling().insertBefore(openParen()).openBefore(tpl);\n\t\t\t\treturn state;\n\t\t\t} else if(last.t == 1 && last.v == 1) {\n\t\t\t\tconst prev = r.previous();\n\t\t\t\tconst test = prev && prev.o;\n\t\t\t\tif(test && complexTypes.includes(test)) {\n\t\t\t\t\tif(test == \"function\") {\n\t\t\t\t\t\t// convert function(*) to function((...),item()*)\n\t\t\t\t\t\tstate.r.push(seq()).open(openParen())\n\t\t\t\t\t\t\t.push({t:4,o:\"rest-params\"}).open(openParen()).push(closeParen()).close()\n\t\t\t\t\t\t\t.push(closeParen()).close().push(closeParen()).close()\n\t\t\t\t\t\t\t.push({t:4,o:\"any\"}).open(openParen()).push({t:4,o:\"item\"}).open(openParen()).push(closeParen()).close()\n\t\t\t\t\t\t\t.push(closeParen()).close();\n\t\t\t\t\t}\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(v == 505 && hasTag) {\n\t\t\t// TODO replace with tag and flag XML at depth\n\t\t\tr.pop();\n\t\t\tconst qname = state.qname;\n\t\t\tstate.qname = null;\n\t\t\tif(hasTag == 1) {\n\t\t\t\tr.push(openTag(qname,state.attrs));\n\t\t\t\tstate.xml++;\n\t\t\t\tstate.attrs = [];\n\t\t\t} else if(hasTag == 3 || hasTag == 6) {\n\t\t\t\tr.push(closeTag(qname));//.close();\n\t\t\t}\n\t\t\tstate.infix[d]--;\n\t\t\treturn state;\n\t\t} else if(v == 1901) {\n\t\t\tconst last = r.peek();\n\t\t\tif(last.t == 4 && last.v == 507) {\n\t\t\t\t// close tag\n\t\t\t\tif(hasTag) {\n\t\t\t\t\tconst qname = state.qname;\n\t\t\t\t\tr.pop();\n\t\t\t\t\tr.push(openTag(qname,state.attrs));\n\t\t\t\t\tr.push(tpl);\n\t\t\t\t\tstate.attrs = [];\n\t\t\t\t}\n\t\t\t\tstate.hasTag = hasTag + 2;\n\t\t\t\treturn state;\n\t\t\t}\n\t\t} else if(v == 2600) {\n\t\t\tconst prev = r.previousSibling();\n\t\t\tif(prev && prev.t == 1 && prev.v == 3) {\n\t\t\t\tprev.v += 2000;\n\t\t\t}\n\t\t\tconst last = r.peek(1);\n\t\t\tr.pop();\n\t\t\ttpl.o = last.v;\n\t\t} else if(v == 509 && hasTag == 5) {\n\t\t\t// NOTE treat attrs as pairs\n\t\t\tstate.hasTag = hasTag + 1;\n\t\t\treturn state;\n\t\t}\n\t\tif(v == 119 || v == 2005) {\n\t\t\tif(opMap.hasOwnProperty(v)) tpl.o = opMap[v];\n\t\t\tr.push(tpl).open(openParen()).push(closeParen()).close();\n\t\t} else if(v >= 300 && v < 2000) {\n\t\t\t// NOTE always add prefix to distinguish between infix operators and equivalent functions\n\t\t\tconst last = r.peek();\n\t\t\tconst unaryOp = (v == 801 || v == 802) && (!last || !last.t || last.t == 1 || last.t == 4);\n\t\t\tconst v1 = unaryOp ? v + 900 : v;\n\t\t\ttpl.v = v1;\n\t\t\tconst mappedOp = opMap.hasOwnProperty(v1) ? opMap[v1] : \"n:\"+tpl.o;\n\t\t\ttpl.o = mappedOp;\n\t\t\tr.push(tpl);\n\t\t\tif(!state.infix[d]) state.infix[d] = 0;\n\t\t\tr.mark(d+\":\"+state.infix[d]++);\n\t\t} else {\n\t\t\tr.push(tpl);\n\t\t}\n\t} else if(t == 6) {\n\t\tif(/^\\$/.test(v)) {\n\t\t\t// var\n\t\t\ttpl.v = v.replace(/^\\$/,\"\");\n\t\t\tif(/[0-9]/.test(tpl.v)) tpl.t = 8;\n\t\t\tr.push({t:10,v:\"$\",o:\"$\"}).open(openParen()).push(tpl).push(closeParen()).close();\n\t\t} else {\n\t\t\tconst last = r.peek();\n\t\t\tif(last.t == 4 && last.v == 507 && !ws) {\n\t\t\t\tstate.qname = v;\n\t\t\t\tstate.hasTag = hasTag + 1;\n\t\t\t\treturn state;\n\t\t\t} else if(hasTag == 4) {\n\t\t\t\tstate.hasTag = hasTag + 1;\n\t\t\t\tif(!state.attrs) state.attrs = [];\n\t\t\t\tstate.attrs.push([v]);\n\t\t\t} else {\n\t\t\t\tr.push(tpl);\n\t\t\t}\n\t\t}\n\t} else if(t === 0) {\n\t\tr.push(tpl);\n\t\tif(state.infix[d]) {\n\t\t\t// mark close so we can return to it\n\t\t\tr.mark(\"EOS\");\n\t\t\thandleInfix(state,d);\n\t\t\tr.unmark(\"EOS\");\n\t\t\tstate.infix[d] = null;\n\t\t}\n\t} else if(t === 17){\n\t\t// mark WS\n\t\tstate.ws = true;\n\t\tif(hasTag) state.hasTag = 4;\n\t} else {\n\t\tif(hasTag == 6) {\n\t\t\tstate.attrs.lastItem.push(v);\n\t\t\tstate.hasTag = 1;\n\t\t} else {\n\t\t\tr.push(tpl);\n\t\t}\n\t}\n\tstate.depth = tpl.d;\n\treturn state;\n}", "function assert(count, name, test){\n if(!count || !Array.isArray(count) || count.length !== 2) {\n count = [0, '*'];\n } else {\n count[1]++;\n }\n\n var pass = 'false';\n try {\n if (test()) {\n pass = ' true';\n count[0]++;\n }\n } catch(e) {}\n console.log(' ' + (count[1] + ') ').slice(0,5) + pass + ' : ' + name);\n}", "function foo5(f) { f(1, 2, 3, 4); }", "function printer(value){\r\n return value; // => example of a function that can optionally take arguments \r\n}", "function tb(a, b) { var d, e; if (1 === b.length && c(b[0]) && (b = b[0]), !b.length) return sb(); for (d = b[0], e = 1; e < b.length; ++e) b[e].isValid() && !b[e][a](d) || (d = b[e]); return d }", "function assert(count, name, test){\n if(!count || !Array.isArray(count) || count.length !== 2) { \n count = [0, '*']; \n } else {\n count[1]++;\n }\n \n var pass = 'false';\n var errMsg = null;\n try {\n if (test()) { \n pass = ' true';\n count[0]++;\n } \n } catch(e) {\n errMsg = e;\n } \n console.log(' ' + (count[1] + ') ').slice(0,5) + pass + ' : ' + name);\n if (errMsg !== null) {\n console.log(' ' + errMsg + '\\n');\n }\n}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function X(a){for(var b,c=[],d=/\\[([^\\]]*)\\]|\\(([^\\)]*)\\)|(LT|(\\w)\\4*o?)|([^\\w\\[\\(]+)/g;b=d.exec(a);)b[1]?// a literal string inside [ ... ]\nc.push(b[1]):b[2]?// non-zero formatting inside ( ... )\nc.push({maybe:X(b[2])}):b[3]?// a formatting token\nc.push({token:b[3]}):b[5]&&// an unenclosed literal string\nc.push(b[5]);return c}", "function genTernaryExp(el){return el.once?genOnce(el):genElement(el);}", "function five(string){\n console.log(string);\n console.log(string);\n console.log(string);\n console.log(string);\n console.log(string);\n}", "prettyPrintCallback( cb ) {\n // get rid of \"function gen\" and start with parenthesis\n // const shortendCB = cb.toString().slice(9)\n const cbSplit = cb.toString().split('\\n')\n const cbTrim = cbSplit.slice( 3, -2 )\n const cbTabbed = cbTrim.map( v => ' ' + v ) \n \n return cbTabbed.join('\\n')\n }", "function\n// a\nf\n// b\n(\n// c\nx\n// d\n,\n// e\ny\n// f\n)\n// g\n{\n// h\n;\n// i\n;\n// j\n}", "function xt(t,e){return null===t||!1===t||void 0===t?S[e]:(\"number\"===typeof t&&(t=String(t)),t=i.format.from(t),t=T.toStepping(t),!1===t||isNaN(t)?S[e]:t)}", "function tF() {\n \n // 0\n let z = 0;\n let zVal = z ? 'is truthy': 'is falsey';\n console.log(`0 ${zVal} because 0 is a false value`);\n // \"zero\";\n let zS = \"zero\";\n let zSVal = zS ? 'is truthy': 'is falsey';\n console.log(`\"zero\" ${zSVal} because it is a filled string`);\n // const zero = 20;\n const zero = 20;\n let zeroVal = zero ? 'is truthy': 'is falsey';\n console.log(`20 ${zeroVal} because it is a number despite the variable name being zero`);\n // null\n let n = null;\n let nVal = n ? 'is truthy': 'is falsey';\n console.log(`null ${nVal} because it is lacks any value at all`);\n // \"0\"\n let zStrNum = \"0\";\n let zStrNumVal = zStrNum ? 'is truthy': 'is falsey';\n console.log(`\"0\" ${zStrNumVal} because it is a string that contains a character`);\n // !\"\"\n let excl = !\"\";\n let exclVal = excl? 'is truthy': 'is falsey';\n console.log(`!\"\" ${exclVal} because the \"!\" reverts the false value of the empty string to be true`);\n // {}\n let brack = {};\n let brackVal = brack? 'is truthy': 'is falsey';\n console.log(`{} ${brackVal} because JavaScript recognizes it as truthy (honestly i dont understand why it is this way, it seems it should be falsey since no value is contained)`);\n // () => {console.log(\"hello TEKcamp!\");\n let fun = () => {console.log(\"hello TEKcamp!\")};\n let funVal = fun? 'is truthy': 'is falsey';\n console.log(`() => {console.log(\"hello TEKcamp!\")} ${funVal} because the function contains contains a return (console)`);\n // 125\n let onetwofive = 125;\n let otfVal = onetwofive? 'is truthy': 'is falsey';\n console.log(`125 ${otfVal} because it is a number and numbers other than 0 are truthy`);\n // undefined\n let und = undefined;\n let undVal = und? 'is truthy': 'is falsey';\n console.log(`undefined ${undVal} because it doesnt recognize a value being assigned`);\n // \"\"\n let empt = \"\";\n let emptVal = empt? 'is truthy': 'is falsey';\n console.log(`\"\" ${emptVal} because it it is an empty string`);\n }", "function it(t, n) {\n return t + \" \" + n + (1 === t ? \"\" : \"s\");\n}", "function t$i(t,...n){let o=\"\";for(let r=0;r<n.length;r++)o+=t[r]+n[r];return o+=t[t.length-1],o}", "function t(e){if(e)return n(e)}", "function callString(f) {\n return '(' + f.toString() + ')()';\n}", "function n(n,t){return n?t?4:3:t?3:2}", "function parseExp5(state) {\n return lift(state)\n .then(parseExp6)\n .then(opt(alt([ parseExp5$times, parseExp5$div ])));\n}", "function genTernaryExp(el){return altGen?altGen(el,state):el.once?genOnce(el,state):genElement(el,state);}", "function genTernaryExp(el){return altGen?altGen(el,state):el.once?genOnce(el,state):genElement(el,state);}", "function tagFunction(strings, ...values) {\n let name = values[0];\n let age = values[1];\n if (age > 80) {\n return `${strings[0]}${values[0]}`;\n }\n return `${strings[0]}${name}${strings[1]}${age}${strings[2]}`;\n}", "function test_one(x,y) {\n var sink = x;\n\n//CHECK-NEXT: %0 = BinaryOperatorInst '+', %x, 2 : number\n//CHECK-NEXT: %1 = CallInst %x, undefined : undefined, %0 : string|number\n sink(x + 2);\n\n//CHECK-NEXT: %2 = CallInst %x, undefined : undefined, 4 : number\n sink(2 + 2);\n\n//CHECK-NEXT: %3 = BinaryOperatorInst '*', %x, 2 : number\n//CHECK-NEXT: %4 = BinaryOperatorInst '*', %x, 2 : number\n//CHECK-NEXT: %5 = BinaryOperatorInst '+', %3 : number, %4 : number\n//CHECK-NEXT: %6 = CallInst %x, undefined : undefined, %5 : number\n sink(x * 2 + x * 2);\n\n//CHECK-NEXT: %7 = AsInt32Inst %x\n//CHECK-NEXT: %8 = AsInt32Inst %x\n//CHECK-NEXT: %9 = BinaryOperatorInst '+', %7 : number, %8 : number\n//CHECK-NEXT: %10 = CallInst %x, undefined : undefined, %9 : number\n sink((x|0) + (x|0));\n\n//CHECK-NEXT: %11 = CallInst %x, undefined : undefined, \"hibye\" : string\n sink(\"hi\" + \"bye\");\n\n//CHECK-NEXT: %12 = BinaryOperatorInst '+', %x, %y\n//CHECK-NEXT: %13 = CallInst %x, undefined : undefined, %12 : string|number\n sink(x + y);\n\n//CHECK-NEXT: %14 = BinaryOperatorInst '+', \"hi\" : string, %y\n//CHECK-NEXT: %15 = CallInst %x, undefined : undefined, %14 : string\n sink(\"hi\" + y);\n\n//CHECK-NEXT: %16 = CallInst %x, undefined : undefined, 0 : number\n sink(null + null);\n\n//CHECK-NEXT: %17 = AllocObjectInst 0 : number, empty\n//CHECK-NEXT: %18 = AllocObjectInst 0 : number, empty\n//CHECK-NEXT: %19 = BinaryOperatorInst '+', %17 : object, %18 : object\n//CHECK-NEXT: %20 = CallInst %x, undefined : undefined, %19 : string|number\n sink({} + {});\n\n//CHECK-NEXT: %21 = CallInst %x, undefined : undefined, NaN : number\n sink(undefined + undefined);\n//CHECK-NEXT: %22 = ReturnInst undefined : undefined\n}", "function foo4(f) { f(1, 2, 3); }", "function one(a, onecb) {\n console.log(a);\n //Since it is a function\n onecb(a+1,(c,threecb)=>{\n console.log(c);\n threecb(c+1,(e)=>{\n console.log(e);\n console.log(a)\n console.log(c)\n });\n });\n}", "function TStylingTupleSummary() {}", "static fStr3(x) {\nreturn this.fStr(x, 3);\n}", "static fStr3(x) {\nreturn this.fStr(x, 3);\n}", "function Format() {}", "function Format() {}", "function f11(str) {\n const stack = [];\n for (let i = 0; i < str.length; i++) {\n if (str[i] === '(') stack.push(str[i]);\n else if (str[i] === ')') stack.pop();\n }\n return !stack.length;\n}", "function testChaining(val) {\n if (val < 5) return \"Tiny\";\n else if (val < 10) return \"Small\";\n else if (val < 15) return \"Medium\";\n else if (val < 20) return \"Large\";\n else return \"Huge\";\n}", "function test (func, input, expected) { console.log(func.name, \"\\n got:\", applyMaybeCurriedArgs(func, input), \"\\n exp:\", expected) }", "function fifth() {}", "next(num, format) {\n return getOccurrences.call(this, num, format, \"next\")\n }", "function v17(v18,v19) {\n function v23(v24,v25) {\n const v26 = 13.37;\n // v26 = .float\n const v27 = 0;\n // v27 = .integer\n const v28 = 1;\n // v28 = .integer\n const v29 = 13.37;\n // v29 = .float\n const v30 = 0;\n // v30 = .integer\n const v31 = 1;\n // v31 = .integer\n }\n const v33 = [13.37,13.37,13.37,13.37];\n // v33 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v36 = [1337];\n // v36 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v37 = [v36,arguments,arguments,\"65535\",arguments,13.37,13.37,1337,v33,1337];\n // v37 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v40 = v23(\"caller\",v37,...v37);\n // v40 = .unknown\n const v42 = [...v3,1337,-1.7976931348623157e+308];\n // v42 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n for (let v43 = 0; v43 < 1337; v43 = v43 + 1) {\n }\n}", "function i(e, t) {\n return e ? t ? 4 : 3 : t ? 3 : 2;\n }", "function logFive(sequence){\n\n for(var i =0;i<5;i++){\n if(!sequence.next()){\n break;\n \n }\n console.log(sequence.current());\n }\n\n}", "function TStylingTupleSummary(){}", "function TStylingTupleSummary() { }", "function be(t, n) {\n return t + \" \" + n + (1 === t ? \"\" : \"s\");\n}", "function isFive(input) {\n\n}", "function o0(o1,o2,o3)\n{\n try {\no4.o5(o39 === true + \" index:\" + o2 + \" Object:\" + o3);\n}catch(e){}\n try {\nreturn true;\n}catch(e){}\n}", "function a(n,t){0}", "function logFive(sequence) {\n for (var i = 0; i < 5; i++) {\n if (!sequence.next()) {\n break;\n } else {\n console.log(sequence.current());\n }\n }\n}", "function f(n1,n2,n3)\n{\nif (n1>n2 && n1>n3)\n{\n \n if(n2>n3)\n {\n \t document.write(n1 +\",\"+n2 +\",\"+n3 );\n\n }\n else{\n document.write(n1+ \",\"+n3+ \",\"+n2 );\n }\n}\nelse if (n2>n1 && n2>n3)\n{\n\n if(n1>n3)\n {\n \t document.write(n2+ \",\"+n1 +\",\"+n3 );\n\n }\n else\n {\n document.write(n2 +\",\"+n3+ \",\"+n1);\n }\n \n}\nelse if (n3>n1 && n3>n2) \n{\n if(n2>n1)\n {\n \t document.write(n3 +\",\"+n2+ \",\"+n1);\n\n }\n else\n {\n document.write(n3+ \",\"+n1+ \",\"+n2);\n }\n}\n}", "function fourth() {}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function v19(v20,v21,v22) {\n for (let v25 = 0; v25 < 100; v25 = v25 + 3) {\n let v26 = 0;\n function v27(v28,v29,v30,v31,v32) {\n for (let v35 = v26; v35 < 100; v35 = v35 + 1100861557) {\n }\n }\n for (let v39 = 0; v39 < 100; v39 = v39 + 1) {\n const v43 = [NaN,-2987865916,\"flags\"];\n // v43 = .object(ofGroup: Array, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"reduce\", \"map\", \"forEach\", \"find\", \"keys\", \"indexOf\", \"copyWithin\", \"flatMap\", \"join\", \"reverse\", \"reduceRight\", \"unshift\", \"entries\", \"slice\", \"pop\", \"filter\", \"some\", \"lastIndexOf\", \"fill\", \"toLocaleString\", \"concat\", \"every\", \"values\", \"flat\", \"findIndex\", \"shift\", \"push\", \"sort\", \"splice\", \"includes\", \"toString\"])\n const v44 = v43.concat();\n // v44 = .object(ofGroup: Array, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"reduce\", \"map\", \"forEach\", \"find\", \"keys\", \"indexOf\", \"copyWithin\", \"flatMap\", \"join\", \"reverse\", \"reduceRight\", \"unshift\", \"entries\", \"slice\", \"pop\", \"filter\", \"some\", \"lastIndexOf\", \"fill\", \"toLocaleString\", \"concat\", \"every\", \"values\", \"flat\", \"findIndex\", \"shift\", \"push\", \"sort\", \"splice\", \"includes\", \"toString\"])\n const v45 = v27(v26,v27,v27,v26,v27);\n // v45 = .unknown\n }\n }\n}" ]
[ "0.54520625", "0.54125756", "0.54015124", "0.5300545", "0.52498543", "0.51416755", "0.5129984", "0.5089496", "0.49964607", "0.49952304", "0.4973966", "0.4964228", "0.49168083", "0.4914914", "0.4910557", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.49089327", "0.48768717", "0.48744488", "0.48734716", "0.48521602", "0.48334983", "0.48299152", "0.48279086", "0.48151147", "0.48116827", "0.48060188", "0.47997555", "0.47890103", "0.47778156", "0.47606367", "0.47606367", "0.47501722", "0.47501254", "0.47498998", "0.4747876", "0.47453663", "0.4734025", "0.4734025", "0.4726678", "0.4726678", "0.4722565", "0.47145155", "0.4709453", "0.46914944", "0.46886668", "0.46853554", "0.46779284", "0.4677881", "0.46695358", "0.46629238", "0.46555206", "0.46464053", "0.46421838", "0.46410555", "0.46371838", "0.46350998", "0.4634102", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46294573", "0.46163392" ]
0.0
-1
supports only 2.0style add(1, 's') or add(duration)
function add$1 (input, value) { return addSubtract$1(this, input, value, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Duration(time) {\n var d = document.createElement('span');\n d.classList.add('duration');\n d.innerText = time;\n return d;\n}", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add(input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function addTwoSeconds(time){\n // Transform time to milliseconds\n var timeInMilliseconds = formattedTimeToMilliseconds(time);\n if (timeInMilliseconds == 0 || isNaN(timeInMilliseconds)){\n return 'ERROR';\n }\n // Add 2000 milliseconds\n var twoSecondsAdded = timeInMilliseconds + 2000;\n // Transform time to formatted time\n return millisecondsToFullTime(twoSecondsAdded);\n}", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "handleDurationChange() {\n this.setState({taskDuration: this.state.taskDuration.add(1, 's')});\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "setDuration(dur) {\nreturn this.duration = dur;\n}", "function duration_add_subtract__add(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function formatDuration(duration) {\n if (duration < 1000) {\n duration += 'ms';\n } else if (duration > 1000) {\n duration /= 1000;\n duration += 's';\n }\n return duration;\n}", "parseDurationProp(newValue) {\n this.innerDuration = newValue ? newValue : \"2000ms\";\n }", "function add() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n hours++;\n }\n }\n h2.textContent = (hours ? (hours > 9 ? hours : \"0\" + hours) : \"00\") + \":\" + (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") + \":\" + (seconds > 9 ? seconds : \"0\" + seconds);\n timer();\n}", "addAttoseconds(value, createNew) {\n return this.addFractionsOfSecond(value, createNew, '_attosecond', '_femtosecond', 'addFemtoseconds');\n }", "function add(a,b) {\n\treturn a + b + new Date().getSeconds();\n}", "function add() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n }\n }\n timer.textContent = (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") +\n \":\" + (seconds > 9 ? seconds : \"0\" + seconds);\n startTimer();\n}", "function duration(s) {\n if (typeof(s) == 'number') return s;\n var units = {\n days: { rx:/(\\d+)\\s*d/, mul:86400 },\n hours: { rx:/(\\d+)\\s*h/, mul:3600 },\n minutes: { rx:/(\\d+)\\s*m/, mul:60 },\n seconds: { rx:/(\\d+)\\s*s/, mul:1 }\n };\n var result = 0, unit, match;\n if (typeof(s) == 'string') for (var key in units) {\n unit = units[key];\n match = s.match(unit.rx);\n if (match) result += parseInt(match[1])*unit.mul;\n }\n return result*1000;\n}", "function addOneSec() {\n sec += 1;\n updateTimer();\n waitOneSec();\n}", "function duration_ms(durations) {\n\n durations = durations.toString();\n durations = durations.replace(/ms/g, \"\");\n\n // result\n var duration = 0;\n var ms;\n\n // Is multi durations?\n if (durations.indexOf(\",\") != -1) {\n\n var durationsArray = durations.split(\",\");\n\n for (var i = 0; i < durationsArray.length; i++) {\n\n var val = durationsArray[i];\n\n // Has dot?\n if (val.indexOf(\".\") != -1) {\n\n ms = parseFloat(val).toString().split(\".\")[1].length;\n val = val.replace(\".\", \"\").toString();\n\n if (ms == 2) {\n val = val.replace(/s/g, \"0\");\n } else if (ms == 1) {\n val = val.replace(/s/g, \"00\");\n }\n\n } else {\n val = val.replace(/s/g, \"000\");\n }\n\n duration = parseFloat(duration) + parseFloat(val);\n\n }\n\n return duration;\n\n } else {\n\n // Has dot?\n if (durations.indexOf(\".\") != -1) {\n\n ms = parseFloat(durations).toString().split(\".\")[1].length;\n durations = durations.replace(\".\", \"\").toString();\n\n if (ms == 2) {\n durations = durations.replace(/s/g, \"0\");\n } else if (ms == 1) {\n durations = durations.replace(/s/g, \"00\");\n }\n\n } else {\n durations = durations.replace(/s/g, \"000\");\n }\n\n return durations;\n\n }\n\n }", "function timeAdd(element, start,stop){\n if(typeof(start)!=='number' && typeof(stop)!=='number' || start === stop){\n return;\n }\n start++;\n element.text(start);\n setTimeout(function(){timeAdd(element, start,stop);}, 25);\n}", "function parseDuration(duration) {\n if (!duration) {\n return {second: 1};\n } else if (typeof(duration) == \"string\") {\n var start = 0;\n var isReciprocal = false;\n if (duration.charAt(0) == \"/\") {\n isReciprocal = true;\n start = 1;\n }\n function complete(value) {\n if (isReciprocal)\n value.reciprocal = true;\n return value;\n }\n var type = duration.charAt(duration.length - 1);\n if (/\\d/.test(type)) {\n return complete({milli: Number(type)});\n } else {\n var count;\n if (start == duration.length - 1) {\n count = 1;\n } else {\n count = Number(duration.slice(start, duration.length - 1));\n }\n switch (type) {\n case \"s\":\n return complete({second: count});\n case \"m\":\n return complete({minute: count});\n case \"h\":\n return complete({hour: count});\n default:\n throw new Error(\"Couldn't parse duration \" + duration);\n }\n }\n } else {\n return duration;\n }\n }", "function Seconds() {\r\n}", "function getSecondsTime(duration) {\n if(typeof duration === \"number\") return duration;\n if(typeof duration !== \"string\") return 0;\n\n duration = duration.split(\":\");\n let time = 0;\n\n if(duration.length === 2) {\n time += Number(duration[0]) * 60;\n time += Number(duration[1]);\n } else if(duration.length === 3) {\n time += Number(duration[0]) * 3600;\n time += Number(duration[1]) * 60;\n time += Number(duration[2]);\n }\n\n return time;\n}", "addTime(s){\n if (timer.minutes === 59 && (timer.secondes + s) >= 60){\n timer.hours++\n timer.minutes = 0\n timer.secondes = (timer.secondes + s) - 60\n } else if (timer.secondes + s >= 60){\n timer.minutes++\n timer.secondes = (timer.secondes + s) - 60 \n } else {\n timer.secondes = timer.secondes + s\n }\n }", "set time(value) {}" ]
[ "0.64308345", "0.6108279", "0.6108279", "0.6108279", "0.6108279", "0.6108279", "0.6108279", "0.6108279", "0.6108279", "0.6108279", "0.6108279", "0.6108279", "0.6108279", "0.608478", "0.60591125", "0.60149765", "0.60149765", "0.6010823", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.5894448", "0.58881646", "0.58881646", "0.5884993", "0.5845467", "0.5845467", "0.5845467", "0.5814135", "0.5786174", "0.5766111", "0.5761194", "0.57311916", "0.5717657", "0.56490403", "0.56398857", "0.56220484", "0.5617265", "0.5607366", "0.5591012", "0.5587138", "0.5559087", "0.5449574" ]
0.0
-1
supports only 2.0style subtract(1, 's') or subtract(duration)
function subtract$1 (input, value) { return addSubtract$1(this, input, value, -1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract(input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, -1);\r\n }", "function duration_add_subtract__subtract (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, -1);\r\n }", "function duration_add_subtract__subtract(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add(input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }" ]
[ "0.7400228", "0.7400228", "0.7400228", "0.7400228", "0.7400228", "0.7400228", "0.7400228", "0.7400228", "0.7400228", "0.7400228", "0.7400228", "0.7400228", "0.73801476", "0.7363223", "0.7363223", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.72737086", "0.7267948", "0.7267948", "0.7232978", "0.7232978", "0.7232978", "0.6682277", "0.6682277", "0.6675781", "0.6675781", "0.6675781", "0.6675781", "0.6675781", "0.6675781", "0.6675781", "0.6675781", "0.6675781", "0.6675781", "0.6675781", "0.6675781", "0.6612194", "0.66115457", "0.66115457", "0.65883803", "0.65883803" ]
0.0
-1
helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function formatHuman(value) {\n var time = moment(value).fromNow();\n time = time === 'a few seconds ago' ? 'seconds ago' : time;\n return time;\n }", "labelFunction(date) {\n return moment(date).fromNow();\n }", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function humanizeDuration(duration) {\n const months = duration.months();\n const weeks = duration.weeks();\n let days = duration.days();\n const hours = duration.hours();\n const minutes = duration.minutes();\n const seconds = duration.seconds();\n\n // console.log(duration);\n\n const str = [];\n\n if (weeks > 0) {\n const weekTitle = pluralize('week', weeks);\n str.push(`${weeks} ${weekTitle}`);\n }\n\n if (days > 0) {\n if (weeks > 0) days -= 7 * weeks;\n\n const dayTitle = pluralize('day', days);\n str.push(`${days} ${dayTitle}`);\n }\n\n if (hours > 0 && (weeks < 1 && days < 2)) {\n const hourTitle = pluralize('hour', hours);\n str.push(`${hours} ${hourTitle}`);\n }\n\n if (minutes > 0 && (weeks < 1 && days < 1)) {\n const minuteTitle = pluralize('minute', minutes);\n str.push(`${minutes} ${minuteTitle}`);\n }\n\n if (seconds > 0 && (weeks < 1 && hours < 1)) {\n const secondTitle = pluralize('second', seconds);\n str.push(`${seconds} ${secondTitle}`);\n }\n\n return str.join(' ');\n}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(qf=c)),qf._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(qf=c)),qf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function T(a,b,c,d,e){var f;// works with moment-pre-2.8\n// Expand localized format strings, like \"LL\" -> \"MMMM D YYYY\"\n// BTW, this is not important for `formatDate` because it is impossible to put custom tokens\n// or non-zero areas in Moment's localized format strings.\nreturn a=Ia.moment.parseZone(a),b=Ia.moment.parseZone(b),f=(a.localeData||a.lang).call(a),c=f.longDateFormat(c)||c,d=d||\" - \",U(a,b,W(c),d,e)}// expose", "dateForHumans(item) {\n if (!item.date) return \"\";\n let startDate = DateTime.fromISO(item.date).toFormat(\"d LLLL yyyy\");\n if (!item.time && !item.enddate) return startDate;\n if (item.time) return `${startDate} at ${item.time}`;\n if (!item.enddate) return startDate;\n\n let endDate = DateTime.fromISO(item.enddate).toFormat(\"d LLLL yyyy\");\n return `${startDate} to ${endDate}`;\n }", "function humanizeStr(nd, s, en, o) {\n var r = Math.round,\n dir = en ? ' ago' : '前',\n pl = function(v, n) {\n return (s === undefined) ? n + (en ? ' ' : '') + v + (n > 1 && en ? 's' : '') + dir : n + v.substring(0, 1)\n },\n ts = Date.now() - new Date(nd).getTime(),\n ii;\n if( ts < 0 )\n {\n ts *= -1;\n dir = en ? ' from now' : '後';\n }\n for (var i in o) {\n if (r(ts) < o[i]) return pl(ii || 'm', r(ts / (o[ii] || 1)))\n ii = i;\n }\n return pl(i, r(ts / o[i]));\n}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function oldMomentFormat(mom,formatStr){return oldMomentProto.format.call(mom,formatStr);// oldMomentProto defined in moment-ext.js\n}", "function relativeTimeWithPlural(number,withoutSuffix,key){var format={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},separator=\" \";return(number%100>=20||number>=100&&number%100===0)&&(separator=\" de \"),number+separator+format[key]}", "function humanizeDate(date) {\n return moment(date).format('lll');\n}", "fromNow(date /* , locale*/) {\n if (typeof date !== 'object') date = new Date(date);\n return moment(date).fromNow();\n }", "changeTimeFormatByTime(time) {\n if(time > moment().subtract(1, 'minutes')) {\n return time.startOf('second').fromNow();\n } else if(time > moment().subtract(1, 'hours')) {\n return time.startOf('minute').fromNow();\n } else if(time > moment().subtract(1, 'days')) {\n return time.format('h:mm:ss a');\n } else if(time > moment().subtract(1, 'years')) {\n return time.format(\"MMM Do\");\n } else {\n return time.format(\"MMM Do YYYY\");\n }\n }", "createdAgo(date) { return moment(date).fromNow() }", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number || 1,!!withoutSuffix,string,isFuture);}", "function relativeTimeWithMutation(number,withoutSuffix,key){var format={'mm':'munutenn','MM':'miz','dd':'devezh'};return number + ' ' + mutation(format[key],number);}", "function relativeTimeWithPlural$2(number,withoutSuffix,key){var format={'ss':'secunde','mm':'minute','hh':'ore','dd':'zile','MM':'luni','yy':'ani'},separator=' ';if(number % 100 >= 20 || number >= 100 && number % 100 === 0){separator = ' de ';}return number + separator + format[key];}", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n\t var result = number + ' ';\n\t switch (key) {\n\t case 's':\n\t return withoutSuffix || isFuture\n\t ? 'nekaj sekund'\n\t : 'nekaj sekundami';\n\t case 'ss':\n\t if (number === 1) {\n\t result += withoutSuffix ? 'sekundo' : 'sekundi';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n\t } else {\n\t result += 'sekund';\n\t }\n\t return result;\n\t case 'm':\n\t return withoutSuffix ? 'ena minuta' : 'eno minuto';\n\t case 'mm':\n\t if (number === 1) {\n\t result += withoutSuffix ? 'minuta' : 'minuto';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n\t }\n\t return result;\n\t case 'h':\n\t return withoutSuffix ? 'ena ura' : 'eno uro';\n\t case 'hh':\n\t if (number === 1) {\n\t result += withoutSuffix ? 'ura' : 'uro';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'uri' : 'urama';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'ure' : 'urami';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'ur' : 'urami';\n\t }\n\t return result;\n\t case 'd':\n\t return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n\t case 'dd':\n\t if (number === 1) {\n\t result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n\t }\n\t return result;\n\t case 'M':\n\t return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n\t case 'MM':\n\t if (number === 1) {\n\t result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n\t }\n\t return result;\n\t case 'y':\n\t return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n\t case 'yy':\n\t if (number === 1) {\n\t result += withoutSuffix || isFuture ? 'leto' : 'letom';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'leta' : 'leti';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'let' : 'leti';\n\t }\n\t return result;\n\t }\n\t }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ?\n 'nekaj sekund' :\n 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;}\n\n }", "function formatMoment(m, inputString) {\n var currentMonth = m.month(),\n currentDate = m.date(),\n currentYear = m.year(),\n currentDay = m.day(),\n currentHours = m.hours(),\n currentMinutes = m.minutes(),\n currentSeconds = m.seconds(),\n currentMilliseconds = m.milliseconds(),\n currentZone = -m.zone(),\n ordinal = moment.ordinal,\n meridiem = moment.meridiem;\n // check if the character is a format\n // return formatted string or non string.\n //\n // uses switch/case instead of an object of named functions (like http://phpjs.org/functions/date:380)\n // for minification and performance\n // see http://jsperf.com/object-of-functions-vs-switch for performance comparison\n function replaceFunction(input) {\n // create a couple variables to be used later inside one of the cases.\n var a, b;\n switch (input) {\n // MONTH\n case 'M' :\n return currentMonth + 1;\n case 'Mo' :\n return (currentMonth + 1) + ordinal(currentMonth + 1);\n case 'MM' :\n return leftZeroFill(currentMonth + 1, 2);\n case 'MMM' :\n return moment.monthsShort[currentMonth];\n case 'MMMM' :\n return moment.months[currentMonth];\n // DAY OF MONTH\n case 'D' :\n return currentDate;\n case 'Do' :\n return currentDate + ordinal(currentDate);\n case 'DD' :\n return leftZeroFill(currentDate, 2);\n // DAY OF YEAR\n case 'DDD' :\n a = new Date(currentYear, currentMonth, currentDate);\n b = new Date(currentYear, 0, 1);\n return ~~ (((a - b) / 864e5) + 1.5);\n case 'DDDo' :\n a = replaceFunction('DDD');\n return a + ordinal(a);\n case 'DDDD' :\n return leftZeroFill(replaceFunction('DDD'), 3);\n // WEEKDAY\n case 'd' :\n return currentDay;\n case 'do' :\n return currentDay + ordinal(currentDay);\n case 'ddd' :\n return moment.weekdaysShort[currentDay];\n case 'dddd' :\n return moment.weekdays[currentDay];\n // WEEK OF YEAR\n case 'w' :\n a = new Date(currentYear, currentMonth, currentDate - currentDay + 5);\n b = new Date(a.getFullYear(), 0, 4);\n return ~~ ((a - b) / 864e5 / 7 + 1.5);\n case 'wo' :\n a = replaceFunction('w');\n return a + ordinal(a);\n case 'ww' :\n return leftZeroFill(replaceFunction('w'), 2);\n // YEAR\n case 'YY' :\n return leftZeroFill(currentYear % 100, 2);\n case 'YYYY' :\n return currentYear;\n // AM / PM\n case 'a' :\n return meridiem ? meridiem(currentHours, currentMinutes, false) : (currentHours > 11 ? 'pm' : 'am');\n case 'A' :\n return meridiem ? meridiem(currentHours, currentMinutes, true) : (currentHours > 11 ? 'PM' : 'AM');\n // 24 HOUR\n case 'H' :\n return currentHours;\n case 'HH' :\n return leftZeroFill(currentHours, 2);\n // 12 HOUR\n case 'h' :\n return currentHours % 12 || 12;\n case 'hh' :\n return leftZeroFill(currentHours % 12 || 12, 2);\n // MINUTE\n case 'm' :\n return currentMinutes;\n case 'mm' :\n return leftZeroFill(currentMinutes, 2);\n // SECOND\n case 's' :\n return currentSeconds;\n case 'ss' :\n return leftZeroFill(currentSeconds, 2);\n // MILLISECONDS\n case 'S' :\n return ~~ (currentMilliseconds / 100);\n case 'SS' :\n return leftZeroFill(~~(currentMilliseconds / 10), 2);\n case 'SSS' :\n return leftZeroFill(currentMilliseconds, 3);\n // TIMEZONE\n case 'Z' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(Math.abs(currentZone) / 60), 2) + ':' + leftZeroFill(~~(Math.abs(currentZone) % 60), 2);\n case 'ZZ' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(10 * Math.abs(currentZone) / 6), 4);\n // LONG DATES\n case 'L' :\n case 'LL' :\n case 'LLL' :\n case 'LLLL' :\n case 'LT' :\n return formatMoment(m, moment.longDateFormat[input]);\n // DEFAULT\n default :\n return input.replace(/(^\\[)|(\\\\)|\\]$/g, \"\");\n }\n }\n return inputString.replace(formattingTokens, replaceFunction);\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n\n return result;\n\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n\n return result;\n\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n\n return result;\n\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number,withoutSuffix,key,isFuture){var format={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return withoutSuffix?format[key][0]:format[key][1]}", "function toAgo(time){\n var strings = {\n suffixAgo: \"ago\",\n suffixFromNow: \"from now\",\n seconds: \"less than a minute\",\n minute: \"about a minute\",\n minutes: \"%d minutes\",\n hour: \"about an hour\",\n hours: \"about %d hours\",\n day: \"a day\",\n days: \"%d days\",\n month: \"about a month\",\n months: \"%d months\",\n year: \"about a year\",\n years: \"%d years\"\n };\n var $l = strings;\n var prefix = $l.prefixAgo;\n var suffix = $l.suffixAgo;\n\n var distanceMillis = new Date().getTime() - time;\n\n var seconds = distanceMillis / 1000;\n var minutes = seconds / 60;\n var hours = minutes / 60;\n var days = hours / 24;\n var years = days / 365;\n\n function substitute(string, number) {\n var value = ($l.numbers && $l.numbers[number]) || number;\n return string.replace(/%d/i, value);\n }\n\n var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||\n seconds < 90 && substitute($l.minute, 1) ||\n minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||\n minutes < 90 && substitute($l.hour, 1) ||\n hours < 24 && substitute($l.hours, Math.round(hours)) ||\n hours < 48 && substitute($l.day, 1) ||\n days < 30 && substitute($l.days, Math.floor(days)) ||\n days < 60 && substitute($l.month, 1) ||\n days < 365 && substitute($l.months, Math.floor(days / 30)) ||\n years < 2 && substitute($l.year, 1) ||\n substitute($l.years, Math.floor(years));\n\n return [prefix, words, suffix].join(\" \").trim();\n}", "function formatMoment(m, inputString) {\n var currentMonth = m.month(),\n currentDate = m.date(),\n currentYear = m.year(),\n currentDay = m.day(),\n currentHours = m.hours(),\n currentMinutes = m.minutes(),\n currentSeconds = m.seconds(),\n currentZone = -m.zone(),\n ordinal = moment.ordinal,\n meridiem = moment.meridiem;\n // check if the character is a format\n // return formatted string or non string.\n //\n // uses switch/case instead of an object of named functions (like http://phpjs.org/functions/date:380)\n // for minification and performance\n // see http://jsperf.com/object-of-functions-vs-switch for performance comparison\n function replaceFunction(input) {\n // create a couple variables to be used later inside one of the cases.\n var a, b;\n switch (input) {\n // MONTH\n case 'M' :\n return currentMonth + 1;\n case 'Mo' :\n return (currentMonth + 1) + ordinal(currentMonth + 1);\n case 'MM' :\n return leftZeroFill(currentMonth + 1, 2);\n case 'MMM' :\n return moment.monthsShort[currentMonth];\n case 'MMMM' :\n return moment.months[currentMonth];\n // DAY OF MONTH\n case 'D' :\n return currentDate;\n case 'Do' :\n return currentDate + ordinal(currentDate);\n case 'DD' :\n return leftZeroFill(currentDate, 2);\n // DAY OF YEAR\n case 'DDD' :\n a = new Date(currentYear, currentMonth, currentDate);\n b = new Date(currentYear, 0, 1);\n return ~~ (((a - b) / 864e5) + 1.5);\n case 'DDDo' :\n a = replaceFunction('DDD');\n return a + ordinal(a);\n case 'DDDD' :\n return leftZeroFill(replaceFunction('DDD'), 3);\n // WEEKDAY\n case 'd' :\n return currentDay;\n case 'do' :\n return currentDay + ordinal(currentDay);\n case 'ddd' :\n return moment.weekdaysShort[currentDay];\n case 'dddd' :\n return moment.weekdays[currentDay];\n // WEEK OF YEAR\n case 'w' :\n a = new Date(currentYear, currentMonth, currentDate - currentDay + 5);\n b = new Date(a.getFullYear(), 0, 4);\n return ~~ ((a - b) / 864e5 / 7 + 1.5);\n case 'wo' :\n a = replaceFunction('w');\n return a + ordinal(a);\n case 'ww' :\n return leftZeroFill(replaceFunction('w'), 2);\n // YEAR\n case 'YY' :\n return leftZeroFill(currentYear % 100, 2);\n case 'YYYY' :\n return currentYear;\n // AM / PM\n case 'a' :\n return currentHours > 11 ? meridiem.pm : meridiem.am;\n case 'A' :\n return currentHours > 11 ? meridiem.PM : meridiem.AM;\n // 24 HOUR\n case 'H' :\n return currentHours;\n case 'HH' :\n return leftZeroFill(currentHours, 2);\n // 12 HOUR\n case 'h' :\n return currentHours % 12 || 12;\n case 'hh' :\n return leftZeroFill(currentHours % 12 || 12, 2);\n // MINUTE\n case 'm' :\n return currentMinutes;\n case 'mm' :\n return leftZeroFill(currentMinutes, 2);\n // SECOND\n case 's' :\n return currentSeconds;\n case 'ss' :\n return leftZeroFill(currentSeconds, 2);\n // TIMEZONE\n case 'zz' :\n // depreciating 'zz' fall through to 'z'\n case 'z' :\n return (m._d.toString().match(timezoneRegex) || [''])[0].replace(nonuppercaseLetters, '');\n case 'Z' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(Math.abs(currentZone) / 60), 2) + ':' + leftZeroFill(~~(Math.abs(currentZone) % 60), 2);\n case 'ZZ' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(10 * Math.abs(currentZone) / 6), 4);\n // LONG DATES\n case 'L' :\n case 'LL' :\n case 'LLL' :\n case 'LLLL' :\n case 'LT' :\n return formatMoment(m, moment.longDateFormat[input]);\n // DEFAULT\n default :\n return input.replace(/(^\\[)|(\\\\)|\\]$/g, \"\");\n }\n }\n return inputString.replace(charactersToReplace, replaceFunction);\n }", "function durationFormat() {\n\n var args = [].slice.call(arguments);\n var settings = extend({}, this.format.defaults);\n\n // Keep a shadow copy of this moment for calculating remainders.\n // Perform all calculations on positive duration value, handle negative\n // sign at the very end.\n var asMilliseconds = this.asMilliseconds();\n var asMonths = this.asMonths();\n\n // Treat invalid durations as having a value of 0 milliseconds.\n if (typeof this.isValid === \"function\" && this.isValid() === false) {\n asMilliseconds = 0;\n asMonths = 0;\n }\n\n var isNegative = asMilliseconds < 0;\n\n // Two shadow copies are needed because of the way moment.js handles\n // duration arithmetic for years/months and for weeks/days/hours/minutes/seconds.\n var remainder = moment.duration(Math.abs(asMilliseconds), \"milliseconds\");\n var remainderMonths = moment.duration(Math.abs(asMonths), \"months\");\n\n // Parse arguments.\n each(args, function (arg) {\n if (typeof arg === \"string\" || typeof arg === \"function\") {\n settings.template = arg;\n return;\n }\n\n if (typeof arg === \"number\") {\n settings.precision = arg;\n return;\n }\n\n if (isObject(arg)) {\n extend(settings, arg);\n }\n });\n\n var momentTokens = {\n years: \"y\",\n months: \"M\",\n weeks: \"w\",\n days: \"d\",\n hours: \"h\",\n minutes: \"m\",\n seconds: \"s\",\n milliseconds: \"S\"\n };\n\n var tokenDefs = {\n escape: /\\[(.+?)\\]/,\n years: /\\*?[Yy]+/,\n months: /\\*?M+/,\n weeks: /\\*?[Ww]+/,\n days: /\\*?[Dd]+/,\n hours: /\\*?[Hh]+/,\n minutes: /\\*?m+/,\n seconds: /\\*?s+/,\n milliseconds: /\\*?S+/,\n general: /.+?/\n };\n\n // Types array is available in the template function.\n settings.types = types;\n\n var typeMap = function (token) {\n return find(types, function (type) {\n return tokenDefs[type].test(token);\n });\n };\n\n var tokenizer = new RegExp(map(types, function (type) {\n return tokenDefs[type].source;\n }).join(\"|\"), \"g\");\n\n // Current duration object is available in the template function.\n settings.duration = this;\n\n // Eval template function and cache template string.\n var template = typeof settings.template === \"function\" ? settings.template.apply(settings) : settings.template;\n\n // outputTypes and returnMomentTypes are settings to support durationsFormat().\n\n // outputTypes is an array of moment token types that determines\n // the tokens returned in formatted output. This option overrides\n // trim, largest, stopTrim, etc.\n var outputTypes = settings.outputTypes;\n\n // returnMomentTypes is a boolean that sets durationFormat to return\n // the processed momentTypes instead of formatted output.\n var returnMomentTypes = settings.returnMomentTypes;\n\n var largest = settings.largest;\n\n // Setup stopTrim array of token types.\n var stopTrim = [];\n\n if (!outputTypes) {\n if (isArray(settings.stopTrim)) {\n settings.stopTrim = settings.stopTrim.join(\"\");\n }\n\n // Parse stopTrim string to create token types array.\n if (settings.stopTrim) {\n each(settings.stopTrim.match(tokenizer), function (token) {\n var type = typeMap(token);\n\n if (type === \"escape\" || type === \"general\") {\n return;\n }\n\n stopTrim.push(type);\n });\n }\n }\n\n // Cache moment's locale data.\n var localeData = moment.localeData();\n\n if (!localeData) {\n localeData = {};\n }\n\n // Fall back to this plugin's `eng` extension.\n each(keys(engLocale), function (key) {\n if (typeof engLocale[key] === \"function\") {\n if (!localeData[key]) {\n localeData[key] = engLocale[key];\n }\n\n return;\n }\n\n if (!localeData[\"_\" + key]) {\n localeData[\"_\" + key] = engLocale[key];\n }\n });\n\n // Replace Duration Time Template strings.\n // For locale `eng`: `_HMS_`, `_HM_`, and `_MS_`.\n each(keys(localeData._durationTimeTemplates), function (item) {\n template = template.replace(\"_\" + item + \"_\", localeData._durationTimeTemplates[item]);\n });\n\n // Determine user's locale.\n var userLocale = settings.userLocale || moment.locale();\n\n var useLeftUnits = settings.useLeftUnits;\n var usePlural = settings.usePlural;\n var precision = settings.precision;\n var forceLength = settings.forceLength;\n var useGrouping = settings.useGrouping;\n var trunc = settings.trunc;\n\n // Use significant digits only when precision is greater than 0.\n var useSignificantDigits = settings.useSignificantDigits && precision > 0;\n var significantDigits = useSignificantDigits ? settings.precision : 0;\n var significantDigitsCache = significantDigits;\n\n var minValue = settings.minValue;\n var isMinValue = false;\n\n var maxValue = settings.maxValue;\n var isMaxValue = false;\n\n // formatNumber fallback options.\n var useToLocaleString = settings.useToLocaleString;\n var groupingSeparator = settings.groupingSeparator;\n var decimalSeparator = settings.decimalSeparator;\n var grouping = settings.grouping;\n\n useToLocaleString = useToLocaleString && (toLocaleStringWorks || intlNumberFormatWorks);\n\n // Trim options.\n var trim = settings.trim;\n\n if (isArray(trim)) {\n trim = trim.join(\" \");\n }\n\n if (trim === null && (largest || maxValue || useSignificantDigits)) {\n trim = \"all\";\n }\n\n if (trim === null || trim === true || trim === \"left\" || trim === \"right\") {\n trim = \"large\";\n }\n\n if (trim === false) {\n trim = \"\";\n }\n\n var trimIncludes = function (item) {\n return item.test(trim);\n };\n\n var rLarge = /large/;\n var rSmall = /small/;\n var rBoth = /both/;\n var rMid = /mid/;\n var rAll = /^all|[^sm]all/;\n var rFinal = /final/;\n\n var trimLarge = largest > 0 || any([rLarge, rBoth, rAll], trimIncludes);\n var trimSmall = any([rSmall, rBoth, rAll], trimIncludes);\n var trimMid = any([rMid, rAll], trimIncludes);\n var trimFinal = any([rFinal, rAll], trimIncludes);\n\n // Parse format string to create raw tokens array.\n var rawTokens = map(template.match(tokenizer), function (token, index) {\n var type = typeMap(token);\n\n if (token.slice(0, 1) === \"*\") {\n token = token.slice(1);\n\n if (type !== \"escape\" && type !== \"general\") {\n stopTrim.push(type);\n }\n }\n\n return {\n index: index,\n length: token.length,\n text: \"\",\n\n // Replace escaped tokens with the non-escaped token text.\n token: (type === \"escape\" ? token.replace(tokenDefs.escape, \"$1\") : token),\n\n // Ignore type on non-moment tokens.\n type: ((type === \"escape\" || type === \"general\") ? null : type)\n };\n });\n\n // Associate text tokens with moment tokens.\n var currentToken = {\n index: 0,\n length: 0,\n token: \"\",\n text: \"\",\n type: null\n };\n\n var tokens = [];\n\n if (useLeftUnits) {\n rawTokens.reverse();\n }\n\n each(rawTokens, function (token) {\n if (token.type) {\n if (currentToken.type || currentToken.text) {\n tokens.push(currentToken);\n }\n\n currentToken = token;\n\n return;\n }\n\n if (useLeftUnits) {\n currentToken.text = token.token + currentToken.text;\n } else {\n currentToken.text += token.token;\n }\n });\n\n if (currentToken.type || currentToken.text) {\n tokens.push(currentToken);\n }\n\n if (useLeftUnits) {\n tokens.reverse();\n }\n\n // Find unique moment token types in the template in order of\n // descending magnitude.\n var momentTypes = intersection(types, unique(compact(pluck(tokens, \"type\"))));\n\n // Exit early if there are no moment token types.\n if (!momentTypes.length) {\n return pluck(tokens, \"text\").join(\"\");\n }\n\n // Calculate values for each moment type in the template.\n // For processing the settings, values are associated with moment types.\n // Values will be assigned to tokens at the last step in order to\n // assume nothing about frequency or order of tokens in the template.\n momentTypes = map(momentTypes, function (momentType, index) {\n // Is this the least-magnitude moment token found?\n var isSmallest = ((index + 1) === momentTypes.length);\n\n // Is this the greatest-magnitude moment token found?\n var isLargest = (!index);\n\n // Get the raw value in the current units.\n var rawValue;\n\n if (momentType === \"years\" || momentType === \"months\") {\n rawValue = remainderMonths.as(momentType);\n } else {\n rawValue = remainder.as(momentType);\n }\n\n var wholeValue = Math.floor(rawValue);\n var decimalValue = rawValue - wholeValue;\n\n var token = find(tokens, function (token) {\n return momentType === token.type;\n });\n\n if (isLargest && maxValue && rawValue > maxValue) {\n isMaxValue = true;\n }\n\n if (isSmallest && minValue && Math.abs(settings.duration.as(momentType)) < minValue) {\n isMinValue = true;\n }\n\n // Note the length of the largest-magnitude moment token:\n // if it is greater than one and forceLength is not set,\n // then default forceLength to `true`.\n //\n // Rationale is this: If the template is \"h:mm:ss\" and the\n // moment value is 5 minutes, the user-friendly output is\n // \"5:00\", not \"05:00\". We shouldn't pad the `minutes` token\n // even though it has length of two if the template is \"h:mm:ss\";\n //\n // If the minutes output should always include the leading zero\n // even when the hour is trimmed then set `{ forceLength: true }`\n // to output \"05:00\". If the template is \"hh:mm:ss\", the user\n // clearly wanted everything padded so we should output \"05:00\";\n //\n // If the user wants the full padded output, they can use\n // template \"hh:mm:ss\" and set `{ trim: false }` to output\n // \"00:05:00\".\n if (isLargest && forceLength === null && token.length > 1) {\n forceLength = true;\n }\n\n // Update remainder.\n remainder.subtract(wholeValue, momentType);\n remainderMonths.subtract(wholeValue, momentType);\n\n return {\n rawValue: rawValue,\n wholeValue: wholeValue,\n // Decimal value is only retained for the least-magnitude\n // moment type in the format template.\n decimalValue: isSmallest ? decimalValue : 0,\n isSmallest: isSmallest,\n isLargest: isLargest,\n type: momentType,\n // Tokens can appear multiple times in a template string,\n // but all instances must share the same length.\n tokenLength: token.length\n };\n });\n\n var truncMethod = trunc ? Math.floor : Math.round;\n var truncate = function (value, places) {\n var factor = Math.pow(10, places);\n return truncMethod(value * factor) / factor;\n };\n\n var foundFirst = false;\n var bubbled = false;\n\n var formatValue = function (momentType, index) {\n var formatOptions = {\n useGrouping: useGrouping,\n groupingSeparator: groupingSeparator,\n decimalSeparator: decimalSeparator,\n grouping: grouping,\n useToLocaleString: useToLocaleString\n };\n\n if (useSignificantDigits) {\n if (significantDigits <= 0) {\n momentType.rawValue = 0;\n momentType.wholeValue = 0;\n momentType.decimalValue = 0;\n } else {\n formatOptions.maximumSignificantDigits = significantDigits;\n momentType.significantDigits = significantDigits;\n }\n }\n\n if (isMaxValue && !bubbled) {\n if (momentType.isLargest) {\n momentType.wholeValue = maxValue;\n momentType.decimalValue = 0;\n } else {\n momentType.wholeValue = 0;\n momentType.decimalValue = 0;\n }\n }\n\n if (isMinValue && !bubbled) {\n if (momentType.isSmallest) {\n momentType.wholeValue = minValue;\n momentType.decimalValue = 0;\n } else {\n momentType.wholeValue = 0;\n momentType.decimalValue = 0;\n }\n }\n\n if (momentType.isSmallest || momentType.significantDigits && momentType.significantDigits - momentType.wholeValue.toString().length <= 0) {\n // Apply precision to least significant token value.\n if (precision < 0) {\n momentType.value = truncate(momentType.wholeValue, precision);\n } else if (precision === 0) {\n momentType.value = truncMethod(momentType.wholeValue + momentType.decimalValue);\n } else { // precision > 0\n if (useSignificantDigits) {\n if (trunc) {\n momentType.value = truncate(momentType.rawValue, significantDigits - momentType.wholeValue.toString().length);\n } else {\n momentType.value = momentType.rawValue;\n }\n\n if (momentType.wholeValue) {\n significantDigits -= momentType.wholeValue.toString().length;\n }\n } else {\n formatOptions.fractionDigits = precision;\n\n if (trunc) {\n momentType.value = momentType.wholeValue + truncate(momentType.decimalValue, precision);\n } else {\n momentType.value = momentType.wholeValue + momentType.decimalValue;\n }\n }\n }\n } else {\n if (useSignificantDigits && momentType.wholeValue) {\n // Outer Math.round required here to handle floating point errors.\n momentType.value = Math.round(truncate(momentType.wholeValue, momentType.significantDigits - momentType.wholeValue.toString().length));\n\n significantDigits -= momentType.wholeValue.toString().length;\n } else {\n momentType.value = momentType.wholeValue;\n }\n }\n\n if (momentType.tokenLength > 1 && (forceLength || foundFirst)) {\n formatOptions.minimumIntegerDigits = momentType.tokenLength;\n\n if (bubbled && formatOptions.maximumSignificantDigits < momentType.tokenLength) {\n delete formatOptions.maximumSignificantDigits;\n }\n }\n\n if (!foundFirst && (momentType.value > 0 || trim === \"\" /* trim: false */ || find(stopTrim, momentType.type) || find(outputTypes, momentType.type))) {\n foundFirst = true;\n }\n\n momentType.formattedValue = formatNumber(momentType.value, formatOptions, userLocale);\n\n formatOptions.useGrouping = false;\n formatOptions.decimalSeparator = \".\";\n momentType.formattedValueEn = formatNumber(momentType.value, formatOptions, \"en\");\n\n if (momentType.tokenLength === 2 && momentType.type === \"milliseconds\") {\n momentType.formattedValueMS = formatNumber(momentType.value, {\n minimumIntegerDigits: 3,\n useGrouping: false\n }, \"en\").slice(0, 2);\n }\n\n return momentType;\n };\n\n // Calculate formatted values.\n momentTypes = map(momentTypes, formatValue);\n momentTypes = compact(momentTypes);\n\n // Bubble rounded values.\n if (momentTypes.length > 1) {\n var findType = function (type) {\n return find(momentTypes, function (momentType) {\n return momentType.type === type;\n });\n };\n\n var bubbleTypes = function (bubble) {\n var bubbleMomentType = findType(bubble.type);\n\n if (!bubbleMomentType) {\n return;\n }\n\n each(bubble.targets, function (target) {\n var targetMomentType = findType(target.type);\n\n if (!targetMomentType) {\n return;\n }\n\n if (parseInt(bubbleMomentType.formattedValueEn, 10) === target.value) {\n bubbleMomentType.rawValue = 0;\n bubbleMomentType.wholeValue = 0;\n bubbleMomentType.decimalValue = 0;\n targetMomentType.rawValue += 1;\n targetMomentType.wholeValue += 1;\n targetMomentType.decimalValue = 0;\n targetMomentType.formattedValueEn = targetMomentType.wholeValue.toString();\n bubbled = true;\n }\n });\n };\n\n each(bubbles, bubbleTypes);\n }\n\n // Recalculate formatted values.\n if (bubbled) {\n foundFirst = false;\n significantDigits = significantDigitsCache;\n momentTypes = map(momentTypes, formatValue);\n momentTypes = compact(momentTypes);\n }\n\n if (outputTypes && !(isMaxValue && !settings.trim)) {\n momentTypes = map(momentTypes, function (momentType) {\n if (find(outputTypes, function (outputType) {\n return momentType.type === outputType;\n })) {\n return momentType;\n }\n\n return null;\n });\n\n momentTypes = compact(momentTypes);\n } else {\n // Trim Large.\n if (trimLarge) {\n momentTypes = rest(momentTypes, function (momentType) {\n // Stop trimming on:\n // - the smallest moment type\n // - a type marked for stopTrim\n // - a type that has a whole value\n return !momentType.isSmallest && !momentType.wholeValue && !find(stopTrim, momentType.type);\n });\n }\n\n // Largest.\n if (largest && momentTypes.length) {\n momentTypes = momentTypes.slice(0, largest);\n }\n\n // Trim Small.\n if (trimSmall && momentTypes.length > 1) {\n momentTypes = initial(momentTypes, function (momentType) {\n // Stop trimming on:\n // - a type marked for stopTrim\n // - a type that has a whole value\n // - the largest momentType\n return !momentType.wholeValue && !find(stopTrim, momentType.type) && !momentType.isLargest;\n });\n }\n\n // Trim Mid.\n if (trimMid) {\n momentTypes = map(momentTypes, function (momentType, index) {\n if (index > 0 && index < momentTypes.length - 1 && !momentType.wholeValue) {\n return null;\n }\n\n return momentType;\n });\n\n momentTypes = compact(momentTypes);\n }\n\n // Trim Final.\n if (trimFinal && momentTypes.length === 1 && !momentTypes[0].wholeValue && !(!trunc && momentTypes[0].isSmallest && momentTypes[0].rawValue < minValue)) {\n momentTypes = [];\n }\n }\n\n if (returnMomentTypes) {\n return momentTypes;\n }\n\n // Localize and pluralize unit labels.\n each(tokens, function (token) {\n var key = momentTokens[token.type];\n\n var momentType = find(momentTypes, function (momentType) {\n return momentType.type === token.type;\n });\n\n if (!key || !momentType) {\n return;\n }\n\n var values = momentType.formattedValueEn.split(\".\");\n\n values[0] = parseInt(values[0], 10);\n\n if (values[1]) {\n values[1] = parseFloat(\"0.\" + values[1], 10);\n } else {\n values[1] = null;\n }\n\n var pluralKey = localeData.durationPluralKey(key, values[0], values[1]);\n\n var labels = durationGetLabels(key, localeData);\n\n var autoLocalized = false;\n\n var pluralizedLabels = {};\n\n // Auto-Localized unit labels.\n each(localeData._durationLabelTypes, function (labelType) {\n var label = find(labels, function (label) {\n return label.type === labelType.type && label.key === pluralKey;\n });\n\n if (label) {\n pluralizedLabels[label.type] = label.label;\n\n if (stringIncludes(token.text, labelType.string)) {\n token.text = token.text.replace(labelType.string, label.label);\n autoLocalized = true;\n }\n }\n });\n\n // Auto-pluralized unit labels.\n if (usePlural && !autoLocalized) {\n labels.sort(durationLabelCompare);\n\n each(labels, function (label) {\n if (pluralizedLabels[label.type] === label.label) {\n if (stringIncludes(token.text, label.label)) {\n // Stop checking this token if its label is already\n // correctly pluralized.\n return false;\n }\n\n // Skip this label if it is correct, but not present in\n // the token's text.\n return;\n }\n\n if (stringIncludes(token.text, label.label)) {\n // Replece this token's label and stop checking.\n token.text = token.text.replace(label.label, pluralizedLabels[label.type]);\n return false;\n }\n });\n }\n });\n\n // Build ouptut.\n tokens = map(tokens, function (token) {\n if (!token.type) {\n return token.text;\n }\n\n var momentType = find(momentTypes, function (momentType) {\n return momentType.type === token.type;\n });\n\n if (!momentType) {\n return \"\";\n }\n\n var out = \"\";\n\n if (useLeftUnits) {\n out += token.text;\n }\n\n if (isNegative && isMaxValue || !isNegative && isMinValue) {\n out += \"< \";\n isMaxValue = false;\n isMinValue = false;\n }\n\n if (isNegative && isMinValue || !isNegative && isMaxValue) {\n out += \"> \";\n isMaxValue = false;\n isMinValue = false;\n }\n\n if (isNegative && (momentType.value > 0 || trim === \"\" || find(stopTrim, momentType.type) || find(outputTypes, momentType.type))) {\n out += \"-\";\n isNegative = false;\n }\n\n if (token.type === \"milliseconds\" && momentType.formattedValueMS) {\n out += momentType.formattedValueMS;\n } else {\n out += momentType.formattedValue;\n }\n\n if (!useLeftUnits) {\n out += token.text;\n }\n\n return out;\n });\n\n // Trim leading and trailing comma, space, colon, and dot.\n return tokens.join(\"\").replace(/(,| |:|\\.)*$/, \"\").replace(/^(,| |:|\\.)*/, \"\");\n }", "function millisecondsToStr(a){\"use strict\";function b(a){return a>1?\"s ago\":\" ago\"}var c=Math.floor(a/1e3),d=Math.floor(c/31536e3);if(d)return d+\" year\"+b(d);var e=Math.floor((c%=31536e3)/2592e3);if(e)return e+\" month\"+b(e);var f=Math.floor((c%=2592e3)/86400);if(f)return f+\" day\"+b(f);var g=Math.floor((c%=86400)/3600);if(g)return\"about \"+g+\" hour\"+b(g);var h=Math.floor((c%=3600)/60);if(h)return h+\" minute\"+b(h);var i=c%60;return i?i+\" second\"+b(i):\"just now\"}", "function processRelativeTime$5(number,withoutSuffix,key,isFuture){var format={'m':['eng Minutt','enger Minutt'],'h':['eng Stonn','enger Stonn'],'d':['een Dag','engem Dag'],'M':['ee Mount','engem Mount'],'y':['ee Joer','engem Joer']};return withoutSuffix?format[key][0]:format[key][1];}", "function relativeTimeWithMutation(number,withoutSuffix,key){var format={mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"};return number+\" \"+mutation(format[key],number)}", "function processRelativeTime(number,withoutSuffix,key,isFuture){var format={s:[\"mõne sekundi\",\"mõni sekund\",\"paar sekundit\"],ss:[number+\"sekundi\",number+\"sekundit\"],m:[\"ühe minuti\",\"üks minut\"],mm:[number+\" minuti\",number+\" minutit\"],h:[\"ühe tunni\",\"tund aega\",\"üks tund\"],hh:[number+\" tunni\",number+\" tundi\"],d:[\"ühe päeva\",\"üks päev\"],M:[\"kuu aja\",\"kuu aega\",\"üks kuu\"],MM:[number+\" kuu\",number+\" kuud\"],y:[\"ühe aasta\",\"aasta\",\"üks aasta\"],yy:[number+\" aasta\",number+\" aastat\"]};return withoutSuffix?format[key][2]?format[key][2]:format[key][1]:isFuture?format[key][0]:format[key][1]}", "function humanizer(passedOptions) {\n\n var result = function humanizer(ms, humanizerOptions) {\n var options = extend({}, result, humanizerOptions || {});\n return doHumanization(ms, options);\n };\n\n return extend(result, {\n language: \"en\",\n delimiter: \", \",\n spacer: \" \",\n units: [\"year\", \"month\", \"week\", \"day\", \"hour\", \"minute\", \"second\"],\n languages: {},\n halfUnit: true,\n round: false\n }, passedOptions);\n\n }", "function processRelativeTime$6(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += withoutSuffix || isFuture ? 'sekund' : 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function momentify(value, options) {\n\t\tvar parser = options.parser;\n\t\tvar format = options.parser || options.format;\n\n\t\tif (typeof parser === 'function') {\n\t\t\treturn parser(value);\n\t\t}\n\n\t\tif (typeof value === 'string' && typeof format === 'string') {\n\t\t\treturn moment(value, format);\n\t\t}\n\n\t\tif (!(value instanceof moment)) {\n\t\t\tvalue = moment(value);\n\t\t}\n\n\t\tif (value.isValid()) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t\t// The user might still use the deprecated `format` option to convert his inputs.\n\t\tif (typeof format === 'function') {\n\t\t\treturn format(value);\n\t\t}\n\n\t\treturn value;\n\t}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}" ]
[ "0.6559775", "0.6559775", "0.6559775", "0.6559775", "0.64748263", "0.6382462", "0.6327351", "0.6327351", "0.6327351", "0.6327351", "0.6327351", "0.6327351", "0.6327351", "0.6327351", "0.6327351", "0.6212573", "0.61233556", "0.61233556", "0.60977244", "0.60977244", "0.60977244", "0.60864335", "0.60307044", "0.6020028", "0.6012384", "0.6012384", "0.6012384", "0.6012384", "0.6012384", "0.6007388", "0.5948747", "0.58929545", "0.5882656", "0.5863884", "0.5838807", "0.5813722", "0.5813722", "0.5813722", "0.5813722", "0.5811752", "0.5778797", "0.57667637", "0.5762012", "0.5733142", "0.5719807", "0.5694971", "0.5689181", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5682762", "0.5679213", "0.56452346", "0.56219506", "0.5621885", "0.5606486", "0.56022024", "0.5574064", "0.5562575", "0.5538086", "0.55373305", "0.5522579", "0.5520902", "0.5520902", "0.5520902", "0.5520902", "0.5520902", "0.5520902", "0.5520902", "0.5520902", "0.5520902", "0.5520902", "0.5520902", "0.5520902" ]
0.0
-1
This function allows you to set the rounding function for relative time strings
function getSetRelativeTimeRounding (roundingFunction) { if (roundingFunction === undefined) { return round; } if (typeof(roundingFunction) === 'function') { round = roundingFunction; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding(roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof roundingFunction === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding(roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof roundingFunction === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding(roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof roundingFunction === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\n\tif (roundingFunction === undefined) {\n\t\treturn round;\n\t}\n\tif (typeof(roundingFunction) === 'function') {\n\t\tround = roundingFunction;\n\t\treturn true;\n\t}\n\treturn false;\n}", "function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\r\n if (roundingFunction === undefined) {\r\n return round;\r\n }\r\n if (typeof(roundingFunction) === 'function') {\r\n round = roundingFunction;\r\n return true;\r\n }\r\n return false;\r\n }", "function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }" ]
[ "0.72622484", "0.72409254", "0.72409254", "0.72409254", "0.72409254", "0.72409254", "0.72409254", "0.72409254", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70316243", "0.6977638", "0.6977638", "0.6977638", "0.6977638", "0.6977638", "0.6977638", "0.69598234", "0.6958744", "0.6947806", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6895281", "0.6895281", "0.6895281", "0.68885976", "0.6886316", "0.68665904", "0.6859235", "0.6822068", "0.6822068" ]
0.0
-1
This function allows you to set a threshold for relative time strings
function getSetRelativeTimeThreshold (threshold, limit) { if (thresholds[threshold] === undefined) { return false; } if (limit === undefined) { return thresholds[threshold]; } thresholds[threshold] = limit; if (threshold === 's') { thresholds.ss = limit - 1; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\tif (thresholds[threshold] === undefined) {\n\t\treturn false;\n\t}\n\tif (limit === undefined) {\n\t\treturn thresholds[threshold];\n\t}\n\tthresholds[threshold] = limit;\n\tif (threshold === 's') {\n\t\tthresholds.ss = limit - 1;\n\t}\n\treturn true;\n}", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function getSetRelativeTimeThreshold(threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold(threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold(threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\r\n if (thresholds[threshold] === undefined) {\r\n return false;\r\n }\r\n if (limit === undefined) {\r\n return thresholds[threshold];\r\n }\r\n thresholds[threshold] = limit;\r\n if (threshold === 's') {\r\n thresholds.ss = limit - 1;\r\n }\r\n return true;\r\n }", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }" ]
[ "0.69783336", "0.69343334", "0.69072294", "0.69072294", "0.69072294", "0.69072294", "0.69072294", "0.69072294", "0.6901369", "0.6901369", "0.6901369", "0.6901369", "0.6901369", "0.6901369", "0.6895151", "0.68865347", "0.6871718", "0.6841288", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6820637", "0.6820637", "0.6820637", "0.68154883", "0.6812607", "0.68008447", "0.68008447" ]
0.0
-1
The Buffer constructor returns instances of `Uint8Array` that have their prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`, so the returned instances will have all the node `Buffer` methods and the `Uint8Array` methods. Square bracket notation works as expected it returns a single octet. The `Uint8Array` prototype remains unmodified.
function Buffer (arg, encodingOrOffset, length) { // Common case. if (typeof arg === 'number') { if (typeof encodingOrOffset === 'string') { throw new TypeError( 'The "string" argument must be of type string. Received type number' ) } return allocUnsafe(arg) } return from(arg, encodingOrOffset, length) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "toBuffer() {\n return toArrayBuffer(this.toUint8Array());\n }", "function createByteContainer() {\n if (HAS_BUFFER)\n return new Buffer(0);\n\n return new Uint8Array();\n }", "function createByteContainer() {\n if (HAS_BUFFER)\n return new Buffer(0);\n\n return new Uint8Array();\n }", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "converseToBuffer(): Buffer {\n const bign = this._bn.toArrayLike(Buffer);\n if (bign.length === 32) {\n return bign;\n }\n\n const zeroPad = Buffer.alloc(32);\n bign.copy(zeroPad, 32 - bign.length);\n return zeroPad;\n }", "function Buffer(arg,encodingOrOffset,length){// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new TypeError('The \"string\" argument must be of type string. Received type number');}return allocUnsafe(arg);}return from(arg,encodingOrOffset,length);}// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97", "function Buffer(arg,encodingOrOffset,length){// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new TypeError('The \"string\" argument must be of type string. Received type number');}return allocUnsafe(arg);}return from(arg,encodingOrOffset,length);}// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97", "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "function Buffer(arg,encodingOrOffset,length){// Common case.\n if(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new TypeError('The \"string\" argument must be of type string. Received type number');}return allocUnsafe(arg);}return from(arg,encodingOrOffset,length);}// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n }", "function Buffer(arg){if(!(this instanceof Buffer)){ // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\nif(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg);}if(!Buffer.TYPED_ARRAY_SUPPORT){this.length=0;this.parent=undefined;} // Common case.\nif(typeof arg==='number'){return fromNumber(this,arg);} // Slightly less common case.\nif(typeof arg==='string'){return fromString(this,arg,arguments.length>1?arguments[1]:'utf8');} // Unusual.\nreturn fromObject(this,arg);}", "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n }", "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\n\tif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n \n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1)\n return new Buffer(arg, arguments[1]);\n return new Buffer(arg);\n }\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0;\n this.parent = undefined;\n }\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg);\n }\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n }\n // Unusual.\n return fromObject(this, arg);\n }", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer (arg, encodingOrOffset, length) {\r\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\r\n return new Buffer(arg, encodingOrOffset, length)\r\n }\r\n\r\n // Common case.\r\n if (typeof arg === 'number') {\r\n if (typeof encodingOrOffset === 'string') {\r\n throw new Error(\r\n 'If encoding is specified then the first argument must be a string'\r\n )\r\n }\r\n return allocUnsafe(this, arg)\r\n }\r\n\r\n var buf = from(this, arg, encodingOrOffset, length)\r\n return buf;\r\n}", "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n return new Buffer(arg);\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0;\n this.parent = undefined;\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg);\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n }\n\n // Unusual.\n return fromObject(this, arg);\n }", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}" ]
[ "0.7353032", "0.7353032", "0.7353032", "0.7353032", "0.6973215", "0.6893831", "0.6893831", "0.6847244", "0.6847244", "0.6847244", "0.6847244", "0.6847244", "0.6847244", "0.6847244", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6837017", "0.6796462", "0.67845035", "0.67845035", "0.67522323", "0.67457277", "0.67457277", "0.67241585", "0.66764843", "0.6673626", "0.6658937", "0.66488314", "0.66488314", "0.66424894", "0.66374075", "0.6634604", "0.6634604", "0.6634604", "0.6634604", "0.6634604", "0.6628141", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6615265", "0.6607041", "0.6607041", "0.6607041", "0.6594417", "0.65929407", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.6592059", "0.65913075", "0.65913075", "0.65913075", "0.65913075", "0.65913075", "0.65913075" ]
0.0
-1
Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, OR the last index of `val` in `buffer` at offset <= `byteOffset`. Arguments: buffer a Buffer to search val a string, Buffer, or number byteOffset an index into `buffer`; will be clamped to an int32 encoding an optional encoding, relevant is val is a string dir true for indexOf, false for lastIndexOf
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { // Empty buffer means no match if (buffer.length === 0) return -1 // Normalize byteOffset if (typeof byteOffset === 'string') { encoding = byteOffset byteOffset = 0 } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffffff } else if (byteOffset < -0x80000000) { byteOffset = -0x80000000 } byteOffset = +byteOffset // Coerce to Number. if (numberIsNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1) } // Normalize byteOffset: negative offsets start from the end of the buffer if (byteOffset < 0) byteOffset = buffer.length + byteOffset if (byteOffset >= buffer.length) { if (dir) return -1 else byteOffset = buffer.length - 1 } else if (byteOffset < 0) { if (dir) byteOffset = 0 else return -1 } // Normalize val if (typeof val === 'string') { val = Buffer.from(val, encoding) } // Finally, search either indexOf (if dir is true) or lastIndexOf if (Buffer.isBuffer(val)) { // Special case: looking for empty string/buffer always fails if (val.length === 0) { return -1 } return arrayIndexOf(buffer, val, byteOffset, encoding, dir) } else if (typeof val === 'number') { val = val & 0xFF // Search for a byte value [0-255] if (typeof Uint8Array.prototype.indexOf === 'function') { if (dir) { return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) } else { return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) } } return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) } throw new TypeError('val must be string, number or Buffer') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){// Empty buffer means no match\n if(buffer.length===0)return -1;// Normalize byteOffset\n if(typeof byteOffset==='string'){encoding=byteOffset;byteOffset=0;}else if(byteOffset>0x7fffffff){byteOffset=0x7fffffff;}else if(byteOffset<-0x80000000){byteOffset=-0x80000000;}byteOffset=+byteOffset;// Coerce to Number.\n if(numberIsNaN(byteOffset)){// byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset=dir?0:buffer.length-1;}// Normalize byteOffset: negative offsets start from the end of the buffer\n if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return -1;else byteOffset=buffer.length-1;}else if(byteOffset<0){if(dir)byteOffset=0;else return -1;}// Normalize val\n if(typeof val==='string'){val=Buffer.from(val,encoding);}// Finally, search either indexOf (if dir is true) or lastIndexOf\n if(Buffer.isBuffer(val)){// Special case: looking for empty string/buffer always fails\n if(val.length===0){return -1;}return arrayIndexOf(buffer,val,byteOffset,encoding,dir);}else if(typeof val==='number'){val=val&0xFF;// Search for a byte value [0-255]\n if(typeof Uint8Array.prototype.indexOf==='function'){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset);}else {return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset);}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir);}throw new TypeError('val must be string, number or Buffer');}", "function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){// Empty buffer means no match\nif(buffer.length===0)return-1;// Normalize byteOffset\nif(typeof byteOffset==='string'){encoding=byteOffset;byteOffset=0;}else if(byteOffset>0x7fffffff){byteOffset=0x7fffffff;}else if(byteOffset<-0x80000000){byteOffset=-0x80000000;}byteOffset=+byteOffset;// Coerce to Number.\nif(numberIsNaN(byteOffset)){// byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\nbyteOffset=dir?0:buffer.length-1;}// Normalize byteOffset: negative offsets start from the end of the buffer\nif(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1;}else if(byteOffset<0){if(dir)byteOffset=0;else return-1;}// Normalize val\nif(typeof val==='string'){val=Buffer.from(val,encoding);}// Finally, search either indexOf (if dir is true) or lastIndexOf\nif(Buffer.isBuffer(val)){// Special case: looking for empty string/buffer always fails\nif(val.length===0){return-1;}return arrayIndexOf(buffer,val,byteOffset,encoding,dir);}else if(typeof val==='number'){val=val&0xFF;// Search for a byte value [0-255]\nif(typeof Uint8Array.prototype.indexOf==='function'){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset);}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset);}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir);}throw new TypeError('val must be string, number or Buffer');}", "function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){// Empty buffer means no match\nif(buffer.length===0)return-1;// Normalize byteOffset\nif(typeof byteOffset==='string'){encoding=byteOffset;byteOffset=0;}else if(byteOffset>0x7fffffff){byteOffset=0x7fffffff;}else if(byteOffset<-0x80000000){byteOffset=-0x80000000;}byteOffset=+byteOffset;// Coerce to Number.\nif(numberIsNaN(byteOffset)){// byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\nbyteOffset=dir?0:buffer.length-1;}// Normalize byteOffset: negative offsets start from the end of the buffer\nif(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1;}else if(byteOffset<0){if(dir)byteOffset=0;else return-1;}// Normalize val\nif(typeof val==='string'){val=Buffer.from(val,encoding);}// Finally, search either indexOf (if dir is true) or lastIndexOf\nif(Buffer.isBuffer(val)){// Special case: looking for empty string/buffer always fails\nif(val.length===0){return-1;}return arrayIndexOf(buffer,val,byteOffset,encoding,dir);}else if(typeof val==='number'){val=val&0xFF;// Search for a byte value [0-255]\nif(typeof Uint8Array.prototype.indexOf==='function'){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset);}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset);}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir);}throw new TypeError('val must be string, number or Buffer');}", "function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1; // Normalize byteOffset\n\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n\n byteOffset = +byteOffset; // Coerce to Number.\n\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n } // Normalize byteOffset: negative offsets start from the end of the buffer\n\n\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n } // Normalize val\n\n\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n } // Finally, search either indexOf (if dir is true) or lastIndexOf\n\n\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}", "function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1; // Normalize byteOffset\n\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n\n byteOffset = +byteOffset; // Coerce to Number.\n\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n } // Normalize byteOffset: negative offsets start from the end of the buffer\n\n\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n } // Normalize val\n\n\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n } // Finally, search either indexOf (if dir is true) or lastIndexOf\n\n\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}", "function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1; // Normalize byteOffset\n\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n\n byteOffset = +byteOffset; // Coerce to Number.\n\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n } // Normalize byteOffset: negative offsets start from the end of the buffer\n\n\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n } // Normalize val\n\n\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n } // Finally, search either indexOf (if dir is true) or lastIndexOf\n\n\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}", "function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1; // Normalize byteOffset\n\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n\n byteOffset = +byteOffset; // Coerce to Number.\n\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n } // Normalize byteOffset: negative offsets start from the end of the buffer\n\n\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n } // Normalize val\n\n\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n } // Finally, search either indexOf (if dir is true) or lastIndexOf\n\n\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}", "function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1; // Normalize byteOffset\n\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n\n byteOffset = +byteOffset; // Coerce to Number.\n\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n } // Normalize byteOffset: negative offsets start from the end of the buffer\n\n\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n } // Normalize val\n\n\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n } // Finally, search either indexOf (if dir is true) or lastIndexOf\n\n\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}", "function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1; // Normalize byteOffset\n\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n\n byteOffset = +byteOffset; // Coerce to Number.\n\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n } // Normalize byteOffset: negative offsets start from the end of the buffer\n\n\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n } // Normalize val\n\n\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n } // Finally, search either indexOf (if dir is true) or lastIndexOf\n\n\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}", "function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1; // Normalize byteOffset\n\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n\n byteOffset = +byteOffset; // Coerce to Number.\n\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n } // Normalize byteOffset: negative offsets start from the end of the buffer\n\n\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n } // Normalize val\n\n\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n } // Finally, search either indexOf (if dir is true) or lastIndexOf\n\n\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}", "function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1; // Normalize byteOffset\n\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n\n byteOffset = +byteOffset; // Coerce to Number.\n\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n } // Normalize byteOffset: negative offsets start from the end of the buffer\n\n\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n } // Normalize val\n\n\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n } // Finally, search either indexOf (if dir is true) or lastIndexOf\n\n\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}", "function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){\n// Empty buffer means no match\nif(buffer.length===0)return-1\n// Normalize byteOffset;\nif(typeof byteOffset===\"string\"){encoding=byteOffset;byteOffset=0}else if(byteOffset>2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset// Coerce to Number.;\nif(numberIsNaN(byteOffset)){\n// byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\nbyteOffset=dir?0:buffer.length-1}\n// Normalize byteOffset: negative offsets start from the end of the buffer\nif(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}\n// Normalize val\nif(typeof val===\"string\"){val=Buffer.from(val,encoding)}\n// Finally, search either indexOf (if dir is true) or lastIndexOf\nif(Buffer.isBuffer(val)){\n// Special case: looking for empty string/buffer always fails\nif(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val===\"number\"){val=val&255// Search for a byte value [0-255];\nif(typeof Uint8Array.prototype.indexOf===\"function\"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError(\"val must be string, number or Buffer\")}", "function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){// Empty buffer means no match\n\tif(buffer.length===0)return-1;// Normalize byteOffset\n\tif(typeof byteOffset==='string'){encoding=byteOffset;byteOffset=0;}else if(byteOffset>0x7fffffff){byteOffset=0x7fffffff;}else if(byteOffset<-0x80000000){byteOffset=-0x80000000;}byteOffset=+byteOffset;// Coerce to Number.\n\tif(isNaN(byteOffset)){// byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n\tbyteOffset=dir?0:buffer.length-1;}// Normalize byteOffset: negative offsets start from the end of the buffer\n\tif(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1;}else if(byteOffset<0){if(dir)byteOffset=0;else return-1;}// Normalize val\n\tif(typeof val==='string'){val=Buffer.from(val,encoding);}// Finally, search either indexOf (if dir is true) or lastIndexOf\n\tif(Buffer.isBuffer(val)){// Special case: looking for empty string/buffer always fails\n\tif(val.length===0){return-1;}return arrayIndexOf(buffer,val,byteOffset,encoding,dir);}else if(typeof val==='number'){val=val&0xFF;// Search for a byte value [0-255]\n\tif(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==='function'){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset);}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset);}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir);}throw new TypeError('val must be string, number or Buffer');}", "function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){// Empty buffer means no match\nif(buffer.length===0)return-1;// Normalize byteOffset\nif(typeof byteOffset==='string'){encoding=byteOffset;byteOffset=0;}else if(byteOffset>0x7fffffff){byteOffset=0x7fffffff;}else if(byteOffset<-0x80000000){byteOffset=-0x80000000;}byteOffset=+byteOffset;// Coerce to Number.\nif(isNaN(byteOffset)){// byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\nbyteOffset=dir?0:buffer.length-1;}// Normalize byteOffset: negative offsets start from the end of the buffer\nif(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1;}else if(byteOffset<0){if(dir)byteOffset=0;else return-1;}// Normalize val\nif(typeof val==='string'){val=Buffer.from(val,encoding);}// Finally, search either indexOf (if dir is true) or lastIndexOf\nif(Buffer.isBuffer(val)){// Special case: looking for empty string/buffer always fails\nif(val.length===0){return-1;}return arrayIndexOf(buffer,val,byteOffset,encoding,dir);}else if(typeof val==='number'){val=val&0xFF;// Search for a byte value [0-255]\nif(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==='function'){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset);}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset);}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir);}throw new TypeError('val must be string, number or Buffer');}", "function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){// Empty buffer means no match\nif(buffer.length===0)return-1;// Normalize byteOffset\nif(typeof byteOffset==='string'){encoding=byteOffset;byteOffset=0;}else if(byteOffset>0x7fffffff){byteOffset=0x7fffffff;}else if(byteOffset<-0x80000000){byteOffset=-0x80000000;}byteOffset=+byteOffset;// Coerce to Number.\nif(isNaN(byteOffset)){// byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\nbyteOffset=dir?0:buffer.length-1;}// Normalize byteOffset: negative offsets start from the end of the buffer\nif(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1;}else if(byteOffset<0){if(dir)byteOffset=0;else return-1;}// Normalize val\nif(typeof val==='string'){val=Buffer.from(val,encoding);}// Finally, search either indexOf (if dir is true) or lastIndexOf\nif(Buffer.isBuffer(val)){// Special case: looking for empty string/buffer always fails\nif(val.length===0){return-1;}return arrayIndexOf(buffer,val,byteOffset,encoding,dir);}else if(typeof val==='number'){val=val&0xFF;// Search for a byte value [0-255]\nif(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==='function'){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset);}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset);}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir);}throw new TypeError('val must be string, number or Buffer');}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer$c.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer$c.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}", "function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}" ]
[ "0.8282926", "0.8255244", "0.8255244", "0.8253898", "0.8253898", "0.8253898", "0.8253898", "0.8253898", "0.8253898", "0.8253898", "0.8253898", "0.82487696", "0.82464457", "0.8244766", "0.8244766", "0.82286805", "0.82205904", "0.82192326", "0.82192326", "0.82192326", "0.82192326", "0.82192326", "0.82192326", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569", "0.8215569" ]
0.0
-1
Need to make sure that buffer isn't trying to write out of bounds.
function checkOffset (offset, ext, length) { if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeBuffer(buffer, pos, src) {\n src.copy(buffer, pos)\n return src.length\n}", "function writeBuffer(buffer, pos, src) {\n src.copy(buffer, pos)\n return src.length\n}", "ensure(n) {\n let minsize = this.pos + n;\n if (minsize > this.capacity) {\n let cap = this.capacity * 2;\n while (cap < minsize) cap *= 2;\n let newbuf = new Uint8Array(cap);\n newbuf.set(this.buffer);\n this.buffer = newbuf;\n this.capacity = cap;\n }\n }", "function bufferOutOfBounds(name = undefined) {\n if (name) {\n return `\"${name}\" is outside of buffer bounds`;\n }\n return 'Attempt to write outside buffer bounds';\n}", "writeBytes(value) {\n let start = 0;\n let valueLen = value.length;\n while (valueLen > 0) {\n const bytesLeft = this.numBytesLeft();\n if (bytesLeft === 0) {\n this._grow(this.pos + valueLen);\n }\n const bytesToWrite = Math.min(bytesLeft, valueLen);\n value.copy(this.buf, this.pos, start, start + bytesToWrite);\n this.pos += bytesToWrite;\n start += bytesToWrite;\n valueLen -= bytesToWrite;\n }\n }", "function checkLen(len){\n if(pos + len > buf.length)\n throw new Error('Broken data stream at pos ' + pos + ' (need ' + len + ' more bytes)');\n }", "oob() {\n return this.at > this.buffer.byteLength || this.at < 0;\n }", "_blockedWrite() {\n throw new Error('Cannot write because the writer has been closed.');\n }", "_blockedWrite() {\n throw new Error('Cannot write because the writer has been closed.');\n }", "function write() {\n\t// Bail if the write queue is invalid\n\tif (!check_queue_write()) return;\n\n\t// Create message from buffer\n\tlet buffer = proto.proto.create(intf.intf.queue_write[intf.intf.queue_write.length - 1]);\n\n\tif (typeof buffer === 'undefined' || buffer === null || buffer === '') return;\n\n\tintf.intf.port.write(buffer, (error) => {\n\t\t// Bail and retry if there was a write error\n\t\tif (error) {\n\t\t\terror_out('writing', error);\n\n\t\t\t// Re-kick it\n\t\t\tsetImmediate(write);\n\n\t\t\treturn;\n\t\t}\n\n\t\tintf.intf.port.drain(() => {\n\t\t\t// After a successful write and drain, remove the last element from the write queue\n\t\t\tintf.intf.queue_write.pop();\n\n\t\t\t// Re-kick it\n\t\t\t// setImmediate(write);\n\t\t\tprocess.nextTick(write);\n\t\t});\n\t});\n}", "write(sequence, offset) {\n offset = typeof offset === 'number' ? offset : this.position;\n // If the buffer is to small let's extend the buffer\n if (this.buffer.length < offset + sequence.length) {\n const buffer$1 = buffer__WEBPACK_IMPORTED_MODULE_0___default.a.Buffer.alloc(this.buffer.length + sequence.length);\n this.buffer.copy(buffer$1, 0, 0, this.buffer.length);\n // Assign the new buffer\n this.buffer = buffer$1;\n }\n if (ArrayBuffer.isView(sequence)) {\n this.buffer.set(ensure_buffer.ensureBuffer(sequence), offset);\n this.position =\n offset + sequence.byteLength > this.position ? offset + sequence.length : this.position;\n }\n else if (typeof sequence === 'string') {\n this.buffer.write(sequence, offset, sequence.length, 'binary');\n this.position =\n offset + sequence.length > this.position ? offset + sequence.length : this.position;\n }\n }", "function pushError(){assert.throws(function(){r.push(new Buffer(1))})}", "function writeBuffer()\n{\n fs.writeFile(outputFile, outputBuffer, 'utf8', function (error) {\n if (error)\n {\n console.log('Could not write the file', error);\n }\n\n exit();\n });\n}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0)\n\t throw new RangeError('offset is not uint')\n\t if (offset + ext > length)\n\t throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0)\n throw new RangeError('offset is not uint')\n if (offset + ext > length)\n throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function writeOrBuffer(stream, state, chunk, encoding, cb) {\n\t chunk = decodeChunk(state, chunk, encoding);\n\t if (util.isBuffer(chunk)) encoding = 'buffer';\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t state.length += len;\n\n\t var ret = state.length < state.highWaterMark;\n\t // we must ensure that previous needDrain will not be reset to false.\n\t if (!ret) state.needDrain = true;\n\n\t if (state.writing || state.corked) state.buffer.push(new WriteReq(chunk, encoding, cb));else doWrite(stream, state, false, len, chunk, encoding, cb);\n\n\t return ret;\n\t}", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "function checkOffset (offset, ext, length) {\n\t\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t\t}", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function writeLength(buffer, pos, length) {\n var digit = 0\n , origPos = pos\n\n do {\n digit = length % 128 | 0\n length = length / 128 | 0\n if (length > 0) {\n digit = digit | 0x80\n }\n buffer.writeUInt8(digit, pos++, true)\n } while (length > 0)\n\n return pos - origPos\n}", "function writeLength(buffer, pos, length) {\n var digit = 0\n , origPos = pos\n\n do {\n digit = length % 128 | 0\n length = length / 128 | 0\n if (length > 0) {\n digit = digit | 0x80\n }\n buffer.writeUInt8(digit, pos++, true)\n } while (length > 0)\n\n return pos - origPos\n}", "function checkOffset(offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset(offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }" ]
[ "0.66712785", "0.66712785", "0.6632945", "0.65210676", "0.63827264", "0.62754023", "0.62562263", "0.62335545", "0.62335545", "0.61056054", "0.6035937", "0.6017502", "0.59810936", "0.5959609", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5948556", "0.59404105", "0.59404105", "0.59404105", "0.5934013", "0.5929776", "0.5929776", "0.59256095", "0.59179246", "0.5915978", "0.5915978", "0.5915887", "0.5912271" ]
0.0
-1
ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass the `instanceof` check but they should be treated as of that type. See:
function isInstance (obj, type) { return obj instanceof type || (obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isArrayBuffer (o) { return o instanceof ArrayBuffer }", "function isArrayBuffer (o) { return o instanceof ArrayBuffer }", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(obj){return obj instanceof ArrayBuffer||obj!=null&&obj.constructor!=null&&obj.constructor.name===\"ArrayBuffer\"&&typeof obj.byteLength===\"number\"}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}", "function isBuf(obj){return global.Buffer && global.Buffer.isBuffer(obj) || global.ArrayBuffer && obj instanceof ArrayBuffer;}", "function isArrayBuffer(obj) {\n return obj instanceof ArrayBuffer || obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' && typeof obj.byteLength === 'number';\n }", "function isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n }", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}", "function isArrayBufferView(obj){return typeof ArrayBuffer.isView===\"function\"&&ArrayBuffer.isView(obj)}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}", "function isArrayBufferView(obj) {\n return typeof ArrayBuffer.isView === 'function' && ArrayBuffer.isView(obj);\n }", "function isArrayBufferView (obj) {\n\t return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n\t}", "function isArrayBufferView(obj) {\n return typeof ArrayBuffer.isView === 'function' && ArrayBuffer.isView(obj);\n}", "static isBuffer(obj) {\n return isInstance(obj, Buffer$1);\n }", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer) ||\n (obj instanceof Uint8Array);\n}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function isBuf(obj) {\n\t return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n\t (global.ArrayBuffer && obj instanceof ArrayBuffer);\n\t}", "function detecteInstanceOf (obj, origin) {\n return obj instanceof origin\n // return Object.getPrototypeOf(obj) === origin.prototype\n // return obj.__proto__ === origin.prototype\n}", "function isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}", "function isBuf(obj) {\n return (global.Buffer && global.Buffer.isBuffer(obj)) ||\n (global.ArrayBuffer && obj instanceof ArrayBuffer);\n}" ]
[ "0.6930499", "0.6930499", "0.66416276", "0.66416276", "0.66416276", "0.66416276", "0.66416276", "0.66416276", "0.66416276", "0.66416276", "0.66416276", "0.66416276", "0.66416276", "0.66416276", "0.66416276", "0.66147846", "0.6572228", "0.6572228", "0.65621686", "0.6551051", "0.65037477", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.6493435", "0.64374065", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6248722", "0.6244478", "0.62429756", "0.6225681", "0.6206548", "0.61279476", "0.608729", "0.608729", "0.608729", "0.608729", "0.608729", "0.608729", "0.608729", "0.608729", "0.608729", "0.608729", "0.608729", "0.60766494", "0.6037733", "0.60294807", "0.60294807", "0.60294807", "0.60294807", "0.60294807", "0.60294807", "0.60294807", "0.60294807", "0.60294807", "0.60294807", "0.60294807" ]
0.0
-1
These standalone emit functions are used to optimize calling of event handlers for fast cases because emit() itself often has a variable number of arguments and can be deoptimized because of that. These functions always have the same number of arguments and thus do not get deoptimized, so the code inside them can execute faster.
function emitNone(handler, isFn, self) { if (isFn) handler.call(self); else { var len = handler.length; var listeners = arrayClone(handler, len); for (var i = 0; i < len; ++i) listeners[i].call(self); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "emit(...args) {\n this._event_dispatcher.$emit(...args);\n }", "function emitAsync(args){\n\t\tsetTimeout(function(){\n\t\t\temit.apply(evented, args);\n\t\t}, 0);\n\t}", "function emitEvent(fn) {\n if (typeof fn != 'function') return\n\n var args = [].slice.call(arguments, 1)\n return fn.apply(null, args)\n}", "emit(...args) {\n // emit the event through own emitter\n EventEmitter.prototype.emit.apply(this, args);\n\n debug('Emitting', args);\n\n // emit the event through all the attached emitters\n this.emitters.forEach((emitter) => {\n emitter.emit(...args);\n });\n }", "$emit(event, ...args) {\n this.emitter.emit(event, ...args)\n }", "$emit(event, ...args) {\n this.emitter.emit(event, ...args);\n }", "emitReserved(ev, ...args) {\n super.emit(ev, ...args);\n return this;\n }", "function emit(eventName, data) {\n if (events[eventName]) {\n events[eventName].forEach( (fn) => {\n fn(data);\n });\n }\n }", "emit(e, ...s) {\n const t = this.events[e];\n if (t) for (let e of t) e(...s);\n }", "emit(eventName, ...args) {\n if (!this.listeners[eventName] || this.listeners[eventName] === []) {\n return false\n }\n this.listeners[eventName].forEach(fn => {\n fn(...args)\n })\n return true\n }", "emit(eventName,param,next) {\n if (!this._events[eventName]) throw new Error(`${eventName} is not registered`);\n this._events[eventName](param);\n if (typeof next == 'function') next();\n }", "function emit(eventName, data) {\n if(events[eventName]) {\n events[eventName].forEach(function(fn) {\n fn(data);\n });\n }\n }", "seriesEmit(e, ...s) {\n const t = this.events[e];\n if (!t) return;\n let r;\n for (let e = 0; e < t.length; e++) r = 0 === e ? t[e](...s) : t[e](r);\n return r;\n }", "emit(ev, ...args) {\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\n throw new Error('\"' + ev + '\" is a reserved event name');\n }\n args.unshift(ev);\n const packet = {\n type: dist.PacketType.EVENT,\n data: args,\n };\n packet.options = {};\n packet.options.compress = this.flags.compress !== false;\n // event ack callback\n if (\"function\" === typeof args[args.length - 1]) {\n debug(\"emitting packet with ack id %d\", this.ids);\n this.acks[this.ids] = args.pop();\n packet.id = this.ids++;\n }\n const isTransportWritable = this.io.engine &&\n this.io.engine.transport &&\n this.io.engine.transport.writable;\n const discardPacket = this.flags.volatile && (!isTransportWritable || !this.connected);\n if (discardPacket) {\n debug(\"discard packet as the transport is not currently writable\");\n }\n else if (this.connected) {\n this.packet(packet);\n }\n else {\n this.sendBuffer.push(packet);\n }\n this.flags = {};\n return this;\n }", "emit(...args){\n let emitter = privateMembers.get(this).emitter;\n emitter.emit(...args);\n }", "emit(...args){\n let emitter = privateMembers.get(this).emitter;\n emitter.emit(...args);\n }", "emit(name, data){\n if(this.eventsMap[name]){\n for(let callback of this.eventsMap[name]){\n callback(data) ;\n };\n }\n}", "emit() {\n\t\t\tlet currentListeners = listeners;\n\t\t\tfor (let i=0; i<currentListeners.length; i++) {\n\t\t\t\tcurrentListeners[i].apply(null, arguments);\n\t\t\t}\n\t\t}", "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "function emit(name, data) {\n var list = events[name];\n if(!Array.isArray(data)) {\n data = [data];\n }\n\n if(list) {\n // Copy callback lists to prevent modification\n list = list.slice();\n\n // Execute event callbacks, use index because it's the faster.\n for(var i = 0, len = list.length; i < len; i++) {\n list[i].apply(exports, data);\n }\n }\n\n return events;\n}", "emit(eventName) {\r\n let fired = false;\r\n if (eventName in this.events === false) return fired;\r\n\r\n const list = this.events[eventName].slice();\r\n\r\n for (let i = 0; i < list.length; i++) {\r\n list[i].apply(this, Array.prototype.slice.call(arguments, 1));\r\n fired = true;\r\n }\r\n\r\n return fired;\r\n }", "function Emiter() {}", "function emit(eventName, data) {\n if (events[eventName]) {\n events[eventName].forEach( (fn) => {\n fn(data);\n });\n }\n }", "function _emit(type, args) {\n if ( listeners[type] ) {\n listeners[type].forEach(function(listener) {\n listener.apply(null, args || []);\n });\n }\n }", "emit() {\n for (var i = 0, len = this._cb.length; i < len; i++)\n this._cb[i].apply(this._cb[i], arguments);\n }", "emit(eventName, ...rest) {\n if (this._events[eventName]) {\n this._events[eventName].forEach((callback) => {\n callback(rest);\n });\n } else {\n console.log(\"The event doesn't exists.\");\n }\n }", "function EventEmitter(obj) {\n var handlers = {};\n\n function on(eventName, callback) {\n var hs = handlers[eventName] || (handlers[eventName] = []);\n hs.push(callback);\n return obj;\n }\n\n var eventNameSeparator = /\\s+/g;\n\n function off(eventNames, callback) {\n var hs, eventNamesArr, i, N, eventName;\n\n eventNamesArr = eventNames.split(eventNameSeparator);\n\n for (i = 0, N = eventNamesArr.length; i < N; ++i) {\n eventName = eventNamesArr[i];\n hs = handlers[eventName];\n if (callback) {\n if (hs) {\n handlers[eventName] = hs.filter(function (c) { return c !== callback; });\n }\n } else {\n // Turn off all callbacks\n delete handlers[eventName];\n }\n }\n\n return obj;\n }\n\n function emit(eventNames, arg) {\n var hs, eventNamesArr, i, N, eventName;\n\n eventNamesArr = eventNames.split(eventNameSeparator);\n\n for (i = 0, N = eventNamesArr.length; i < N; ++i) {\n eventName = eventNamesArr[i];\n\n hs = handlers[eventName];\n if (hs && hs.length > 0) {\n setTimeout(emitNow, 0, hs, eventName, arg);\n }\n }\n\n return obj;\n }\n\n function emitNow(hs, eventName, arg) {\n var i, N;\n for (i = 0, N = hs.length; i < N; ++i) {\n hs[i](obj, eventName, arg);\n }\n }\n\n obj.on = on;\n obj.off = off;\n obj.emit = emit;\n return obj;\n}", "emit(ev, ...args) {\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\n throw new Error('\"' + ev + '\" is a reserved event name');\n }\n\n args.unshift(ev);\n const packet = {\n type: socket_io_parser_1.PacketType.EVENT,\n data: args\n };\n packet.options = {};\n packet.options.compress = this.flags.compress !== false; // event ack callback\n\n if (\"function\" === typeof args[args.length - 1]) {\n debug(\"emitting packet with ack id %d\", this.ids);\n this.acks[this.ids] = args.pop();\n packet.id = this.ids++;\n }\n\n const isTransportWritable = this.io.engine && this.io.engine.transport && this.io.engine.transport.writable;\n const discardPacket = this.flags.volatile && (!isTransportWritable || !this.connected);\n\n if (discardPacket) {\n debug(\"discard packet as the transport is not currently writable\");\n } else if (this.connected) {\n this.packet(packet);\n } else {\n this.sendBuffer.push(packet);\n }\n\n this.flags = {};\n return this;\n }", "emit(ev, ...args) {\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\n throw new Error('\"' + ev + '\" is a reserved event name');\n }\n args.unshift(ev);\n const packet = {\n type: socket_io_parser_1.PacketType.EVENT,\n data: args,\n };\n packet.options = {};\n packet.options.compress = this.flags.compress !== false;\n // event ack callback\n if (\"function\" === typeof args[args.length - 1]) {\n debug(\"emitting packet with ack id %d\", this.ids);\n this.acks[this.ids] = args.pop();\n packet.id = this.ids++;\n }\n const isTransportWritable = this.io.engine &&\n this.io.engine.transport &&\n this.io.engine.transport.writable;\n const discardPacket = this.flags.volatile && (!isTransportWritable || !this.connected);\n if (discardPacket) {\n debug(\"discard packet as the transport is not currently writable\");\n }\n else if (this.connected) {\n this.packet(packet);\n }\n else {\n this.sendBuffer.push(packet);\n }\n this.flags = {};\n return this;\n }", "emit(ev, ...args) {\r\n if (socket_1.RESERVED_EVENTS.has(ev)) {\r\n throw new Error(`\"${ev}\" is a reserved event name`);\r\n }\r\n // set up packet object\r\n const data = [ev, ...args];\r\n const packet = {\r\n type: socket_io_parser_1.PacketType.EVENT,\r\n data: data,\r\n };\r\n if (\"function\" == typeof data[data.length - 1]) {\r\n throw new Error(\"Callbacks are not supported when broadcasting\");\r\n }\r\n this.adapter.broadcast(packet, {\r\n rooms: this.rooms,\r\n except: this.exceptRooms,\r\n flags: this.flags,\r\n });\r\n return true;\r\n }", "function EventEmitter(){}// Shortcuts to improve speed and size", "function emitNone(handler, isFn, self) {\n if (isFn) handler.call(self);else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n\n for (var i = 0; i < len; ++i) listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "h(eventName) {\n return this.emit.bind(this, eventName);\n }", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "emit() {\n try {\n this.out.emit.apply(this.out, arguments)\n }\n catch (err) {\n this.out.emit('error', err)\n }\n }", "function emitEvent(eventName, args) {\r\n if (scope.eventhandler) {\r\n $(scope.eventhandler).trigger(eventName, args);\r\n }\r\n }", "function emit(msg){\n\tconsole.log(msg);\n}", "function emitEvent ( name ) {\n\t\t\tif ( options['on' + name] ) {\n\t\t\t\toptions['on' + name].call(API);\n\t\t\t}\n\t\t}", "function emitEvent(eventName, args) {\r\n\r\n if (scope.eventhandler) {\r\n $(scope.eventhandler).trigger(eventName, args);\r\n }\r\n }", "function emit(sender, signal, args) {\n var list = senderMap.get(sender);\n if (!list) {\n return;\n }\n list.refs++;\n try {\n var dirty = invokeList(list, sender, signal, args);\n }\n finally {\n list.refs--;\n }\n if (dirty && list.refs === 0) {\n cleanList(list);\n }\n}", "emit(name, data) {\n this.params$.onNext(data);\n\n let handler = this.handlers[name];\n\n if (handler !== null && handler !== undefined) {\n this.handlers$.onNext(handler);\n } else {\n this.handlers$.onNext(undefined);\n }\n }", "emit(ev, ...args) {\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\n throw new Error('\"' + ev + '\" is a reserved event name');\n }\n args.unshift(ev);\n const packet = {\n type: socket_io_parser_1.PacketType.EVENT,\n data: args,\n };\n packet.options = {};\n packet.options.compress = this.flags.compress !== false;\n // event ack callback\n if (\"function\" === typeof args[args.length - 1]) {\n const id = this.ids++;\n debug(\"emitting packet with ack id %d\", id);\n const ack = args.pop();\n this._registerAckCallback(id, ack);\n packet.id = id;\n }\n const isTransportWritable = this.io.engine &&\n this.io.engine.transport &&\n this.io.engine.transport.writable;\n const discardPacket = this.flags.volatile && (!isTransportWritable || !this.connected);\n if (discardPacket) {\n debug(\"discard packet as the transport is not currently writable\");\n }\n else if (this.connected) {\n this.packet(packet);\n }\n else {\n this.sendBuffer.push(packet);\n }\n this.flags = {};\n return this;\n }" ]
[ "0.6524171", "0.6403223", "0.634626", "0.6194433", "0.6063215", "0.604239", "0.5946616", "0.5925932", "0.5901471", "0.58936495", "0.5877004", "0.5867342", "0.5861124", "0.58575964", "0.5846938", "0.5846938", "0.58239335", "0.58167434", "0.5793601", "0.5793601", "0.5792203", "0.57776725", "0.5773964", "0.5732355", "0.5717524", "0.571396", "0.57089573", "0.5693387", "0.5682696", "0.56742793", "0.56563073", "0.5652689", "0.56418866", "0.5638726", "0.5638726", "0.5638726", "0.5634107", "0.5634107", "0.5634107", "0.5632401", "0.5629672", "0.5629672", "0.5629672", "0.5629672", "0.5629672", "0.5629672", "0.5629672", "0.5628171", "0.56253356", "0.5619293", "0.56041074", "0.5596773", "0.55958843", "0.55873793", "0.5569884" ]
0.0
-1
About 1.5x faster than the twoarg version of Arraysplice().
function spliceOne(list, index) { for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) list[i] = list[k]; list.pop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fastSplice(arr, startIdx, removeCount) {\n let i, length = arr.length;\n if (startIdx >= length || removeCount === 0) {\n return;\n }\n removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount);\n let len = length - removeCount;\n for (i = startIdx; i < len; ++i) {\n arr[i] = arr[i + removeCount];\n }\n arr.length = len;\n }", "function testSplice2(arr) {\n arr.splice(0, 2); // start at 0, delete 2 elements\n console.log(arr);\n}", "splice() {\n let ret;\n\n _checkManualPopulation(this, Array.prototype.slice.call(arguments, 2));\n\n if (arguments.length) {\n const vals = [];\n for (let i = 0; i < arguments.length; ++i) {\n vals[i] = i < 2 ?\n arguments[i] :\n this._cast(arguments[i], arguments[0] + (i - 2));\n }\n ret = [].splice.apply(this, vals);\n this._registerAtomic('$set', this);\n }\n\n return ret;\n }", "function usingSplice(array, start, deleteCount, item) {\n array.splice(start, deleteCount, item)\n return array;\n}", "function applySplice(array, index, item1, item2) {\n\t// remove two elements from the array at the index given, and adds item1 and item2 in their place\n\tarray.splice(index, 2, item1, item2);\n\t// return the array\n\treturn array;\n}", "splice() {\n let ret;\n\n _checkManualPopulation(this, Array.prototype.slice.call(arguments, 2));\n\n if (arguments.length) {\n let vals;\n if (this[arraySchemaSymbol] == null) {\n vals = arguments;\n } else {\n vals = [];\n for (let i = 0; i < arguments.length; ++i) {\n vals[i] = i < 2 ?\n arguments[i] :\n this._cast(arguments[i], arguments[0] + (i - 2));\n }\n }\n\n ret = [].splice.apply(this, vals);\n this._registerAtomic('$set', this);\n }\n\n return ret;\n }", "function jpt_splice(arr, index) {\n\t for (var i = index, len = arr.length - 1; i < len; i++)\n\t arr[i] = arr[i + 1];\n\n\t arr.length = len;\n\t}", "function frankenSplice(arr1, arr2, n) {\r\n let localArr = arr2.slice();\r\n localArr.splice(n, 0, ...arr1);\r\n return localArr;\r\n}", "function f6(arr) {\n return arr.concat(arr.splice(0, 2));\n}", "function testSplice(arr) {\n arr.splice(2, 0, 'c');\n console.log(arr);\n}", "splice(position = self.list.length, deleteCount = 0, ...elements) {\n return self.list.splice(position, deleteCount, ...elements)\n }", "function splice(array, start, deleteCount, element1, elementN) {\n var newElements = [];\n var oldElements = [];\n var i;\n\n for (i = 3; i < arguments.length; i += 1) {\n newElements.push(arguments[i]);\n }\n\n for (i = start; i < start + deleteCount; i += 1) {\n oldElements.push(array[i]);\n array[i] = undefined;\n }\n\n console.log(oldElements);\n console.log(array);\n}", "function spliceElement(someArr, index) {\n newArray = someArr[index]\n someArr = someArr.splice(index,1) //is is cheating to use the already existing splice fxn?\n return newArray\n}", "function frankenSplice(arr1, arr2, n) {\n var arr2Copy = arr2.slice();\n\n}", "function frankenSplice(arr1, arr2, n) {\n // It's alive. It's alive!\n // my code\n // copy the elements in arr2 and assign them to newArr so that we don't change arr2\n let newArr = arr2.slice();\n // starting from n index, delete 0 elements, and insert arr1(unpacked with the spread operator)\n newArr.splice(n, 0, ...arr1)\n // my code\n return newArr;\n}", "function frankenSplice(arr1, arr2, n) {\n let localArr = arr2.slice();\n localArr.splice(n, 0, ...arr1);\n return localArr;\n}", "function getSpliceEquivalent ( length, methodName, args ) {\n\t \tswitch ( methodName ) {\n\t \t\tcase 'splice':\n\t \t\t\tif ( args[0] !== undefined && args[0] < 0 ) {\n\t \t\t\t\targs[0] = length + Math.max( args[0], -length );\n\t \t\t\t}\n\n\t \t\t\twhile ( args.length < 2 ) {\n\t \t\t\t\targs.push( length - args[0] );\n\t \t\t\t}\n\n\t \t\t\t// ensure we only remove elements that exist\n\t \t\t\targs[1] = Math.min( args[1], length - args[0] );\n\n\t \t\t\treturn args;\n\n\t \t\tcase 'sort':\n\t \t\tcase 'reverse':\n\t \t\t\treturn null;\n\n\t \t\tcase 'pop':\n\t \t\t\tif ( length ) {\n\t \t\t\t\treturn [ length - 1, 1 ];\n\t \t\t\t}\n\t \t\t\treturn [ 0, 0 ];\n\n\t \t\tcase 'push':\n\t \t\t\treturn [ length, 0 ].concat( args );\n\n\t \t\tcase 'shift':\n\t \t\t\treturn [ 0, length ? 1 : 0 ];\n\n\t \t\tcase 'unshift':\n\t \t\t\treturn [ 0, 0 ].concat( args );\n\t \t}\n\t }", "function frankenSplice(arr1, arr2, n) {\n\n return;\n}", "function splice(arr, start, deleteCount, items) {\n arr.splice(start, deleteCount, items);\n}", "function sliceAndSplice(original, start, deleteCount, ...args) {\n const returnArray = original.slice();\n returnArray.splice(start, deleteCount, ...args);\n return returnArray;\n}", "function getSpliceEquivalent(array, methodName, args) {\n \tswitch (methodName) {\n \t\tcase \"splice\":\n \t\t\tif (args[0] !== undefined && args[0] < 0) {\n \t\t\t\targs[0] = array.length + Math.max(args[0], -array.length);\n \t\t\t}\n\n \t\t\twhile (args.length < 2) {\n \t\t\t\targs.push(0);\n \t\t\t}\n\n \t\t\t// ensure we only remove elements that exist\n \t\t\targs[1] = Math.min(args[1], array.length - args[0]);\n\n \t\t\treturn args;\n\n \t\tcase \"sort\":\n \t\tcase \"reverse\":\n \t\t\treturn null;\n\n \t\tcase \"pop\":\n \t\t\tif (array.length) {\n \t\t\t\treturn [array.length - 1, 1];\n \t\t\t}\n \t\t\treturn [0, 0];\n\n \t\tcase \"push\":\n \t\t\treturn [array.length, 0].concat(args);\n\n \t\tcase \"shift\":\n \t\t\treturn [0, array.length ? 1 : 0];\n\n \t\tcase \"unshift\":\n \t\t\treturn [0, 0].concat(args);\n \t}\n }", "function mySplice (arr, start, deleteCount) {\n var deletedArr = [];\n var startElements = [];\n //Remove members up to start\n for (var i=0; i<start; i++) {\n startElements.push(arr.shift());\n }\n //Remove deleted elements\n for (var j=0; j<deleteCount; j++) {\n deletedArr.push(arr.shift());\n }\n //Add start elements back into the original array\n var startElementsLength = startElements.length;\n for (var z=0; z<startElementsLength; z++) {\n arr.unshift(startElements.pop());\n }\n return deletedArr;\n}", "function arraySplice(array, index, count) {\n var length = array.length - count;\n\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n\n while (count--) {\n array.pop(); // shrink the array\n }\n }", "function arraySplice(array, index, count) {\n var length = array.length - count;\n\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n\n while (count--) {\n array.pop(); // shrink the array\n }\n }", "function frankenSplice(arr1, arr2, n) {\n return arr2;\n}", "function arraySplice(array, index, count) {\n var length = array.length - count;\n\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n\n while (count--) {\n array.pop(); // shrink the array\n }\n }", "function arraySplice(array, index, count) {\n var length = array.length - count;\n\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function sliceSplice(arr1, arr2, n){\n // slice method to make new copy of arr2 so original arr2 not mutated\n let newArr = arr2.slice();\n\n // ... spread operator spread out individual elements in arr1\n // without ... the fx put arr1 as a single element\n newArr.splice(n, 0, ...arr1);\n\n // return in new line because splice returns elements removed, which would result in empty [] in this case\n return newArr;\n}", "function frankenSplice(arr1, arr2, n) {\n\n let NewArr = arr2.slice()\n NewArr.splice(n, 0, ...arr1);\n return NewArr\n }", "function Task2(array,index){\n array.splice(index,1);\n}", "function slasher(arr, howMany) {\n var splicedArray = [];\n arr.splice(0, howMany);\n return arr;\n}", "function splice(arr, idx, num) {\n var result = [];\n\n for (var i = idx; i < idx + num; i++) { push(result, arr[i]); } // adding values to result\n for (var i = idx; i < arr.length - num; i++) { arr[i] = arr[i + num]; } // removing values from arr\n\n arr.length = arr.length - num; // chop\n return result;\n}", "function Task2(array,index, newValue){\n return array.splice(index,0, newValue);\n}", "function ObservableArray$splice(start, deleteCount) {\n var items = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n items[_i - 2] = arguments[_i];\n }\n var removed = Array.prototype.splice.apply(this, arguments);\n if (removed.length > 0 || items.length > 0) {\n var changeEvents = [];\n if (removed.length > 0) {\n changeEvents.push({ type: ArrayChangeType.remove, startIndex: start, endIndex: start + removed.length - 1, items: removed });\n }\n if (items.length > 0) {\n changeEvents.push({ type: ArrayChangeType.add, startIndex: start, endIndex: start + items.length - 1, items: items });\n }\n this.__ob__.raiseEvents(changeEvents);\n }\n return removed;\n}", "function n(e,t,n,...o){t<e.length?e.splice(t,n,...o):e.push(...o);}", "function frankenSpliceF(arr1, arr2, n) {\n\t// let localArray = arr2.slice(); // or Array.from(arr2) or [...arr2]\n\t// for (let i = 0; i < arr1.length; i++) {\n\t// \tlocalArray.splice(n, 0, arr1[i]);\n\t// \tn++; // increments index at which we insert arr1[i];\n\t// }\n\t// return localArray;\n\n\t// let localArr = arr2.slice();\n\t// localArr.splice(n, 0, ...arr1);\n\t// return localArr;\n\n\treturn arr2.slice(0, n).concat(arr1).concat(arr2.slice(n));\n}", "function splice(arr, start, remove) {\n var items = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n items[_i - 3] = arguments[_i];\n }\n start = start || 0;\n var head = arr.slice(0, start);\n var tail = arr.slice(start);\n var removed = [];\n if (remove) {\n removed = tail.slice(0, remove);\n tail = tail.slice(remove);\n }\n if (!is_1.isValue(remove)) {\n arr = head.concat(items);\n removed = tail;\n }\n else {\n arr = head.concat(items).concat(tail);\n }\n return {\n array: arr,\n val: removed\n };\n}", "function testSplice3(arr) {\n let newArr = arr.splice(3); // default start at 0, delete 3 element\n console.log(newArr); // [ 4, 5, 6, 7 ]\n console.log(arr); // [ 1, 2, 3 ]\n}", "function frankenSplice(arr1, arr2, n) {\n // It's alive. It's alive!\n let copy = arr2.slice();\n\n for(let i = 0; i < arr1.length; i++) {\n copy.splice(n, 0 , arr1[i]);\n n++\n }\n return copy;\n}", "function splice(arr, start, deleteCount, element1, elementN) {\n let deleted = [];\n let i;\n let arrLength = arr.length;\n\n // arr = [1, 2, 3];\n // start = 1;\n // deleteCount = 1;\n // element1 = 'two'\n\n if (element1 === undefined && elementN === undefined) {\n if ((start + deleteCount) >= arrLength) {\n deleted = arr.slice(start, deleteCount); \n arrLength -= deleteCount;\n } else if (start == 0) {\n for (i = 0; i < deleteCount; i += 1) {\n deleted.push(arr.shift()); \n }\n }\n } else if (element1 !== undefined && elementN === undefined) {\n if (deleteCount === 0) {\n for (i = arrLength; i > start; i -= 1) {\n arr[i + 1] = arr[i - 1]; \n } \n arr[start] = element1;\n } else if (deleteCount === 1) {\n deleted.push(arr[start]);\n arr[start] = element1; \n } \n } else if (element1 !== undefined && elementN !== undefined) {\n if (deleteCount === 2) {\n deleted = arr.slice(start, 2);\n arr[start] = element1; \n arr[start + 1] = elementN;\n } \n }\n return deleted;\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function frankenSplice(arr1, arr2, n) {\n // It's alive. It's alive!\n\n\tconsole.log (arr2.slice(n));\n\tconsole.log (arr2.slice(0,n));\n\tconsole.log (arr1.slice());\nreturn [...arr2.slice(0,n), ...arr1, ...arr2.slice(n)];\n}", "array_move(arr, fromIndex, toIndex) {\n\t\tvar element = arr[fromIndex];\n\t\tarr.splice(fromIndex, 1);\n\t\tarr.splice(toIndex, 0, element);\n\t}", "function spliceMe(tempArr,ind,howmanytoRemove,AddedItem ){\r\n\r\n return tempArr.splice(ind,howmanytoRemove,AddedItem);\r\n\r\n\r\n }", "function frankenSplice(arr1, arr2, n) {\n let newArr = arr2.slice();\n newArr.splice(n, 0, ...arr1);\n console.log(newArr);\n\n return newArr;\n\n }", "function frankenSplice(arr1, arr2, n) {\n let Aux = arr2.slice();\n\n for (let i = 0; i < arr1.length; i++) {\n Aux.splice(n + i, 0, arr1[i])\n }\n return Aux\n}", "function splic(array, start, deleteCount, ...values) {\n start = Math.min(start, array.length);\n deleteCount = Math.min(deleteCount, array.length - start);\n\n var deleted = slice(array, start, start + deleteCount);\n var rest = slice(array, start + deleteCount, array.length);\n\n array.length = start;\n array.push(...values);\n array.push(...rest);\n\n console.log(deleted);\n return deleted;\n}", "function doubleTrouble(arr){\n for(let i=0;i<arr.length;i+=2){ arr.splice(i, 0, arr[i]); }\n return arr;\n}", "function test() {\n var arr;\n var res;\n\n // Standard: splice 'baz' and 'quuux'.\n arr = [ 'foo', 'bar', 'quux', 'baz', 'quuux' ];\n res = arr.splice(3, 2);\n print(JSON.stringify(arr), JSON.stringify(res));\n\n // ES2015+: same behavior if second argument omitted.\n // ES5.1 behavior seems to mandate same behavior as\n // arr.splice(3, 0);\n arr = [ 'foo', 'bar', 'quux', 'baz', 'quuux' ];\n res = arr.splice(3);\n print(JSON.stringify(arr), JSON.stringify(res));\n\n // When given as 'undefined', Rhino and V8 both behave like\n // the standard mandates, e.g. same as arr.splice(3, 0);\n arr = [ 'foo', 'bar', 'quux', 'baz', 'quuux' ];\n res = arr.splice(3, undefined);\n print(JSON.stringify(arr), JSON.stringify(res));\n}", "function take(arr, n) { \n arr.splice(n)\n return arr\n}", "function removeAt(array, idx) {\n if (idx >= array.length || idx < 0) return array;\n return array.slice(0, idx).concat(array.slice(idx + 1));\n} // -- #### replaceAt()", "function frankenSplice(arr1, arr2, n) {\n let arr1mod = arr1;\n let arr2mod = [...arr2];\n arr1mod.forEach((element, index) => {\n arr2mod.splice((n+index), 0, element)\n });\n console.log(arr2mod);\n console.log(arr2);\n return arr2mod;\n}", "function frankenSplice(arr1, arr2, n) {\n let combined_arr = [...arr2];\n combined_arr.splice(n, 0, ...arr1); // splice( starting index, # items to remove, items... )\n\n return combined_arr;\n}", "function arraymove(arr, fromIndex, toIndex) {\n var element = arr[fromIndex];\n arr.splice(fromIndex, 1);\n arr.splice(toIndex, 0, element);\n}", "spliceToArray() {\n return this.splice.apply(this, arguments).base;\n }", "function spliceElement(someArr) {\r\n console.log(someArr.length);\r\n someArr.splice(2, 1);\r\n console.log(someArr.length);\r\n }", "function unsafeRemove (i, a, l) {\n\t var b = new Array(l)\n\t var j\n\t for (j = 0; j < i; ++j) {\n\t b[j] = a[j]\n\t }\n\t for (j = i; j < l; ++j) {\n\t b[j] = a[j + 1]\n\t }\n\t\n\t return b\n\t}", "function test1(arr) {\n\tarr.push(arr.splice(arr.indexOf(0), 1)[0]);\n\n\treturn arr;\n}", "function arraymove(arr, fromIndex, toIndex) {\n\t\t\tvar element = arr[fromIndex];\n\t\t\tarr.splice(fromIndex, 1);\n\t\t\tarr.splice(toIndex, 0, element);\n\t\t\treturn arr\n\t\t}", "immutableDelete (arr, index) {\n var i = parseInt(index, 10);\n return arr.slice(0,i).concat(arr.slice(i+1));\n }", "function spliceWorks() {\n\t\tvar n = 256,\n\t\t\ta = [];\n\t\ta[n] = 'a';\n\t\ta.splice( n + 1, 0, 'b' );\n\t\treturn a[n] === 'a';\n\t}", "function unsafeRemove(i, a, l) {\n var b = new Array(l);\n var j = void 0;\n for (j = 0; j < i; ++j) {\n b[j] = a[j];\n }\n for (j = i; j < l; ++j) {\n b[j] = a[j + 1];\n }\n\n return b;\n}", "function frankenSplice(arr1, arr2, n) {\n let newArr1 = arr1.slice();\n let newArr2 = arr2.slice();\n for (let i = 0 ; i < newArr1.length ; i++) {\n newArr2.splice(n, 0, newArr1[i] );\n n++;\n }\n return newArr2;\n}", "function slasher(arr, howMany) {\n arr.splice(0, howMany);\n return arr;\n}", "function unsafeRemove (i, a, l) {\n var b = new Array(l)\n var j\n for (j = 0; j < i; ++j) {\n b[j] = a[j]\n }\n for (j = i; j < l; ++j) {\n b[j] = a[j + 1]\n }\n\n return b\n}", "function removeAt(array, idx) {\n if (idx >= array.length || idx < 0) return array;\n return array.slice(0, idx).concat(array.slice(idx + 1));\n}", "function removex(array, from, to) {\n var rest = array.slice((to || from) + 1 || array.length);\n array.length = from < 0 ? array.length + from: from;\n return array.push.apply(array, rest);\n}", "function removex(array, from, to) {\n var rest = array.slice((to || from) + 1 || array.length);\n array.length = from < 0 ? array.length + from: from;\n return array.push.apply(array, rest);\n}", "function spliceArray(origArray, start, replace, arrayToSplice) {\n var args = [start];\n if (arguments.length > 2) { args.push(replace); }\n if (arguments.length > 3) { args = args.concat(arrayToSplice); } // In case arrayToSplice is not passed in, otherwise appending 'undefined'\n return Array.prototype.splice.apply(origArray, args);\n }", "function spliceArray(origArray, start, replace, arrayToSplice) {\n var args = [start];\n if (arguments.length > 2) { args.push(replace); }\n if (arguments.length > 3) { args = args.concat(arrayToSplice); } // In case arrayToSplice is not passed in, otherwise appending 'undefined'\n return Array.prototype.splice.apply(origArray, args);\n }", "function frankenSplice(arr1, arr2, n) {\n\n // use array.slice() to create beginning of array\n let arrBegin = arr2.slice(0, n);\n \n // use array.slice() to create end of array\n let arrEnd = arr2.slice(n);\n \n // use array.concat() to concat arrays\n let arrResult = arrBegin.concat(arr1).concat(arrEnd)\n \n return arrResult;\n}", "function slasher(arr, howMany) {\n // it doesn't always pay to be first\n arr.splice(0, howMany);\n return arr;\n}", "function unsafeDeleteAt_(as, i) {\n const xs = [...as];\n xs.splice(i, 1);\n return xs;\n}", "function slasher(arr, howMany) {\n // it doesn't always pay to be first\n\n return arr.splice(howMany,arr.length-howMany);\n}", "function slasher(arr, howMany) {\n\tarr.splice(0, howMany);\n\treturn arr;\n}", "function replaceInNativeArray(array, start, deleteCount, items) {\n arrayContentWillChange(array, start, deleteCount, items.length);\n\n if (items.length <= CHUNK_SIZE) {\n array.splice(start, deleteCount, ...items);\n } else {\n array.splice(start, deleteCount);\n\n for (let i = 0; i < items.length; i += CHUNK_SIZE) {\n let chunk = items.slice(i, i + CHUNK_SIZE);\n array.splice(start + i, 0, ...chunk);\n }\n }\n\n arrayContentDidChange(array, start, deleteCount, items.length);\n}", "function spliceOne(list,index){for(var i=index,k=i+1,n=list.length;k<n;i+=1,k+=1){list[i]=list[k];}list.pop();}", "function spliceOne(list,index){for(var i=index,k=i+1,n=list.length;k<n;i+=1,k+=1){list[i]=list[k];}list.pop();}", "function insert(array, idx, val) {\n return array.slice(0, idx).concat(Array.isArray(val) ? val : [val]).concat(array.slice(idx));\n} // -- #### removeAt()", "function frankenSplice(arr1, arr2, n) {\n let arr3 = arr2.slice(0,n);\n for (let i=0;i < arr1.length; i++) {\n arr3.push(arr1[i]);\n }\n for (let i=n;i < arr2.length; i++) {\n arr3.push(arr2[i]);\n }\n return arr3;\n}", "function splice(array, start, count, ...values) {\n var narray = [];\n var count = Math.min(array.length - start, count);\n var difference = count - 0;\n var extra = shuffleUp(array, values.length, start);\n for (start; start < array.length; start++) {\n if (values.length > 0) {\n array[start] = values.shift();\n } else {\n if (count > 0) {\n narray.push(array[start]);\n count -= 1;\n }\n array[start] = array[start + difference];\n }\n }\n array.length -= difference;\n return narray;\n}", "function spliceElement(someArr, index) {\n return(someArr.splice(index, 1));\n \n}", "function arrayMove(arr, from, to) {\n var element = arr.splice(from, 1);\n arr.splice(to, 0, element[0]);\n }", "splice(start, deleteCount, ...items) {\n // Delete items\n if (deleteCount) {\n for (let i = start; i < this._length - deleteCount; i++) {\n this._array[this._getCyclicIndex(i)] = this._array[this._getCyclicIndex(i + deleteCount)];\n }\n this._length -= deleteCount;\n this.onDeleteEmitter.fire({ index: start, amount: deleteCount });\n }\n // Add items\n for (let i = this._length - 1; i >= start; i--) {\n this._array[this._getCyclicIndex(i + items.length)] = this._array[this._getCyclicIndex(i)];\n }\n for (let i = 0; i < items.length; i++) {\n this._array[this._getCyclicIndex(start + i)] = items[i];\n }\n if (items.length) {\n this.onInsertEmitter.fire({ index: start, amount: items.length });\n }\n // Adjust length as needed\n if (this._length + items.length > this._maxLength) {\n const countToTrim = (this._length + items.length) - this._maxLength;\n this._startIndex += countToTrim;\n this._length = this._maxLength;\n this.onTrimEmitter.fire(countToTrim);\n }\n else {\n this._length += items.length;\n }\n }", "function replace(array, from, to, elements) {\n\t// array.splice.apply(array, [from, to - from].concat(elements)); //ES5\n\ttestArray=[...array.slice(0,from), ...elements, ...array.slice(to)];\n}", "function mySplice(inputArray, start = 0, deleteCount = inputArray.length, ...items) {\n // create new empty arrays and copy the input\n let inputArrayCopy = [];\n let newArray = [];\n let deletedItems = [];\n inputArrayCopy = inputArrayCopy.concat(inputArray);\n\n // if we are passed values, assume the start didn't offset the index by -1\n if (start) start--;\n //if (deleteCount) deleteCount--;\n\n // slice off the deleted items\n //let deletedItems = (inputArray.slice(start, start + deleteCount +1));\n // Note: MODIFY inputArray when deleting or adding\n for (let i = 0; i < inputArray.length; i++) {\n if (i <= start || i > start + deleteCount) {\n console.log('keep: idx', i, 'val', inputArrayCopy[0]);\n newArray = newArray.concat(inputArrayCopy.shift());\n } \n else {\n console.log('dele: idx', i, 'val', inputArrayCopy[0]);\n deletedItems = deletedItems.concat(inputArrayCopy.shift());\n }\n }\n console.log('new', newArray);\n console.log('del', deletedItems);\n\n // clear the inputArray, then move the newArray to the inputArray\n while (inputArray.length) inputArray.pop();\n while (newArray.length) inputArray.push(newArray.shift());\n \n\n // returns the deleted elements, not the modified array!\n return deletedItems;\n}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\r\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\r\n list[i] = list[k];\r\n list.pop();\r\n}", "function spliceOne(list, index) {\r\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\r\n list[i] = list[k];\r\n list.pop();\r\n}" ]
[ "0.7395812", "0.71519256", "0.7065192", "0.7012039", "0.6878061", "0.6753091", "0.67074555", "0.66961807", "0.66882205", "0.6687342", "0.6681239", "0.6679162", "0.6678183", "0.66775954", "0.66335577", "0.6621636", "0.65752155", "0.6558999", "0.6531689", "0.65295357", "0.64876974", "0.6470425", "0.64662147", "0.64662147", "0.64551276", "0.6448074", "0.6429002", "0.64266807", "0.64186895", "0.641848", "0.64183635", "0.6388983", "0.6376852", "0.6371037", "0.6361589", "0.63546693", "0.63524556", "0.634388", "0.6340464", "0.6318274", "0.63148004", "0.63148004", "0.63148004", "0.63148004", "0.63148004", "0.63148004", "0.63148004", "0.6303633", "0.6297158", "0.62817025", "0.6281317", "0.62808233", "0.6269743", "0.626558", "0.62640065", "0.6252665", "0.6247535", "0.6235361", "0.6219757", "0.6142618", "0.6142165", "0.613538", "0.6133883", "0.61155826", "0.61058134", "0.6104062", "0.6098272", "0.60976624", "0.6084577", "0.60833293", "0.6078226", "0.6078093", "0.6071196", "0.6071196", "0.6065995", "0.6065995", "0.6062629", "0.6055649", "0.6052992", "0.60527533", "0.60350925", "0.60025007", "0.59710383", "0.59710383", "0.59683347", "0.5961394", "0.5949166", "0.59334993", "0.5933154", "0.5931376", "0.5922848", "0.59141695", "0.58811295", "0.58811295", "0.58811295", "0.58811295", "0.58811295", "0.58811295", "0.58811295", "0.5870262", "0.5870262" ]
0.0
-1
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n if (each.score >= 0.4) {\n objectDescription = objectDescription + \", \" + each.class\n }\n })\n tj.speak(\"The objects I see are: \" + objectDescription)\n });\n}", "function recommendNewPosts() {\n model.loadModel();\n getNewPosts(function (err, posts) {\n var label\n ;\n posts.forEach(function (post) {\n label = model.classifyPost(post);\n if (label == 'like') {\n console.log(post);\n }\n });\n });\n }", "function BOT_onLike() {\r\n\tBOT_traceString += \"GOTO command judge\" + \"\\n\"; // change performative\r\n\tBOT_theReqJudgement = \"likeable\";\r\n\tBOT_onJudge(); \t\r\n\tif(BOT_reqSuccess) {\r\n\t\tvar ta = [BOT_theReqTopic,BOT_theReqAttribute]; \r\n\t\tBOT_del(BOT_theUserTopicId,\"distaste\",\"VAL\",ta);\r\n\t\tBOT_add(BOT_theUserTopicId,\"preference\",\"VAL\",ta);\r\n\t}\r\n}", "function like (data, archetype) {\n var name;\n\n for (name in archetype) {\n if (archetype.hasOwnProperty(name)) {\n if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof archetype[name]) {\n return false;\n }\n\n if (object(data[name]) && like(data[name], archetype[name]) === false) {\n return false;\n }\n }\n }\n\n return true;\n }", "function LanguageUnderstandingModel() {\n }", "function guess() {\n classifier.predict(video.elt, 5, gotResult);\n}", "function theBigBang() {\n\t\tinitLibs();\n\t\tinitFuncs();\n\t\tObject.setPrototypeOf(Universe.prototype, universe.kjsclasses._primitive_prototype);\n\t\tObject.setPrototypeOf(Object.prototype, universe); // [0]\n\t}", "function readOwn(obj, name, pumpkin) {\n if (typeof obj !== 'object' || !obj) {\n if (typeOf(obj) !== 'object') {\n return pumpkin;\n }\n }\n if (typeof name === 'number' && name >= 0) {\n if (myOriginalHOP.call(obj, name)) { return obj[name]; }\n return pumpkin;\n }\n name = String(name);\n if (obj[name + '_canRead___'] === obj) { return obj[name]; }\n if (!myOriginalHOP.call(obj, name)) { return pumpkin; }\n // inline remaining relevant cases from canReadPub\n if (endsWith__.test(name)) { return pumpkin; }\n if (name === 'toString') { return pumpkin; }\n if (!isJSONContainer(obj)) { return pumpkin; }\n fastpathRead(obj, name);\n return obj[name];\n }", "function a(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach(function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)})}", "function NXObject() {}", "function isPrimative(val) { return (typeof val !== 'object') }", "function like (data, duck) {\n var name;\n\n assert.object(data);\n assert.object(duck);\n\n for (name in duck) {\n if (duck.hasOwnProperty(name)) {\n if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof duck[name]) {\n return false;\n }\n\n if (object(data[name]) && like(data[name], duck[name]) === false) {\n return false;\n }\n }\n }\n\n return true;\n }", "static get observedAttributes() {\n return ['rainbow', 'lang'];\n }", "function a(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach((function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)}))}", "function testSimpleHole_prototype() {\n var theHole = Object.create({ x: \"in proto\" });\n var theReplacement = \"yay\";\n var serialized = bidar.serialize(theHole, holeFilter);\n var parsed = bidar.parse(serialized, holeFiller);\n\n assert.equal(parsed, theReplacement);\n\n function holeFilter(x) {\n assert.equal(x, theHole);\n return { data: \"blort\" };\n }\n\n function holeFiller(x) {\n assert.equal(x, \"blort\");\n return theReplacement;\n }\n}", "function test() {\n\t// \"ex nihilo\" object creation using the literal\n\t// object notation {}.\n\tvar foo = {\n\t\tname : \"foo\",\n\t\tone : 1,\n\t\ttwo : 2\n\t};\n\n\t// Another \"ex nihilo\" object.\n\tvar bar = {\n\t\ttwo : \"two\",\n\t\tthree : 3\n\t};\n\n\t// Gecko and Webkit JavaScript engines can directly\n\t// manipulate the internal prototype link.\n\t// For the sake of simplicity, let us pretend\n\t// that the following line works regardless of the\n\t// engine used:\n\tbar.__proto__ = foo; // foo is now the prototype of bar.\n\n\t// If we try to access foo's properties from bar\n\t// from now on, we'll succeed.\n\tlog(bar.one) // Resolves to 1.\n\n\t// The child object's properties are also accessible.\n\tlog(bar.three) // Resolves to 3.\n\n\t// Own properties shadow prototype properties\n\tlog(bar.two); // Resolves to \"two\"\n\tlog(foo.name); // unaffected, resolves to \"foo\"\n\tlog(bar.name); // Resolves to \"foo\"\n log(foo.__proto__);\n}", "function wrappedPrimitivePreviewer(className, classObj, objectActor, grip) {\r\n let {_obj} = objectActor;\r\n\r\n if (!_obj.proto || _obj.proto.class != className) {\r\n return false;\r\n }\r\n\r\n let raw = _obj.unsafeDereference();\r\n let v = null;\r\n try {\r\n v = classObj.prototype.valueOf.call(raw);\r\n } catch (ex) {\r\n // valueOf() can throw if the raw JS object is \"misbehaved\".\r\n return false;\r\n }\r\n\r\n if (v === null) {\r\n return false;\r\n }\r\n\r\n let canHandle = GenericObject(objectActor, grip, className === \"String\");\r\n if (!canHandle) {\r\n return false;\r\n }\r\n\r\n grip.preview.wrappedValue = objectActor.getGrip(makeDebuggeeValueIfNeeded(_obj, v));\r\n return true;\r\n}", "function DartObject(o) {\n this.o = o;\n}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function likeVsLikes(toyLikeCount){\n\t\tif (toyLikeCount == 1){\n\t\t\treturn 'Like';\n\t\t} else {\n\t\t\treturn 'Likes';\n\t\t}\n\t}", "constructor(spec) {\n this.cached = /* @__PURE__ */ Object.create(null);\n let instanceSpec = this.spec = {};\n for (let prop in spec)\n instanceSpec[prop] = spec[prop];\n instanceSpec.nodes = OrderedMap.from(spec.nodes), instanceSpec.marks = OrderedMap.from(spec.marks || {}), this.nodes = NodeType$1.compile(this.spec.nodes, this);\n this.marks = MarkType.compile(this.spec.marks, this);\n let contentExprCache = /* @__PURE__ */ Object.create(null);\n for (let prop in this.nodes) {\n if (prop in this.marks)\n throw new RangeError(prop + \" can not be both a node and a mark\");\n let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n type.markSet = markExpr == \"_\" ? null : markExpr ? gatherMarks(this, markExpr.split(\" \")) : markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (let prop in this.marks) {\n let type = this.marks[prop], excl = type.spec.excludes;\n type.excluded = excl == null ? [type] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this);\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n this.cached.wrappings = /* @__PURE__ */ Object.create(null);\n }", "wordClass(word) {\r\n return {\r\n der: word.artikel == \"der\",\r\n die: word.artikel == \"die\",\r\n das: word.artikel == \"das\",\r\n marked: word.marker\r\n }\r\n }", "function dummyObjects(name, age){\n this.name = name\n this.age = age\n}", "function handleLikes() {\n // Get a random number\n let randomNumber = Math.random();\n // To make it unpredictable, only change the likes if =>\n if (randomNumber < REVEAL_PROBABILITY) {\n defineLikes();\n }\n}", "constructor() { \n \n Like.initialize(this);\n }", "like() {\r\n return this.clone(Comment, \"Like\").postCore();\r\n }", "like() {\r\n return this.getItem().then(i => {\r\n return i.like();\r\n });\r\n }", "added(vrobject){}", "classify(phrase) { return this.clf.classify(phrase) }", "function badIdea(){\n this.idea = \"bad\";\n}", "shouldSerialize(prop, dataKey) {\n const contains = (str, re) => (str.match(re) || []).length > 0;\n const a = contains(dataKey, /\\./g);\n const b = contains(dataKey, /\\[/g);\n return !!prop.object && !(a || b);\n }", "static get observedAttributes(){this.finalize();const e=[];// Use forEach so this works even if for/of loops are compiled to for loops\n// expecting arrays\nreturn this._classProperties.forEach((t,n)=>{const r=this._attributeNameForProperty(n,t);void 0!==r&&(this._attributeToPropertyMap.set(r,n),e.push(r))}),e}", "function oldAndLoud(object){\n\tobject.age++;\n\tobject.name = object.name.toUpperCase();\n}", "like() {\r\n return this.clone(Item, \"like\").postCore();\r\n }", "function classifyPose() {\n if (pose && working) {\n inputs = [];\n for (let i = 0; i < pose.landmarks.length; i++) {\n inputs.push(pose.landmarks[i][0]);\n inputs.push(pose.landmarks[i][1]);\n inputs.push(pose.landmarks[i][2]);\n }\n brain.classify(inputs, gotResult)\n }\n }", "function PropertyDetection() {}", "constructor()\n {\n this.likes = [];\n }", "async TestLikeDoctorPost(){\n var response = await entity.Likes(6,28,true,true);\n //console.log(response)\n if(response != null){\n console.log(\"\\x1b[32m%s\\x1b[0m\",\"TestDOctorRating Passed\");\n }else{\n console.log(\"\\x1b[31m%s\\x1b[0m\",\"TestDOctorRating Failed\");\n }\n\n }", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function showLikes(likes) {\n\tconsole.log(`THINGS I LIKE:\\n`);\n\tfor(let like of likes) {\n\t\tconsole.log(like);\n\t}\n}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function Nevis() {}", "function Nevis() {}", "function Nevis() {}", "test_primitivesExtended() {\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.primitivesExtended);\n let object = translator.decode(text).getRoot();\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.PrimitivesExtended\", object.constructor.__getClass());\n Assert.equals(\"alpha16\", object.string);\n }", "function buildObjectsObj(gCloudV, azureCV, minScore = 0.0){\n let objects = [];\n\n if(gCloudV) {// gcloud vision results are available\n let gCloudObjects = gCloudV['localizedObjectAnnotations'];\n\n //apply standard bounding box to all the detected objects\n if(azureCV)// azure computer vision results are available\n gCloudVObjsToCogniBoundingBox(gCloudObjects, azureCV['metadata']['width'], azureCV['metadata']['height']);\n\n else//need to retrieve image sizes from gcloud (already done and put in the metadata tag of gcloudv with appropriate calls)\n gCloudVObjsToCogniBoundingBox(gCloudObjects, gCloudV['metadata']['width'], gCloudV['metadata']['height']);\n\n for (let gCloudObj of gCloudObjects) {\n if (gCloudObj['score'] > minScore) { //filter out unwanted tags\n objects.push({\n name: gCloudObj['name'],\n mid: (gCloudObj['mid'] && gCloudObj['mid']!= '')? gCloudObj['mid']: undefined,\n confidence: gCloudObj['score'],\n boundingBox: gCloudObj['boundingBox']\n });\n }\n }\n }\n\n if(azureCV){// azure computer vision results are available\n let azureObjects = azureCV['objects'];\n //apply standard bounding box to all the detected objects\n azureCVObjsToCogniBoundingBox(azureObjects, azureCV['metadata']['width'], azureCV['metadata']['height']);\n for(let aObj of azureObjects){\n if(aObj['confidence'] > minScore) { //filter out unwanted tags\n objects.push({\n name: aObj['object'],\n confidence: aObj['confidence'],\n boundingBox: aObj['boundingBox']\n });\n }\n }\n }\n\n objects = combineObjectsArray(objects);// build an array where labels regarding the same exact object are combined with averaged confidence\n\n objects.sort((a, b) => {\n if(a['confidence']>b['confidence'])\n return -1;\n else if(a['confidence']==b['confidence'])\n return 0;\n else\n return 1;\n });\n\n return objects;\n}", "function V(e){if(null===e||\"[object Object]\"!==function(e){return Object.prototype.toString.call(e)}(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}", "function classifyVideo() {\r\n classifier.classify(vid, gotResult);\r\n\r\n}", "function test_nountag_does_not_think_it_has_watch_tag_when_it_does_not() {\n Assert.equal(TagNoun.fromJSON(\"watch\"), undefined);\n}", "function v11(v12,v13) {\n const v15 = v11(Object,Function);\n // v15 = .unknown\n const v16 = Object(v13,v8,0,v6);\n // v16 = .object()\n const v17 = 0;\n // v17 = .integer\n const v18 = 1;\n // v18 = .integer\n const v19 = 512;\n // v19 = .integer\n const v20 = \"-1024\";\n // v20 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v21 = isFinite;\n // v21 = .function([.anything] => .boolean)\n const v23 = [1337];\n // v23 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v24 = {};\n // v24 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v25 = v23;\n const v26 = -29897853;\n // v26 = .integer\n const v27 = \"replace\";\n // v27 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v28 = Boolean;\n // v28 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v30 = [13.37,13.37];\n // v30 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v31 = 1337;\n // v31 = .integer\n let v32 = 13.37;\n const v36 = [13.37,13.37,13.37];\n // v36 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v38 = [1337,1337];\n // v38 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v39 = [13.37,1337,v38,1337,\"-128\",13.37,\"-128\",\"-128\",2147483647,1337];\n // v39 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v40 = {__proto__:v36,length:v39};\n // v40 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"length\"])\n const v41 = \"0\";\n // v41 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v42 = -4130093409;\n // v42 = .integer\n const v44 = {b:2147483647,e:v38,valueOf:v36};\n // v44 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"b\", \"valueOf\", \"e\"])\n const v45 = \"k**baeaDif\";\n // v45 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v46 = 65536;\n // v46 = .integer\n const v47 = \"k**baeaDif\";\n // v47 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v48 = 13.37;\n // v48 = .float\n const v50 = [13.37,13.37];\n // v50 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v51 = ~v50;\n // v51 = .boolean\n const v53 = [13.37];\n // v53 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n let v54 = v53;\n const v55 = gc;\n // v55 = .function([] => .undefined)\n const v58 = [13.37,13.37,13.37,13.37];\n // v58 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v60 = [1337,1337,1337,1337];\n // v60 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v61 = [3697200800,v58,v60];\n // v61 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v62 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v61};\n // v62 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"length\", \"constructor\", \"toString\", \"valueOf\"])\n const v65 = [13.37,13.37,13.37,13.37];\n // v65 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v67 = [1337,1337,1337,1337];\n // v67 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v68 = [3697200800,v65,v67];\n // v68 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v69 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v68};\n // v69 = .object(ofGroup: Object, withProperties: [\"e\", \"constructor\", \"__proto__\", \"length\", \"toString\", \"valueOf\"])\n const v70 = Object;\n // v70 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n function v71(v72) {\n }\n const v74 = [13.37];\n // v74 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v75 = 1337;\n // v75 = .integer\n const v76 = v44 ** 13.37;\n // v76 = .integer | .float | .bigint\n function v77(v78,v79,v80,v81,v82) {\n }\n let v83 = v74;\n const v84 = \"2\";\n // v84 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v85 = \"2\";\n // v85 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v88 = [13.37,13.37,1337,13.37];\n // v88 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v89(v90,v91,v92) {\n }\n const v94 = [1337,1337,1337,1337];\n // v94 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v95 = [3697200800,v88,v94];\n // v95 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v96(v97,v98) {\n }\n const v99 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,d:v95};\n // v99 = .object(ofGroup: Object, withProperties: [\"toString\", \"length\", \"constructor\", \"__proto__\", \"e\", \"d\"])\n let v100 = 13.37;\n const v101 = typeof v74;\n // v101 = .string\n const v102 = \"symbol\";\n // v102 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v103 = 3697200800;\n // v103 = .integer\n const v104 = \"2\";\n // v104 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v105 = Boolean;\n // v105 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v106 = Function;\n // v106 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v107 = 13.37;\n // v107 = .float\n const v108 = 1337;\n // v108 = .integer\n const v109 = \"2\";\n // v109 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v110 = Function;\n // v110 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v112 = [13.37,13.37,13.37,13.37];\n // v112 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v113 = 1337;\n // v113 = .integer\n let v114 = 13.37;\n const v116 = {...3697200800,...3697200800};\n // v116 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n const v117 = Object;\n // v117 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v118 = Function;\n // v118 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v119 = {};\n // v119 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v120 = v119;\n const v121 = (3697200800).constructor;\n // v121 = .unknown\n function v122(v123,v124) {\n }\n const v125 = Promise;\n // v125 = .object(ofGroup: PromiseConstructor, withProperties: [\"prototype\"], withMethods: [\"race\", \"allSettled\", \"reject\", \"all\", \"resolve\"]) + .constructor([.function()] => .object(ofGroup: Promise, withProperties: [\"__proto__\"], withMethods: [\"finally\", \"then\", \"catch\"]))\n const v128 = 4;\n // v128 = .integer\n let v129 = 0;\n const v131 = [13.37,13.37,13.37,13.37];\n // v131 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v133 = [1337,1337,1337,1337];\n // v133 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v134 = [3697200800,v131,v133];\n // v134 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v135 = Object;\n // v135 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v136 = -944747134;\n // v136 = .integer\n const v139 = [13.37,13.37,13.37,13.37];\n // v139 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v141 = [1337,1337,1337,1337];\n // v141 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v142 = [3697200800,v139,v141];\n // v142 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v143 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v142};\n // v143 = .object(ofGroup: Object, withProperties: [\"toString\", \"constructor\", \"e\", \"__proto__\", \"valueOf\", \"length\"])\n let v144 = v143;\n const v145 = gc;\n // v145 = .function([] => .undefined)\n let v146 = 13.37;\n const v150 = [13.37,13.37,13.37,Function];\n // v150 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v152 = [1337,1337,1337,1337];\n // v152 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v153 = [3697200800,v150,v152];\n // v153 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v154 = v153 + 1;\n // v154 = .primitive\n let v155 = 0;\n const v156 = v155 + 1;\n // v156 = .primitive\n const v158 = \"2\";\n // v158 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v160 = [13.37,13.37,13.37,13.37];\n // v160 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v162 = 0;\n // v162 = .integer\n const v163 = [1337,1337,1337,1337];\n // v163 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v164 = [3697200800,1337,v163];\n // v164 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v166 = 1337;\n // v166 = .integer\n let v167 = 2594067260;\n const v169 = 4;\n // v169 = .integer\n let v170 = 0;\n const v171 = v167 + 1;\n // v171 = .primitive\n const v172 = {__proto__:3697200800,constructor:v163,e:3697200800,length:13.37,toString:3697200800,valueOf:v164};\n // v172 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"constructor\", \"valueOf\", \"length\", \"toString\"])\n const v173 = 0;\n // v173 = .integer\n const v174 = 5;\n // v174 = .integer\n const v175 = 2937513072;\n // v175 = .integer\n const v176 = Object;\n // v176 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v177 = v172.constructor;\n // v177 = .unknown\n const v178 = 0;\n // v178 = .integer\n const v179 = 1;\n // v179 = .integer\n try {\n } catch(v180) {\n const v182 = [13.37,13.37,13.37,13.37];\n // v182 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v183 = v182.__proto__;\n // v183 = .object()\n function v185(v186) {\n }\n const v187 = Object >>> v183;\n // v187 = .integer | .bigint\n }\n function v188(v189,v190,v191,v192,...v193) {\n }\n}", "function markRaw(obj) {\r\n if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) {\r\n return obj;\r\n }\r\n // set the vue observable flag at obj\r\n var ob = createObserver();\r\n ob.__raw__ = true;\r\n def(obj, '__ob__', ob);\r\n // mark as Raw\r\n rawSet.set(obj, true);\r\n return obj;\r\n}", "function markRaw(obj) {\r\n if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) {\r\n return obj;\r\n }\r\n // set the vue observable flag at obj\r\n var ob = createObserver();\r\n ob.__raw__ = true;\r\n def(obj, '__ob__', ob);\r\n // mark as Raw\r\n rawSet.set(obj, true);\r\n return obj;\r\n}", "transient private internal function m185() {}", "function rekognizeLabels(bucket, key) {\n let params = {\n Image: {\n S3Object: {\n Bucket: bucket,\n Name: key\n }\n },\n MaxLabels: 3,\n MinConfidence: 80\n };\n\n return rekognition.detectLabels(params).promise()\n}", "test_doNotRetainAnno(){\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.doNotRetainAnno);\n let object1 = translator.decode(text).getRoot();\n let object2 = translator.decode(text).getRoot();\n\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.DoNotRetainAnno\", object1.constructor.__getClass());\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.DoNotRetainAnno\", object2.constructor.__getClass());\n Assert.notEquals(object1, object2);\n }", "function LK_likeIt(elem) {\n var likeGroup = elem.getAttribute(LK_LIKEGROUP);\n var likeValue = elem.getAttribute(LK_LIKEVALUE);\n localStorage[likeGroup] = likeValue;\n\n // Change the style of the liker nodes\n var siblings = elem.parentNode.childNodes;\n for (var i = 0; i < siblings.length; i++) {\n if (siblings[i].style) { \n LK_applyNormalStyle(siblings[i]);\n }\n }\n LK_applySelectedStyle(elem, likeValue);\n\n // Change the value of any mini likers\n var allSpans = document.getElementsByTagName('span');\n for (var i = 0; i < allSpans.length; i++) {\n var span = allSpans[i];\n if (span.getAttribute(LK_LIKEGROUP) == likeGroup) {\n if (span.getAttribute(LK_LIKETYPE) == 'mini') {\n span.innerHTML = LK_MAPPINGS[likeValue].label;\n LK_applySelectedStyle(allSpans[i], likeValue);\n }\n }\n }\n}", "function OOPExample(who) {\n this.me = who;\n}", "getLikes(state, data) {\n state.likes = data\n }", "function _isAlternativeRecognitionResult(obj) {\r\n return obj && typeof obj === 'object';\r\n}", "function addLikes() {\n if (propLike?.includes(user.username)) {\n let index = propLike.indexOf(user.username);\n let removeLike = [\n ...propLike.slice(0, index),\n ...propLike.slice(index + 1),\n ];\n setLikeGet(removeLike);\n setPropLike(removeLike);\n setRedLike(\"\");\n\n addToLike(eventid, removeLike);\n } else {\n let likesArr = [...propLike, `${user.username}`];\n\n setLikeGet(likesArr);\n setPropLike(likesArr);\n setRedLike(\"red\");\n addToLike(eventid, likesArr);\n }\n }", "function LiteralObject() {\r\n}", "function Komunalne() {}", "function Bevy() {}", "function Prediction() {\n this.score = {};\n}", "function Object() {}", "function Object() {}", "function canEnumPub(obj, name) {\n if (obj === null) { return false; }\n if (obj === void 0) { return false; }\n name = String(name);\n if (obj[name + '_canEnum___']) { return true; }\n if (endsWith__.test(name)) { return false; }\n if (!isJSONContainer(obj)) { return false; }\n if (!myOriginalHOP.call(obj, name)) { return false; }\n fastpathEnum(obj, name);\n if (name === 'toString') { return true; }\n fastpathRead(obj, name);\n return true;\n }", "function Obj(){ return Literal.apply(this,arguments) }", "test_primitives() {\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.primitives);\n let object = translator.decode(text).getRoot();\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.Primitives\", object.constructor.__getClass());\n Assert.equals(\"alpha9\", object.string);\n }", "function hello()\n{\n /* ATTRIBUTES */\n this.coolbeans = 'class';\n this.something = 'hello-class';\n\n}", "function test_cluster_tagged_crosshair_op_vsphere65() {}", "function classifyVideo() {\n classifier.classify(gotResult);\n}", "function classifyVideo() {\n classifier.classify(gotResult);\n}", "constructor(papa,mummy,sivlings,belongs,loving_bro,favs_bro){\n super(papa,mummy,sivlings,belongs)\n this.loving_bro=loving_bro\n this.favs_bro=favs_bro\n }", "function v8(v9,v10) {\n const v16 = [1337,1337];\n // v16 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v17 = [\"536870912\",-3848843708,v16,-3848843708,1337,13.37,13.37,WeakMap,-3848843708];\n // v17 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v18 = {constructor:13.37,e:v16};\n // v18 = .object(ofGroup: Object, withProperties: [\"constructor\", \"e\", \"__proto__\"])\n const v19 = {__proto__:-3848843708,a:v18,b:-3848843708,constructor:1337,d:v18,e:v17,length:WeakMap};\n // v19 = .object(ofGroup: Object, withProperties: [\"d\", \"b\", \"a\", \"__proto__\", \"e\", \"constructor\", \"length\"])\n const v21 = new Float64Array(v19);\n // v21 = .object(ofGroup: Float64Array, withProperties: [\"byteOffset\", \"constructor\", \"buffer\", \"__proto__\", \"byteLength\", \"length\"], withMethods: [\"map\", \"values\", \"subarray\", \"find\", \"fill\", \"set\", \"findIndex\", \"some\", \"reduceRight\", \"reverse\", \"join\", \"includes\", \"entries\", \"reduce\", \"every\", \"copyWithin\", \"sort\", \"forEach\", \"lastIndexOf\", \"indexOf\", \"filter\", \"slice\", \"keys\"])\n v6[6] = v7;\n v7.toString = v9;\n }", "function defineInspect(classObject) {\n var fn = classObject.prototype.toJSON;\n typeof fn === 'function' || invariant(0);\n classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n if (nodejsCustomInspectSymbol[\"a\" /* default */]) {\n classObject.prototype[nodejsCustomInspectSymbol[\"a\" /* default */]] = fn;\n }\n}", "annotate(message: string, data: Object) {\n this.message = message;\n this.data = assign(this.data, data);\n }", "function encodeObject(o) {\n if (_.isNumber(o)) {\n if (_.isNaN(o)) {\n return ['SPECIAL_FLOAT', 'NaN'];\n } else if (o === Infinity) {\n return ['SPECIAL_FLOAT', 'Infinity'];\n } else if (o === -Infinity) {\n return ['SPECIAL_FLOAT', '-Infinity'];\n } else {\n return o;\n }\n } else if (_.isString(o)) {\n return o;\n } else if (_.isBoolean(o) || _.isNull(o) || _.isUndefined(o)) {\n return ['JS_SPECIAL_VAL', String(o)];\n } else if (typeof o === 'symbol') {\n // ES6 symbol\n return ['JS_SPECIAL_VAL', String(o)];\n } else {\n // render these as heap objects\n\n // very important to use _.has since we don't want to\n // grab the property in your prototype, only in YOURSELF ... SUBTLE!\n if (!_.has(o, 'smallObjId_hidden_')) {\n // make this non-enumerable so that it doesn't show up in\n // console.log() or other inspector functions\n Object.defineProperty(o, 'smallObjId_hidden_', { value: smallObjId,\n enumerable: false });\n smallObjId++;\n }\n assert(o.smallObjId_hidden_ > 0);\n\n var ret = ['REF', o.smallObjId_hidden_];\n\n if (encodedHeapObjects[String(o.smallObjId_hidden_)] !== undefined) {\n return ret;\n }\n else {\n assert(_.isObject(o));\n\n var newEncodedObj = [];\n encodedHeapObjects[String(o.smallObjId_hidden_)] = newEncodedObj;\n\n var i;\n\n if (_.isFunction(o)) {\n var funcProperties = []; // each element is a pair of [name, encoded value]\n\n var encodedProto = null;\n if (_.isObject(o.prototype)) {\n // TRICKY TRICKY! for inheritance to be displayed properly, we\n // want to find the prototype of o.prototype and see if it's\n // non-empty. if that's true, then even if o.prototype is\n // empty (i.e., has no properties of its own), then we should\n // still encode it since its 'prototype' \"uber-hidden\n // property\" is non-empty\n var prototypeOfPrototype = Object.getPrototypeOf(o.prototype);\n if (!_.isEmpty(o.prototype) ||\n (_.isObject(prototypeOfPrototype) && !_.isEmpty(prototypeOfPrototype))) {\n encodedProto = encodeObject(o.prototype);\n }\n }\n\n if (encodedProto) {\n funcProperties.push(['prototype', encodedProto]);\n }\n\n // now get all of the normal properties out of this function\n // object (it's unusual to put properties in a function object,\n // but it's still legal!)\n var funcPropPairs = _.pairs(o);\n for (i = 0; i < funcPropPairs.length; i++) {\n funcProperties.push([funcPropPairs[i][0], encodeObject(funcPropPairs[i][1])]);\n }\n\n var funcCodeString = o.toString();\n\n /*\n\n #craftsmanship -- make nested functions look better by indenting\n the first line of a nested function definition by however much\n the LAST line is indented, ONLY if the last line is simply a\n single ending '}'. otherwise it will look ugly since the\n function definition doesn't start out indented, like so:\n\nfunction bar(x) {\n globalZ += 100;\n return x + y + globalZ;\n }\n\n */\n var codeLines = funcCodeString.split('\\n');\n if (codeLines.length > 1) {\n var lastLine = _.last(codeLines);\n if (lastLine.trim() === '}') {\n var lastLinePrefix = lastLine.slice(0, lastLine.indexOf('}'));\n funcCodeString = lastLinePrefix + funcCodeString; // prepend!\n }\n }\n\n newEncodedObj.push('JS_FUNCTION',\n o.name,\n funcCodeString, /* code string*/\n funcProperties.length ? funcProperties : null, /* OPTIONAL */\n null /* parent frame */);\n } else if (_.isArray(o)) {\n newEncodedObj.push('LIST');\n for (i = 0; i < o.length; i++) {\n newEncodedObj.push(encodeObject(o[i]));\n }\n } else if (o.__proto__.toString() === canonicalSet.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n newEncodedObj.push('SET');\n // ES6 Set (TODO: add WeakSet)\n for (let item of o) {\n newEncodedObj.push(encodeObject(item));\n }\n } else if (o.__proto__.toString() === canonicalMap.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n // ES6 Map (TODO: add WeakMap)\n newEncodedObj.push('DICT'); // use the Python 'DICT' type since it's close enough; adjust display in frontend\n for (let [key, value] of o) {\n newEncodedObj.push([encodeObject(key), encodeObject(value)]);\n }\n } else {\n // a true object\n\n // if there's a custom toString() function (note that a truly\n // prototypeless object won't have toString method, so check first to\n // see if toString is *anywhere* up the prototype chain)\n var s = (o.toString !== undefined) ? o.toString() : '';\n if (s !== '' && s !== '[object Object]') {\n newEncodedObj.push('INSTANCE_PPRINT', 'object', s);\n } else {\n newEncodedObj.push('INSTANCE', '');\n var pairs = _.pairs(o);\n for (i = 0; i < pairs.length; i++) {\n var e = pairs[i];\n newEncodedObj.push([encodeObject(e[0]), encodeObject(e[1])]);\n }\n\n var proto = Object.getPrototypeOf(o);\n if (_.isObject(proto) && !_.isEmpty(proto)) {\n //log('obj.prototype', proto, proto.smallObjId_hidden_);\n // I think __proto__ is the official term for this field,\n // *not* 'prototype'\n newEncodedObj.push(['__proto__', encodeObject(proto)]);\n }\n }\n }\n\n return ret;\n }\n\n }\n assert(false);\n}", "function dist_index_esm_contains(obj,key){return Object.prototype.hasOwnProperty.call(obj,key);}", "function isRawPostcodeObject(o, additionalAttr, blackListedAttr) {\n\tif (!additionalAttr) additionalAttr = [];\n\tif (!blackListedAttr) blackListedAttr = [];\n\tisSomeObject(o, rawPostcodeAttributes, additionalAttr, blackListedAttr);\n}", "function _meta_(v,m){var ms=v['__meta__']||{};for(var k in m){ms[k]=m[k]};v['__meta__']=ms;return v}", "function Animal() {\n this.kind = \"Dog\"\n}", "function Kitten(name, photo, interests, isGoodWithKids, isGoodWithDogs, isGoodWithCats) {\n this.name = name;\n this.photo = photo;\n this.interests = interests;\n this.isGoodWithKids = isGoodWithKids;\n this.isGoodWithCats = isGoodWithCats;\n this.isGoodWithDogs = isGoodWithDogs;\n}", "getMeta () {\n }", "function np(e){return\"[object Object]\"===Object.prototype.toString.call(e)}", "function Obj() {}", "function isFriend(name, object) {\n//use hasWord function to check object names array\n// console.log(object);\n// console.log(name);\n//conditional to check for property\nif (object['friends'] !== undefined) {\nreturn hasWord(object.friends.join(' '), name);\n}\nelse {return false};\n \n}", "function test_fail_hole_prototype() {\n var obj = Object.create({ stuff: \"in prototype\" });\n obj.foo = \"bar\";\n\n function f1() {\n bidar.serialize(obj);\n }\n assert.throws(f1, /Hole-ful graph, but no hole filter/);\n}", "function Person(saying) {\n this.saying = saying;\n /*\n return {\n dumbObject: true\n }\n */\n}", "transient private protected internal function m182() {}", "function kotlin(hljs) {\n const KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n const KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n const LABEL = {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n const SUBST = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /\\}/,\n contains: [ hljs.C_NUMBER_MODE ]\n };\n const VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"(?=[^\"])',\n contains: [\n VARIABLE,\n SUBST\n ]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'',\n end: '\\'',\n illegal: /\\n/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n SUBST\n ]\n }\n ]\n };\n SUBST.contains.push(STRING);\n\n const ANNOTATION_USE_SITE = {\n className: 'meta',\n begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n const ANNOTATION = {\n className: 'meta',\n begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.inherit(STRING, {\n className: 'meta-string'\n })\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n const KOTLIN_NUMBER_MODE = NUMERIC;\n const KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n {\n contains: [ hljs.C_BLOCK_COMMENT_MODE ]\n }\n );\n const KOTLIN_PAREN_TYPE = {\n variants: [\n {\n className: 'type',\n begin: hljs.UNDERSCORE_IDENT_RE\n },\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [] // defined later\n }\n ]\n };\n const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n name: 'Kotlin',\n aliases: [ 'kt' ],\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance: 0,\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun',\n end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n returnBegin: true,\n relevance: 0,\n contains: [ hljs.UNDERSCORE_TITLE_MODE ]\n },\n {\n className: 'type',\n begin: /</,\n end: />/,\n keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/,\n end: /[=,\\/]/,\n endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', // remove 'trait' when removed from KEYWORDS\n end: /[:\\{(]|$/,\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {\n beginKeywords: 'public protected internal private constructor'\n },\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</,\n end: />/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/,\n end: /[<\\(,]|$/,\n excludeBegin: true,\n returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\",\n end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n}", "function kotlin(hljs) {\n const KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n const KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n const LABEL = {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n const SUBST = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /\\}/,\n contains: [ hljs.C_NUMBER_MODE ]\n };\n const VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"(?=[^\"])',\n contains: [\n VARIABLE,\n SUBST\n ]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'',\n end: '\\'',\n illegal: /\\n/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n SUBST\n ]\n }\n ]\n };\n SUBST.contains.push(STRING);\n\n const ANNOTATION_USE_SITE = {\n className: 'meta',\n begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n const ANNOTATION = {\n className: 'meta',\n begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.inherit(STRING, {\n className: 'meta-string'\n })\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n const KOTLIN_NUMBER_MODE = NUMERIC;\n const KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n {\n contains: [ hljs.C_BLOCK_COMMENT_MODE ]\n }\n );\n const KOTLIN_PAREN_TYPE = {\n variants: [\n {\n className: 'type',\n begin: hljs.UNDERSCORE_IDENT_RE\n },\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [] // defined later\n }\n ]\n };\n const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n name: 'Kotlin',\n aliases: [ 'kt' ],\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance: 0,\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun',\n end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n returnBegin: true,\n relevance: 0,\n contains: [ hljs.UNDERSCORE_TITLE_MODE ]\n },\n {\n className: 'type',\n begin: /</,\n end: />/,\n keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/,\n end: /[=,\\/]/,\n endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', // remove 'trait' when removed from KEYWORDS\n end: /[:\\{(]|$/,\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {\n beginKeywords: 'public protected internal private constructor'\n },\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</,\n end: />/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/,\n end: /[<\\(,]|$/,\n excludeBegin: true,\n returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\",\n end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n}", "function Surrogate(){}", "function Surrogate(){}", "function Surrogate(){}", "static serialize(obj, allowPrimitives, fallbackToJson, requireJsonType = false) {\n if (allowPrimitives) {\n if (typeof obj === \"string\") {\n return this.serializePrimitive(obj, \"string\");\n } else if (typeof obj === \"number\") {\n return this.serializePrimitive(obj, \"double\");\n } else if (Buffer.isBuffer(obj)) {\n return this.serializePrimitive(obj, \"bytes\");\n } else if (typeof obj === \"boolean\") {\n return this.serializePrimitive(obj, \"bool\");\n } else if (Long.isLong(obj)) {\n return this.serializePrimitive(obj, \"int64\");\n }\n }\n if (obj.constructor && typeof obj.constructor.encode === \"function\" && obj.constructor.$type) {\n return Any.create({\n // I have *no* idea why it's type_url and not typeUrl, but it is.\n type_url: \"type.googleapis.com/\" + AnySupport.fullNameOf(obj.constructor.$type),\n value: obj.constructor.encode(obj).finish()\n });\n } else if (fallbackToJson && typeof obj === \"object\") {\n let type = obj.type;\n if (type === undefined) {\n if (requireJsonType) {\n throw new Error(util.format(\"Fallback to JSON serialization supported, but object does not define a type property: %o\", obj));\n } else {\n type = \"object\";\n }\n }\n return Any.create({\n type_url: CloudStateJson + type,\n value: this.serializePrimitiveValue(stableJsonStringify(obj), \"string\")\n });\n } else {\n throw new Error(util.format(\"Object %o is not a protobuf object, and hence can't be dynamically \" +\n \"serialized. Try passing the object to the protobuf classes create function.\", obj));\n }\n }" ]
[ "0.527866", "0.52612406", "0.51951283", "0.518796", "0.51302594", "0.5044646", "0.48934332", "0.4857401", "0.484017", "0.48302925", "0.482028", "0.4812441", "0.4808473", "0.47852293", "0.47828078", "0.47574478", "0.47493434", "0.4739314", "0.47239366", "0.4703992", "0.4703992", "0.46990207", "0.4690639", "0.46904448", "0.46862254", "0.46716532", "0.46667543", "0.46522382", "0.46354175", "0.46053663", "0.46017453", "0.45926702", "0.45891586", "0.45877746", "0.458541", "0.45851982", "0.45847243", "0.4584686", "0.458378", "0.45767823", "0.45753202", "0.45753202", "0.45753202", "0.45713404", "0.45637134", "0.45637134", "0.4557141", "0.4557141", "0.4557141", "0.45494914", "0.45366898", "0.45342454", "0.4533338", "0.45322663", "0.45229813", "0.452288", "0.452288", "0.45159692", "0.45102093", "0.45099118", "0.45062032", "0.4506134", "0.45033473", "0.4502599", "0.44998378", "0.4497197", "0.44843012", "0.44764578", "0.44738895", "0.44715428", "0.44715428", "0.4471341", "0.44594073", "0.44552016", "0.44538808", "0.44522536", "0.44464657", "0.44464657", "0.4443469", "0.4443427", "0.44433454", "0.4437557", "0.4436382", "0.4430658", "0.4429719", "0.4428169", "0.44260293", "0.4420813", "0.44155774", "0.44130567", "0.4406073", "0.4401904", "0.44010627", "0.43994573", "0.43948644", "0.43847254", "0.43847254", "0.43830302", "0.43830302", "0.43830302", "0.4381413" ]
0.0
-1
Currently only WebKitbased Web Inspectors, Firefox >= v31, and the Firebug extension (any Firefox version) are known to support "%c" CSS customizations. TODO: add a `localStorage` variable to explicitly enable/disable colors
function useColors() { // NB: In an Electron preload script, document will be defined but not fully // initialized. Since we know we're in Chrome, we'll just detect this case // explicitly if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { return true; } // is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || // is firebug? http://stackoverflow.com/a/398120/376773 (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || // is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || // double check webkit in userAgent just in case we are in a worker (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useColors(){ // is webkit? http://stackoverflow.com/a/16459606/376773\nreturn 'WebkitAppearance' in document.documentElement.style || // is firebug? http://stackoverflow.com/a/398120/376773\nwindow.console && (console.firebug || console.exception && console.table) || // is firefox >= v31?\n// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\nnavigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1,10) >= 31;}", "function useColors(){ // is webkit? http://stackoverflow.com/a/16459606/376773\n\treturn 'WebkitAppearance' in document.documentElement.style|| // is firebug? http://stackoverflow.com/a/398120/376773\n\twindow.console&&(console.firebug||console.exception&&console.table)|| // is firefox >= v31?\n\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\tnavigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31;}", "function useColors(){ // is webkit? http://stackoverflow.com/a/16459606/376773\n\treturn 'WebkitAppearance' in document.documentElement.style|| // is firebug? http://stackoverflow.com/a/398120/376773\n\twindow.console&&(console.firebug||console.exception&&console.table)|| // is firefox >= v31?\n\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\tnavigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31;}", "function useColors(){ // is webkit? http://stackoverflow.com/a/16459606/376773\n\treturn 'WebkitAppearance' in document.documentElement.style|| // is firebug? http://stackoverflow.com/a/398120/376773\n\twindow.console&&(console.firebug||console.exception&&console.table)|| // is firefox >= v31?\n\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\tnavigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31;}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return 'WebkitAppearance' in document.documentElement.style ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n window.console && (console.firebug || console.exception && console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31;\n }", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return 'WebkitAppearance' in document.documentElement.style ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t window.console && (console.firebug || console.exception && console.table) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31;\n\t}", "function DebugStyling() {}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return ('WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function DebugStyling(){}", "function useColors(){// NB: In an Electron preload script, document will be defined but not fully\n// initialized. Since we know we're in Chrome, we'll just detect this case\n// explicitly\nif(typeof window!=='undefined'&&window.process&&window.process.type==='renderer'){return true;}// is webkit? http://stackoverflow.com/a/16459606/376773\n// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\nreturn typeof document!=='undefined'&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||// is firebug? http://stackoverflow.com/a/398120/376773\ntypeof window!=='undefined'&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||// is firefox >= v31?\n// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\ntypeof navigator!=='undefined'&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||// double check webkit in userAgent just in case we are in a worker\ntypeof navigator!=='undefined'&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);}", "function useColors(){// NB: In an Electron preload script, document will be defined but not fully\n// initialized. Since we know we're in Chrome, we'll just detect this case\n// explicitly\nvar useColorsOption=getOption('colors');if(/^(no|off|false|disabled)$/i.test(useColorsOption)){return false;}if(typeof window!=='undefined'&&window.process&&window.process.type==='renderer'){return true;}// Internet Explorer and Edge do not support colors.\nif(typeof navigator!=='undefined'&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)){return false;}// is webkit? http://stackoverflow.com/a/16459606/376773\n// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\nreturn Boolean(typeof document!=='undefined'&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||// is firebug? http://stackoverflow.com/a/398120/376773\ntypeof window!=='undefined'&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||// is firefox >= v31?\n// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\ntypeof navigator!=='undefined'&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||// double check webkit in userAgent just in case we are in a worker\ntypeof navigator!=='undefined'&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));}", "function startCSSInfo(){\n if ($jQ('body').attr('vlink')!=null){\n var a = document.createElement('a');\n $jQ(a).css('color', $jQ('body').attr('vlink'));\n\n $jQ('a').each(function(){\n $jQ(this).attr(vars.fgColor+':visited', $jQ(a).css('color'));\n $jQ(this).attr(vars.bgColor+':visited', getBgColor($jQ(this)));\n });\n }\n else{\n CSSUtilities.define('async', true);\n CSSUtilities.init(function() {\n css_=CSSUtilities.getCSSStyleSheetRules('*', 'properties, selector');\n css_.forEach(function (el) {\n user.colors.forEach(function (sc,i){\n if (el.selector.search(sc)>=0){\n var text='SystemColor'+(i+1)+':'+el.properties['color']+';';\n colorsList.push(text);\n if (DEBUG) console.log('[SystemColor.css] '+el.selector+' => '+text);\n user.colors[i]=null;\n }\n });\n\n // This solution can produce erroneous information's\n // todo: Consider order/hierarchy in future\n if (el.selector.search(':visited')>=0){\n var c=['color','background-color'];\n var a=document.createElement('a');\n $jQ(a).css('color', DEFAULT_VISITED);\n\n if (el.properties!=null) {\n c.forEach(function (attr) {\n if (el.properties[attr] != null) {\n found=true;\n $jQ(a).css(attr, el.properties[attr]);\n }\n });\n }\n\n $jQ(el.selector.replace(':visited','')).each(function(){\n var bg= $jQ(a).css('background-color');\n if (bg==null || bg=='')\n $jQ(a).css('background-color',getBgColor($jQ(this)));\n $jQ(this).attr(vars.fgColor+':visited', $jQ(a).css('color'));\n $jQ(this).attr(vars.bgColor+':visited', $jQ(a).css('background-color'));\n });\n }\n });\n user.colors.forEach(function (sc,i){\n if (sc!=null){\n var a=document.createElement('a');\n $jQ(a).css('background-color', sc);\n var text='SystemColor'+(i+1)+':'+getBgColor($jQ(a))+';';\n colorsList.push(text);\n if (DEBUG) console.log('[SystemColor] '+text);\n }\n });\n });\n }\n}", "function DebugStyling() { }", "function useColors(){// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif(typeof window!=='undefined'&&window&&typeof window.process!=='undefined'&&window.process.type==='renderer'){return true;}// is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn typeof document!=='undefined'&&document&&'WebkitAppearance'in document.documentElement.style||// is firebug? http://stackoverflow.com/a/398120/376773\n\ttypeof window!=='undefined'&&window&&window.console&&(console.firebug||console.exception&&console.table)||// is firefox >= v31?\n\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\ttypeof navigator!=='undefined'&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||// double check webkit in userAgent just in case we are in a worker\n\ttypeof navigator!=='undefined'&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);}", "function colourCode(c)\n{\n\thtmlTag = /(&lt;([\\s\\S]*?)&gt;)/gi;\n\ttableTag = /(&lt;(table|tbody|th|tr|td|\\/table|\\/tbody|\\/th|\\/tr|\\/td)([\\s\\S]*?)&gt;)/gi;\n\tcommentTag = /(&lt;!--([\\s\\S]*?)&gt;)/gi;\n\timageTag = /(&lt;img([\\s\\S]*?)&gt;)/gi;\n\tobjectTag = /(&lt;(object|\\/object)([\\s\\S]*?)&gt;)/gi;\n\tlinkTag = /(&lt;(a|\\/a)([\\s\\S]*?)&gt;)/gi;\n\tscriptTag = /(&lt;(script|\\/script)([\\s\\S]*?)&gt;)/gi;\n\theadlinkTag = /(&lt;link([^&]*?)(borders.css)([^&]*?)&gt;<br\\/>)/gi;\n\tc = c.replace(headlinkTag,\"\");\n\theadlinkTag2 = /(&lt;link([^&]*?)(borders.css)([^&]*?)&gt;)/gi;\n\tc = c.replace(headlinkTag2,\"\");\n\n\tb2 = \"</font>\";\n\tb1 = \"<font color=#000080>\";\n\tc = c.replace(headlinkTag,\"\");\n\tc = c.replace(htmlTag,b1+\"$1\"+b2);\n\tc = c.replace(tableTag,\"<font color=#008080>$1\"+b2);\n\tc = c.replace(commentTag,\"<font color=#808080>$1\"+b2);\n\tc = c.replace(imageTag,\"<font color=#800080>$1\"+b2);\n\tc = c.replace(objectTag,\"<font color=#840000>$1\"+b2);\n\tc = c.replace(linkTag,\"<font color=#008000>$1\"+b2);\n\tc = c.replace(scriptTag,\"<font color=#800000>$1\"+b2);\n\treturn c;\n}", "function C0(){console.log('%c 0 ', \"background:#000; color: #99AAFF\");}", "function formatBrowserArgs(args, config) {\n args[0] = (config.useColors ? '%c' : '') + config.namespace;\n\n if (!config.useColors) {\n return;\n }\n\n var c = 'color: ' + config.color; // The final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function (match) {\n if (match === '%%') {\n return;\n }\n\n index++;\n\n if (match === '%c') {\n // We only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n args.splice(lastC, 0, c);\n}", "function changeColorScheme() {\n\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n } // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\n\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n }", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n return true;\n } // Internet Explorer and Edge do not support colors.\n\n\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false;\n } // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\n\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n }", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n return true;\n } // Internet Explorer and Edge do not support colors.\n\n\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false;\n } // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\n\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n }" ]
[ "0.67635036", "0.6297456", "0.6297456", "0.6297456", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6252116", "0.6216698", "0.61655235", "0.61432713", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6136524", "0.6109688", "0.6102387", "0.6101977", "0.6081244", "0.5986979", "0.5985277", "0.5928927", "0.5896334", "0.58962584", "0.5860767", "0.5813471", "0.5805783", "0.5805783" ]
0.0
-1
Colorize log arguments if enabled.
function formatArgs(args) { var useColors = this.useColors; args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + _$browser_913.humanize(this.diff); if (!useColors) return; var c = 'color: ' + this.color; args.splice(1, 0, c, 'color: inherit') // the final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into var index = 0; var lastC = 0; args[0].replace(/%[a-zA-Z%]/g, function(match) { if ('%%' === match) return; index++; if ('%c' === match) { // we only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "log(...args) {\n console.log(this.getColorOn() + args.join(\" \"));\n }", "function writelnColor(){\n\t\tfor(var i=0; i<arguments.length; i=i+2)\n\t\t\tgrunt.log.write(arguments[i][arguments[i+1]]);\n\t\tgrunt.log.writeln('');\n\t}", "debug(...args) {\n console.debug(this.getColorOn() + args.join(\" \"));\n }", "function formatArgs(){var args=arguments;var useColors=this.useColors;args[0]=(useColors?'%c':'')+this.namespace+(useColors?' %c':' ')+args[0]+(useColors?'%c ':' ')+'+'+exports.humanize(this.diff);if(!useColors)return args;var c='color: '+this.color;args=[args[0],c,'color: inherit'].concat(Array.prototype.slice.call(args,1)); // the final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tvar index=0;var lastC=0;args[0].replace(/%[a-z%]/g,function(match){if('%%'===match)return;index++;if('%c'===match){ // we only are interested in the *last* %c\n\t// (the user may have provided their own)\n\tlastC=index;}});args.splice(lastC,0,c);return args;}", "function formatArgs(){var args=arguments;var useColors=this.useColors;args[0]=(useColors?'%c':'')+this.namespace+(useColors?' %c':' ')+args[0]+(useColors?'%c ':' ')+'+'+exports.humanize(this.diff);if(!useColors)return args;var c='color: '+this.color;args=[args[0],c,'color: inherit'].concat(Array.prototype.slice.call(args,1)); // the final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tvar index=0;var lastC=0;args[0].replace(/%[a-z%]/g,function(match){if('%%'===match)return;index++;if('%c'===match){ // we only are interested in the *last* %c\n\t// (the user may have provided their own)\n\tlastC=index;}});args.splice(lastC,0,c);return args;}", "function formatArgs(){var args=arguments;var useColors=this.useColors;args[0]=(useColors?'%c':'')+this.namespace+(useColors?' %c':' ')+args[0]+(useColors?'%c ':' ')+'+'+exports.humanize(this.diff);if(!useColors)return args;var c='color: '+this.color;args=[args[0],c,'color: inherit'].concat(Array.prototype.slice.call(args,1)); // the final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tvar index=0;var lastC=0;args[0].replace(/%[a-z%]/g,function(match){if('%%'===match)return;index++;if('%c'===match){ // we only are interested in the *last* %c\n\t// (the user may have provided their own)\n\tlastC=index;}});args.splice(lastC,0,c);return args;}", "function formatArgs(args){var useColors=this.useColors;args[0]=(useColors?'%c':'')+this.namespace+(useColors?' %c':' ')+args[0]+(useColors?'%c ':' ')+'+'+module.exports.humanize(this.diff);if(!useColors)return;var c='color: '+this.color;args.splice(1,0,c,'color: inherit');// the final \"%c\" is somewhat tricky, because there could be other\n// arguments passed either before or after the %c, so we need to\n// figure out the correct index to insert the CSS into\nvar index=0;var lastC=0;args[0].replace(/%[a-zA-Z%]/g,function(match){if('%%'===match)return;index++;if('%c'===match){// we only are interested in the *last* %c\n// (the user may have provided their own)\nlastC=index;}});args.splice(lastC,0,c);}", "function formatArgs(args){var useColors=this.useColors;args[0]=(useColors?'%c':'')+this.namespace+(useColors?' %c':' ')+args[0]+(useColors?'%c ':' ')+'+'+exports.humanize(this.diff);if(!useColors)return;var c='color: '+this.color;args.splice(1,0,c,'color: inherit');// the final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tvar index=0;var lastC=0;args[0].replace(/%[a-zA-Z%]/g,function(match){if('%%'===match)return;index++;if('%c'===match){// we only are interested in the *last* %c\n\t// (the user may have provided their own)\n\tlastC=index;}});args.splice(lastC,0,c);}", "function formatArgs(args){var useColors=this.useColors;args[0]=(useColors?'%c':'')+this.namespace+(useColors?' %c':' ')+args[0]+(useColors?'%c ':' ')+'+'+exports.humanize(this.diff);if(!useColors)return;var c='color: '+this.color;args.splice(1,0,c,'color: inherit');// the final \"%c\" is somewhat tricky, because there could be other\n// arguments passed either before or after the %c, so we need to\n// figure out the correct index to insert the CSS into\nvar index=0;var lastC=0;args[0].replace(/%[a-zA-Z%]/g,function(match){if('%%'===match)return;index++;if('%c'===match){// we only are interested in the *last* %c\n// (the user may have provided their own)\nlastC=index;}});args.splice(lastC,0,c);}", "function formatArgs(){var args=arguments;var useColors=this.useColors;args[0] = (useColors?'%c':'') + this.namespace + (useColors?' %c':' ') + args[0] + (useColors?'%c ':' ') + '+' + exports.humanize(this.diff);if(!useColors)return args;var c='color: ' + this.color;args = [args[0],c,'color: inherit'].concat(Array.prototype.slice.call(args,1)); // the final \"%c\" is somewhat tricky, because there could be other\n// arguments passed either before or after the %c, so we need to\n// figure out the correct index to insert the CSS into\nvar index=0;var lastC=0;args[0].replace(/%[a-z%]/g,function(match){if('%%' === match)return;index++;if('%c' === match){ // we only are interested in the *last* %c\n// (the user may have provided their own)\nlastC = index;}});args.splice(lastC,0,c);return args;}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function (match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n }", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ');\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n var name = this.namespace;\n \n if (useColors) {\n var c = this.color;\n \n args[0] = ' \\u001b[3' + c + ';1m' + name + ' '\n + '\\u001b[0m'\n + args[0] + '\\u001b[3' + c + 'm'\n + ' +' + exports.humanize(this.diff) + '\\u001b[0m';\n } else {\n args[0] = new Date().toUTCString()\n + ' ' + name + ' ' + args[0];\n }\n return args;\n }", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ');\n\n\t if (!useColors) return args;\n\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t var name = this.namespace;\n\t\n\t if (useColors) {\n\t var c = this.color;\n\t\n\t args[0] = ' \\u001b[3' + c + ';1m' + name + ' '\n\t + '\\u001b[0m'\n\t + args[0] + '\\u001b[3' + c + 'm'\n\t + ' +' + exports.humanize(this.diff) + '\\u001b[0m';\n\t } else {\n\t args[0] = new Date().toUTCString()\n\t + ' ' + name + ' ' + args[0];\n\t }\n\t return args;\n\t}", "function formatArgs(args) {\n\t args[0] = \"\".concat((this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' '), \"+\").concat(setupDebug.humanize(this.diff));\n\n\t if (!this.useColors) {\n\t return;\n\t }\n\n\t var c = \"color: \".concat(this.color);\n\t args.splice(1, 0, c, 'color: inherit'); // The final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-zA-Z%]/g, function (match) {\n\t if (match === '%%') {\n\t return;\n\t }\n\n\t index++;\n\n\t if (match === '%c') {\n\t // We only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t args.splice(lastC, 0, c);\n\t}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n var name = this.namespace;\n\n if (useColors) {\n var c = this.color;\n\n args[0] = ' \\u001b[3' + c + ';1m' + name + ' ' + '\\u001b[0m' + args[0] + '\\u001b[3' + c + 'm' + ' +' + exports.humanize(this.diff) + '\\u001b[0m';\n } else {\n args[0] = new Date().toUTCString() + ' ' + name + ' ' + args[0];\n }\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function (match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\t\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\t\n\t if (!useColors) return args;\n\t\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\t\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\t\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n var name = this.namespace;\n\n if (useColors) {\n var c = this.color;\n\n args[0] = ' \\u001b[3' + c + ';1m' + name + ' '\n + '\\u001b[0m'\n + args[0] + '\\u001b[3' + c + 'm'\n + ' +' + exports.humanize(this.diff) + '\\u001b[0m';\n } else {\n args[0] = new Date().toUTCString()\n + ' ' + name + ' ' + args[0];\n }\n return args;\n}", "function formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n var name = this.namespace;\n\n if (useColors) {\n var c = this.color;\n\n args[0] = ' \\u001b[3' + c + ';1m' + name + ' '\n + '\\u001b[0m'\n + args[0] + '\\u001b[3' + c + 'm'\n + ' +' + exports.humanize(this.diff) + '\\u001b[0m';\n } else {\n args[0] = new Date().toUTCString()\n + ' ' + name + ' ' + args[0];\n }\n return args;\n}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\n\t if (!useColors) return args;\n\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\n\t if (!useColors) return args;\n\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\n\t if (!useColors) return args;\n\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\n\t if (!useColors) return args;\n\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\n\t if (!useColors) return args;\n\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}", "function formatArgs() {\n\t var args = arguments;\n\t var useColors = this.useColors;\n\n\t args[0] = (useColors ? '%c' : '')\n\t + this.namespace\n\t + (useColors ? ' %c' : ' ')\n\t + args[0]\n\t + (useColors ? '%c ' : ' ')\n\t + '+' + exports.humanize(this.diff);\n\n\t if (!useColors) return args;\n\n\t var c = 'color: ' + this.color;\n\t args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n\t // the final \"%c\" is somewhat tricky, because there could be other\n\t // arguments passed either before or after the %c, so we need to\n\t // figure out the correct index to insert the CSS into\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-z%]/g, function(match) {\n\t if ('%%' === match) return;\n\t index++;\n\t if ('%c' === match) {\n\t // we only are interested in the *last* %c\n\t // (the user may have provided their own)\n\t lastC = index;\n\t }\n\t });\n\n\t args.splice(lastC, 0, c);\n\t return args;\n\t}" ]
[ "0.6760166", "0.6711751", "0.65307504", "0.65290976", "0.65290976", "0.65290976", "0.6475225", "0.64737195", "0.64728016", "0.6462169", "0.645757", "0.6455942", "0.6453729", "0.64420164", "0.64335275", "0.64298606", "0.642863", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.6418752", "0.64099276", "0.6407302", "0.6407302", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6391772", "0.6375712", "0.6375712", "0.63755894", "0.63755894", "0.63755894", "0.63755894", "0.63755894", "0.63755894" ]
0.0
-1
Invokes `console.log()` when available. Noop when `console.log` is not a "function".
function log() { // this hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function log() {\n if (window.console) console.log.apply(console,arguments);\n}", "function consoleLog() {\n if (typeof(console) == 'object' && typeof(console[\"log\"]) != \"undefined\") {\n console.log.apply(console, arguments);\n }\n}", "function L() {\n if (window.console && console.log) {\n console.log.apply(console, arguments);\n }\n}", "function log() {\n var _console;\n\n if (undefined) (_console = console).log.apply(_console, arguments);\n}", "function log() { console.log.apply(console, arguments); }", "function log() { console.log.apply(console, arguments); }", "function log () {\n if (shouldLog) {\n console.log.apply(this, arguments)\n }\n}", "function dummyLogging()\n{\n console.log.apply(console, arguments);\n}", "function log(){ // this hackery is required for IE8/9, where\n// the `console.log` function doesn't have 'apply'\nreturn 'object' === typeof console && console.log && Function.prototype.apply.call(console.log,console,arguments);}", "function log(x)\r\n{\r\n if (typeof(window.console) !== 'undefined') {\r\n window.console.log(x);\r\n }\r\n}", "function log(message) {\n if (typeof console !== 'undefined' && typeof console.log === 'function') {\n console.log(message)\n }\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === (typeof console === \"undefined\" ? \"undefined\" : _typeof(console)) && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console &&\n console.log &&\n Function.prototype.apply.call(console.log, console, arguments);\n}", "function h$log() {\n console.log.apply(console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === (typeof console === 'undefined' ? 'undefined' : _typeof(console)) && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === (typeof console === 'undefined' ? 'undefined' : _typeof(console)) && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === (typeof console === 'undefined' ? 'undefined' : _typeof(console)) && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === (typeof console === 'undefined' ? 'undefined' : _typeof(console)) && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === (typeof console === 'undefined' ? 'undefined' : _typeof(console)) && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n}", "function log(){// this hackery is required for IE8/9, where\n// the `console.log` function doesn't have 'apply'\nreturn'object'===(typeof console==='undefined'?'undefined':(0,_typeof3.default)(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments);}", "function debuglog(){\n if(false)\n console.log.apply(this,arguments)\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);\n }", "function log(msg) {\n if (window.console) {\n //console.log(msg);\n }\n}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === (typeof console === 'undefined' ? 'undefined' : _typeof(console)) && console.log && Function.prototype.apply.call(console.log, console, arguments);\n }", "function safelog(str){return typeof(console)!=='undefined' && console.log && console.log(str);}", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n }", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n }", "function log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n }" ]
[ "0.7739394", "0.7717552", "0.77075", "0.76093554", "0.7566829", "0.7566829", "0.7531627", "0.7490471", "0.7414659", "0.7336425", "0.73305815", "0.7329548", "0.7324058", "0.73122233", "0.73095244", "0.73095244", "0.73095244", "0.73095244", "0.73095244", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.73051697", "0.72952664", "0.7290476", "0.72897124", "0.7281956", "0.72749203", "0.72557545", "0.72547734", "0.72547734", "0.72547734" ]
0.0
-1
base64 is 4/3 + up to two characters of the original data
function byteLength (b64) { var lens = getLens(b64) var validLen = lens[0] var placeHoldersLen = lens[1] return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getBase64() {\n var s = this.getDump();\n\n var ch =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n var c1, c2, c3, e1, e2, e3, e4;\n var l = s.length;\n var i = 0;\n var r = \"\";\n\n do {\n c1 = s.charCodeAt(i);\n e1 = c1 >> 2;\n c2 = s.charCodeAt(i + 1);\n e2 = ((c1 & 3) << 4) | (c2 >> 4);\n c3 = s.charCodeAt(i + 2);\n if (l < i + 2) {\n e3 = 64;\n } else {\n e3 = ((c2 & 0xf) << 2) | (c3 >> 6);\n }\n if (l < i + 3) {\n e4 = 64;\n } else {\n e4 = c3 & 0x3f;\n }\n r += ch.charAt(e1) + ch.charAt(e2) + ch.charAt(e3) + ch.charAt(e4);\n } while ((i += 3) < l);\n return r;\n }", "function base64_encode_data(data, len, b64x) {\n var dst = \"\"\n var i\n\n for (i = 0; i <= len - 3; i += 3)\n {\n dst += b64x.charAt(data.charCodeAt(i) >>> 2)\n dst += b64x.charAt(((data.charCodeAt(i) & 3) << 4) | (data.charCodeAt(i+1) >>> 4))\n dst += b64x.charAt(((data.charCodeAt(i+1) & 15) << 2) | (data.charCodeAt(i+2) >>> 6))\n dst += b64x.charAt(data.charCodeAt(i+2) & 63)\n }\n\n if (len % 3 == 2)\n {\n dst += b64x.charAt(data.charCodeAt(i) >>> 2)\n dst += b64x.charAt(((data.charCodeAt(i) & 3) << 4) | (data.charCodeAt(i+1) >>> 4))\n dst += b64x.charAt(((data.charCodeAt(i+1) & 15) << 2))\n dst += b64pad\n }\n else if (len % 3 == 1)\n {\n dst += b64x.charAt(data.charCodeAt(i) >>> 2)\n dst += b64x.charAt(((data.charCodeAt(i) & 3) << 4))\n dst += b64pad\n dst += b64pad\n }\n\n return dst\n }", "toString(buf) {\n if (buf.length % 4 > 0) {\n throw new RangeError(`base64.toString: input buffer length not multiple of 4: ${buf.length}`);\n }\n let str = '';\n let lineLen = 0;\n function buildLine(c1, c2, c3, c4) {\n switch (lineLen) {\n case 76:\n str += `\\r\\n${c1}${c2}${c3}${c4}`;\n lineLen = 4;\n break;\n case 75:\n str += `${c1}\\r\\n${c2}${c3}${c4}`;\n lineLen = 3;\n break;\n case 74:\n str += `${c1 + c2}\\r\\n${c3}${c4}`;\n lineLen = 2;\n break;\n case 73:\n str += `${c1 + c2 + c3}\\r\\n${c4}`;\n lineLen = 1;\n break;\n default:\n str += c1 + c2 + c3 + c4;\n lineLen += 4;\n break;\n }\n }\n function validate(c) {\n if (c >= 65 && c <= 90) {\n return true;\n }\n if (c >= 97 && c <= 122) {\n return true;\n }\n if (c >= 48 && c <= 57) {\n return true;\n }\n if (c === 43) {\n return true;\n }\n if (c === 47) {\n return true;\n }\n if (c === 61) {\n return true;\n }\n return false;\n }\n for (let i = 0; i < buf.length; i += 4) {\n for (let j = i; j < i + 4; j += 1) {\n if (!validate(buf[j])) {\n throw new RangeError(`base64.toString: buf[${j}]: ${buf[j]} : not valid base64 character code`);\n }\n }\n buildLine(\n String.fromCharCode(buf[i]),\n String.fromCharCode(buf[i + 1]),\n String.fromCharCode(buf[i + 2]),\n String.fromCharCode(buf[i + 3])\n );\n }\n return str;\n }", "function Magic(r){if(!/^[a-z0-9+/]+={0,2}$/i.test(r)||r.length%4!=0)throw Error(\"Not base64 string\");for(var t,e,n,o,i,a,f=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",h=[],d=0;d<r.length;d+=4)t=(a=f.indexOf(r.charAt(d))<<18|f.indexOf(r.charAt(d+1))<<12|(o=f.indexOf(r.charAt(d+2)))<<6|(i=f.indexOf(r.charAt(d+3))))>>>16&255,e=a>>>8&255,n=255&a,h[d/4]=String.fromCharCode(t,e,n),64==i&&(h[d/4]=String.fromCharCode(t,e)),64==o&&(h[d/4]=String.fromCharCode(t));return r=h.join(\"\")}", "function base64(s)\n\t{\n\t\tvar ch =\n\t\t\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\t\tvar c1\n\t\t , c2\n\t\t , c3\n\t\t , e1\n\t\t , e2\n\t\t , e3\n\t\t , e4;\n\t\tvar l = s.length;\n\t\tvar i = 0;\n\t\tvar r = \"\";\n\n\t\tdo\n\t\t\t{\n\t\t\t\tc1 = s.charCodeAt(i);\n\t\t\t\te1 = c1 >> 2;\n\t\t\t\tc2 = s.charCodeAt(i + 1);\n\t\t\t\te2 = ((c1 & 3) << 4) | (c2 >> 4);\n\t\t\t\tc3 = s.charCodeAt(i + 2);\n\t\t\t\tif (l < i + 2) e3 = 64;\n\t\t\t\telse e3 = ((c2 & 0xf) << 2) | (c3 >> 6);\n\t\t\t\tif (l < i + 3) e4 = 64;\n\t\t\t\telse e4 = c3 & 0x3f;\n\t\t\t\tr += ch.charAt(e1) + ch.charAt(e2) + ch.charAt(e3) + ch.charAt(e4);\n\t\t\t}\n\t\twhile ((i += 3) < l);\n\n\t\treturn r;\n\t}", "function b64(str) {\n return new Buffer(str).toString('base64')\n .replace(/=/g, '')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_');\n} // This is the encyrption algorithm, don't ask me why it is that way", "function base64_encode(data) {\n\n var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,\n ac = 0,\n enc = '',\n tmp_arr = [];\n\n if (!data) {\n return data;\n }\n\n data = unescape(encodeURIComponent(data));\n\n do {\n // pack three octets into four hexets\n o1 = data.charCodeAt(i++);\n o2 = data.charCodeAt(i++);\n o3 = data.charCodeAt(i++);\n\n bits = o1 << 16 | o2 << 8 | o3;\n\n h1 = bits >> 18 & 0x3f;\n h2 = bits >> 12 & 0x3f;\n h3 = bits >> 6 & 0x3f;\n h4 = bits & 0x3f;\n\n // use hexets to index into b64, and append result to encoded string\n tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);\n } while (i < data.length);\n\n enc = tmp_arr.join('');\n\n var r = data.length % 3;\n\n return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);\n}", "function base64_encode(data) {\r\n var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\r\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,\r\n ac = 0,\r\n enc = '',\r\n tmp_arr = [];\r\n\r\n if (!data) {\r\n return data;\r\n }\r\n\r\n do { // pack three octets into four hexets\r\n o1 = data.charCodeAt(i++);\r\n o2 = data.charCodeAt(i++);\r\n o3 = data.charCodeAt(i++);\r\n\r\n bits = o1 << 16 | o2 << 8 | o3;\r\n\r\n h1 = bits >> 18 & 0x3f;\r\n h2 = bits >> 12 & 0x3f;\r\n h3 = bits >> 6 & 0x3f;\r\n h4 = bits & 0x3f;\r\n\r\n // use hexets to index into b64, and append result to encoded string\r\n tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);\r\n } while (i < data.length);\r\n\r\n enc = tmp_arr.join('');\r\n\r\n var r = data.length % 3;\r\n\r\n return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);\r\n}", "function base64ArrayBuffer(bytes) {\n var base64 = ''\n var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n\n var byteLength = bytes.byteLength\n var byteRemainder = byteLength % 3\n var mainLength = byteLength - byteRemainder\n\n var a, b, c, d\n var chunk\n\n // Main loop deals with bytes in chunks of 3\n for (var i = 0; i < mainLength; i = i + 3) {\n // Combine the three bytes into a single integer\n chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]\n\n // Use bitmasks to extract 6-bit segments from the triplet\n a = (chunk & 16515072) >> 18 // 16515072 = (2^6 - 1) << 18\n b = (chunk & 258048) >> 12 // 258048 = (2^6 - 1) << 12\n c = (chunk & 4032) >> 6 // 4032 = (2^6 - 1) << 6\n d = chunk & 63 // 63 = 2^6 - 1\n\n // Convert the raw binary segments to the appropriate ASCII encoding\n base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d]\n }\n\n // Deal with the remaining bytes and padding\n if (byteRemainder == 1) {\n chunk = bytes[mainLength]\n\n a = (chunk & 252) >> 2 // 252 = (2^6 - 1) << 2\n\n // Set the 4 least significant bits to zero\n b = (chunk & 3) << 4 // 3 = 2^2 - 1\n\n base64 += encodings[a] + encodings[b] + '=='\n } else if (byteRemainder == 2) {\n chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1]\n\n a = (chunk & 64512) >> 10 // 64512 = (2^6 - 1) << 10\n b = (chunk & 1008) >> 4 // 1008 = (2^6 - 1) << 4\n\n // Set the 2 least significant bits to zero\n c = (chunk & 15) << 2 // 15 = 2^4 - 1\n\n base64 += encodings[a] + encodings[b] + encodings[c] + '='\n }\n\n return base64\n }", "function getBase64(entry) {\n return btoa(entry);\n}", "function toBase64(a){return CryptoJS&&CryptoJS.enc.Base64?CryptoJS.enc.Base64.stringify(CryptoJS.enc.Latin1.parse(a)):Base64.encode(a)}", "function base64ToBuffer(s) {\n var l = s.length * 6 / 8\n if(s[s.length - 2] == '=')\n l = l - 2\n else\n if(s[s.length - 1] == '=')\n l = l - 1\n\n var b = new Buffer(l)\n b.write(s, 'base64')\n return b\n}", "function base64_decode(data) {\n // console.log(\"data\"+data);\n var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,\n ac = 0,\n dec = '',\n tmp_arr = [];\n if (!data) {\n return data;\n }\n\n data += '';\n do { // unpack four hexets into three octets using index points in b64\n h1 = b64.indexOf(data.charAt(i++));\n h2 = b64.indexOf(data.charAt(i++));\n h3 = b64.indexOf(data.charAt(i++));\n h4 = b64.indexOf(data.charAt(i++));\n bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;\n o1 = bits >> 16 & 0xff;\n o2 = bits >> 8 & 0xff;\n o3 = bits & 0xff;\n if (h3 == 64) {\n tmp_arr[ac++] = String.fromCharCode(o1);\n } else if (h4 == 64) {\n tmp_arr[ac++] = String.fromCharCode(o1, o2);\n } else {\n tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);\n }\n } while (i < data.length);\n dec = tmp_arr.join('');\n return dec.replace(/\\0+$/, '');\n }", "function base64_decode(data) {\n // console.log(\"data\"+data);\n var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,\n ac = 0,\n dec = '',\n tmp_arr = [];\n if (!data) {\n return data;\n }\n\n data += '';\n do { // unpack four hexets into three octets using index points in b64\n h1 = b64.indexOf(data.charAt(i++));\n h2 = b64.indexOf(data.charAt(i++));\n h3 = b64.indexOf(data.charAt(i++));\n h4 = b64.indexOf(data.charAt(i++));\n bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;\n o1 = bits >> 16 & 0xff;\n o2 = bits >> 8 & 0xff;\n o3 = bits & 0xff;\n if (h3 == 64) {\n tmp_arr[ac++] = String.fromCharCode(o1);\n } else if (h4 == 64) {\n tmp_arr[ac++] = String.fromCharCode(o1, o2);\n } else {\n tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);\n }\n } while (i < data.length);\n dec = tmp_arr.join('');\n return dec.replace(/\\0+$/, '');\n }", "function getBase64(file) {\n var reader = new FileReader();\n var algo = '';\n reader.readAsDataURL(file);\n reader.onloadend = function () {\n algo = reader.result;\n };\n}", "function encoderBase64() {\n return {\n write: encodeBase64Write,\n end: encodeBase64End,\n\n prevStr: '',\n };\n}", "function rawToBase64(raw) {\n var res = '';\n for (var i = 0; i < raw.length; i++) {\n res += intToString(raw[i]);\n }\n return btoa(res);\n}", "function rawToBase64(raw) {\n var res = '';\n for (var i = 0; i < raw.length; i++) {\n res += intToString(raw[i]);\n }\n return btoa(res);\n}", "function base64_decode(data) {\r\n var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\r\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,\r\n ac = 0,\r\n dec = '',\r\n tmp_arr = [];\r\n\r\n if (!data) {\r\n return data;\r\n }\r\n\r\n data += '';\r\n\r\n do { // unpack four hexets into three octets using index points in b64\r\n h1 = b64.indexOf(data.charAt(i++));\r\n h2 = b64.indexOf(data.charAt(i++));\r\n h3 = b64.indexOf(data.charAt(i++));\r\n h4 = b64.indexOf(data.charAt(i++));\r\n\r\n bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;\r\n\r\n o1 = bits >> 16 & 0xff;\r\n o2 = bits >> 8 & 0xff;\r\n o3 = bits & 0xff;\r\n\r\n if (h3 == 64) {\r\n tmp_arr[ac++] = String.fromCharCode(o1);\r\n } else if (h4 == 64) {\r\n tmp_arr[ac++] = String.fromCharCode(o1, o2);\r\n } else {\r\n tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);\r\n }\r\n } while (i < data.length);\r\n\r\n dec = tmp_arr.join('');\r\n\r\n return dec.replace(/\\0+$/, '');\r\n}", "toBase64() {\n return btoa(String.fromCharCode.apply(null, this._byteArray));\n }", "function bytesToBase64( bytes, base, bound, digits ) {\n if (bound == null || bound > bytes.length) bound = bytes.length;\n if (!base || base < 0) base = 0;\n\n var str = \"\";\n for (var i=base; i<=bound-3; i+=3) {\n str += _emit3base64(digits, bytes[i], bytes[i+1], bytes[i+2]);\n }\n if (i >= bound) return str;\n return ((bound - i) == 2) ? str + _emit2base64(digits, bytes[i], bytes[i+1])\n : str + _emit1base64(digits, bytes[i]);\n}", "_Uint8ArrayToBase64(bytes, urlCharset) {\r\n if (!bytes) {\r\n bytes = window.crypto.getRandomValues(new Uint8Array(8));\r\n }\r\n\r\n let base64 = '';\r\n let encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n encodings += urlCharset ? '-_' : '+/';\r\n\r\n let byteLength = bytes.byteLength;\r\n let byteRemainder = byteLength % 3;\r\n let mainLength = byteLength - byteRemainder;\r\n\r\n let a, b, c, d;\r\n let chunk = null;\r\n\r\n // Main loop deals with bytes in chunks of 3\r\n for (let i = 0; i < mainLength; i = i + 3) {\r\n // Combine the three bytes into a single integer\r\n chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\r\n // Use bitmasks to extract 6-bit segments from the triplet\r\n a = (chunk & 16515072) >> 18; // 16515072 = (2^6 - 1) << 18\r\n b = (chunk & 258048) >> 12; // 258048 = (2^6 - 1) << 12\r\n c = (chunk & 4032) >> 6; // 4032 = (2^6 - 1) << 6\r\n d = chunk & 63; // 63 = 2^6 - 1\r\n // Convert the raw binary segments to the appropriate ASCII encoding\r\n base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d];\r\n }\r\n\r\n // Deal with the remaining bytes and padding\r\n if (byteRemainder == 1) {\r\n chunk = bytes[mainLength];\r\n a = (chunk & 252) >> 2 // 252 = (2^6 - 1) << 2;\r\n // Set the 4 least significant bits to zero\r\n b = (chunk & 3) << 4 // 3 = 2^2 - 1;\r\n base64 += encodings[a] + encodings[b] + '=='\r\n } else if (byteRemainder == 2) {\r\n chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1];\r\n a = (chunk & 64512) >> 10; // 64512 = (2^6 - 1) << 10\r\n b = (chunk & 1008) >> 4; // 1008 = (2^6 - 1) << 4\r\n // Set the 2 least significant bits to zero\r\n c = (chunk & 15) << 2; // 15 = 2^4 - 1\r\n base64 += encodings[a] + encodings[b] + encodings[c] + '=';\r\n }\r\n return base64;\r\n }", "function convertBytesToBase64 ( bytes ) {\n\n var base64 = '',\n bytesLength = bytes.length,\n bytesRemainder = ( bytesLength % 3 );\n\n for (\n var i = 0;\n i < bytesLength;\n i += 3\n ) {\n base64 += Base64Encodings[( bytes[i] >> 2 )];\n base64 += Base64Encodings[( ( ( bytes[i] & 3 ) << 4 ) | ( bytes[( i + 1 )] >> 4 ) )];\n base64 += Base64Encodings[( ( ( bytes[( i + 1 )] & 15 ) << 2 ) | ( bytes[( i + 2 )] >> 6 ) )];\n base64 += Base64Encodings[( bytes[( i + 2 )] & 63 )];\n };\n\n if (\n bytesRemainder == 2\n ) {\n base64 = base64.substring(0, ( base64.length - 1 )) + '=';\n } else if (\n bytesRemainder == 1\n ) {\n base64 = base64.substring(0, ( base64.length - 2 )) + '==';\n };\n\n return(base64);\n\n}", "function encode_base64( what )\n{\n var base64_encodetable = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n var result = \"\";\n var len = what.length;\n var x, y;\n var ptr = 0;\n\n while( len-- > 0 )\n {\n x = what.charCodeAt( ptr++ );\n result += base64_encodetable.charAt( ( x >> 2 ) & 63 );\n\n if( len-- <= 0 )\n {\n result += base64_encodetable.charAt( ( x << 4 ) & 63 );\n result += \"==\";\n break;\n }\n\n y = what.charCodeAt( ptr++ );\n result += base64_encodetable.charAt( ( ( x << 4 ) | ( ( y >> 4 ) & 15 ) ) & 63 );\n\n if ( len-- <= 0 )\n {\n result += base64_encodetable.charAt( ( y << 2 ) & 63 );\n result += \"=\";\n break;\n }\n\n x = what.charCodeAt( ptr++ );\n result += base64_encodetable.charAt( ( ( y << 2 ) | ( ( x >> 6 ) & 3 ) ) & 63 );\n result += base64_encodetable.charAt( x & 63 );\n\n }\n\n return result;\n}", "function base64Decode(data) {\n data = data.replace(/[^a-z0-9\\+\\/=]/gi, \"\"); // strip none base64 characters\n if (typeof atob == \"function\") return atob(data); //use internal base64 functions if available (gecko only)\n var b64_map =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n var byte1, byte2, byte3;\n var ch1, ch2, ch3, ch4;\n var result = new Array(); //array is used instead of string because in most of browsers working with large arrays is faster than working with large strings\n var j = 0;\n while (data.length % 4 != 0) {\n data += \"=\";\n }\n\n for (var i = 0; i < data.length; i += 4) {\n ch1 = b64_map.indexOf(data.charAt(i));\n ch2 = b64_map.indexOf(data.charAt(i + 1));\n ch3 = b64_map.indexOf(data.charAt(i + 2));\n ch4 = b64_map.indexOf(data.charAt(i + 3));\n\n byte1 = (ch1 << 2) | (ch2 >> 4);\n byte2 = ((ch2 & 15) << 4) | (ch3 >> 2);\n byte3 = ((ch3 & 3) << 6) | ch4;\n\n result[j++] = String.fromCharCode(byte1);\n if (ch3 != 64) result[j++] = String.fromCharCode(byte2);\n if (ch4 != 64) result[j++] = String.fromCharCode(byte3);\n }\n\n return result.join(\"\");\n}", "function encodeBase64String(data, w, h) {\n var str = \"\";\n for (var i = 0; i < data.length; i++) {\n str = str.concat(btoa(data[i]));\n }\n return str;\n}", "function base64ArrayBuffer(arrayBuffer) {\n var base64 = ''\n var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n\n var bytes = new Uint8Array(arrayBuffer)\n var byteLength = bytes.byteLength\n var byteRemainder = byteLength % 3\n var mainLength = byteLength - byteRemainder\n\n var a, b, c, d\n var chunk\n\n // Main loop deals with bytes in chunks of 3\n for (var i = 0; i < mainLength; i = i + 3) {\n // Combine the three bytes into a single integer\n chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]\n\n // Use bitmasks to extract 6-bit segments from the triplet\n a = (chunk & 16515072) >> 18 // 16515072 = (2^6 - 1) << 18\n b = (chunk & 258048) >> 12 // 258048 = (2^6 - 1) << 12\n c = (chunk & 4032) >> 6 // 4032 = (2^6 - 1) << 6\n d = chunk & 63 // 63 = 2^6 - 1\n\n // Convert the raw binary segments to the appropriate ASCII encoding\n base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d]\n }\n\n // Deal with the remaining bytes and padding\n if (byteRemainder == 1) {\n chunk = bytes[mainLength]\n\n a = (chunk & 252) >> 2 // 252 = (2^6 - 1) << 2\n\n // Set the 4 least significant bits to zero\n b = (chunk & 3) << 4 // 3 = 2^2 - 1\n\n base64 += encodings[a] + encodings[b] + '=='\n } else if (byteRemainder == 2) {\n chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1]\n\n a = (chunk & 64512) >> 10 // 64512 = (2^6 - 1) << 10\n b = (chunk & 1008) >> 4 // 1008 = (2^6 - 1) << 4\n\n // Set the 2 least significant bits to zero\n c = (chunk & 15) << 2 // 15 = 2^4 - 1\n\n base64 += encodings[a] + encodings[b] + encodings[c] + '='\n }\n\n return base64\n}", "function fromBase64(base64) {\n return base64\n .replace(/=/g, \"\")\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\");\n}", "function fromBase64(input) {\n var totalByteLength = (input.length / 4) * 3;\n if (input.substr(-2) === \"==\") {\n totalByteLength -= 2;\n }\n else if (input.substr(-1) === \"=\") {\n totalByteLength--;\n }\n var out = new ArrayBuffer(totalByteLength);\n var dataView = new DataView(out);\n for (var i = 0; i < input.length; i += 4) {\n var bits = 0;\n var bitLength = 0;\n for (var j = i, limit = i + 3; j <= limit; j++) {\n if (input[j] !== \"=\") {\n bits |= alphabetByEncoding[input[j]] << ((limit - j) * bitsPerLetter);\n bitLength += bitsPerLetter;\n }\n else {\n bits >>= bitsPerLetter;\n }\n }\n var chunkOffset = (i / 4) * 3;\n bits >>= bitLength % bitsPerByte;\n var byteLength = Math.floor(bitLength / bitsPerByte);\n for (var k = 0; k < byteLength; k++) {\n var offset = (byteLength - k - 1) * bitsPerByte;\n dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset);\n }\n }\n return new Uint8Array(out);\n}", "function fromBase64(input) {\n var totalByteLength = (input.length / 4) * 3;\n if (input.substr(-2) === \"==\") {\n totalByteLength -= 2;\n }\n else if (input.substr(-1) === \"=\") {\n totalByteLength--;\n }\n var out = new ArrayBuffer(totalByteLength);\n var dataView = new DataView(out);\n for (var i = 0; i < input.length; i += 4) {\n var bits = 0;\n var bitLength = 0;\n for (var j = i, limit = i + 3; j <= limit; j++) {\n if (input[j] !== \"=\") {\n bits |= alphabetByEncoding[input[j]] << ((limit - j) * bitsPerLetter);\n bitLength += bitsPerLetter;\n }\n else {\n bits >>= bitsPerLetter;\n }\n }\n var chunkOffset = (i / 4) * 3;\n bits >>= bitLength % bitsPerByte;\n var byteLength = Math.floor(bitLength / bitsPerByte);\n for (var k = 0; k < byteLength; k++) {\n var offset = (byteLength - k - 1) * bitsPerByte;\n dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset);\n }\n }\n return new Uint8Array(out);\n}", "function fromBase64(input) {\n var totalByteLength = (input.length / 4) * 3;\n if (input.substr(-2) === \"==\") {\n totalByteLength -= 2;\n }\n else if (input.substr(-1) === \"=\") {\n totalByteLength--;\n }\n var out = new ArrayBuffer(totalByteLength);\n var dataView = new DataView(out);\n for (var i = 0; i < input.length; i += 4) {\n var bits = 0;\n var bitLength = 0;\n for (var j = i, limit = i + 3; j <= limit; j++) {\n if (input[j] !== \"=\") {\n bits |= alphabetByEncoding[input[j]] << ((limit - j) * bitsPerLetter);\n bitLength += bitsPerLetter;\n }\n else {\n bits >>= bitsPerLetter;\n }\n }\n var chunkOffset = (i / 4) * 3;\n bits >>= bitLength % bitsPerByte;\n var byteLength = Math.floor(bitLength / bitsPerByte);\n for (var k = 0; k < byteLength; k++) {\n var offset = (byteLength - k - 1) * bitsPerByte;\n dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset);\n }\n }\n return new Uint8Array(out);\n}", "function base64ArrayBuffer(arrayBuffer) {\n var base64 = '';\n var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n var bytes = new Uint8Array(arrayBuffer);\n var byteLength = bytes.byteLength;\n var byteRemainder = byteLength % 3;\n var mainLength = byteLength - byteRemainder;\n var a, b, c, d;\n var chunk;\n // Main loop deals with bytes in chunks of 3\n for (var i = 0; i < mainLength; i = i + 3) {\n // Combine the three bytes into a single integer\n chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n // Use bitmasks to extract 6-bit segments from the triplet\n a = (chunk & 16515072) >> 18; // 16515072 = (2^6 - 1) << 18\n b = (chunk & 258048) >> 12 ;// 258048 = (2^6 - 1) << 12\n c = (chunk & 4032) >> 6 ;// 4032 = (2^6 - 1) << 6\n d = chunk & 63 ; // 63 = 2^6 - 1\n // Convert the raw binary segments to the appropriate ASCII encoding\n base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d];\n }\n // Deal with the remaining bytes and padding\n if (byteRemainder == 1) {\n chunk = bytes[mainLength];\n a = (chunk & 252) >> 2 ;// 252 = (2^6 - 1) << 2\n // Set the 4 least significant bits to zero\n b = (chunk & 3) << 4 ;// 3 = 2^2 - 1\n base64 += encodings[a] + encodings[b] + '==';\n } else if (byteRemainder == 2) {\n chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1];\n \n a = (chunk & 64512) >> 10 ;// 64512 = (2^6 - 1) << 10\n b = (chunk & 1008) >> 4; // 1008 = (2^6 - 1) << 4\n \n // Set the 2 least significant bits to zero\n c = (chunk & 15) << 2 ;// 15 = 2^4 - 1\n \n base64 += encodings[a] + encodings[b] + encodings[c] + '=';\n }\n return base64;\n}", "function url_base64_decode(str) {\n var output = str.replace('-', '+').replace('_', '/');\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += '==';\n break;\n case 3:\n output += '=';\n break;\n default:\n throw 'Illegal base64url string!';\n }\n return window.atob(output); //polifyll https://github.com/davidchambers/Base64.js\n }", "function rawToBase64(raw) {\n var res = '';\n for (var i = 0, len = raw.length; i < len; i++) {\n res += intToString(raw[i]);\n }\n return base64.btoa(res);\n}", "function url_base64_decode(str) {\n var output = str.replace('-', '+').replace('_', '/');\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += '==';\n break;\n case 3:\n output += '=';\n break;\n default:\n throw 'Illegal base64url string!';\n }\n return window.atob(output); //polifyll https://github.com/davidchambers/Base64.js\n }", "function Base64() { \r\n // private property \r\n var _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\"; \r\n \r\n // public method for encoding \r\n this.encode = function (input) { \r\n \tif(Ext.isEmpty(input)){\r\n \t\treturn '';\r\n \t}\r\n var output = \"\"; \r\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4; \r\n var i = 0; \r\n input = _utf8_encode(input); \r\n while (i < input.length) { \r\n chr1 = input.charCodeAt(i++); \r\n chr2 = input.charCodeAt(i++); \r\n chr3 = input.charCodeAt(i++); \r\n enc1 = chr1 >> 2; \r\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); \r\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); \r\n enc4 = chr3 & 63; \r\n if (isNaN(chr2)) { \r\n enc3 = enc4 = 64; \r\n } else if (isNaN(chr3)) { \r\n enc4 = 64; \r\n } \r\n output = output + \r\n _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + \r\n _keyStr.charAt(enc3) + _keyStr.charAt(enc4); \r\n } \r\n return output; \r\n } \r\n \r\n // public method for decoding \r\n this.decode = function (input) {\r\n \tif(Ext.isEmpty(input)){\r\n \t\treturn '';\r\n \t}\r\n var output = \"\"; \r\n var chr1, chr2, chr3; \r\n var enc1, enc2, enc3, enc4; \r\n var i = 0; \r\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\"); \r\n while (i < input.length) { \r\n enc1 = _keyStr.indexOf(input.charAt(i++)); \r\n enc2 = _keyStr.indexOf(input.charAt(i++)); \r\n enc3 = _keyStr.indexOf(input.charAt(i++)); \r\n enc4 = _keyStr.indexOf(input.charAt(i++)); \r\n chr1 = (enc1 << 2) | (enc2 >> 4); \r\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); \r\n chr3 = ((enc3 & 3) << 6) | enc4; \r\n output = output + String.fromCharCode(chr1); \r\n if (enc3 != 64) { \r\n output = output + String.fromCharCode(chr2); \r\n } \r\n if (enc4 != 64) { \r\n output = output + String.fromCharCode(chr3); \r\n } \r\n } \r\n output = _utf8_decode(output); \r\n return output; \r\n } \r\n \r\n // private method for UTF-8 encoding \r\n var _utf8_encode = function (str) { \r\n str = str.replace(/\\r\\n/g,\"\\n\");\r\n var utftext = \"\"; \r\n for (var n = 0; n < str.length; n++) { \r\n var c = str.charCodeAt(n); \r\n if (c < 128) { \r\n utftext += String.fromCharCode(c); \r\n } else if((c > 127) && (c < 2048)) { \r\n utftext += String.fromCharCode((c >> 6) | 192); \r\n utftext += String.fromCharCode((c & 63) | 128); \r\n } else { \r\n utftext += String.fromCharCode((c >> 12) | 224); \r\n utftext += String.fromCharCode(((c >> 6) & 63) | 128); \r\n utftext += String.fromCharCode((c & 63) | 128); \r\n } \r\n \r\n } \r\n return utftext; \r\n } \r\n \r\n // private method for UTF-8 decoding \r\n var _utf8_decode = function (utftext) { \r\n var str = \"\"; \r\n var i = 0, c = 0,c1 = 0,c2 = 0 ,c3; \r\n var c = c1 = c2 = 0; \r\n while ( i < utftext.length ) { \r\n c = utftext.charCodeAt(i); \r\n if (c < 128) { \r\n str += String.fromCharCode(c); \r\n i++; \r\n } else if((c > 191) && (c < 224)) { \r\n c2 = utftext.charCodeAt(i+1); \r\n str += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); \r\n i += 2; \r\n } else { \r\n c2 = utftext.charCodeAt(i+1); \r\n c3 = utftext.charCodeAt(i+2); \r\n str += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); \r\n i += 3; \r\n } \r\n } \r\n return str; \r\n } \r\n}", "function base64ArrayBuffer(arrayBuffer) {\n var base64 = '';\n var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n var bytes = new Uint8Array(arrayBuffer);\n var byteLength = bytes.byteLength;\n var byteRemainder = byteLength % 3;\n var mainLength = byteLength - byteRemainder;\n\n var a, b, c, d;\n var chunk;\n\n // Main loop deals with bytes in chunks of 3\n for (var i = 0; i < mainLength; i = i + 3) {\n // Combine the three bytes into a single integer\n chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n\n // Use bitmasks to extract 6-bit segments from the triplet\n a = (chunk & 16515072) >> 18; // 16515072 = (2^6 - 1) << 18\n b = (chunk & 258048) >> 12; // 258048 = (2^6 - 1) << 12\n c = (chunk & 4032) >> 6; // 4032 = (2^6 - 1) << 6\n d = chunk & 63; // 63 = 2^6 - 1\n\n // Convert the raw binary segments to the appropriate ASCII encoding\n base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d];\n }\n\n // Deal with the remaining bytes and padding\n if (byteRemainder == 1) {\n chunk = bytes[mainLength];\n\n a = (chunk & 252) >> 2; // 252 = (2^6 - 1) << 2\n\n // Set the 4 least significant bits to zero\n b = (chunk & 3) << 4; // 3 = 2^2 - 1\n\n base64 += encodings[a] + encodings[b] + '==';\n } else if (byteRemainder == 2) {\n chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1];\n\n a = (chunk & 64512) >> 10; // 64512 = (2^6 - 1) << 10\n b = (chunk & 1008) >> 4; // 1008 = (2^6 - 1) << 4\n\n // Set the 2 least significant bits to zero\n c = (chunk & 15) << 2; // 15 = 2^4 - 1\n\n base64 += encodings[a] + encodings[b] + encodings[c] + '=';\n }\n\n return base64;\n}", "function url_base64_decode(str) {\n\t var output = str.replace('-', '+').replace('_', '/');\n\t switch (output.length % 4) {\n\t\tcase 0:\n\t\t break;\n\t\tcase 2:\n\t\t output += '==';\n\t\t break;\n\t\tcase 3:\n\t\t output += '=';\n\t\t break;\n\t\tdefault:\n\t\t throw 'Illegal base64url string!';\n\t }\n\t return window.atob(output); //polifyll https://github.com/davidchambers/Base64.js\n\t}", "function base64ToString (s) {\r\n //the base 64 characters\r\n var BASE64 = new Array ('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/');\r\n\t\r\n var decode = new Object();\r\n for (var i=0; i<BASE64.length; i++) {decode[BASE64[i]] = i;} //inverse of the array\r\n decode['='] = 0; //add the equals sign as well\r\n var r = \"\", c1, c2, c3, c4, len=s.length; //define variables\r\n s += \"====\"; //just to make sure it is padded correctly\r\n for (var i=0; i<len; i+=4) { //4 input characters at a time\r\n c1 = s.charAt(i); //the 1st base64 input characther\r\n c2 = s.charAt(i+1);\r\n c3 = s.charAt(i+2);\r\n c4 = s.charAt(i+3);\r\n r += String.fromCharCode (((decode[c1] << 2) & 0xff) | (decode[c2] >> 4)); //reform the string\r\n if (c3 != '=') r += String.fromCharCode (((decode[c2] << 4) & 0xff) | (decode[c3] >> 2));\r\n if (c4 != '=') r += String.fromCharCode (((decode[c3] << 6) & 0xff) | decode[c4]);\r\n }\r\n return r;\r\n}", "function base64ToByteArray( str )\n\t\t{\n\t\t\tvar result = [ ];\n\t\t\tvar digit_num;\n\t\t\tvar cur;\n\t\t\tvar prev;\n\n\t\t\tfor ( var i = 23, l = str.length; i < l; i++ )\n\t\t\t{\n\t\t\t\tcur = reverse_base64_map[ str.charAt( i ) ];\n\t\t\t\tdigit_num = ( i - 23 ) % 4;\n\n\t\t\t\tswitch ( digit_num )\n\t\t\t\t{\n\t\t\t\t\t// case 0: first digit - do nothing, not enough info to work with\n\t\t\t\t\tcase 1: // second digit\n\t\t\t\t\t\tresult.push( prev << 2 | cur >> 4 );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2: // third digit\n\t\t\t\t\t\tresult.push( ( prev & 0x0f ) << 4 | cur >> 2 );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3: // fourth digit\n\t\t\t\t\t\tresult.push( ( prev & 3 ) << 6 | cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tprev = cur;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}", "function Base64() {\n \n\t// private property\n\t_keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n \n\t// public method for encoding\n\tthis.encode = function (input) {\n\t\tvar output = \"\";\n\t\tvar chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n\t\tvar i = 0;\n\t\tinput = _utf8_encode(input);\n\t\twhile (i < input.length) {\n\t\t\tchr1 = input.charCodeAt(i++);\n\t\t\tchr2 = input.charCodeAt(i++);\n\t\t\tchr3 = input.charCodeAt(i++);\n\t\t\tenc1 = chr1 >> 2;\n\t\t\tenc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n\t\t\tenc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n\t\t\tenc4 = chr3 & 63;\n\t\t\tif (isNaN(chr2)) {\n\t\t\t\tenc3 = enc4 = 64;\n\t\t\t} else if (isNaN(chr3)) {\n\t\t\t\tenc4 = 64;\n\t\t\t}\n\t\t\toutput = output +\n\t\t\t_keyStr.charAt(enc1) + _keyStr.charAt(enc2) +\n\t\t\t_keyStr.charAt(enc3) + _keyStr.charAt(enc4);\n\t\t}\n\t\treturn output;\n\t}\n \n\t// public method for decoding\n\tthis.decode = function (input) {\n\t\tvar output = \"\";\n\t\tvar chr1, chr2, chr3;\n\t\tvar enc1, enc2, enc3, enc4;\n\t\tvar i = 0;\n\t\tinput = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\t\twhile (i < input.length) {\n\t\t\tenc1 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tenc2 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tenc3 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tenc4 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tchr1 = (enc1 << 2) | (enc2 >> 4);\n\t\t\tchr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n\t\t\tchr3 = ((enc3 & 3) << 6) | enc4;\n\t\t\toutput = output + String.fromCharCode(chr1);\n\t\t\tif (enc3 != 64) {\n\t\t\t\toutput = output + String.fromCharCode(chr2);\n\t\t\t}\n\t\t\tif (enc4 != 64) {\n\t\t\t\toutput = output + String.fromCharCode(chr3);\n\t\t\t}\n\t\t}\n\t\toutput = _utf8_decode(output);\n\t\treturn output;\n\t}\n \n\t// private method for UTF-8 encoding\n\t_utf8_encode = function (string) {\n\t\tstring = string.replace(/\\r\\n/g,\"\\n\");\n\t\tvar utftext = \"\";\n\t\tfor (var n = 0; n < string.length; n++) {\n\t\t\tvar c = string.charCodeAt(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\t\treturn utftext;\n\t}\n \n\t// private method for UTF-8 decoding\n\t_utf8_decode = function (utftext) {\n\t\tvar string = \"\";\n\t\tvar i = 0;\n\t\tvar c = c1 = c2 = 0;\n\t\twhile ( i < utftext.length ) {\n\t\t\tc = utftext.charCodeAt(i);\n\t\t\tif (c < 128) {\n\t\t\t\tstring += String.fromCharCode(c);\n\t\t\t\ti++;\n\t\t\t} else if((c > 191) && (c < 224)) {\n\t\t\t\tc2 = utftext.charCodeAt(i+1);\n\t\t\t\tstring += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t\ti += 2;\n\t\t\t} else {\n\t\t\t\tc2 = utftext.charCodeAt(i+1);\n\t\t\t\tc3 = utftext.charCodeAt(i+2);\n\t\t\t\tstring += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t\ti += 3;\n\t\t\t}\n\t\t}\n\t\treturn string;\n\t}\n}", "function base64_decode(data) {\n var dst = \"\"\n var i, a, b, c, d, z\n\n for (i = 0; i < data.length - 3; i += 4) {\n a = base64_charIndex(data.charAt(i+0))\n b = base64_charIndex(data.charAt(i+1))\n c = base64_charIndex(data.charAt(i+2))\n d = base64_charIndex(data.charAt(i+3))\n\n dst += String.fromCharCode((a << 2) | (b >>> 4))\n if (data.charAt(i+2) != b64pad)\n dst += String.fromCharCode(((b << 4) & 0xF0) | ((c >>> 2) & 0x0F))\n if (data.charAt(i+3) != b64pad)\n dst += String.fromCharCode(((c << 6) & 0xC0) | d)\n }\n\n dst = decodeURIComponent(escape(dst))\n return dst\n }", "function atob(x) { return Buffer.from(x, 'base64').toString('binary'); }", "function Base64() {\n\t// private property\n\t_keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\t// public method for encoding\n\tthis.encode = function (input) {\n\t\tvar output = \"\";\n\t\tvar chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n\t\tvar i = 0;\n\t\tinput = _utf8_encode(input);\n\t\twhile (i < input.length) {\n\t\t\tchr1 = input.charCodeAt(i++);\n\t\t\tchr2 = input.charCodeAt(i++);\n\t\t\tchr3 = input.charCodeAt(i++);\n\t\t\tenc1 = chr1 >> 2;\n\t\t\tenc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n\t\t\tenc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n\t\t\tenc4 = chr3 & 63;\n\t\t\tif (isNaN(chr2)) {\n\t\t\t\tenc3 = enc4 = 64;\n\t\t\t} else if (isNaN(chr3)) {\n\t\t\t\tenc4 = 64;\n\t\t\t}\n\t\t\toutput = output +\n\t\t\t\t_keyStr.charAt(enc1) + _keyStr.charAt(enc2) +\n\t\t\t\t_keyStr.charAt(enc3) + _keyStr.charAt(enc4);\n\t\t}\n\t\treturn output;\n\t}\n\t// public method for decoding\n\tthis.decode = function (input) {\n\t\tvar output = \"\";\n\t\tvar chr1, chr2, chr3;\n\t\tvar enc1, enc2, enc3, enc4;\n\t\tvar i = 0;\n\t\tinput = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\t\twhile (i < input.length) {\n\t\t\tenc1 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tenc2 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tenc3 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tenc4 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tchr1 = (enc1 << 2) | (enc2 >> 4);\n\t\t\tchr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n\t\t\tchr3 = ((enc3 & 3) << 6) | enc4;\n\t\t\toutput = output + String.fromCharCode(chr1);\n\t\t\tif (enc3 != 64) {\n\t\t\t\toutput = output + String.fromCharCode(chr2);\n\t\t\t}\n\t\t\tif (enc4 != 64) {\n\t\t\t\toutput = output + String.fromCharCode(chr3);\n\t\t\t}\n\t\t}\n\t\toutput = _utf8_decode(output);\n\t\treturn output;\n\t}\n\t// private method for UTF-8 encoding\n\t_utf8_encode = function (string) {\n\t\tstring = string.replace(/\\r\\n/g, \"\\n\");\n\t\tvar utftext = \"\";\n\t\tfor (var n = 0; n < string.length; n++) {\n\t\t\tvar c = string.charCodeAt(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\t\t}\n\t\treturn utftext;\n\t}\n\t// private method for UTF-8 decoding\n\t_utf8_decode = function (utftext) {\n\t\tvar string = \"\";\n\t\tvar i = 0;\n\t\tvar c = c1 = c2 = 0;\n\t\twhile (i < utftext.length) {\n\t\t\tc = utftext.charCodeAt(i);\n\t\t\tif (c < 128) {\n\t\t\t\tstring += String.fromCharCode(c);\n\t\t\t\ti++;\n\t\t\t} else if ((c > 191) && (c < 224)) {\n\t\t\t\tc2 = utftext.charCodeAt(i + 1);\n\t\t\t\tstring += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t\ti += 2;\n\t\t\t} else {\n\t\t\t\tc2 = utftext.charCodeAt(i + 1);\n\t\t\t\tc3 = utftext.charCodeAt(i + 2);\n\t\t\t\tstring += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t\ti += 3;\n\t\t\t}\n\t\t}\n\t\treturn string;\n\t}\n}", "function ab_to_base64(ab) {\n return base64urlencode(ab_to_str(ab));\n}", "function toBase64(u8arr) {\r\n return btoa(String.fromCharCode.apply(null, u8arr)).\r\n replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=*$/, '');\r\n}", "function toBase64(input) {\n var tab = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n var output = '';\n var length = input.length;\n var triplet;\n var b64pad = '=';\n\n for (var i = 0; i < length; i += 3) {\n triplet = input.charCodeAt(i) << 16 | (i + 1 < length ? input.charCodeAt(i + 1) << 8 : 0) | (i + 2 < length ? input.charCodeAt(i + 2) : 0);\n\n for (var j = 0; j < 4; j += 1) {\n if (i * 8 + j * 6 > input.length * 8) {\n output += b64pad;\n } else {\n output += tab.charAt(triplet >>> 6 * (3 - j) & 0x3f);\n }\n }\n }\n\n return output;\n}", "function Base64() {\n\n\t// private property\n\t_keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n\t// public method for encoding\n\tthis.encode = function(input) {\n\t\tvar output = \"\";\n\t\tvar chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n\t\tvar i = 0;\n\t\tinput = _utf8_encode(input);\n\t\twhile (i < input.length) {\n\t\t\tchr1 = input.charCodeAt(i++);\n\t\t\tchr2 = input.charCodeAt(i++);\n\t\t\tchr3 = input.charCodeAt(i++);\n\t\t\tenc1 = chr1 >> 2;\n\t\t\tenc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n\t\t\tenc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n\t\t\tenc4 = chr3 & 63;\n\t\t\tif (isNaN(chr2)) {\n\t\t\t\tenc3 = enc4 = 64;\n\t\t\t} else if (isNaN(chr3)) {\n\t\t\t\tenc4 = 64;\n\t\t\t}\n\t\t\toutput = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2)\n\t\t\t\t\t+ _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\n\t\t}\n\t\treturn output;\n\t}\n\n\t// public method for decoding\n\tthis.decode = function(input) {\n\t\tvar output = \"\";\n\t\tvar chr1, chr2, chr3;\n\t\tvar enc1, enc2, enc3, enc4;\n\t\tvar i = 0;\n\t\tinput = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\t\twhile (i < input.length) {\n\t\t\tenc1 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tenc2 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tenc3 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tenc4 = _keyStr.indexOf(input.charAt(i++));\n\t\t\tchr1 = (enc1 << 2) | (enc2 >> 4);\n\t\t\tchr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n\t\t\tchr3 = ((enc3 & 3) << 6) | enc4;\n\t\t\toutput = output + String.fromCharCode(chr1);\n\t\t\tif (enc3 != 64) {\n\t\t\t\toutput = output + String.fromCharCode(chr2);\n\t\t\t}\n\t\t\tif (enc4 != 64) {\n\t\t\t\toutput = output + String.fromCharCode(chr3);\n\t\t\t}\n\t\t}\n\t\toutput = _utf8_decode(output);\n\t\treturn output;\n\t}\n\n\t// private method for UTF-8 encoding\n\t_utf8_encode = function(string) {\n\t\tstring = string.replace(/\\r\\n/g, \"\\n\");\n\t\tvar utftext = \"\";\n\t\tfor ( var n = 0; n < string.length; n++) {\n\t\t\tvar c = string.charCodeAt(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\t\treturn utftext;\n\t}\n\n\t// private method for UTF-8 decoding\n\t_utf8_decode = function(utftext) {\n\t\tvar string = \"\";\n\t\tvar i = 0;\n\t\tvar c = c1 = c2 = 0;\n\t\twhile (i < utftext.length) {\n\t\t\tc = utftext.charCodeAt(i);\n\t\t\tif (c < 128) {\n\t\t\t\tstring += String.fromCharCode(c);\n\t\t\t\ti++;\n\t\t\t} else if ((c > 191) && (c < 224)) {\n\t\t\t\tc2 = utftext.charCodeAt(i + 1);\n\t\t\t\tstring += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t\ti += 2;\n\t\t\t} else {\n\t\t\t\tc2 = utftext.charCodeAt(i + 1);\n\t\t\t\tc3 = utftext.charCodeAt(i + 2);\n\t\t\t\tstring += String.fromCharCode(((c & 15) << 12)\n\t\t\t\t\t\t| ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t\ti += 3;\n\t\t\t}\n\t\t}\n\t\treturn string;\n\t}\n}", "function fromBase64Url(data) {\n var input = data.padRight(data.length + (4 - data.length % 4) % 4, '=')\n .replace(/\\-/g, '+')\n .replace(/_/g, '/');\n\n return toArrayBuffer(atob(input));\n}", "function url_base64_decode(str) {\n var output = str.replace('-', '+').replace('_', '/');\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += '==';\n break;\n case 3:\n output += '=';\n break;\n default:\n throw 'Illegal base64url string!';\n }\n return window.atob(output); //polifyll https://github.com/davidchambers/Base64.js\n}", "function url_base64_decode(str) {\n var output = str.replace('-', '+').replace('_', '/');\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += '==';\n break;\n case 3:\n output += '=';\n break;\n default:\n throw 'Illegal base64url string!';\n }\n return window.atob(output); //polifyll https://github.com/davidchambers/Base64.js\n}", "function convertBase64ToBytes ( base64 ) {\n\n base64 = base64.replace(/[^A-Za-z0-9\\+\\/\\=]+/g, '');\n\n var bytes = [],\n base64Length = base64.length,\n a, b, c, d;\n\n if (\n ( base64Length % 4 ) != 0\n ) {\n return(bytes);\n };\n\n for (\n var i = 0;\n i < base64Length;\n i += 4\n ) {\n\n a = base64Lookup[base64.charCodeAt(i)];\n b = base64Lookup[base64.charCodeAt(( i + 1 ))];\n c = base64Lookup[base64.charCodeAt(( i + 2 ))];\n d = base64Lookup[base64.charCodeAt(( i + 3 ))];\n\n bytes.push(( ( a << 2 ) | ( b >> 4 ) ));\n\n if (\n c != 64\n ) {\n bytes.push(( ( ( b & 15 ) << 4 ) | ( c >> 2 ) ));\n };\n\n if (\n d != 64\n ) {\n bytes.push(( ( ( c & 3 ) << 6 ) | ( d & 63 ) ));\n };\n\n };\n\n return(bytes);\n\n}", "function base16tobase64(h) {\n var i;\n var base64Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n var c;\n var ret = \"\";\n if(h.length % 2 == 1)\n {\n h = \"0\" + h;\n }\n for (i = 0; i + 3 <= h.length; i += 3)\n {\n c = parseInt(h.substring(i, i + 3), 16);\n ret += base64Chars.charAt(c >> 6) + base64Chars.charAt(c & 63);\n }\n if (i + 1 == h.length)\n {\n c = parseInt(h.substring(i, i + 1), 16);\n ret += base64Chars.charAt(c << 2);\n }\n else if (i + 2 == h.length)\n {\n c = parseInt(h.substring(i, i + 2), 16);\n ret += base64Chars.charAt(c >> 2) + base64Chars.charAt((c & 3) << 4);\n }\n while ((ret.length & 3) > 0) ret += \"=\";\n return ret;\n}", "function base64encode(value) {\n\treturn new Buffer(value).toString('base64');\n}", "function url_base64_decode(str) {\n var output = str.replace('-', '+').replace('_', '/');\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += '==';\n break;\n case 3:\n output += '=';\n break;\n default:\n throw 'Illegal base64url string!';\n }\n return window.atob(output); //polifyll https://github.com/davidchambers/Base64.js\n}", "base64(pathFile) {\n const fs = require('fs');\n let base64data = null;\n try {\n let buff = fs.readFileSync(pathFile);\n base64data = buff.toString('base64');\n } catch (error) {\n console.log('Image not converted to base 64 :\\n\\n' + error);\n }\n //console.log('Image converted to base 64 is:\\n\\n' + base64data);\n return base64data;\n }", "function url_base64_decode(str) {\n var output = str.replace('-', '+').replace('_', '/');\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += '==';\n break;\n case 3:\n output += '=';\n break;\n default:\n throw 'Illegal base64url string!';\n }\n return window.atob(output); //polyfill https://github.com/davidchambers/Base64.js\n }", "apply_blob(blob) { return Base64.encode(blob) }", "extractCode(str) {\n //console.log((new Buffer(str, 'base64')))\n let res = {}, length;\n // move the data into a byte array\n let arr = str;\n res.partType = arr[0]; // should be one of the PART_COMBINATIONS values\n length = arr[1]; // length of the first key part\n let c = 2;\n res.part1 = arr.slice(c, c + length);\n c += length;\n length = arr[c]; // length of the second key part\n c += 1;\n res.part2 = arr.slice(c, c + length);\n let keylength = arr[c + length];\n c += length + 1;\n res.pad1 = arr.slice(c, c + keylength);\n c += keylength;\n res.pad2 = arr.slice(c, c + keylength);\n return res;\n }", "function url_base64_decode(str) {\n var output = str.replace('-', '+').replace('_', '/');\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += '==';\n break;\n case 3:\n output += '=';\n break;\n default:\n throw 'Illegal base64url string!';\n }\n return window.atob(output);\n }", "base64Pad() {\n return this._b64pad;\n }", "function ToBase64(u8) \n{\n return btoa(String.fromCharCode.apply(null, u8));\n}", "function encode64(input) {\n if(window.btoa){\n return window.btoa(input);\n }\n// base64 strings are 4/3 larger than the original string\n var output = new Array( Math.floor( (input.length + 2) / 3 ) * 4 );\n var chr1, chr2, chr3;\n var enc1, enc2, enc3, enc4;\n var i = 0, p = 0;\n var _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n do {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n \n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n \n if (isNaN(chr2)) {\n \tenc3 = enc4 = 64;\n }\n else if (isNaN(chr3)) {\n \t enc4 = 64;\n }\n\n output[p++] = _keyStr.charAt(enc1);\n output[p++] = _keyStr.charAt(enc2);\n output[p++] = _keyStr.charAt(enc3);\n output[p++] = _keyStr.charAt(enc4);\n } while (i < input.length);\n\n return output.join('');\n}", "function base64Encode(data) {\n if (typeof btoa == \"function\") return btoa(data); //use internal base64 functions if available (gecko only)\n var b64_map =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n var byte1, byte2, byte3;\n var ch1, ch2, ch3, ch4;\n var result = new Array(); //array is used instead of string because in most of browsers working with large arrays is faster than working with large strings\n var j = 0;\n for (var i = 0; i < data.length; i += 3) {\n byte1 = data.charCodeAt(i);\n byte2 = data.charCodeAt(i + 1);\n byte3 = data.charCodeAt(i + 2);\n ch1 = byte1 >> 2;\n ch2 = ((byte1 & 3) << 4) | (byte2 >> 4);\n ch3 = ((byte2 & 15) << 2) | (byte3 >> 6);\n ch4 = byte3 & 63;\n\n if (isNaN(byte2)) {\n ch3 = ch4 = 64;\n } else if (isNaN(byte3)) {\n ch4 = 64;\n }\n\n result[j++] =\n b64_map.charAt(ch1) +\n b64_map.charAt(ch2) +\n b64_map.charAt(ch3) +\n b64_map.charAt(ch4);\n }\n\n return result.join(\"\");\n}", "function getBase64(f){\r\n var reader = new FileReader();\r\n reader.readAsDataURL(f);\r\n reader.onload = function () {\r\n console.log(reader.result);\r\n };\r\n }", "function toBase64(input) {\n return util_buffer_from_1.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\n}", "function convertToBase64(input) {\n var result = \"\";\n var charCodes = getExpandedCharCodes(input);\n var i = 0;\n var length = charCodes.length;\n var byte1, byte2, byte3, byte4;\n while (i < length) {\n // Convert every 6-bits in the input 3 character points\n // into a base64 digit\n byte1 = charCodes[i] >> 2;\n byte2 = (charCodes[i] & 3) << 4 | charCodes[i + 1] >> 4;\n byte3 = (charCodes[i + 1] & 15) << 2 | charCodes[i + 2] >> 6;\n byte4 = charCodes[i + 2] & 63;\n // We are out of characters in the input, set the extra\n // digits to 64 (padding character).\n if (i + 1 >= length) {\n byte3 = byte4 = 64;\n }\n else if (i + 2 >= length) {\n byte4 = 64;\n }\n // Write to the output\n result += base64Digits.charAt(byte1) + base64Digits.charAt(byte2) + base64Digits.charAt(byte3) + base64Digits.charAt(byte4);\n i += 3;\n }\n return result;\n }", "static base64Decode(base64Str) {\n return Buffer.from(base64Str, \"base64\").toString(\"utf8\");\n }", "static base64Encode(str, encoding) {\n return Buffer.from(str, encoding).toString(\"base64\");\n }", "function urlBase64Decode(str) {\n var output = str.replace('-', '+').replace('_', '/');\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += '==';\n break;\n case 3:\n output += '=';\n break;\n default:\n throw 'Illegal base64url string!';\n }\n return window.atob(output);\n }", "function base64encode(input) {\n var output = \"\";\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n var i = 0;\n\n input = _utf8_encode(input);\n\n while (i < input.length) {\n\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n\n output = output +\n _keyStr.charAt(enc1) + _keyStr.charAt(enc2) +\n _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\n\n }\n\n return output;\n }", "arrayBufferToBase64(buffer) {\n var binary = '';\n var bytes = [].slice.call(new Uint8Array(buffer));\n bytes.forEach((b) => binary += String.fromCharCode(b));\n return binary;\n }", "str2Base64(_str) {\n const _this = this;\n return _this._binb2b64(_this._str2binb(_str));\n }", "method_59(param1)\n {\n return new Buffer(param1, 'base64');\n }", "function url_base64_decode(str) {\n\tvar output = str.replace(/-/g, '+').replace(/_/g, '/');\n\tswitch (output.length % 4) {\n\t\tcase 0:\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\toutput += '==';\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\toutput += '=';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow 'Illegal base64url string!';\n\t}\n\tvar result = window.atob(output); //polifyll https://github.com/davidchambers/Base64.js\n\ttry {\n\t\treturn decodeURIComponent(escape(result));\n\t} catch (err) {\n\t\treturn result;\n\t}\n}", "get base64String() {\n return exports.base64.encode(this.refString);\n }", "function dateToBase64(date) {\n\t\tvar majorminor = date.split(' ')\n\t\tvar major = majorminor[0].split('-')\n\t\tvar minor = majorminor[1].split(':')\n\t\tvar year = parseInt(major[0]) - 2010\n\t\tvar month = parseInt(major[1])\n\t\tvar day = parseInt(major[2])\n\t\tvar hour = parseInt(minor[0])\n\t\tvar minute = parseInt(minor[1])\n\t\tvar second = parseInt(minor[2])\n\n\t\tyear = BASE64_STRING.substr(year, 1)\n\t\tmonth = BASE64_STRING.substr(month, 1)\n\t\tday = BASE64_STRING.substr(day, 1)\n\t\thour = BASE64_STRING.substr(hour, 1)\n\t\tminute = BASE64_STRING.substr(minute, 1)\n\t\tsecond = BASE64_STRING.substr(second, 1)\n\t\tresult = year + month + day + hour + minute + second\n\n\t\treturn result\n\t}", "function base64_to_ab(a) {\n return str_to_ab(base64urldecode(a));\n}", "decode(str){\n this.init()\n var end = str.length\n while(end>=0 && str.charAt(end-1)=='=') end--\n if(end<2) throw '·Invalid Base64 string at· ' + end\n var m = (end%4)\n if(m==1) throw '·Invalid Base64 string at· ' + (end-1)\n if(m>1) m--\n var n = 3*Math.floor(end/4) + m\n var blob = new Uint8Array(n)\n var control =[[2,4,1],[4,2,1],[6,0,2]]\n var left, right\n var k=0\n var c=0\n for(var i=0; i<n; i++){\n left = this.a2i[str.charAt(k)]\n right = this.a2i[str.charAt(k+1)]\n if(left===undefined || right===undefined) throw '·Invalid Base64 string at· ' + k\n blob[i] = (left << control[c][0]) |( right >> control[c][1])\n k+=control[c][2]\n c = (c+1)%3\n } \n return blob\n }", "function toBase64(base64url) {\n // We this to be a string so we can do .replace on it. If it's\n // already a string, this is a noop.\n base64url = base64url.toString();\n return padString(base64url)\n .replace(/\\-/g, \"+\")\n .replace(/_/g, \"/\");\n}", "getBase64(img, callback) {\n const reader = new FileReader();\n reader.addEventListener('load', () => callback(reader.result));\n reader.readAsDataURL(img);\n }", "function atou(b64) {\n return decodeURIComponent(escape(atob(b64)));\n}", "function text2base64(text) {\n var j = 0;\n var i = 0;\n var base64 = new Array();\n var base64string = \"\";\n var base64key = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n var text0, text1, text2;\n\n////////////////////////////////////////////////////////////////////////////////////////////////////\n// Step thru the input text string 3 characters per loop, creating 4 output characters per loop //\n////////////////////////////////////////////////////////////////////////////////////////////////////\n\n for (i=0; i < text.length; )\n {\n text0 = text.charCodeAt(i);\n text1 = text.charCodeAt(i+1);\n text2 = text.charCodeAt(i+2);\n\n base64[j] = base64key.charCodeAt((text0 & 252) >> 2);\n if ((i+1)<text.length) // i+1 is still part of string\n {\n base64[j+1] = base64key.charCodeAt(((text0 & 3) << 4)|((text1 & 240) >> 4));\n if ((i+2)<text.length) // i+2 is still part of string\n {\n base64[j+2] = base64key.charCodeAt(((text1 & 15) << 2) | ((text2 & 192) >> 6));\n base64[j+3] = base64key.charCodeAt((text2 & 63));\n }\n else\n {\n base64[j+2] = base64key.charCodeAt(((text1 & 15) << 2));\n base64[j+3] = 61;\n }\n }\n else\n {\n base64[j+1] = base64key.charCodeAt(((text0 & 3) << 4));\n base64[j+2] = 61;\n base64[j+3] = 61;\n }\n i=i+3;\n j=j+4;\n }\n \n ////////////////////////////////////////////\n // Create output string from byte array //\n ////////////////////////////////////////////\n\n for (i=0; i<base64.length; i++)\n {\n base64string += String.fromCharCode(base64[i]);\n }\n\n return base64string;\n}", "base64Encode(input) {\n return EncodingUtils.base64Encode(input);\n }", "function base64Encode(str)\r\n{\r\n\tvar charBase64 = new Array(\r\n\t\t'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',\r\n\t\t'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f',\r\n\t\t'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',\r\n\t\t'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/'\r\n\t);\r\n\r\n\tvar out = \"\";\r\n\tvar chr1, chr2, chr3;\r\n\tvar enc1, enc2, enc3, enc4;\r\n\tvar i = 0;\r\n\r\n\tvar len = str.length;\r\n\r\n\tdo\r\n\t{\r\n\t\tchr1 = str.charCodeAt(i++);\r\n\t\tchr2 = str.charCodeAt(i++);\r\n\t\tchr3 = str.charCodeAt(i++);\r\n\r\n\t\t//enc1 = (chr1 & 0xFC) >> 2;\r\n\t\tenc1 = chr1 >> 2;\r\n\t\tenc2 = ((chr1 & 0x03) << 4) | (chr2 >> 4);\r\n\t\tenc3 = ((chr2 & 0x0F) << 2) | (chr3 >> 6);\r\n\t\tenc4 = chr3 & 0x3F;\r\n\r\n\t\tout += charBase64[enc1] + charBase64[enc2];\r\n\r\n\t\tif (isNaN(chr2))\r\n \t\t{\r\n\t\t\tout += '==';\r\n\t\t}\r\n \t\telse if (isNaN(chr3))\r\n \t\t{\r\n\t\t\tout += charBase64[enc3] + '=';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tout += charBase64[enc3] + charBase64[enc4];\r\n\t\t}\r\n\t}\r\n\twhile (i < len);\r\n\r\n\treturn out;\r\n}", "function toBase64$1(input) {\n return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\n}", "function base64_encode(img) {\n // read binary data\n let png = fs.readFileSync(img);\n // convert binary data to base64 encoded string\n return new Buffer.from(png).toString('base64');\n}", "function rstr2b64(input) {\n var tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n var output = \"\";\n var len = input.length;\n for (var i = 0; i < len; i += 3) {\n var triplet = (input.charCodeAt(i) << 16)\n | (i + 1 < len ? input.charCodeAt(i + 1) << 8 : 0)\n | (i + 2 < len ? input.charCodeAt(i + 2) : 0);\n for (var j = 0; j < 4; j++) {\n if (i * 8 + j * 6 > input.length * 8) output += b64pad;\n else output += tab.charAt((triplet >>> 6 * (3 - j)) & 0x3F);\n }\n }\n return output;\n}", "function base64_encode(str) {\n var utf8str = unescape(encodeURIComponent(str))\n return base64_encode_data(utf8str, utf8str.length, b64c)\n }", "function base64_encode(img) {\n // read binary data\n let png = fs.readFileSync(img);\n // convert binary data to base64 encoded string\n return new Buffer.from(png).toString('base64');\n}", "function base64ToBase64Url(b64) {\n return b64.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n}", "function base64ToBase64Url(b64) {\n return b64.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n}", "qb64b() {\n return Buffer.from(this.qb64(), 'utf-8');\n }", "function toBase64() {\n var canvas = document.createElement(\"canvas\");\n var ctx = canvas.getContext(\"2d\");\n var img = document.getElementById(\"preview\");\n ctx.drawImage(img, 10, 10);\n var data = canvas.toDataURL();\n var string = data.replace('data:image/png;base64,', '');\n return string;\n }", "getBase64(file, cb) {\n let reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = function () {\n cb(reader.result)\n };\n reader.onerror = function (error) {\n console.log('Error: ', error);\n };\n }", "function base64Encode_(inputStr)\n {\n var b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n var outputStr = \"\";\n var i = 0;\n while (i < inputStr.length)\n {\n //all three \"& 0xff\" added below are there to fix a known bug\n //with bytes returned by xhr.responseText\n var byte1 = inputStr.charCodeAt(i++) & 0xff;\n var byte2 = inputStr.charCodeAt(i++) & 0xff;\n var byte3 = inputStr.charCodeAt(i++) & 0xff;\n var enc1 = byte1 >> 2;\n var enc2 = ((byte1 & 3) << 4) | (byte2 >> 4);\n var enc3, enc4;\n if (isNaN(byte2)) { enc3 = enc4 = 64; } else { enc3 = ((byte2 & 15) << 2) | (byte3 >> 6); if (isNaN(byte3)) { enc4 = 64; } else { enc4 = byte3 & 63; } }\n outputStr += b64.charAt(enc1) + b64.charAt(enc2) + b64.charAt(enc3) + b64.charAt(enc4);\n }\n return outputStr;\n }", "base64EncodedAuthInfo () {\n\t\treturn {\n\t\t\tclientID: this.authInfo.clientID,\n\t\t\tserverToken: this.authInfo.serverToken,\n\t\t\tclientToken: this.authInfo.clientToken,\n\t\t\tencKey: this.authInfo.encKey.toString('base64'),\n\t\t\tmacKey: this.authInfo.macKey.toString('base64')\n\t\t}\n\t}", "function base64ToHex(b64str)\t\t\t\t\t\t\t\t\t// Base64 to Hex\r\n\t{\r\n\t\tfor (var i = 0, bin = atob(b64str.replace(/[ \\r\\n]+$/, \"\")), hex = []; i < bin.length; ++i) {\r\n\t\t\tvar tmp = bin.charCodeAt(i).toString(16);\r\n\t\t\tif (tmp.length === 1) tmp = \"0\" + tmp;\r\n\t\t\thex[hex.length] = tmp;\r\n\t\t}\r\n\t\treturn hex.join(\"\");\r\n\t}", "function rstr2b64(input)\n{\n try { b64pad } catch(e) { b64pad=''; }\n var tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n var output = \"\";\n var len = input.length;\n for(var i = 0; i < len; i += 3)\n {\n var triplet = (input.charCodeAt(i) << 16)\n | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)\n | (i + 2 < len ? input.charCodeAt(i+2) : 0);\n for(var j = 0; j < 4; j++)\n {\n if(i * 8 + j * 6 > input.length * 8) output += b64pad;\n else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);\n }\n }\n return output;\n}", "function rstr2b64(input)\n{\n b64pad = b64pad || '';\n var tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n var output = \"\";\n var len = input.length;\n for(var i = 0; i < len; i += 3)\n {\n var triplet = (input.charCodeAt(i) << 16)\n | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)\n | (i + 2 < len ? input.charCodeAt(i+2) : 0);\n for(var j = 0; j < 4; j++)\n {\n if(i * 8 + j * 6 > input.length * 8) output += b64pad;\n else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);\n }\n }\n return output;\n}", "function atob(r) { for (var t, a = String(r), c = 0, n = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\", o = \"\"; a.charAt(0 | c) || (n = \"=\", c % 1); o += n.charAt(63 & t >> 8 - c % 1 * 8))t = t << 8 | a.charCodeAt(c += .75); return o }" ]
[ "0.77057606", "0.7324507", "0.72870255", "0.7230772", "0.7183817", "0.71231633", "0.7105772", "0.7089243", "0.7062078", "0.6977857", "0.6975599", "0.6933752", "0.6899215", "0.6899215", "0.6893997", "0.6879304", "0.68740326", "0.68740326", "0.68538475", "0.68362004", "0.68160105", "0.68145704", "0.6813304", "0.6796009", "0.6795296", "0.6782342", "0.6781931", "0.67791384", "0.6769328", "0.6769328", "0.6769328", "0.67674285", "0.6737874", "0.67123723", "0.6709781", "0.6708782", "0.67083704", "0.670402", "0.6700978", "0.6699976", "0.6690181", "0.6679911", "0.66669405", "0.6666899", "0.66641486", "0.6657409", "0.6641158", "0.66225743", "0.6618965", "0.65941924", "0.6589855", "0.65884846", "0.6581446", "0.65797615", "0.6558931", "0.65578604", "0.6552427", "0.6541266", "0.65302086", "0.6530095", "0.65256226", "0.6521147", "0.651685", "0.6512322", "0.6510703", "0.65101063", "0.65092134", "0.65048486", "0.65025836", "0.64737135", "0.64592713", "0.64539206", "0.64537174", "0.6453079", "0.6443965", "0.6436135", "0.64339817", "0.64286935", "0.6412356", "0.64100516", "0.64073", "0.6403718", "0.63850236", "0.6378413", "0.6371751", "0.6366443", "0.63600445", "0.63596207", "0.6358845", "0.63499874", "0.63462454", "0.63462454", "0.6327505", "0.63216734", "0.6311204", "0.63005036", "0.62961894", "0.62886417", "0.6277159", "0.6271605", "0.62700164" ]
0.0
-1
FUNCTIONS // Dummy constructor.
function Ctor() { // Empty... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor (){}", "constructur() {}", "constructor( ) {}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "function _construct()\n\t\t{;\n\t\t}", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "function HelperConstructor() {}", "function Ctor() {}", "function _ctor() {\n\t}", "constructor() {\n\t\t// ...\n\t}", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "consructor() {\n }", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "constructor() {\n\t}", "constructor() {\n\t}", "function Ctor() {\r\n }", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "constructor() {\r\n // ohne Inhalt\r\n }", "function tempCtor() {}", "__previnit(){}", "constructor() {\n\n\t}", "function construct() { }", "constructor(){\r\n\t}", "constructor() {\r\n }", "constructor(){\r\n }", "constructor () {\r\n\t\t\r\n\t}", "constructor() {\n throw new Error('Not implemented');\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }" ]
[ "0.85090643", "0.84665614", "0.845112", "0.8285781", "0.8285781", "0.8285781", "0.8285781", "0.8285781", "0.8285781", "0.8285781", "0.8145793", "0.8120852", "0.8120852", "0.8120852", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.81043327", "0.8012456", "0.7950691", "0.7947678", "0.7910193", "0.78789824", "0.78789824", "0.78789824", "0.78789824", "0.78789824", "0.78789824", "0.78789824", "0.78789824", "0.78789824", "0.78789824", "0.78789824", "0.78300416", "0.77829486", "0.77829486", "0.77829486", "0.77829486", "0.77829486", "0.77829486", "0.772534", "0.772534", "0.76617473", "0.7626118", "0.7626118", "0.7626118", "0.7626118", "0.7626118", "0.7626118", "0.75593275", "0.75585943", "0.755777", "0.7554753", "0.7522783", "0.75083035", "0.7462404", "0.7389317", "0.7380463", "0.7375986", "0.73377526", "0.73377526", "0.73377526", "0.73377526", "0.73377526", "0.73377526", "0.73377526", "0.73377526", "0.73377526", "0.73377526" ]
0.793029
52
eslintdisableline maxlen FUNCTIONS // Dummy constructor.
function Dummy() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor( ) {}", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "constructur() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function HelperConstructor() {}", "constructor() {\n throw new Error('Not implemented');\n }", "constructor (){}", "function tempCtor() {}", "constructor() {\n\t\t// ...\n\t}", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "function temporaryConstructor() {}", "function Ctor() {\n\t// Empty...\n}", "constructor() {\n throw Error('do not use constructor directly, only static functions');\n }", "function Ctor() {}", "constructor(initialCapacity = 10) {\n }", "consructor() {\n }", "constructor() { super() }", "constructor() {\n\t\tthrow new Error('Sorry, this class can`t be instanciated, it is only for static methods');\n\t}", "constructor() {\n\t}", "constructor() {\n\t}", "constructor () { super() }", "function _ctor() {\n\t}", "constructor() {\n throw new Error(`${this.constructor.name} class cannot be instantiated`);\n }", "constructor(args, opts) {\n super(args, opts);\n}", "constructor() {\n super(null, null, 0, 0, 0, 0, 0);\n }", "constructor() {\r\n }", "function _construct()\n\t\t{;\n\t\t}", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }", "constructor() {\n }" ]
[ "0.73958194", "0.73035824", "0.73035824", "0.73035824", "0.7241961", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72391737", "0.72335243", "0.72335243", "0.72335243", "0.72335243", "0.72335243", "0.72335243", "0.72335243", "0.7094851", "0.7094851", "0.7094851", "0.7094851", "0.7094851", "0.7094851", "0.7045074", "0.7038649", "0.7002394", "0.69856375", "0.68648595", "0.6861732", "0.6861732", "0.6861732", "0.6861732", "0.6861732", "0.6861732", "0.6861732", "0.6861732", "0.6861732", "0.6861732", "0.6861732", "0.67784095", "0.6748438", "0.6730783", "0.6691922", "0.6639005", "0.662579", "0.6469003", "0.6452571", "0.6439344", "0.6439344", "0.6436116", "0.643356", "0.6396693", "0.6372408", "0.6361033", "0.6349037", "0.63277245", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843", "0.63165843" ]
0.0
-1
From FvD 13.37, CSS Color Module Level 3
function hsl2rgb(h, m1, m2) { return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Colour(){\n\n /* Returns an object representing the RGBA components of this Colour. The red,\n * green, and blue components are converted to integers in the range [0,255].\n * The alpha is a value in the range [0,1].\n */\n this.getIntegerRGB = function(){\n\n // get the RGB components of this colour\n var rgb = this.getRGB();\n\n // return the integer components\n return {\n 'r' : Math.round(rgb.r),\n 'g' : Math.round(rgb.g),\n 'b' : Math.round(rgb.b),\n 'a' : rgb.a\n };\n\n };\n\n /* Returns an object representing the RGBA components of this Colour. The red,\n * green, and blue components are converted to numbers in the range [0,100].\n * The alpha is a value in the range [0,1].\n */\n this.getPercentageRGB = function(){\n\n // get the RGB components of this colour\n var rgb = this.getRGB();\n\n // return the percentage components\n return {\n 'r' : 100 * rgb.r / 255,\n 'g' : 100 * rgb.g / 255,\n 'b' : 100 * rgb.b / 255,\n 'a' : rgb.a\n };\n\n };\n\n /* Returns a string representing this Colour as a CSS hexadecimal RGB colour\n * value - that is, a string of the form #RRGGBB where each of RR, GG, and BB\n * are two-digit hexadecimal numbers.\n */\n this.getCSSHexadecimalRGB = function(){\n\n // get the integer RGB components\n var rgb = this.getIntegerRGB();\n\n // determine the hexadecimal equivalents\n var r16 = rgb.r.toString(16);\n var g16 = rgb.g.toString(16);\n var b16 = rgb.b.toString(16);\n\n // return the CSS RGB colour value\n return '#'\n + (r16.length == 2 ? r16 : '0' + r16)\n + (g16.length == 2 ? g16 : '0' + g16)\n + (b16.length == 2 ? b16 : '0' + b16);\n\n };\n\n /* Returns a string representing this Colour as a CSS integer RGB colour\n * value - that is, a string of the form rgb(r,g,b) where each of r, g, and b\n * are integers in the range [0,255].\n */\n this.getCSSIntegerRGB = function(){\n\n // get the integer RGB components\n var rgb = this.getIntegerRGB();\n\n // return the CSS RGB colour value\n return 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')';\n\n };\n\n /* Returns a string representing this Colour as a CSS integer RGBA colour\n * value - that is, a string of the form rgba(r,g,b,a) where each of r, g, and\n * b are integers in the range [0,255] and a is in the range [0,1].\n */\n this.getCSSIntegerRGBA = function(){\n\n // get the integer RGB components\n var rgb = this.getIntegerRGB();\n\n // return the CSS integer RGBA colour value\n return 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + rgb.a + ')';\n\n };\n\n /* Returns a string representing this Colour as a CSS percentage RGB colour\n * value - that is, a string of the form rgb(r%,g%,b%) where each of r, g, and\n * b are in the range [0,100].\n */\n this.getCSSPercentageRGB = function(){\n\n // get the percentage RGB components\n var rgb = this.getPercentageRGB();\n\n // return the CSS RGB colour value\n return 'rgb(' + rgb.r + '%,' + rgb.g + '%,' + rgb.b + '%)';\n\n };\n\n /* Returns a string representing this Colour as a CSS percentage RGBA colour\n * value - that is, a string of the form rgba(r%,g%,b%,a) where each of r, g,\n * and b are in the range [0,100] and a is in the range [0,1].\n */\n this.getCSSPercentageRGBA = function(){\n\n // get the percentage RGB components\n var rgb = this.getPercentageRGB();\n\n // return the CSS percentage RGBA colour value\n return 'rgb(' + rgb.r + '%,' + rgb.g + '%,' + rgb.b + '%,' + rgb.a + ')';\n\n };\n\n /* Returns a string representing this Colour as a CSS HSL colour value - that\n * is, a string of the form hsl(h,s%,l%) where h is in the range [0,100] and\n * s and l are in the range [0,100].\n */\n this.getCSSHSL = function(){\n\n // get the HSL components\n var hsl = this.getHSL();\n\n // return the CSS HSL colour value\n return 'hsl(' + hsl.h + ',' + hsl.s + '%,' + hsl.l + '%)';\n\n };\n\n /* Returns a string representing this Colour as a CSS HSLA colour value - that\n * is, a string of the form hsla(h,s%,l%,a) where h is in the range [0,100],\n * s and l are in the range [0,100], and a is in the range [0,1].\n */\n this.getCSSHSLA = function(){\n\n // get the HSL components\n var hsl = this.getHSL();\n\n // return the CSS HSL colour value\n return 'hsl(' + hsl.h + ',' + hsl.s + '%,' + hsl.l + '%,' + hsl.a + ')';\n\n };\n\n /* Sets the colour of the specified node to this Colour. This functions sets\n * the CSS 'color' property for the node. The parameter is:\n *\n * node - the node whose colour should be set\n */\n this.setNodeColour = function(node){\n\n // set the colour of the node\n node.style.color = this.getCSSHexadecimalRGB();\n\n };\n\n /* Sets the background colour of the specified node to this Colour. This\n * functions sets the CSS 'background-color' property for the node. The\n * parameter is:\n *\n * node - the node whose background colour should be set\n */\n this.setNodeBackgroundColour = function(node){\n\n // set the background colour of the node\n node.style.backgroundColor = this.getCSSHexadecimalRGB();\n\n };\n\n}", "function Color() {}", "decodeColor(){\n return this.colors[ this.extractBinaryNumber(this.hasAlpha ? 3 : 2) ];\n }", "function Color() { }", "function lgColor(o){this.setOptions=function(o){for(i in o){var n=\"set\"+i.charAt(0).toUpperCase()+i.substr(1);if(this[n]){this[n](o[i])}else{this[i]=o[i]}}};this.setFromIntRGB=function(c){this.colorRGB=c};this.setFromFloatRGB=function(r,g,b){if(typeof(r)==\"object\"){g=r[1];b=r[2];r=r[0]}this.setFromByteRGB(Math.min(0,Math.max(255,(r*255)|0)),Math.min(0,Math.max(255,(g*255)|0)),Math.min(0,Math.max(255,(b*255)|0)))};this.setFromByteRGB=function(r,g,b){if(typeof(r)==\"object\"){g=r[1];b=r[2];r=r[0]}this.colorRGB=r<<16|g<<8|b};this.setFromFloatHSL=function(h,s,l){if(typeof(h)==\"object\"){s=h[1];l=h[2];h=h[0]}var a=this.hslToRgb(h,s,l);this.setFromFloatRGB(a[0],a[1],a[2])};this.setFromByteHSL=function(h,s,l){if(typeof(h)==\"object\"){s=h[1];l=h[2];h=h[0]}this.setFromFloatHSL(h/255,s/255,l/255)};this.getIntRGB=function(){return this.colorRGB};this.getHexRGB=function(){return dec2Hex(this.colorRGB,6)};this.getFloatRGB=function(){var a=this.getByteRGB();return[a[0]/255,a[1]/255,a[2]/255]};this.getByteRGB=function(){return[(c>>16)&255,(c>>8)&255,c&255]};this.getFloatHSL=function(){var a=this.getFloatRGB();return this.rgbToHsl(a[0],a[1],a[2])};this.getByteHSL=function(){var a=this.getFloatRGB();var b=this.rgbToHsl(a[0],a[1],a[2]);return[(h*255)&255,(s*255)&255,(l*255)&255]};this.convert=function(v,a,b){this[\"setFrom\"+a](v);return this[\"get\"+b]()};this.hToC=function(x,y,h){var c;if(h<0){h+=1}if(h>1){h-=1}if(h<1/6){c=x+(y-x)*h*6}else{if(h<1/2){c=y}else{if(h<2/3){c=x+(y-x)*(2/3-h)*6}else{c=x}}}return c};this.hslToRgb=function(h,s,l){var x;var y;var r;var g;var b;y=(l>.5)?l+s-l*s:l*(s+1);x=l*2-y;r=this.hToC(x,y,h+1/3);g=this.hToC(x,y,h);b=this.hToC(x,y,h-1/3);return[r,g,b]};this.rgbToHsl=function(r,g,b){var a=Math.max(r,g,b),mn=Math.min(r,g,b);var h,s,l=(a+mn)/2;if(a==mn){h=s=0}else{var d=a-mn;s=l>0.5?d/(2-a-mn):d/(a+mn);switch(a){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break}h/=6}return[h,s,l]};this.setOptions({colorRGB:0});if(o){this.setOptions(o)}}", "get color() {}", "get color() {\n\n\t}", "function LegacyColor(r, g, b) {\n this.r = r;\n this.g = g;\n this.b = b;\n}", "function RGB2Color(r,g,b)\n\t {\treturn '#' + byte2Hex(r) + byte2Hex(g) + byte2Hex(b); }", "function rgb(r, g, b) {\n \n}", "function getRgbCss(r, g, b) {\r\n\treturn 'color: rgb(' + r + ',' + g + ',' + b + ');';\r\n}", "function colorgenerator() {\n let colours = [],\n i;\n for (i = 0; i < 372; i++){\n colours[i] = 'hsl(' + i + ', 100%, 50%)';\n if (i > 359) {\n colours[i] = 'hsl(0, 100%, 100%)';\n }\n }\n colours = colours.toString();\n //console.log(colours);\n root.style.setProperty(\"--colours\", colours);\n}", "function pColor(piece){ return piece.charCodeAt(0) }", "function GetCheerColorInfo(a){/* exported GetCheerColorInfo */var b=a,c=\"color\",d=\"style\",e=\"color\";return a.startsWith(\"bg-\")&&(b=a.substr(3),c=\"bgcolor\",d=\"wstyle\",e=\"background-color\"),ColorNames.hasOwnProperty(b)?[c,d,e,ColorNames[b]]:b.match(/^#[0-9a-f]{6}/i)?[c,d,e,b]:[null,null,null,null]}", "function colorRGB(){\n var coolor = \"(\"+generarNumero(255)+\",\" + generarNumero(255) + \",\" + generarNumero(255) +\")\";\n return \"rgb\" + coolor;\n }", "function hue2rgb(p,q,h){h=(h+1)%1;if(h*6<1){return p+(q-p)*h*6;}if(h*2<1){return q;}if(h*3<2){return p+(q-p)*(2/3-h)*6;}return p;}", "function hue2rgb(p,q,h){h=(h+1)%1;if(h*6<1){return p+(q-p)*h*6;}if(h*2<1){return q;}if(h*3<2){return p+(q-p)*(2/3-h)*6;}return p;}", "function hue2rgb(p,q,h){h=(h+1)%1;if(h*6<1){return p+(q-p)*h*6;}if(h*2<1){return q;}if(h*3<2){return p+(q-p)*(2/3-h)*6;}return p;}", "function hue2rgb(p,q,h){h = (h + 1) % 1;if(h * 6 < 1){return p + (q - p) * h * 6;}if(h * 2 < 1){return q;}if(h * 3 < 2){return p + (q - p) * (2 / 3 - h) * 6;}return p;}", "function hue2rgb(p,q,h){h = (h + 1) % 1;if(h * 6 < 1){return p + (q - p) * h * 6;}if(h * 2 < 1){return q;}if(h * 3 < 2){return p + (q - p) * (2 / 3 - h) * 6;}return p;}", "get colorValue() {}", "function ColorList() {}", "function color(n) {\r\n // rgb\r\n return `hsl(${n * quickcol * 360},100%,50%)`;\r\n // default\r\n return `hsl(${n * quickcol * 360},${20+n*quickcol*50}%,${n * quickcol * 100}%)`;\r\n // gray-scaled\r\n return `hsl(0, 0%, ${100 - n * quickcol * 100}%)`;\r\n}", "function color() {\n var map = {\n \"black\" : [ 0/255,0/255,0/255 ],\n \"silver\": [ 192/255,192/255,192/255 ],\n \"gray\" : [ 128/255,128/255,128/255 ],\n \"white\" : [ 255/255,255/255,255/255 ],\n \"maroon\": [ 128/255,0/255,0/255 ],\n \"red\" : [ 255/255,0/255,0/255 ],\n \"purple\": [ 128/255,0/255,128/255 ],\n \"fuchsia\": [ 255/255,0/255,255/255 ],\n \"green\" : [ 0/255,128/255,0/255 ],\n \"lime\" : [ 0/255,255/255,0/255 ],\n \"olive\" : [ 128/255,128/255,0/255 ],\n \"yellow\": [ 255/255,255/255,0/255 ],\n \"navy\" : [ 0/255,0/255,128/255 ],\n \"blue\" : [ 0/255,0/255,255/255 ],\n \"teal\" : [ 0/255,128/255,128/255 ],\n \"aqua\" : [ 0/255,255/255,255/255 ],\n \"aliceblue\" : [ 240/255,248/255,255/255 ],\n \"antiquewhite\" : [ 250/255,235/255,215/255 ],\n \"aqua\" : [ 0/255,255/255,255/255 ],\n \"aquamarine\" : [ 127/255,255/255,212/255 ],\n \"azure\" : [ 240/255,255/255,255/255 ],\n \"beige\" : [ 245/255,245/255,220/255 ],\n \"bisque\" : [ 255/255,228/255,196/255 ],\n \"black\" : [ 0/255,0/255,0/255 ],\n \"blanchedalmond\" : [ 255/255,235/255,205/255 ],\n \"blue\" : [ 0/255,0/255,255/255 ],\n \"blueviolet\" : [ 138/255,43/255,226/255 ],\n \"brown\" : [ 165/255,42/255,42/255 ],\n \"burlywood\" : [ 222/255,184/255,135/255 ],\n \"cadetblue\" : [ 95/255,158/255,160/255 ],\n \"chartreuse\" : [ 127/255,255/255,0/255 ],\n \"chocolate\" : [ 210/255,105/255,30/255 ],\n \"coral\" : [ 255/255,127/255,80/255 ],\n \"cornflowerblue\" : [ 100/255,149/255,237/255 ],\n \"cornsilk\" : [ 255/255,248/255,220/255 ],\n \"crimson\" : [ 220/255,20/255,60/255 ],\n \"cyan\" : [ 0/255,255/255,255/255 ],\n \"darkblue\" : [ 0/255,0/255,139/255 ],\n \"darkcyan\" : [ 0/255,139/255,139/255 ],\n \"darkgoldenrod\" : [ 184/255,134/255,11/255 ],\n \"darkgray\" : [ 169/255,169/255,169/255 ],\n \"darkgreen\" : [ 0/255,100/255,0/255 ],\n \"darkgrey\" : [ 169/255,169/255,169/255 ],\n \"darkkhaki\" : [ 189/255,183/255,107/255 ],\n \"darkmagenta\" : [ 139/255,0/255,139/255 ],\n \"darkolivegreen\" : [ 85/255,107/255,47/255 ],\n \"darkorange\" : [ 255/255,140/255,0/255 ],\n \"darkorchid\" : [ 153/255,50/255,204/255 ],\n \"darkred\" : [ 139/255,0/255,0/255 ],\n \"darksalmon\" : [ 233/255,150/255,122/255 ],\n \"darkseagreen\" : [ 143/255,188/255,143/255 ],\n \"darkslateblue\" : [ 72/255,61/255,139/255 ],\n \"darkslategray\" : [ 47/255,79/255,79/255 ],\n \"darkslategrey\" : [ 47/255,79/255,79/255 ],\n \"darkturquoise\" : [ 0/255,206/255,209/255 ],\n \"darkviolet\" : [ 148/255,0/255,211/255 ],\n \"deeppink\" : [ 255/255,20/255,147/255 ],\n \"deepskyblue\" : [ 0/255,191/255,255/255 ],\n \"dimgray\" : [ 105/255,105/255,105/255 ],\n \"dimgrey\" : [ 105/255,105/255,105/255 ],\n \"dodgerblue\" : [ 30/255,144/255,255/255 ],\n \"firebrick\" : [ 178/255,34/255,34/255 ],\n \"floralwhite\" : [ 255/255,250/255,240/255 ],\n \"forestgreen\" : [ 34/255,139/255,34/255 ],\n \"fuchsia\" : [ 255/255,0/255,255/255 ],\n \"gainsboro\" : [ 220/255,220/255,220/255 ],\n \"ghostwhite\" : [ 248/255,248/255,255/255 ],\n \"gold\" : [ 255/255,215/255,0/255 ],\n \"goldenrod\" : [ 218/255,165/255,32/255 ],\n \"gray\" : [ 128/255,128/255,128/255 ],\n \"green\" : [ 0/255,128/255,0/255 ],\n \"greenyellow\" : [ 173/255,255/255,47/255 ],\n \"grey\" : [ 128/255,128/255,128/255 ],\n \"honeydew\" : [ 240/255,255/255,240/255 ],\n \"hotpink\" : [ 255/255,105/255,180/255 ],\n \"indianred\" : [ 205/255,92/255,92/255 ],\n \"indigo\" : [ 75/255,0/255,130/255 ],\n \"ivory\" : [ 255/255,255/255,240/255 ],\n \"khaki\" : [ 240/255,230/255,140/255 ],\n \"lavender\" : [ 230/255,230/255,250/255 ],\n \"lavenderblush\" : [ 255/255,240/255,245/255 ],\n \"lawngreen\" : [ 124/255,252/255,0/255 ],\n \"lemonchiffon\" : [ 255/255,250/255,205/255 ],\n \"lightblue\" : [ 173/255,216/255,230/255 ],\n \"lightcoral\" : [ 240/255,128/255,128/255 ],\n \"lightcyan\" : [ 224/255,255/255,255/255 ],\n \"lightgoldenrodyellow\" : [ 250/255,250/255,210/255 ],\n \"lightgray\" : [ 211/255,211/255,211/255 ],\n \"lightgreen\" : [ 144/255,238/255,144/255 ],\n \"lightgrey\" : [ 211/255,211/255,211/255 ],\n \"lightpink\" : [ 255/255,182/255,193/255 ],\n \"lightsalmon\" : [ 255/255,160/255,122/255 ],\n \"lightseagreen\" : [ 32/255,178/255,170/255 ],\n \"lightskyblue\" : [ 135/255,206/255,250/255 ],\n \"lightslategray\" : [ 119/255,136/255,153/255 ],\n \"lightslategrey\" : [ 119/255,136/255,153/255 ],\n \"lightsteelblue\" : [ 176/255,196/255,222/255 ],\n \"lightyellow\" : [ 255/255,255/255,224/255 ],\n \"lime\" : [ 0/255,255/255,0/255 ],\n \"limegreen\" : [ 50/255,205/255,50/255 ],\n \"linen\" : [ 250/255,240/255,230/255 ],\n \"magenta\" : [ 255/255,0/255,255/255 ],\n \"maroon\" : [ 128/255,0/255,0/255 ],\n \"mediumaquamarine\" : [ 102/255,205/255,170/255 ],\n \"mediumblue\" : [ 0/255,0/255,205/255 ],\n \"mediumorchid\" : [ 186/255,85/255,211/255 ],\n \"mediumpurple\" : [ 147/255,112/255,219/255 ],\n \"mediumseagreen\" : [ 60/255,179/255,113/255 ],\n \"mediumslateblue\" : [ 123/255,104/255,238/255 ],\n \"mediumspringgreen\" : [ 0/255,250/255,154/255 ],\n \"mediumturquoise\" : [ 72/255,209/255,204/255 ],\n \"mediumvioletred\" : [ 199/255,21/255,133/255 ],\n \"midnightblue\" : [ 25/255,25/255,112/255 ],\n \"mintcream\" : [ 245/255,255/255,250/255 ],\n \"mistyrose\" : [ 255/255,228/255,225/255 ],\n \"moccasin\" : [ 255/255,228/255,181/255 ],\n \"navajowhite\" : [ 255/255,222/255,173/255 ],\n \"navy\" : [ 0/255,0/255,128/255 ],\n \"oldlace\" : [ 253/255,245/255,230/255 ],\n \"olive\" : [ 128/255,128/255,0/255 ],\n \"olivedrab\" : [ 107/255,142/255,35/255 ],\n \"orange\" : [ 255/255,165/255,0/255 ],\n \"orangered\" : [ 255/255,69/255,0/255 ],\n \"orchid\" : [ 218/255,112/255,214/255 ],\n \"palegoldenrod\" : [ 238/255,232/255,170/255 ],\n \"palegreen\" : [ 152/255,251/255,152/255 ],\n \"paleturquoise\" : [ 175/255,238/255,238/255 ],\n \"palevioletred\" : [ 219/255,112/255,147/255 ],\n \"papayawhip\" : [ 255/255,239/255,213/255 ],\n \"peachpuff\" : [ 255/255,218/255,185/255 ],\n \"peru\" : [ 205/255,133/255,63/255 ],\n \"pink\" : [ 255/255,192/255,203/255 ],\n \"plum\" : [ 221/255,160/255,221/255 ],\n \"powderblue\" : [ 176/255,224/255,230/255 ],\n \"purple\" : [ 128/255,0/255,128/255 ],\n \"red\" : [ 255/255,0/255,0/255 ],\n \"rosybrown\" : [ 188/255,143/255,143/255 ],\n \"royalblue\" : [ 65/255,105/255,225/255 ],\n \"saddlebrown\" : [ 139/255,69/255,19/255 ],\n \"salmon\" : [ 250/255,128/255,114/255 ],\n \"sandybrown\" : [ 244/255,164/255,96/255 ],\n \"seagreen\" : [ 46/255,139/255,87/255 ],\n \"seashell\" : [ 255/255,245/255,238/255 ],\n \"sienna\" : [ 160/255,82/255,45/255 ],\n \"silver\" : [ 192/255,192/255,192/255 ],\n \"skyblue\" : [ 135/255,206/255,235/255 ],\n \"slateblue\" : [ 106/255,90/255,205/255 ],\n \"slategray\" : [ 112/255,128/255,144/255 ],\n \"slategrey\" : [ 112/255,128/255,144/255 ],\n \"snow\" : [ 255/255,250/255,250/255 ],\n \"springgreen\" : [ 0/255,255/255,127/255 ],\n \"steelblue\" : [ 70/255,130/255,180/255 ],\n \"tan\" : [ 210/255,180/255,140/255 ],\n \"teal\" : [ 0/255,128/255,128/255 ],\n \"thistle\" : [ 216/255,191/255,216/255 ],\n \"tomato\" : [ 255/255,99/255,71/255 ],\n \"turquoise\" : [ 64/255,224/255,208/255 ],\n \"violet\" : [ 238/255,130/255,238/255 ],\n \"wheat\" : [ 245/255,222/255,179/255 ],\n \"white\" : [ 255/255,255/255,255/255 ],\n \"whitesmoke\" : [ 245/255,245/255,245/255 ],\n \"yellow\" : [ 255/255,255/255,0/255 ],\n \"yellowgreen\" : [ 154/255,205/255,50/255 ] };\n\n var o, i = 1, a = arguments, c = a[0], alpha;\n\n if(a[0].length<4 && (a[i]*1-0)==a[i]) { alpha = a[i++]; } // first argument rgb (no a), and next one is numeric?\n if(a[i].length) { a = a[i], i = 0; } // next arg an array, make it our main array to walk through\n if(typeof c == 'string')\n c = map[c.toLowerCase()];\n if(alpha!==undefined)\n c = c.concat(alpha);\n for(o=a[i++]; i<a.length; i++) {\n o = o.union(a[i]);\n }\n return o.setColor(c);\n}", "get ETC_RGB4() {}", "function RGBColor(color_string)\n{\n this.ok = false;\n\n // strip any leading #\n if (color_string.charAt(0) == '#') { // remove # if any\n color_string = color_string.substr(1,6);\n }\n\n color_string = color_string.replace(/ /g,'');\n color_string = color_string.toLowerCase();\n\n // before getting into regexps, try simple matches\n // and overwrite the input\n var simple_colors = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dodgerblue: '1e90ff',\n feldspar: 'd19275',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred : 'cd5c5c',\n indigo : '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgrey: 'd3d3d3',\n lightgreen: '90ee90',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslateblue: '8470ff',\n lightslategray: '778899',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '00ff00',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'ff00ff',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370d8',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'd87093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n red: 'ff0000',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n violetred: 'd02090',\n wheat: 'f5deb3',\n white: 'ffffff',\n whitesmoke: 'f5f5f5',\n yellow: 'ffff00',\n yellowgreen: '9acd32'\n };\n for (var key in simple_colors) {\n if (color_string == key) {\n color_string = simple_colors[key];\n }\n }\n // emd of simple type-in colors\n\n // array of color definition objects\n var color_defs = [\n {\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3])\n ];\n }\n },\n {\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n example: ['#00ff00', '336699'],\n process: function (bits){\n return [\n parseInt(bits[1], 16),\n parseInt(bits[2], 16),\n parseInt(bits[3], 16)\n ];\n }\n },\n {\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n example: ['#fb0', 'f0f'],\n process: function (bits){\n return [\n parseInt(bits[1] + bits[1], 16),\n parseInt(bits[2] + bits[2], 16),\n parseInt(bits[3] + bits[3], 16)\n ];\n }\n }\n ];\n\n // search through the definitions to find a match\n for (var i = 0; i < color_defs.length; i++) {\n var re = color_defs[i].re;\n var processor = color_defs[i].process;\n var bits = re.exec(color_string);\n if (bits) {\n channels = processor(bits);\n this.r = channels[0];\n this.g = channels[1];\n this.b = channels[2];\n this.ok = true;\n }\n\n }\n\n // validate/cleanup values\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\n\n // some getters\n this.toRGB = function () {\n return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\n }\n this.toHex = function () {\n var r = this.r.toString(16);\n var g = this.g.toString(16);\n var b = this.b.toString(16);\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 return r + g + b;\n }\n\n // help\n this.getHelpXML = function () {\n\n var examples = new Array();\n // add regexps\n for (var i = 0; i < color_defs.length; i++) {\n var example = color_defs[i].example;\n for (var j = 0; j < example.length; j++) {\n examples[examples.length] = example[j];\n }\n }\n // add type-in colors\n for (var sc in simple_colors) {\n examples[examples.length] = sc;\n }\n\n var xml = document.createElement('ul');\n xml.setAttribute('id', 'rgbcolor-examples');\n for (var i = 0; i < examples.length; i++) {\n try {\n var list_item = document.createElement('li');\n var list_color = new RGBColor(examples[i]);\n var example_div = document.createElement('div');\n example_div.style.cssText =\n 'margin: 3px; '\n + 'border: 1px solid black; '\n + 'background:' + list_color.toHex() + '; '\n + 'color:' + list_color.toHex()\n ;\n example_div.appendChild(document.createTextNode('test'));\n var list_item_value = document.createTextNode(\n ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\n );\n list_item.appendChild(example_div);\n list_item.appendChild(list_item_value);\n xml.appendChild(list_item);\n\n } catch(e){}\n }\n return xml;\n\n }\n\n}", "function RGBColor(color_string)\r\n{\r\n this.ok = false;\r\n\r\n // strip any leading #\r\n if (color_string.charAt(0) == '#') { // remove # if any\r\n color_string = color_string.substr(1,6);\r\n }\r\n\r\n color_string = color_string.replace(/ /g,'');\r\n color_string = color_string.toLowerCase();\r\n\r\n // before getting into regexps, try simple matches\r\n // and overwrite the input\r\n var simple_colors = {\r\n aliceblue: 'f0f8ff',\r\n antiquewhite: 'faebd7',\r\n aqua: '00ffff',\r\n aquamarine: '7fffd4',\r\n azure: 'f0ffff',\r\n beige: 'f5f5dc',\r\n bisque: 'ffe4c4',\r\n black: '000000',\r\n blanchedalmond: 'ffebcd',\r\n blue: '0000ff',\r\n blueviolet: '8a2be2',\r\n brown: 'a52a2a',\r\n burlywood: 'deb887',\r\n cadetblue: '5f9ea0',\r\n chartreuse: '7fff00',\r\n chocolate: 'd2691e',\r\n coral: 'ff7f50',\r\n cornflowerblue: '6495ed',\r\n cornsilk: 'fff8dc',\r\n crimson: 'dc143c',\r\n cyan: '00ffff',\r\n darkblue: '00008b',\r\n darkcyan: '008b8b',\r\n darkgoldenrod: 'b8860b',\r\n darkgray: 'a9a9a9',\r\n darkgreen: '006400',\r\n darkkhaki: 'bdb76b',\r\n darkmagenta: '8b008b',\r\n darkolivegreen: '556b2f',\r\n darkorange: 'ff8c00',\r\n darkorchid: '9932cc',\r\n darkred: '8b0000',\r\n darksalmon: 'e9967a',\r\n darkseagreen: '8fbc8f',\r\n darkslateblue: '483d8b',\r\n darkslategray: '2f4f4f',\r\n darkturquoise: '00ced1',\r\n darkviolet: '9400d3',\r\n deeppink: 'ff1493',\r\n deepskyblue: '00bfff',\r\n dimgray: '696969',\r\n dodgerblue: '1e90ff',\r\n feldspar: 'd19275',\r\n firebrick: 'b22222',\r\n floralwhite: 'fffaf0',\r\n forestgreen: '228b22',\r\n fuchsia: 'ff00ff',\r\n gainsboro: 'dcdcdc',\r\n ghostwhite: 'f8f8ff',\r\n gold: 'ffd700',\r\n goldenrod: 'daa520',\r\n gray: '808080',\r\n green: '008000',\r\n greenyellow: 'adff2f',\r\n honeydew: 'f0fff0',\r\n hotpink: 'ff69b4',\r\n indianred : 'cd5c5c',\r\n indigo : '4b0082',\r\n ivory: 'fffff0',\r\n khaki: 'f0e68c',\r\n lavender: 'e6e6fa',\r\n lavenderblush: 'fff0f5',\r\n lawngreen: '7cfc00',\r\n lemonchiffon: 'fffacd',\r\n lightblue: 'add8e6',\r\n lightcoral: 'f08080',\r\n lightcyan: 'e0ffff',\r\n lightgoldenrodyellow: 'fafad2',\r\n lightgrey: 'd3d3d3',\r\n lightgreen: '90ee90',\r\n lightpink: 'ffb6c1',\r\n lightsalmon: 'ffa07a',\r\n lightseagreen: '20b2aa',\r\n lightskyblue: '87cefa',\r\n lightslateblue: '8470ff',\r\n lightslategray: '778899',\r\n lightsteelblue: 'b0c4de',\r\n lightyellow: 'ffffe0',\r\n lime: '00ff00',\r\n limegreen: '32cd32',\r\n linen: 'faf0e6',\r\n magenta: 'ff00ff',\r\n maroon: '800000',\r\n mediumaquamarine: '66cdaa',\r\n mediumblue: '0000cd',\r\n mediumorchid: 'ba55d3',\r\n mediumpurple: '9370d8',\r\n mediumseagreen: '3cb371',\r\n mediumslateblue: '7b68ee',\r\n mediumspringgreen: '00fa9a',\r\n mediumturquoise: '48d1cc',\r\n mediumvioletred: 'c71585',\r\n midnightblue: '191970',\r\n mintcream: 'f5fffa',\r\n mistyrose: 'ffe4e1',\r\n moccasin: 'ffe4b5',\r\n navajowhite: 'ffdead',\r\n navy: '000080',\r\n oldlace: 'fdf5e6',\r\n olive: '808000',\r\n olivedrab: '6b8e23',\r\n orange: 'ffa500',\r\n orangered: 'ff4500',\r\n orchid: 'da70d6',\r\n palegoldenrod: 'eee8aa',\r\n palegreen: '98fb98',\r\n paleturquoise: 'afeeee',\r\n palevioletred: 'd87093',\r\n papayawhip: 'ffefd5',\r\n peachpuff: 'ffdab9',\r\n peru: 'cd853f',\r\n pink: 'ffc0cb',\r\n plum: 'dda0dd',\r\n powderblue: 'b0e0e6',\r\n purple: '800080',\r\n red: 'ff0000',\r\n rosybrown: 'bc8f8f',\r\n royalblue: '4169e1',\r\n saddlebrown: '8b4513',\r\n salmon: 'fa8072',\r\n sandybrown: 'f4a460',\r\n seagreen: '2e8b57',\r\n seashell: 'fff5ee',\r\n sienna: 'a0522d',\r\n silver: 'c0c0c0',\r\n skyblue: '87ceeb',\r\n slateblue: '6a5acd',\r\n slategray: '708090',\r\n snow: 'fffafa',\r\n springgreen: '00ff7f',\r\n steelblue: '4682b4',\r\n tan: 'd2b48c',\r\n teal: '008080',\r\n thistle: 'd8bfd8',\r\n tomato: 'ff6347',\r\n turquoise: '40e0d0',\r\n violet: 'ee82ee',\r\n violetred: 'd02090',\r\n wheat: 'f5deb3',\r\n white: 'ffffff',\r\n whitesmoke: 'f5f5f5',\r\n yellow: 'ffff00',\r\n yellowgreen: '9acd32'\r\n };\r\n for (var key in simple_colors) {\r\n if (color_string == key) {\r\n color_string = simple_colors[key];\r\n }\r\n }\r\n // emd of simple type-in colors\r\n\r\n // array of color definition objects\r\n var color_defs = [\r\n {\r\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\r\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1]),\r\n parseInt(bits[2]),\r\n parseInt(bits[3])\r\n ];\r\n }\r\n },\r\n {\r\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\r\n example: ['#00ff00', '336699'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1], 16),\r\n parseInt(bits[2], 16),\r\n parseInt(bits[3], 16)\r\n ];\r\n }\r\n },\r\n {\r\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\r\n example: ['#fb0', 'f0f'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1] + bits[1], 16),\r\n parseInt(bits[2] + bits[2], 16),\r\n parseInt(bits[3] + bits[3], 16)\r\n ];\r\n }\r\n }\r\n ];\r\n\r\n // search through the definitions to find a match\r\n for (var i = 0; i < color_defs.length; i++) {\r\n var re = color_defs[i].re;\r\n var processor = color_defs[i].process;\r\n var bits = re.exec(color_string);\r\n if (bits) {\r\n channels = processor(bits);\r\n this.r = channels[0];\r\n this.g = channels[1];\r\n this.b = channels[2];\r\n this.ok = true;\r\n }\r\n\r\n }\r\n\r\n // validate/cleanup values\r\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\r\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\r\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\r\n\r\n // some getters\r\n this.toRGB = function () {\r\n return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\r\n }\r\n this.toHex = function () {\r\n var r = this.r.toString(16);\r\n var g = this.g.toString(16);\r\n var b = this.b.toString(16);\r\n if (r.length == 1) r = '0' + r;\r\n if (g.length == 1) g = '0' + g;\r\n if (b.length == 1) b = '0' + b;\r\n return '#' + r + g + b;\r\n }\r\n\r\n // help\r\n this.getHelpXML = function () {\r\n\r\n var examples = new Array();\r\n // add regexps\r\n for (var i = 0; i < color_defs.length; i++) {\r\n var example = color_defs[i].example;\r\n for (var j = 0; j < example.length; j++) {\r\n examples[examples.length] = example[j];\r\n }\r\n }\r\n // add type-in colors\r\n for (var sc in simple_colors) {\r\n examples[examples.length] = sc;\r\n }\r\n\r\n var xml = document.createElement('ul');\r\n xml.setAttribute('id', 'rgbcolor-examples');\r\n for (var i = 0; i < examples.length; i++) {\r\n try {\r\n var list_item = document.createElement('li');\r\n var list_color = new RGBColor(examples[i]);\r\n var example_div = document.createElement('div');\r\n example_div.style.cssText =\r\n 'margin: 3px; '\r\n + 'border: 1px solid black; '\r\n + 'background:' + list_color.toHex() + '; '\r\n + 'color:' + list_color.toHex()\r\n ;\r\n example_div.appendChild(document.createTextNode('test'));\r\n var list_item_value = document.createTextNode(\r\n ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\r\n );\r\n list_item.appendChild(example_div);\r\n list_item.appendChild(list_item_value);\r\n xml.appendChild(list_item);\r\n\r\n } catch(e){}\r\n }\r\n return xml;\r\n\r\n }\r\n\r\n}", "function RGBColor(color_string)\r\n{\r\n this.ok = false;\r\n\r\n // strip any leading #\r\n if (color_string.charAt(0) == '#') { // remove # if any\r\n color_string = color_string.substr(1,6);\r\n }\r\n\r\n color_string = color_string.replace(/ /g,'');\r\n color_string = color_string.toLowerCase();\r\n\r\n // before getting into regexps, try simple matches\r\n // and overwrite the input\r\n var simple_colors = {\r\n aliceblue: 'f0f8ff',\r\n antiquewhite: 'faebd7',\r\n aqua: '00ffff',\r\n aquamarine: '7fffd4',\r\n azure: 'f0ffff',\r\n beige: 'f5f5dc',\r\n bisque: 'ffe4c4',\r\n black: '000000',\r\n blanchedalmond: 'ffebcd',\r\n blue: '0000ff',\r\n blueviolet: '8a2be2',\r\n brown: 'a52a2a',\r\n burlywood: 'deb887',\r\n cadetblue: '5f9ea0',\r\n chartreuse: '7fff00',\r\n chocolate: 'd2691e',\r\n coral: 'ff7f50',\r\n cornflowerblue: '6495ed',\r\n cornsilk: 'fff8dc',\r\n crimson: 'dc143c',\r\n cyan: '00ffff',\r\n darkblue: '00008b',\r\n darkcyan: '008b8b',\r\n darkgoldenrod: 'b8860b',\r\n darkgray: 'a9a9a9',\r\n darkgreen: '006400',\r\n darkkhaki: 'bdb76b',\r\n darkmagenta: '8b008b',\r\n darkolivegreen: '556b2f',\r\n darkorange: 'ff8c00',\r\n darkorchid: '9932cc',\r\n darkred: '8b0000',\r\n darksalmon: 'e9967a',\r\n darkseagreen: '8fbc8f',\r\n darkslateblue: '483d8b',\r\n darkslategray: '2f4f4f',\r\n darkturquoise: '00ced1',\r\n darkviolet: '9400d3',\r\n deeppink: 'ff1493',\r\n deepskyblue: '00bfff',\r\n dimgray: '696969',\r\n dodgerblue: '1e90ff',\r\n feldspar: 'd19275',\r\n firebrick: 'b22222',\r\n floralwhite: 'fffaf0',\r\n forestgreen: '228b22',\r\n fuchsia: 'ff00ff',\r\n gainsboro: 'dcdcdc',\r\n ghostwhite: 'f8f8ff',\r\n gold: 'ffd700',\r\n goldenrod: 'daa520',\r\n gray: '808080',\r\n green: '008000',\r\n greenyellow: 'adff2f',\r\n honeydew: 'f0fff0',\r\n hotpink: 'ff69b4',\r\n indianred : 'cd5c5c',\r\n indigo : '4b0082',\r\n ivory: 'fffff0',\r\n khaki: 'f0e68c',\r\n lavender: 'e6e6fa',\r\n lavenderblush: 'fff0f5',\r\n lawngreen: '7cfc00',\r\n lemonchiffon: 'fffacd',\r\n lightblue: 'add8e6',\r\n lightcoral: 'f08080',\r\n lightcyan: 'e0ffff',\r\n lightgoldenrodyellow: 'fafad2',\r\n lightgrey: 'd3d3d3',\r\n lightgreen: '90ee90',\r\n lightpink: 'ffb6c1',\r\n lightsalmon: 'ffa07a',\r\n lightseagreen: '20b2aa',\r\n lightskyblue: '87cefa',\r\n lightslateblue: '8470ff',\r\n lightslategray: '778899',\r\n lightsteelblue: 'b0c4de',\r\n lightyellow: 'ffffe0',\r\n lime: '00ff00',\r\n limegreen: '32cd32',\r\n linen: 'faf0e6',\r\n magenta: 'ff00ff',\r\n maroon: '800000',\r\n mediumaquamarine: '66cdaa',\r\n mediumblue: '0000cd',\r\n mediumorchid: 'ba55d3',\r\n mediumpurple: '9370d8',\r\n mediumseagreen: '3cb371',\r\n mediumslateblue: '7b68ee',\r\n mediumspringgreen: '00fa9a',\r\n mediumturquoise: '48d1cc',\r\n mediumvioletred: 'c71585',\r\n midnightblue: '191970',\r\n mintcream: 'f5fffa',\r\n mistyrose: 'ffe4e1',\r\n moccasin: 'ffe4b5',\r\n navajowhite: 'ffdead',\r\n navy: '000080',\r\n oldlace: 'fdf5e6',\r\n olive: '808000',\r\n olivedrab: '6b8e23',\r\n orange: 'ffa500',\r\n orangered: 'ff4500',\r\n orchid: 'da70d6',\r\n palegoldenrod: 'eee8aa',\r\n palegreen: '98fb98',\r\n paleturquoise: 'afeeee',\r\n palevioletred: 'd87093',\r\n papayawhip: 'ffefd5',\r\n peachpuff: 'ffdab9',\r\n peru: 'cd853f',\r\n pink: 'ffc0cb',\r\n plum: 'dda0dd',\r\n powderblue: 'b0e0e6',\r\n purple: '800080',\r\n red: 'ff0000',\r\n rosybrown: 'bc8f8f',\r\n royalblue: '4169e1',\r\n saddlebrown: '8b4513',\r\n salmon: 'fa8072',\r\n sandybrown: 'f4a460',\r\n seagreen: '2e8b57',\r\n seashell: 'fff5ee',\r\n sienna: 'a0522d',\r\n silver: 'c0c0c0',\r\n skyblue: '87ceeb',\r\n slateblue: '6a5acd',\r\n slategray: '708090',\r\n snow: 'fffafa',\r\n springgreen: '00ff7f',\r\n steelblue: '4682b4',\r\n tan: 'd2b48c',\r\n teal: '008080',\r\n thistle: 'd8bfd8',\r\n tomato: 'ff6347',\r\n turquoise: '40e0d0',\r\n violet: 'ee82ee',\r\n violetred: 'd02090',\r\n wheat: 'f5deb3',\r\n white: 'ffffff',\r\n whitesmoke: 'f5f5f5',\r\n yellow: 'ffff00',\r\n yellowgreen: '9acd32'\r\n };\r\n for (var key in simple_colors) {\r\n if (color_string == key) {\r\n color_string = simple_colors[key];\r\n }\r\n }\r\n // emd of simple type-in colors\r\n\r\n // array of color definition objects\r\n var color_defs = [\r\n {\r\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\r\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1]),\r\n parseInt(bits[2]),\r\n parseInt(bits[3])\r\n ];\r\n }\r\n },\r\n {\r\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\r\n example: ['#00ff00', '336699'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1], 16),\r\n parseInt(bits[2], 16),\r\n parseInt(bits[3], 16)\r\n ];\r\n }\r\n },\r\n {\r\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\r\n example: ['#fb0', 'f0f'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1] + bits[1], 16),\r\n parseInt(bits[2] + bits[2], 16),\r\n parseInt(bits[3] + bits[3], 16)\r\n ];\r\n }\r\n }\r\n ];\r\n\r\n // search through the definitions to find a match\r\n for (var i = 0; i < color_defs.length; i++) {\r\n var re = color_defs[i].re;\r\n var processor = color_defs[i].process;\r\n var bits = re.exec(color_string);\r\n if (bits) {\r\n channels = processor(bits);\r\n this.r = channels[0];\r\n this.g = channels[1];\r\n this.b = channels[2];\r\n this.ok = true;\r\n }\r\n\r\n }\r\n\r\n // validate/cleanup values\r\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\r\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\r\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\r\n\r\n // some getters\r\n this.toRGB = function () {\r\n return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\r\n }\r\n this.toHex = function () {\r\n var r = this.r.toString(16);\r\n var g = this.g.toString(16);\r\n var b = this.b.toString(16);\r\n if (r.length == 1) r = '0' + r;\r\n if (g.length == 1) g = '0' + g;\r\n if (b.length == 1) b = '0' + b;\r\n return '#' + r + g + b;\r\n }\r\n\r\n // help\r\n this.getHelpXML = function () {\r\n\r\n var examples = new Array();\r\n // add regexps\r\n for (var i = 0; i < color_defs.length; i++) {\r\n var example = color_defs[i].example;\r\n for (var j = 0; j < example.length; j++) {\r\n examples[examples.length] = example[j];\r\n }\r\n }\r\n // add type-in colors\r\n for (var sc in simple_colors) {\r\n examples[examples.length] = sc;\r\n }\r\n\r\n var xml = document.createElement('ul');\r\n xml.setAttribute('id', 'rgbcolor-examples');\r\n for (var i = 0; i < examples.length; i++) {\r\n try {\r\n var list_item = document.createElement('li');\r\n var list_color = new RGBColor(examples[i]);\r\n var example_div = document.createElement('div');\r\n example_div.style.cssText =\r\n 'margin: 3px; '\r\n + 'border: 1px solid black; '\r\n + 'background:' + list_color.toHex() + '; '\r\n + 'color:' + list_color.toHex()\r\n ;\r\n example_div.appendChild(document.createTextNode('test'));\r\n var list_item_value = document.createTextNode(\r\n ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\r\n );\r\n list_item.appendChild(example_div);\r\n list_item.appendChild(list_item_value);\r\n xml.appendChild(list_item);\r\n\r\n } catch(e){}\r\n }\r\n return xml;\r\n\r\n }\r\n\r\n}", "function hcl(hue) {\n return function(start, end) {\n var h = hue((start = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* hcl */])(start)).h, (end = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* hcl */])(end)).h),\n c = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.c, end.c),\n l = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.l, end.l),\n opacity = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}", "function hcl(hue) {\n return function(start, end) {\n var h = hue((start = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* hcl */])(start)).h, (end = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* hcl */])(end)).h),\n c = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.c, end.c),\n l = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.l, end.l),\n opacity = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}", "function hcl(hue) {\n return function(start, end) {\n var h = hue((start = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* hcl */])(start)).h, (end = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"b\" /* hcl */])(end)).h),\n c = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.c, end.c),\n l = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.l, end.l),\n opacity = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__color__[\"a\" /* default */])(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}", "function RGBColor(color_string)\n{\n this.ok = false;\n\n // strip any leading #\n if (color_string.charAt(0) == '#') { // remove # if any\n color_string = color_string.substr(1,6);\n }\n\n color_string = color_string.replace(/ /g,'');\n color_string = color_string.toLowerCase();\n\n // array of color definition objects\n var color_defs = [\n {\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3])\n ];\n }\n },\n {\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n example: ['#00ff00', '336699'],\n process: function (bits){\n return [\n parseInt(bits[1], 16),\n parseInt(bits[2], 16),\n parseInt(bits[3], 16)\n ];\n }\n },\n {\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n example: ['#fb0', 'f0f'],\n process: function (bits){\n return [\n parseInt(bits[1] + bits[1], 16),\n parseInt(bits[2] + bits[2], 16),\n parseInt(bits[3] + bits[3], 16)\n ];\n }\n }\n ];\n\n // search through the definitions to find a match\n for (var i = 0; i < color_defs.length; i++) {\n var re = color_defs[i].re;\n var processor = color_defs[i].process;\n var bits = re.exec(color_string);\n if (bits) {\n channels = processor(bits);\n this.r = channels[0];\n this.g = channels[1];\n this.b = channels[2];\n this.ok = true;\n }\n\n }\n\n // validate/cleanup values\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\n}", "set color(value) {}", "function RGB2Color(r, g, b) {\r\n return '#' + byte2Hex(r) + byte2Hex(g) + byte2Hex(b);\r\n}", "function getCSSColor() {\n var color = \"hsl(\";\n color += Math.round(Math.random() * 360);\n color += \",84%,32%)\";\n return color;\n}", "function parseColor(str){\n\t\tvar result;\n\t\n\t\t/**\n\t\t * rgb(num,num,num)\n\t\t */\n\t\tif((result = /rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.exec(str)))\n\t\t\treturn new Color(parseInt(result[1]), parseInt(result[2]), parseInt(result[3]));\n\t\n\t\t/**\n\t\t * rgba(num,num,num,num)\n\t\t */\n\t\tif((result = /rgba\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(str)))\n\t\t\treturn new Color(parseInt(result[1]), parseInt(result[2]), parseInt(result[3]), parseFloat(result[4]));\n\t\t\t\n\t\t/**\n\t\t * rgb(num%,num%,num%)\n\t\t */\n\t\tif((result = /rgb\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.exec(str)))\n\t\t\treturn new Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55);\n\t\n\t\t/**\n\t\t * rgba(num%,num%,num%,num)\n\t\t */\n\t\tif((result = /rgba\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(str)))\n\t\t\treturn new Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55, parseFloat(result[4]));\n\t\t\t\n\t\t/**\n\t\t * #a0b1c2\n\t\t */\n\t\tif((result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str)))\n\t\t\treturn new Color(parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16));\n\t\n\t\t/**\n\t\t * #fff\n\t\t */\n\t\tif((result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str)))\n\t\t\treturn new Color(parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16));\n\n\t\t/**\n\t\t * Otherwise, we're most likely dealing with a named color.\n\t\t */\n\t\tvar name = str.strip().toLowerCase();\n\t\tif(name == 'transparent'){\n\t\t\treturn new Color(255, 255, 255, 0);\n\t\t}\n\t\tresult = lookupColors[name];\n\t\treturn new Color(result[0], result[1], result[2]);\n\t}", "get ETC2_RGB4() {}", "function Color(input){_classCallCheck(this,Color),input instanceof Color?(this.r=input.r,this.g=input.g,this.b=input.b,this.a=input.a):input?this.parse(input):(this.r=this.g=this.b=0,this.a=1)}// ## Parse ##", "function perc2color(perc) {\n\tvar r, g, b = 0;\n\tif(perc < 50) {\n\t\tr = 255;\n\t\tg = Math.round(5.1 * perc);\n\t}\n\telse {\n\t\tg = 255;\n\t\tr = Math.round(510 - 5.10 * perc);\n\t}\n\tvar h = r * 0x10000 + g * 0x100 + b * 0x1;\n\treturn '#' + ('000000' + h.toString(16)).slice(-6);\n}", "redder(){\n\t\tthis.multiplyColorValue(\"red\", 1.2);\n\t}", "function color (i){\n\tif (i===0){\n\t\treturn \"rgb(1, 95, 102)\";\n\t} else if (i===1) {\n\t\treturn \"rgb(45, 241, 255)\";\n\t} else if (i===2) {\n\t\treturn \"rgb(34, 86, 150)\";\n\t} else if (i===3) {\n\t\treturn \"rgb(0, 132, 88)\";\n\t} else if (i===4) {\n\t\treturn \"rgb(56, 255, 188)\";\n\t} else if (i===5) {\n\t\treturn \"rgb(77, 168, 137)\";\n\t} else {\n\t\treturn \"rgb(1, 95, 102)\";\n\t}\n}", "function color() {\n return colorValue() + colorValue() + colorValue();\n}", "function getColor(cName) {\n\t\tswitch(cName){\n\t\t\tcase \"light_yellow\":\tc = \"#E6FB04\";\n\t\t\tcase \"neon_red\": \t\tc = \"#FF0000\";\n\t\t\tcase \"neon_purple\": \tc = \"#7CFC00\";\n\t\t\tcase \"neon_pink\":\t\tc = \"#FF00CC\";\n\t\t\tcase \"neon_yellow\":\tc = \"#FFFF00\";\n\t\t\tcase \"neon_green\": c = \"#00FF66\";\n\t\t\tcase \"light_blue\": c = \"#00FFFF\";\n\t\t\tcase \"dark_blue\": c = \"#0033FF\";\n\t\t\tdefault: \t\t\t\t\tc = '#FAEBD7';\n\t\t}\n \treturn c;\n\t}", "function css2rgb (s) {\n return cssColors[s.toLowerCase()]\n}", "_extractColor(params, pos, attr) {\n // normalize params\n // meaning: [target, CM, ign, val, val, val]\n // RGB : [ 38/48, 2, ign, r, g, b]\n // P256 : [ 38/48, 5, ign, v, ign, ign]\n const accu = [0, 0, -1, 0, 0, 0];\n // alignment placeholder for non color space sequences\n let cSpace = 0;\n // return advance we took in params\n let advance = 0;\n do {\n accu[advance + cSpace] = params.params[pos + advance];\n if (params.hasSubParams(pos + advance)) {\n const subparams = params.getSubParams(pos + advance);\n let i = 0;\n do {\n if (accu[1] === 5) {\n cSpace = 1;\n }\n accu[advance + i + 1 + cSpace] = subparams[i];\n } while (++i < subparams.length && i + advance + 1 + cSpace < accu.length);\n break;\n }\n // exit early if can decide color mode with semicolons\n if ((accu[1] === 5 && advance + cSpace >= 2)\n || (accu[1] === 2 && advance + cSpace >= 5)) {\n break;\n }\n // offset colorSpace slot for semicolon mode\n if (accu[1]) {\n cSpace = 1;\n }\n } while (++advance + pos < params.length && advance + cSpace < accu.length);\n // set default values to 0\n for (let i = 2; i < accu.length; ++i) {\n if (accu[i] === -1) {\n accu[i] = 0;\n }\n }\n // apply colors\n switch (accu[0]) {\n case 38:\n attr.fg = this._updateAttrColor(attr.fg, accu[1], accu[3], accu[4], accu[5]);\n break;\n case 48:\n attr.bg = this._updateAttrColor(attr.bg, accu[1], accu[3], accu[4], accu[5]);\n break;\n case 58:\n attr.extended = attr.extended.clone();\n attr.extended.underlineColor = this._updateAttrColor(attr.extended.underlineColor, accu[1], accu[3], accu[4], accu[5]);\n }\n return advance;\n }", "function Color(v){\n\tvar _rgb = false;\n\tvar _hsl = false;\n\tvar _a = 0;\n\tvar self = this;\n\tfunction _checkRGB(){\n\t\tif(!_rgb){\n\t\t\t_rgb = Color.hsl2rgb(self.h, self.s, self.l);\n\t\t\tdelete _rgb.a;\n\t\t}\n\t}\n\tfunction _checkHSL(){\n\t\tif(!_hsl){\n\t\t\t_hsl = Color.rgb2hsl(self.r, self.g, self.b);\n\t\t\tdelete _hsl.a;\n\t\t}\n\t}\n\n\n\tObject.defineProperties(this, {\n\t\t\"h\" : {\n\t\t\t\"get\": function(){\n\t\t\t\t_checkHSL();\n\t\t\t\treturn _hsl.h;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tif(typeof v !== 'number') throw new TypeError(\"Not a numeric\");\n\t\t\t\t_checkHSL();\n\t\t\t\t_rgb = false;\n\t\t\t\tv = v % 360;\n\t\t\t\tif(v<0) v += 360;\n\t\t\t\t_hsl.h = v;\n\t\t\t}\n\t\t},\n\t\t\"s\" : {\n\t\t\t\"get\": function(){\n\t\t\t\t_checkHSL();\n\t\t\t\treturn _hsl.s;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tif(typeof v !== 'number') throw new TypeError(\"Not a numeric\");\n\t\t\t\t_checkHSL();\n\t\t\t\t_rgb = false;\n\t\t\t\tv = Math.max(0, Math.min(v, 100));\n\t\t\t\t_hsl.s = v;\n\t\t\t}\n\t\t},\n\t\t\"l\" : {\n\t\t\t\"get\": function(){\n\t\t\t\t_checkHSL();\n\t\t\t\treturn _hsl.l;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tif(typeof v !== 'number') throw new TypeError(\"Not a numeric\");\n\t\t\t\t_checkHSL();\n\t\t\t\t_rgb = false;\n\t\t\t\tv = Math.max(0, Math.min(v, 100));\n\t\t\t\t_hsl.l = v;\n\t\t\t}\n\t\t},\n\t\t\"r\" : {\n\t\t\t\"get\": function(){\n\t\t\t\t_checkRGB();\n\t\t\t\treturn _rgb.r;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tif(typeof v !== 'number') throw new TypeError(\"Not a numeric\");\n\t\t\t\t_checkRGB();\n\t\t\t\t_hsl = false;\n\t\t\t\tv = Math.max(0, Math.min(v, 255));\n\t\t\t\t_rgb.r = Math.round(v);\n\t\t\t}\n\t\t},\n\t\t\"g\" : {\n\t\t\t\"get\": function(){\n\t\t\t\t_checkRGB();\n\t\t\t\treturn _rgb.g;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tif(typeof v !== 'number') throw new TypeError(\"Not a numeric\");\n\t\t\t\t_checkRGB();\n\t\t\t\t_hsl = false;\n\t\t\t\tv = Math.max(0, Math.min(v, 255));\n\t\t\t\t_rgb.g = Math.round(v);\n\t\t\t}\n\t\t},\n\t\t\"b\" : {\n\t\t\t\"get\": function(){\n\t\t\t\t_checkRGB();\n\t\t\t\treturn _rgb.b;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tif(typeof v !== 'number') throw new TypeError(\"Not a numeric\");\n\t\t\t\t_checkRGB();\n\t\t\t\t_hsl = false;\n\t\t\t\tv = Math.max(0, Math.min(v, 255));\n\t\t\t\t_rgb.b = Math.round(v);\n\t\t\t}\n\t\t},\n\t\t\"a\" : {\n\t\t\t\"get\": function(){\n\t\t\t\treturn _a;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tif(typeof v !== 'number') throw new TypeError(\"Not a numeric\");\n\t\t\t\tv = Math.max(0, Math.min(v, 1));\n\t\t\t\t_a = v;\n\t\t\t}\n\t\t},\n\t\t\"r_1\": {\n\t\t\t\"get\": function(){\n\t\t\t\treturn this.r / 255;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tthis.r = v * 255;\n\t\t\t}\n\t\t},\n\t\t\"g_1\": {\n\t\t\t\"get\": function(){\n\t\t\t\treturn this.g / 255;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tthis.g = v * 255;\n\t\t\t}\n\t\t},\n\t\t\"b_1\": {\n\t\t\t\"get\": function(){\n\t\t\t\treturn this.b / 255;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tthis.b = v * 255;\n\t\t\t}\n\t\t},\n\t\t\"h_1\": {\n\t\t\t\"get\": function(){\n\t\t\t\treturn this.h / 360;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tthis.h = v * 360;\n\t\t\t}\n\t\t},\n\t\t\"s_1\": {\n\t\t\t\"get\": function(){\n\t\t\t\treturn this.s / 100;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tthis.s = v * 100;\n\t\t\t}\n\t\t},\n\t\t\"l_1\": {\n\t\t\t\"get\": function(){\n\t\t\t\treturn this.l / 100;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tthis.l = v * 100;\n\t\t\t}\n\t\t},\n\t\t\"a_1\": {\n\t\t\t\"get\": function(){\n\t\t\t\treturn this.a;\n\t\t\t},\n\t\t\t\"set\": function(v){\n\t\t\t\tthis.a = v;\n\t\t\t}\n\t\t}\n\t});\n\n\n\n\n\tif(v){\n\t\tif(typeof v == 'string'){\n\t\t\tif(v.length > 0 && v[0] == \"#\"){\n\t\t\t\t_rgb = Color.parse.hex(v, true);\n\t\t\t\t_a = _rgb && _rgb.a || 0;\n\t\t\t\tdelete _rgb.a;\n\t\t\t}else if(v.length > 4 && v.substring(0, 4) == \"hsla\"){\n\t\t\t\t_hsl = Color.parse.hsla(v, true);\n\t\t\t\t_a = _hsl && _hsl.a || 0;\n\t\t\t\tdelete _hsl.a;\n\t\t\t}else if(v.length > 4 && v.substring(0, 4) == \"rgba\"){\n\t\t\t\t_rgb = Color.parse.rgba(v, true);\n\t\t\t\t_a = _rgb && _rgb.a || 0;\n\t\t\t\tdelete _rgb.a;\n\t\t\t}else if(v.length > 3 && v.substring(0, 3) == \"hsl\"){\n\t\t\t\t_hsl = Color.parse.hsl(v, true);\n\t\t\t\t_a = _hsl && _hsl.a || 0;\n\t\t\t\tdelete _hsl.a;\n\t\t\t}else if(v.length > 4 && v.substring(0, 3) == \"rgb\"){\n\t\t\t\t_rgb = Color.parse.rgb(v, true);\n\t\t\t\t_a = _rgb && _rgb.a || 0;\n\t\t\t\tdelete _rgb.a;\n\t\t\t}else{\n\t\t\t\t_rgb = Color.byName(v, true);\n\t\t\t\t_a = _rgb && _rgb.a || 0;\n\t\t\t\tdelete _rgb.a;\n\t\t\t}\n\t\t}else{\n\t\t\tif(typeof v.r == 'number' && typeof v.g == 'number' && typeof v.b == 'number'){\n\t\t\t\t_rgb = {\n\t\t\t\t\tr: v.r,\n\t\t\t\t\tg: v.g,\n\t\t\t\t\tb: v.b,\n\t\t\t\t\ta: v.a\n\t\t\t\t};\n\t\t\t\tif(typeof v.a == 'number'){\n\t\t\t\t\t_a = Math.max(0, Math.min(1, v.a));\n\t\t\t\t}else{\n\t\t\t\t\t_a = 1;\n\t\t\t\t}\n\t\t\t}else if(typeof v.h == 'number' && typeof v.s == 'number' && typeof v.l == 'number'){\n\t\t\t\tvar hh = v.h % 360;\n\t\t\t\tif(v < 0) hh += 360;\n\t\t\t\t_hsl = {\n\t\t\t\t\th: hh,\n\t\t\t\t\ts: Math.max(0, Math.min(100, v.s)),\n\t\t\t\t\tl: Math.max(0, Math.min(100, v.l))\n\t\t\t\t}\n\n\t\t\t\tif(typeof v.a == 'number'){\n\t\t\t\t\t_a = Math.max(0, Math.min(1, v.a));\n\t\t\t\t}else{\n\t\t\t\t\t_a = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(!_hsl && !_rgb){\n\t\t_rgb = {r:0, g: 0, b:0};\n\t}\n}", "function hue2rgb( p, q, h ) {\r\nh = ( h + 1 ) % 1;\r\nif ( h * 6 < 1 ) {\r\nreturn p + (q - p) * 6 * h;\r\n}\r\nif ( h * 2 < 1) {\r\nreturn q;\r\n}\r\nif ( h * 3 < 2 ) {\r\nreturn p + (q - p) * ((2/3) - h) * 6;\r\n}\r\nreturn p;\r\n}", "function Colour(c,n){\n\t\tif(!c) return {};\n\n\t\tfunction d2h(d) { return ((d < 16) ? \"0\" : \"\")+d.toString(16);}\n\t\tfunction h2d(h) {return parseInt(h,16);}\n\t\t/**\n\t\t * Converts an RGB color value to HSV. Conversion formula\n\t\t * adapted from http://en.wikipedia.org/wiki/HSV_color_space.\n\t\t * Assumes r, g, and b are contained in the set [0, 255] and\n\t\t * returns h, s, and v in the set [0, 1].\n\t\t *\n\t\t * @param\tNumber r\t\t The red color value\n\t\t * @param\tNumber g\t\t The green color value\n\t\t * @param\tNumber b\t\t The blue color value\n\t\t * @return Array\t\t\t The HSV representation\n\t\t */\n\t\tfunction rgb2hsv(r, g, b){\n\t\t\tr = r/255;\n\t\t\tg = g/255;\n\t\t\tb = b/255;\n\t\t\tvar max = Math.max(r, g, b), min = Math.min(r, g, b);\n\t\t\tvar h, s, v = max;\n\t\t\tvar d = max - min;\n\t\t\ts = max == 0 ? 0 : d / max;\n\t\t\tif(max == min) h = 0; // achromatic\n\t\t\telse{\n\t\t\t\tswitch(max){\n\t\t\t\t\tcase r: h = (g - b) / d + (g < b ? 6 : 0); break;\n\t\t\t\t\tcase g: h = (b - r) / d + 2; break;\n\t\t\t\t\tcase b: h = (r - g) / d + 4; break;\n\t\t\t\t}\n\t\t\t\th /= 6;\n\t\t\t}\n\t\t\treturn [h, s, v];\n\t\t}\n\n\t\tthis.alpha = 1;\n\n\t\t// Let's deal with a variety of input\n\t\tif(c.indexOf('#')==0){\n\t\t\tthis.hex = c;\n\t\t\tthis.rgb = [h2d(c.substring(1,3)),h2d(c.substring(3,5)),h2d(c.substring(5,7))];\n\t\t}else if(c.indexOf('rgb')==0){\n\t\t\tvar bits = c.match(/[0-9\\.]+/g);\n\t\t\tif(bits.length == 4) this.alpha = parseFloat(bits[3]);\n\t\t\tthis.rgb = [parseInt(bits[0]),parseInt(bits[1]),parseInt(bits[2])];\n\t\t\tthis.hex = \"#\"+d2h(this.rgb[0])+d2h(this.rgb[1])+d2h(this.rgb[2]);\n\t\t}else return {};\n\t\tthis.hsv = rgb2hsv(this.rgb[0],this.rgb[1],this.rgb[2]);\n\t\tthis.name = (n || \"Name\");\n\t\tvar r,sat;\n\t\tfor(r = 0, sat = 0; r < this.rgb.length ; r++){\n\t\t\tif(this.rgb[r] > 200) sat++;\n\t\t}\n\t\tthis.text = (this.rgb[0] + this.rgb[1] + this.rgb[2] > 500 || sat > 1) ? \"black\" : \"white\";\n\t\treturn this;\n\t}", "function color(grey){\n return {r:grey, g:grey, b:grey};\n}", "function Colour(rgb) {\n this.rgb = rgb;\n}", "function getColor(num){\n if (num>4) {\n return \"white\";\n } else {\n return \"#776e65\";\n }\n }", "function color2state(c){\r\n return c==0xFF0000?1:(c==0x0000FF?2:0);\r\n}", "function hsl2rgb(h,m1,m2){return(h<60?m1+(m2-m1)*h/60:h<180?m2:h<240?m1+(m2-m1)*(240-h)/60:m1)*255;}", "function hsl2rgb(h,m1,m2){return(h<60?m1+(m2-m1)*h/60:h<180?m2:h<240?m1+(m2-m1)*(240-h)/60:m1)*255;}", "constructor(...args) {\n this.r = 0;\n this.g = 0;\n this.b = 0;\n this.a = 255;\n /* Handle Color([...]) -> Color(...) */\n if (args.length == 1 && args[0] instanceof Array) {\n args = args[0];\n }\n if (args.length == 1) {\n /* Handle Color(Color) and Color(\"string\") */\n let arg = args[0];\n if (arg instanceof Color) {\n [this.r, this.g, this.b, this.a] = [arg.r, arg.g, arg.b, arg.a];\n this.scale = arg.scale;\n } else if (typeof(arg) == \"string\" || arg instanceof String) {\n let [r, g, b, a] = ColorParser.parse(arg);\n [this.r, this.g, this.b, this.a] = [r, g, b, a];\n } else {\n throw new TypeError(`Invalid argument \"${arg}\" to Color()`);\n }\n } else if (args.length >= 3 && args.length <= 4) {\n /* Handle Color(r, g, b) and Color(r, g, b, a) */\n [this.r, this.g, this.b] = args;\n if (args.length == 4) this.a = args[3];\n } else if (args.length > 0) {\n throw new TypeError(`Invalid arguments \"${args}\" to Color()`);\n }\n }", "getHexColorValue() {\n let hexRepresentation = _.map(_.slice(this.props.value, 0, 3), (val)=>{\n let hexVal = val.toString(16);\n return hexVal.length === 1 ? '0' + hexVal : hexVal;\n }).join('');\n return '#' + hexRepresentation;\n }", "get ASTC_RGB_6x6() {}", "function css__RGBCOLOR_ques_(cssPrimitiveType) /* (cssPrimitiveType : cssPrimitiveType) -> bool */ {\n return (cssPrimitiveType === 26);\n}", "function cssColor(color) {\r\n if (!color) {\r\n return undefined;\r\n }\r\n return _named(color) || _hex3(color) || _hex6(color) || _rgba(color) || _hsla(color);\r\n}", "function changeColorScheme() {\n\n}", "function hexc(colorval) {\n var parts = colorval.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n delete(parts[0]);\n for (var i = 1; i <= 3; ++i) {\n parts[i] = parseInt(parts[i]).toString(16);\n if (parts[i].length == 1) parts[i] = '0' + parts[i];\n }\n color = '#' + parts.join('');\n }", "function createColor(src) {\n\t\t// strip the leading #, if it exists\n\t\tsrc = src.replace(/^#/, '');\n\t\t// if it's shorthand, expand the values\n\t\tif (src.length == 3) {\n\t\t\tsrc = src.replace(/(.)/g, '$1$1');\n\t\t}\n\t\treturn src;\n\t}", "createColors(color, num) {\n //receive hex color from parent, return array of colors for gradient\n //num is # of generated color in return array\n let a = []\n let red = parseInt( color.substring(1, 3), 16)\n let green = parseInt(color.substring(3, 5), 16)\n let blue = parseInt(color.substring(5,7), 16)\n \n let k = 0.8 \n //from lighter colder to darker warmer\n // console.log(red, green, blue)\n for (i=0;i<num;i++) {\n let new_red = (Math.floor(red*k)).toString(16)\n let new_green = (Math.floor(green*k)).toString(16)\n let new_blue = (Math.floor(blue*k)).toString(16)\n let new_color = '#'+new_red+new_green+new_blue\n k += 0.1\n a.push(new_color)\n }\n return a\n\n }", "function getColorsModules() {\n return [{\n // The module that recognizes colors\n name: \"Colors\",\n precedence: 1,\n kernel: function(value) {\n var colors = matchColors(value);\n if (colors == null) {\n return false;\n }\n // Construct some 'div's\n var ret = \"\",\n width = principal,\n height = principal;\n $$.each(colors, function(color, ix) {\n ret += makeSwatch(color, width, height) + \" \";\n });\n return ret;\n }\n },{\n // The module that recognizes color ranges\n name: \"ColorRanges\",\n precedence: 1,\n kernel: function(value) {\n var colors = matchColorRange(value);\n if (colors == null) {\n return false;\n }\n if (colors.length == 2) {\n // Construct a fade from one color to the other\n var ret = \"\",\n width = 2,\n height = principal,\n a = color2Rgb(colors[0]),\n b = color2Rgb(colors[1]),\n nSteps = 200;\n // Convert 'a' and 'b' to a common base\n var maxBase = Math.max(a.base, b.base);\n a = rgbScaleBase(a, maxBase);\n b = rgbScaleBase(b, maxBase);\n // Calculate a delta color\n var delta = {\n r: (b.r - a.r) / nSteps,\n g: (b.g - a.g) / nSteps,\n b: (b.b - a.b) / nSteps\n };\n ret += colors[0] + \"&nbsp;\";\n for (var i = 0; i <= nSteps; ++i) {\n var color = rgb2Hex({\n r: a.r + i * delta.r,\n g: a.g + i * delta.g,\n b: a.b + i * delta.b,\n base: maxBase\n });\n ret += '<div style=\"width: ' + width + 'px; height: ' + height + 'px; background-color: ' + color + '; '\n + 'display: inline-block; padding: 0px;\" '\n + 'onmouseover=\"rangeMouseOver(\\'' + color + '\\')\" '\n // + (i == 0 || i == nSteps ? 'onmouseout=\"$(\\'#rangeMouseOver\\').empty();\" ' : '')\n + '></div>';\n }\n ret += \"&nbsp;\" + colors[1]\n + '<br />'\n + '<div id=\"rangeMouseOver\"></div>';\n return ret;\n } else {\n return false;\n }\n }\n }];\n}", "set ASTC_RGB_6x6(value) {}", "get ASTC_RGB_5x5() {}", "function determine_color(num) {\n if (num === 0) {\n return \"beige\";\n } else if (num === 2) {\n return \"beige\";\n } else if (num === 4) {\n return \"yellow\";\n } else if (num === 8) {\n return \"#f4b042\";\n } else if (num === 16) {\n return \"#f48641\";\n } else if (num === 32) {\n return \"#f45241\";\n } else if (num === 64) {\n return \"#ff1800\";\n } else if (num === 128) {\n return \"#ff00b2\";\n } else {\n return \"black\";\n }\n}", "function readColor(){\n var color=$('div#output1').css(\"background-color\");\n\tvar patt=/([0-9]+), ([0-9]+), ([0-9]+)/;\n\tcolor=patt.exec(color);\n\tred=Number(color[1]);\n\tgreen=Number(color[2]);\n\tblue=Number(color[3]);\n\t//read others\n\thsv=rgbToHsv(red,green,blue);\n\thsl=rgbToHsl(red,green,blue);\n\tcmyk=rgbToCmyk(red,green,blue);\n\t}", "colorHash (hash) {\n\t while(hash > 360) hash -= 360;\n\t return `hsl(${hash}, 100%, 50%)`;\n\t }", "function colorValues(color) {\n\tif (color === '') return;\n\tif (color.toLowerCase() === 'transparent') return [ 0, 0, 0, 0 ];\n\tif (color[0] === '#') {\n\t\tif (color.length < 7) {\n\t\t\tcolor =\n\t\t\t\t'#' +\n\t\t\t\tcolor[1] +\n\t\t\t\tcolor[1] +\n\t\t\t\tcolor[2] +\n\t\t\t\tcolor[2] +\n\t\t\t\tcolor[3] +\n\t\t\t\tcolor[3] +\n\t\t\t\t(color.length > 4 ? color[4] + color[4] : '');\n\t\t}\n\t\treturn [\n\t\t\tparseInt(color.substr(1, 2), 16),\n\t\t\tparseInt(color.substr(3, 2), 16),\n\t\t\tparseInt(color.substr(5, 2), 16),\n\t\t\tcolor.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1\n\t\t];\n\t}\n\tif (color.indexOf('rgb') === -1) {\n\t\t// convert named colors\n\t\tvar temp_elem = document.body.appendChild(document.createElement('fictum')); // intentionally use unknown tag to lower chances of css rule override with !important\n\t\tvar flag = 'rgb(1, 2, 3)'; // this flag tested on chrome 59, ff 53, ie9, ie10, ie11, edge 14\n\t\ttemp_elem.style.color = flag;\n\t\tif (temp_elem.style.color !== flag) return; // color set failed - some monstrous css rule is probably taking over the color of our object\n\t\ttemp_elem.style.color = color;\n\t\tif (temp_elem.style.color === flag || temp_elem.style.color === '') return; // color parse failed\n\t\tcolor = getComputedStyle(temp_elem).color;\n\t\tdocument.body.removeChild(temp_elem);\n\t}\n\tif (color.indexOf('rgb') === 0) {\n\t\tif (color.indexOf('rgba') === -1) color += ',1'; // convert 'rgb(R,G,B)' to 'rgb(R,G,B)A' which looks awful but will pass the regxep below\n\t\treturn color.match(/[\\.\\d]+/g).map(function(a) {\n\t\t\treturn +a;\n\t\t});\n\t}\n}", "getDefaultColor() {\n return [0.69921875, 0.69921875, 0.69921875];\n }", "get_hslColor() {\n return this.liveFunc._hslColor;\n }", "set ETC_RGB4(value) {}", "function Color(x, y, z, m) {\n var me, _ref2;\n me = this;\n if (!(x != null) && !(y != null) && !(z != null) && !(m != null)) {\n x = [255, 0, 255];\n }\n if (type(x) === \"array\" && x.length === 3) {\n if (m == null) m = y;\n _ref2 = x, x = _ref2[0], y = _ref2[1], z = _ref2[2];\n }\n if (type(x) === \"string\") {\n m = 'hex';\n } else {\n if (m == null) m = 'rgb';\n }\n if (m === 'rgb') {\n me.rgb = [x, y, z];\n } else if (m === 'hsl') {\n me.rgb = Color.hsl2rgb(x, y, z);\n } else if (m === 'hsv') {\n me.rgb = Color.hsv2rgb(x, y, z);\n } else if (m === 'hex') {\n me.rgb = Color.hex2rgb(x);\n } else if (m === 'lab') {\n me.rgb = Color.lab2rgb(x, y, z);\n } else if (m === 'hcl') {\n me.rgb = Color.hcl2rgb(x, y, z);\n } else if (m === 'hsi') {\n me.rgb = Color.hsi2rgb(x, y, z);\n }\n }", "function Color(r, g, b) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n /*\r\n this.rgb = function () {\r\n const { r, g, b } = this;\r\n return `rgb(${r}, ${g}, ${b})`;\r\n }; // gets added to object not prototype\r\n */\r\n}", "function hsl2rgb(h,m1,m2){return(h<60?m1+(m2-m1)*h/60:h<180?m2:h<240?m1+(m2-m1)*(240-h)/60:m1)*255}", "function Color3(r,g,b){if(r===void 0){r=0;}if(g===void 0){g=0;}if(b===void 0){b=0;}this.r=r;this.g=g;this.b=b;}", "function getColor(num){\r\n\t\t\r\n\t\t//using logarithm to smooth color shading\r\n\t\tvar colorMultiple = (num == 0) ? 0 : parseInt(Math.ceil(Math.log(num * 10)));\r\n\r\n\t\tvar r = 250;\r\n\t\tvar g = 250;\r\n\t\tvar b = 250;\r\n\t\t \r\n\t\tif(num == 99999){\r\n\t\t\treturn shade(85, 85, 85);\r\n\t\t}\r\n\t\t\r\n\t\tif(colorMultiple == 0){\r\n\t\t\treturn shade(r-40, g-40, b-40);\r\n\t\t}\r\n\t\t\r\n\t\tif(num < 32)\r\n\t\t\treturn shade(r, g - (20 * colorMultiple), b - (35 * colorMultiple));\r\n\t\t\r\n\t\tif(num < 1024)\r\n\t\t\treturn shade(r - (10 * colorMultiple), g - (20 * colorMultiple), b);\r\n\r\n\t\tfunction shade(r, g, b){\r\n\t\t\treturn \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\r\n\t\t}\r\n\t\t\r\n\t}", "static get INACTIVE_COLOR() { return [128, 128, 128, 100]; }", "function colorConverter (string) {\n \n// todo: study the Object.freeze \n const colorCodes = Object.freeze({\n \"blue\":\"rgb(40, 116, 237)\",\n \"brown\":\"rgb(255, 102, 102)\",\n \"brownish-red\":\"rgb(196, 136, 124)\",\n \"coral\":\"rgb(255, 102, 102)\",\n \"cream\":\"rgb(240, 237, 218)\",\n \"creamyWhite\":\"rgb(255, 253, 230)\",\n \"darkBlue\":\"rgb(0, 0, 153)\",\n \"darkPink\":\"rgb(255, 102, 153)\",\n \"darkPurple\":\"rgb(103, 0, 103)\",\n \"deepGreen\":\"rgb(0, 102, 0)\",\n \"deepPink\":\"rgb(212, 30, 90)\",\n \"emeraldGreen\":\"rgb(38, 115, 38)\",\n \"gold\":\"rgb(217, 195, 33)\",//stopped here, finish adding colors\n \"green\":\"rgb(50, 133, 59)\",\n \"greenish-white\":\"rgb(217, 242, 217)\",\n \"greenish-yellow\":\"rgb(230, 255, 179)\",\n \"indigoBlue\":\"rgb(74, 51, 222)\",\n \"lavender\":\"rgb(150, 153, 255)\",\n \"lightBlue\":\"rgb(179, 218, 255)\",\n \"lightGreen\":\"rgb(204, 255, 204)\",\n \"lightPink\":\"rgb(255, 204, 225)\",\n \"lilac\":\"rgb(230, 204, 255)\",\n \"magenta\":\"rgb(255, 0, 255)\",\n \"peach\":\"rgb(253, 217, 181)\",\n \"pink\":\"rgb(255, 102, 153)\",\n \"pinkish-lavender\":\"rgb(242, 211, 227)\",\n// \"purple and yellow\":\"rgba(0,100,0,0.75)\",//todo: need code instead of dark green\n \"purpleRed\":\"rgb(192, 0, 64)\",\n \"purplish-pink\":\"rgb(192, 96, 166)\",\n \"rose\":\"rgb(255, 153, 204)\",\n \"violet\":\"rgb(230, 130, 255)\",\n \"whiteAndPurple\":\"rgb(240, 240, 240)\",//todo: need code instead of dark green\n \"yellowish-green\":\"rgb(198, 210, 98)\", \n \"yellowCenter\":\"rgb(200, 200, 0)\"\n });\n \n //remove i_ (used to make inconspicuous) that might be in a name\n \n\t//if an rgb code is sent, return the color name\n if (string.slice(0,3) === \"rgb\") {\n for(let key in colorCodes) {\n if(colorCodes[key] === string) {\n return key;\n }\n }\n }\n //if a color name that needs to be converted is sent, return rgb\n else if (string in (colorCodes)) {\n return colorCodes[string];\n }\n //otherwise return a color name in camel case when needed\n //this is used when the color isn't listed in colorCodes, but\n //its name is valid as is or if converted to camel case notation\n else {\n return camelCase(string);\n }\n \n}", "function parseHex(hex) {\n var length = hex.length;\n if (length === 0) {\n // Invalid color\n return null;\n }\n if (hex.charCodeAt(0) !== 35 /* Hash */) {\n // Does not begin with a #\n return null;\n }\n if (length === 7) {\n // #RRGGBB format\n var r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));\n var g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));\n var b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));\n return new Color(new RGBA(r, g, b, 1));\n }\n if (length === 9) {\n // #RRGGBBAA format\n var r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));\n var g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));\n var b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));\n var a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8));\n return new Color(new RGBA(r, g, b, a / 255));\n }\n if (length === 4) {\n // #RGB format\n var r = _parseHexDigit(hex.charCodeAt(1));\n var g = _parseHexDigit(hex.charCodeAt(2));\n var b = _parseHexDigit(hex.charCodeAt(3));\n return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b));\n }\n if (length === 5) {\n // #RGBA format\n var r = _parseHexDigit(hex.charCodeAt(1));\n var g = _parseHexDigit(hex.charCodeAt(2));\n var b = _parseHexDigit(hex.charCodeAt(3));\n var a = _parseHexDigit(hex.charCodeAt(4));\n return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255));\n }\n // Invalid color\n return null;\n }", "function normalizeColor(color) {\n var match;\n\n if (typeof color === 'number') {\n return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;\n } // Ordered based on occurrences on Facebook codebase\n\n\n if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;\n if (colors.hasOwnProperty(color)) return colors[color];\n\n if (match = rgb.exec(color)) {\n return (parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n 0x000000ff) >>> // a\n 0;\n }\n\n if (match = rgba.exec(color)) {\n return (parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n parse1(match[4])) >>> // a\n 0;\n }\n\n if (match = hex3.exec(color)) {\n return parseInt(match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n 'ff', // a\n 16) >>> 0;\n } // https://drafts.csswg.org/css-color-4/#hex-notation\n\n\n if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;\n\n if (match = hex4.exec(color)) {\n return parseInt(match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n match[4] + match[4], // a\n 16) >>> 0;\n }\n\n if (match = hsl.exec(color)) {\n return (hslToRgb(parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) | 0x000000ff) >>> // a\n 0;\n }\n\n if (match = hsla.exec(color)) {\n return (hslToRgb(parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) | parse1(match[4])) >>> // a\n 0;\n }\n\n return null;\n}", "function gnomeColor(color) {\n\t\t\t\treturn color.toString().replace(/#(.{2})(.{2})(.{2})/, '#$1$1$2$2$3$3');\n\t\t\t}", "function gnomeColor(color) {\n\t\t\t\treturn color.toString().replace(/#(.{2})(.{2})(.{2})/, '#$1$1$2$2$3$3');\n\t\t\t}", "get rgb_1() {\n let c = new Color(this.r, this.g, this.b);\n return [c.r / 255, c.g / 255, c.b / 255];\n }", "function RGBToCssColor(rgba, format) {\n if(rgba.length == 3) rgba = [rgba[0], rgba[1], rgba[2], 255];\n if(!format) format = rgba[3] == 255 ? CSS_FORMAT_HEX6 : CSS_FORMAT_RGBA;\n\n if(format == CSS_FORMAT_HEX3) {\n var r = Number(Math.floor(rgba[0] / 16)).toString(16);\n var g = Number(Math.floor(rgba[1] / 16)).toString(16);\n var b = Number(Math.floor(rgba[2] / 16)).toString(16);\n return '#' + r + g + b;\n }\n else if(format == CSS_FORMAT_HEX6) {\n function toTwoHexDigits(number) {\n return (number < 16 ? '0' : '') + Number(Math.floor(number)).toString(16);\n }\n\n var r = toTwoHexDigits(rgba[0]);\n var g = toTwoHexDigits(rgba[1]);\n var b = toTwoHexDigits(rgba[2]);\n return '#' + r + g + b;\n }\n else if(format == CSS_FORMAT_RGB) {\n var r = Number(Math.floor(rgba[0])).toString(10);\n var g = Number(Math.floor(rgba[1])).toString(10);\n var b = Number(Math.floor(rgba[2])).toString(10);\n return 'rgb(' + r + ',' + g + ',' + b + ')';\n }\n else if(format == CSS_FORMAT_RGBA) {\n // Does not work in IE pre 9\n var r = Number(Math.floor(rgba[0])).toString(10);\n var g = Number(Math.floor(rgba[1])).toString(10);\n var b = Number(Math.floor(rgba[2])).toString(10);\n var a = Number(rgba[3] / 255).toString(10);\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n }\n return '#000'; //unknown\n}", "function wallColorizer() {\n return 'rgb(150,150,150)';\n}", "function Color3(\n /**\n * Defines the red component (between 0 and 1, default is 0)\n */\n r, \n /**\n * Defines the green component (between 0 and 1, default is 0)\n */\n g, \n /**\n * Defines the blue component (between 0 and 1, default is 0)\n */\n b) {\n if (r === void 0) { r = 0; }\n if (g === void 0) { g = 0; }\n if (b === void 0) { b = 0; }\n this.r = r;\n this.g = g;\n this.b = b;\n }", "function dopolnitCol(hex) {\r\nvar a = hex.split(\"(\")[1].split(\")\")[0];\r\na = a.split(\",\");\r\nreturn \"rgb(\"+(255-Number(a[0])).toString()+\", \"+(255-Number(a[1])).toString()+\", \"+(255-Number(a[2])).toString()+\")\"\r\n}", "function color() {\n\tvar alpha = 0,\n\t\t s = 1,\n\t\t v = 1,\n\t\t c, h, x, r1, g1, b1, m,\n\t\t red, blue, green;\n\thue %= 360;\n\th = hue / 60;\n\tif (hue < 0) {\n\t hue += 360;\n\t}\n\tc = v * s;\n\th = hue / 60;\n\tx = c * (1 - Math.abs(h % 2 - 1));\n\tm = v - c;\n\tswitch (Math.floor(h)) {\n\t\tcase 0: r1 = c; g1 = x; b1 = 0; break;\n\t\tcase 1: r1 = x; g1 = c; b1 = 0; break;\n\t\tcase 2: r1 = 0; g1 = c; b1 = x; break;\n\t\t/*case 3: r1 = 0; g1 = x; b1 = c; break;\n\t\tcase 4: r1 = x; g1 = 0; b1 = c; break;\n\t\tcase 5: r1 = c; g1 = 0; b1 = x; break;*/\n\t}\n\tred = Math.floor((r1 + m) * 255);\n\tgreen = Math.floor((g1 + m) * 255);\n\tblue = Math.floor((b1 + m) * 255);\n\n // $(\".flashing-banner\").css('backgroundColor', 'rgba(' + red + ',' + green + ',' + blue + ',' + 1 + ')'); // commented on 21.10.17\n hue++;\n}", "getColor(value) {\n // Test Max\n if (value === 255) {\n console.log(\"MAX!\");\n }\n let percent = (value) / 255 * 50;\n // return 'rgb(V, V, V)'.replace(/V/g, 255 - value);\n return 'hsl(H, 100%, P%)'.replace(/H/g, 255 - value).replace(/P/g, percent);\n }", "function GetColorList() {\n // return ['#4e73df', '#1cc88a', '#36b9cc', '#e74a3b', '#e67e22', '#f6c23e', '#9b59b6', '#1abc9c', '#2ecc71', '#3498db'];\n return ['#1abc9c', '#2ecc71', '#3498db', '#9b59b6', '#34495e', '#16a085', '#27ae60', '#2980b9', '#8e44ad', '#2c3e50'];\n}", "function getRGB(color) {\n var result;\n\n // Check if we're already dealing with an array of colors\n if (color && color.constructor == Array && color.length == 3) return color;\n\n // Look for rgb(num,num,num)\n result = /rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.exec(color);\n if (result) {\n return [parseInt(result[1], 10), parseInt(result[2], 10), parseInt(result[3], 10)];\n }\n\n // Look for rgb(num%,num%,num%)\n result = /rgb\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.exec(color);\n if (result) {\n return [parseFloat(result[1]) * 2.55, parseFloat(result[2]) * 2.55, parseFloat(result[3]) * 2.55];\n }\n\n // Look for #a0b1c2\n result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color);\n if (result) {\n return [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)];\n }\n\n // Look for #fff\n result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color);\n if (result) {\n return [parseInt(result[1] + result[1], 16), parseInt(result[2] + result[2], 16), parseInt(result[3] + result[3], 16)];\n }\n\n // Look for rgba(0, 0, 0, 0) == transparent in Safari 3\n result = /rgba\\(0, 0, 0, 0\\)/.exec(color);\n if (result) {\n return colors['transparent'];\n }\n\n // Otherwise, we're most likely dealing with a named color\n return colors[color.toLowerCase()];\n }", "function color_rgb(color){\n return function (obj){\n if(color[3] === undefined)\n return COLOR([color[0]/255.0, color[1]/255.0, color[2]/255.0])(obj);\n else\n return COLOR([color[0]/255.0, color[1]/255.0, color[2]/255.0, color[3]])(obj);\n }\n }", "function getColor(value) {\n // More votes for republican, show red\n var red = 0;\n var blue = 0;\n var green = 0;\n if (value > 1) {\n var trimmed_value = Math.min(value, 3);\n red = 255;\n blue = Math.round((1 - trimmed_value / 3) * 255);\n green = Math.round((1 - trimmed_value / 3) * 255);\n trimmed_value = null;\n } else if (value == 1) {\n return \"#FFFFFF\";\n } else if (value < 1) {\n var trimmed_value = 1 / value;\n trimmed_value = Math.min(trimmed_value, 3);\n blue = 255;\n red = Math.round((1 - trimmed_value / 3) * 255);\n green = Math.round((1 - trimmed_value / 3) * 255);\n trimmed_value = null;\n }\n var second = red % 16;\n var first = (red - second) / 16;\n var fourth = green % 16;\n var third = (green - fourth) / 16;\n var sixth = blue % 16;\n var fifth = (blue - sixth) / 16;\n return (\"#\" + first.toString(16) + second.toString(16) + third.toString(16) + fourth.toString(16) + fifth.toString(16) + sixth.toString(16));\n }", "greener(){\n\t\tthis.multiplyColorValue(\"green\", 1.2);\n\t}", "set ETC2_RGB4(value) {}", "get dryColor() {}", "get ASTC_RGB_10x10() {}", "get healthyColor() {}", "static get color() {\n\t\treturn colorNames;\n\t}" ]
[ "0.7089194", "0.7050894", "0.70180076", "0.6918326", "0.69088155", "0.6865348", "0.6787769", "0.6779162", "0.67433536", "0.6725297", "0.6723463", "0.6701248", "0.66937774", "0.66653216", "0.6639698", "0.66359454", "0.66359454", "0.66359454", "0.66295534", "0.66295534", "0.66287106", "0.6618026", "0.6614506", "0.65917146", "0.658532", "0.65702724", "0.65563595", "0.65563595", "0.6555741", "0.6555741", "0.6555741", "0.6552157", "0.65302384", "0.6515924", "0.65086436", "0.64875466", "0.64718974", "0.64665157", "0.64646965", "0.6463476", "0.6453733", "0.64506394", "0.64426553", "0.64422894", "0.64113957", "0.639741", "0.63827413", "0.6382041", "0.6380963", "0.6377555", "0.63751745", "0.63683444", "0.6367581", "0.6367581", "0.63674057", "0.63633066", "0.6359621", "0.635605", "0.63457316", "0.63450307", "0.63441974", "0.63359034", "0.6335805", "0.63338476", "0.6332877", "0.63291955", "0.6326122", "0.6323771", "0.63199025", "0.63127494", "0.6311966", "0.6305204", "0.62956923", "0.6295575", "0.62938654", "0.62923115", "0.6291263", "0.6290391", "0.62855196", "0.6279686", "0.6278451", "0.62773657", "0.62711215", "0.62711215", "0.62688094", "0.62668353", "0.62659466", "0.6262282", "0.6261195", "0.6260489", "0.6258581", "0.62579054", "0.62574023", "0.6250392", "0.6248001", "0.62431544", "0.6242424", "0.62392044", "0.6238418", "0.62333244", "0.6224637" ]
0.0
-1
p0 = [ux0, uy0, w0] p1 = [ux1, uy1, w1]
function zoom(p0, p1) { var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S; // Special case for u0 ≅ u1. if (d2 < epsilon2) { S = Math.log(w1 / w0) / rho; i = function(t) { return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S) ]; }; } // General case. else { var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); S = (r1 - r0) / rho; i = function(t) { var s = t * S, coshr0 = cosh(r0), u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0) ]; }; } i.duration = S * 1000; return i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pu(a,b){this.$h=[];this.vo=a;this.ym=b||null;this.Af=this.re=!1;this.Jc=void 0;this.jl=this.wq=this.Pi=!1;this.oi=0;this.L=null;this.Si=0}", "function mul( p0, p1 ) {\n return {x: p0.x * p1.x, y: p0.y * p1.y};\n}", "function ip(v0, v1){\r\n return v0.x*v1.x+v0.y*v1.y+v0.z*v1.z;\r\n}", "Pistol() {\n src1 = 0;\n var values = [src1,pistol_snd];\n return values;\n }", "create(cp0, cp1, cp2, cp3) {\n\n const cp = this.cp;\n\n cp[0] = new PVector();\n cp[0].x = cp0.x;\n cp[0].y = cp0.y;\n\n\n cp[1] = new PVector();\n cp[1].x = cp1.x;\n cp[1].y = cp1.y;\n\n cp[2] = new PVector();\n cp[2].x = cp2.x;\n cp[2].y = cp2.y;\n\n cp[3] = new PVector();\n cp[3].x = cp3.x;\n cp[3].y = cp3.y;\n\n\n }", "function x(p1, p1) {}", "function weight(w, p0, p1, p2, p3) {\n return {\n x: w[0] * p0.left + w[1] * p1.left + w[2] * p2.left + w[3] * p3.left,\n y: w[0] * p0.top + w[1] * p1.top + w[2] * p2.top + w[3] * p3.top\n };\n }", "function _default(p0, p1) {\n var ux0 = p0[0],\n uy0 = p0[1],\n w0 = p0[2],\n ux1 = p1[0],\n uy1 = p1[1],\n w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S; // Special case for u0 ≅ u1.\n\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n\n i = function (t) {\n return [ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S)];\n };\n } // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n\n i = function (t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0)];\n };\n }\n\n i.duration = S * 1000;\n return i;\n}", "function _default(p0, p1) {\n var ux0 = p0[0],\n uy0 = p0[1],\n w0 = p0[2],\n ux1 = p1[0],\n uy1 = p1[1],\n w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S; // Special case for u0 ≅ u1.\n\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n\n i = function (t) {\n return [ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S)];\n };\n } // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n\n i = function (t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0)];\n };\n }\n\n i.duration = S * 1000;\n return i;\n}", "function _default(p0, p1) {\n var ux0 = p0[0],\n uy0 = p0[1],\n w0 = p0[2],\n ux1 = p1[0],\n uy1 = p1[1],\n w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S; // Special case for u0 ≅ u1.\n\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n\n i = function (t) {\n return [ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S)];\n };\n } // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n\n i = function (t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0)];\n };\n }\n\n i.duration = S * 1000;\n return i;\n}", "function _default(p0, p1) {\n var ux0 = p0[0],\n uy0 = p0[1],\n w0 = p0[2],\n ux1 = p1[0],\n uy1 = p1[1],\n w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S; // Special case for u0 ≅ u1.\n\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n\n i = function (t) {\n return [ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S)];\n };\n } // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n\n i = function (t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0)];\n };\n }\n\n i.duration = S * 1000;\n return i;\n}", "function weight(w, p0, p1, p2, p3) {\n return {\n x: w[0] * p0.left + w[1] * p1.left + w[2] * p2.left + w[3] * p3.left,\n y: w[0] * p0.top + w[1] * p1.top + w[2] * p2.top + w[3] * p3.top\n };\n }", "if(lineFirst[2]){ d = d2; p0 = tri.p0; p1 = tri.p2; }", "function _default(p0, p1) {\n var ux0 = p0[0],\n uy0 = p0[1],\n w0 = p0[2],\n ux1 = p1[0],\n uy1 = p1[1],\n w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S; // Special case for u0 ≅ u1.\n\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n\n i = function i(t) {\n return [ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S)];\n };\n } // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n\n i = function i(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0)];\n };\n }\n\n i.duration = S * 1000;\n return i;\n}", "function add( p0, p1 ) {\n return {x: p0.x + p1.x, y: p0.y + p1.y};\n}", "function interpolate (arr0, arr1, p) {\n var q = 1 - p;\n return [q * arr0[0] + p * arr1[0], q * arr0[1] + p * arr1[1], q * arr0[2] + p * arr1[2]];\n }", "function pv2(p, a, b) {\n return Math.min(a, b) + Math.abs(a - b) * p;\n}", "set(p, gb, p1p, p2p) {\n this._phase = p;\n // clone this._board\n for (let x = 0; x < 6; x++) {\n for (let y = 0; y < 6; y++) {\n this._board[x][y] = gb[x][y];\n }\n }\n // clone player pieces\n for (let i = 0; i < 6; i++) {\n this._player_1_pieces[i] = p1p[i];\n this._player_2_pieces[i] = p2p[i];\n }\n }", "conjectureP2(x, y) {\n return 0;\n }", "if(lineFirst[1]){ d = d1; p0 = tri.n; p1 = tri.n2; }", "VertexInterp(p1, p2){\n\n var ret = [];\n\n ret[0] = (p1[0]+ p2[0])/2\n ret[1] = (p1[1]+p2[1])/2\n ret[2] = (p1[2]+p2[2])/2\n\n return ret;\n}", "function jc(a,b){this.Uk=[];this.Wq=a;this.yp=b||null}", "function onSameSide(p1=[0,0], p2=[0,0], p3=[0,0], p4=[0,0]) {\n if (p1[0] === p2[0]) {\n let m = p3[0] - p1[0];\n let n = p4[0] - p1[0];\n if (m * n === 0) {\n return 0;\n }\n return m * n > 0 ? 1: -1;\n }\n let k = (p2[1] - p1[1]) / (p2[0] - p1[0]);\n let b0 = p2[1] - k * p2[0];\n let b1 = p3[1] - k * p3[0];\n let b2 = p4[1] - k * p4[0];\n let p = b1 - b0;\n let q = b2 - b0;\n if (p * q === 0) {\n return 0;\n } else {\n return p * q > 0 ? 1 : -1;\n }\n}", "function rotpoints2d(p,pr,ang,np) {\n\tvar i;\n\tvar fs=Math.sin(ang);\n\tvar fc=Math.cos(ang);\n\tfor (i=0;i<np;++i) {\n\t\tpr[i].x = fc*p[i].x - fs*p[i].y;\n\t\tpr[i].y = fc*p[i].y + fs*p[i].x;\n\t}\n}", "function pertenceConjunto(p1x, p1y, p1w, p1h, p2x, p2y){\n /*compara os pontos*/\n if(((p1x <= p2x) && (p1y <= p2y)) \n && ((p1w >= p2x) && (p1h >= p2y))\n ){\n return true;\n }\n return false\n }", "function getDxyAt1(ps) {\n if (ps.length === 4) {\n let [, , [x2, y2], [x3, y3]] = ps;\n return [\n 3 * (x3 - x2),\n 3 * (y3 - y2),\n ]; // max bitlength increase 3\n }\n else if (ps.length === 3) {\n let [, [x1, y1], [x2, y2]] = ps;\n return [\n 2 * (x2 - x1),\n 2 * (y2 - y1),\n ]; // max bitlength increase 2\n }\n else if (ps.length === 2) {\n let [[x0, y0], [x1, y1]] = ps;\n return [\n x1 - x0,\n y1 - y0\n ]; // max bitlength increase 1\n }\n}", "function P2(a,b){this.r=[];this.M=a;this.I=b||null;this.j=this.a=!1;this.g=void 0;this.G=this.Dm=this.D=!1;this.B=0;this.b=null;this.k=0;this.H=null;if(Error.captureStackTrace){var c={stack:f};Error.captureStackTrace(c,P2);typeof c.stack==CJ&&(this.H=c.stack.replace(/^[^\\n]*\\n/,f))}}", "function interpolatePairs( _ps, t1, t2 ) {\n var pn = [];\n for (var i=0; i<_ps.length; i++) {\n var next = (i==_ps.length-1) ? 0 : i+1;\n pn.push( new Pair( _ps[i].interpolate( t1 ) ).to( _ps[next].interpolate( 1-t2 ) ) );\n }\n return pn;\n}", "function vp(a,b){this.ee=[];this.wf=a;this.lf=b||null;this.sd=this.Uc=!1;this.Wb=void 0;this.Oe=this.Kf=this.ne=!1;this.he=0;this.Ua=null;this.oe=0}", "function sub( p0, p1 ) {\n return {x: p0.x - p1.x, y: p0.y - p1.y};\n}", "constructor(p1, p2) {\n if ((p1 && p2) && (p1.x > p2.x || (p1.x === p2.x && p1.y > p2.y))) {\n this.p1 = p2;\n this.p2 = p1;\n return;\n }\n this.p1 = p1;\n this.p2 = p2;\n }", "b2p0(t, p) {\n const k = 1 - t;\n return k * k * p;\n\n }", "function normalizePegs(p1, p2, peg1, peg2)\n{\n if (p1 == 0) {\n peg1.setX(rowOne[pegIndexes[p1]].x);\n peg1.setY(rowOne[pegIndexes[p1]].y);\n peg2.setX(rowOne[pegIndexes[p2]].x);\n peg2.setY(rowOne[pegIndexes[p2]].y);\n }\n\n if (p1 == 2) {\n peg1.setX(rowTwo[pegIndexes[p1]].x);\n peg1.setY(rowTwo[pegIndexes[p1]].y);\n peg2.setX(rowTwo[pegIndexes[p2]].x);\n peg2.setY(rowTwo[pegIndexes[p2]].y);\n }\n\n if (p1 == 4) {\n peg1.setX(rowThree[pegIndexes[p1]].x);\n peg1.setY(rowThree[pegIndexes[p1]].y);\n peg2.setX(rowThree[pegIndexes[p2]].x);\n peg2.setY(rowThree[pegIndexes[p2]].y);\n }\n\n peg1.children[1].setX(-10);\n peg1.children[1].setY(-10);\n peg2.children[1].setX(-10);\n peg2.children[1].setY(-10);\n\n if(pegIndexes[p1] - pegIndexes[p2] == -1){\n if (pegIndexes[p1] <= 36 || pegIndexes[p1] >= 82) {\n console.log(\"1\");\n peg1.setX(peg1.getX() - 10);\n peg2.setX(peg2.getX() + 10);\n peg1.children[1].setX(0);\n peg2.children[1].setX(-20);\n } else if (pegIndexes[p1] > 36 && pegIndexes[p1] < 42) {\n console.log(\"2\");\n peg1.setY(peg1.getY() - 10);\n peg2.setY(peg2.getY() + 10);\n peg1.children[1].setY(0);\n peg2.children[1].setY(-20);\n } else if (pegIndexes[p1] >= 42 && pegIndexes[p1] <= 77) {\n console.log(\"3\");\n peg1.setX(peg1.getX() + 10);\n peg2.setX(peg2.getX() - 10);\n peg1.children[1].setX(-20);\n peg2.children[1].setX(0);\n } else if (pegIndexes[p1] > 77 && pegIndexes[p1] < 82) {\n console.log(\"4\");\n peg1.setY(peg1.getY() - 10);\n peg2.setY(peg2.getY() + 10);\n peg1.children[1].setY(0);\n peg2.children[1].setY(-20);\n }\n \n }else if(pegIndexes[p1] - pegIndexes[p2] == 1){\n if (pegIndexes[p1] <= 36 || pegIndexes[p1] >= 82) {\n console.log(\"11\");\n peg1.setX(peg1.getX() + 10);\n peg2.setX(peg2.getX() - 10);\n peg1.children[1].setX(-20);\n peg2.children[1].setX(0);\n } else if (pegIndexes[p1] > 36 && pegIndexes[p1] < 42) {\n console.log(\"22\");\n peg1.setY(peg1.getY() + 10);\n peg2.setY(peg2.getY() - 10);\n peg1.children[1].setY(-20);\n peg2.children[1].setY(0);\n } else if (pegIndexes[p1] >= 42 && pegIndexes[p1] <= 77) {\n console.log(\"33\");\n peg1.setX(peg1.getX() - 10);\n peg2.setX(peg2.getX() + 10);\n peg1.children[1].setX(0);\n peg2.children[1].setX(-20);\n } else if (pegIndexes[p1] > 77 && pegIndexes[p1] < 82) {\n console.log(\"44\");\n peg1.setY(peg1.getY() + 10);\n peg2.setY(peg2.getY() - 10);\n peg1.children[1].setY(-20);\n peg2.children[1].setY(0);\n }\n \n }\n}", "getWeights() {\r\n let w1 = this.w1.flatten().selection.data;\r\n\r\n let w2 = this.w2.flatten().selection.data;\r\n\r\n return [...w1, ...w2];\r\n }", "function setupPaddles() {\r\n // Initialise the left paddle position\r\n leftPaddle.x = 0 + leftPaddle.w;\r\n leftPaddle.y = height / 2;\r\n\r\n // Initialise the right paddle position\r\n rightPaddle.x = width - rightPaddle.w;\r\n rightPaddle.y = height / 2;\r\n}", "function wR(a,b){this.Fb=[];this.HF=a;this.YE=b||null;this.Pq=this.un=!1;this.ai=void 0;this.Gz=this.AK=this.ez=!1;this.uu=0;this.cb=null;this.az=0}", "function P(a,b,c){P.m.constructor.call(this,a);this.Ya=a.Ya||kg;this.Ze=a.Ze||lg;var e=[];e[y.Va]=new ye;e[y.ug]=new ye;e[y.Pa]=new ye;e[y.mf]=new ye;this.ll=e;b&&(this.Xa=b);c&&(this.mg=c);this.Mk=this.mg&&y.h.He();this.Wj=[];this.pe=new Wf(a.qc);this.Nc=this.options.ep?new zf(a.ep,a.cp):null;y.I&&y.I.we&&mg(this,y.Ln,y.I.we);y.Ec&&y.Ec.we&&mg(this,y.xr,y.Ec.we);y.Qa&&y.Qa.we&&mg(this,y.Jn,y.Qa.we)}", "constructor(player1Name, player2Name) {\n this.P1point = 0;\n this.P2point = 0;\n\n this.P1res = '';\n this.P2res = '';\n\n this.player1Name = player1Name;\n this.player2Name = player2Name;\n }", "function crossProduct(p1, p2, p3){\n return (p2.x - p1.x)*(p3.y - p1.y) - (p2.y - p1.y)*(p3.x - p1.x); \n}", "function pf(a,b){this.rb=[];this.sd=a;this.Tc=b||null}", "function defline(p1, p2){\n var a = p1[1] - p2[1];\n var b = p1[0] - p2[0];\n return [a, -b, b * p1[1] - a * p1[0]];\n}", "function computeHalfTexCoord(tex1x, tex1y, tex2x, tex2y)\n{\n var newT = [];\n newT.push((tex1x + tex2x) * 0.5);\n newT.push((tex1y + tex2y) * 0.5);\n return newT;\n}", "function setupPaddles() {\n // Initialise the left paddle\n leftPaddle.x = paddleInset;\n leftPaddle.y = height/2;\n\n // Initialise the right paddle\n rightPaddle.x = width - paddleInset;\n rightPaddle.y = height/2;\n}", "function pi(a,b){this.Ta=[];this.wd=a;this.Cc=b||n}", "function Ps(t) {\n for (;t.xh.length > 0 && t.$h.size < t.Dh; ) {\n var e = t.xh.shift(), n = t.Bh.next();\n t.kh.set(n, new ms(e)), t.$h = t.$h.ot(e, n), Wo(t.ph, new gt(zn(Un(e.path)), n, 2 /* LimboResolution */ , qr.ai));\n }\n}", "function calculatePosition() {\n var t = p1.angle;\n var p = p2.angle;\n\n var x1 = l*Math.sin(t);\n var y1 = l*Math.cos(t);\n var _y1 = -y1;\n\n var x2 = x1 + L*Math.sin(p);\n var y2 = y1 + L*Math.cos(p);\n var _y2 = -y2;\n\n p1.x = x1;\n p1.y = _y1;\n p2.x = x2;\n p2.y = _y2;\n}", "function zoom(p0, p1) {\n\t var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n\t ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n\t dx = ux1 - ux0,\n\t dy = uy1 - uy0,\n\t d2 = dx * dx + dy * dy,\n\t i,\n\t S;\n\t\n\t // Special case for u0 ≅ u1.\n\t if (d2 < epsilon2) {\n\t S = Math.log(w1 / w0) / rho;\n\t i = function(t) {\n\t return [\n\t ux0 + t * dx,\n\t uy0 + t * dy,\n\t w0 * Math.exp(rho * t * S)\n\t ];\n\t }\n\t }\n\t\n\t // General case.\n\t else {\n\t var d1 = Math.sqrt(d2),\n\t b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n\t b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n\t r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n\t r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n\t S = (r1 - r0) / rho;\n\t i = function(t) {\n\t var s = t * S,\n\t coshr0 = cosh(r0),\n\t u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n\t return [\n\t ux0 + u * dx,\n\t uy0 + u * dy,\n\t w0 * coshr0 / cosh(rho * s + r0)\n\t ];\n\t }\n\t }\n\t\n\t i.duration = S * 1000;\n\t\n\t return i;\n\t }", "function x(p1, p2) {}", "function Rp(a,b){this.i=[];this.D=a;this.L=b||null;this.g=this.a=!1;this.c=void 0;this.s=this.w=this.j=!1;this.h=0;this.b=null;this.l=0}", "function zoom(p0, p1) {\n\t var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n\t ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n\t dx = ux1 - ux0,\n\t dy = uy1 - uy0,\n\t d2 = dx * dx + dy * dy,\n\t i,\n\t S;\n\n\t // Special case for u0 ≅ u1.\n\t if (d2 < epsilon2) {\n\t S = Math.log(w1 / w0) / rho;\n\t i = function(t) {\n\t return [\n\t ux0 + t * dx,\n\t uy0 + t * dy,\n\t w0 * Math.exp(rho * t * S)\n\t ];\n\t }\n\t }\n\n\t // General case.\n\t else {\n\t var d1 = Math.sqrt(d2),\n\t b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n\t b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n\t r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n\t r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n\t S = (r1 - r0) / rho;\n\t i = function(t) {\n\t var s = t * S,\n\t coshr0 = cosh(r0),\n\t u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n\t return [\n\t ux0 + u * dx,\n\t uy0 + u * dy,\n\t w0 * coshr0 / cosh(rho * s + r0)\n\t ];\n\t }\n\t }\n\n\t i.duration = S * 1000;\n\n\t return i;\n\t }", "function outputSingle(p){\n var single_output = [];\n single_output.push( p.position.normalized_x() );\n single_output.push( p.position.normalized_y() );\n return single_output;\n}", "function generateLerpLists(v1,v2,tiles){\n\tvar l1 = [];\n\tfor (var i=0; i<=tiles; i+=1){\n\t\tl1.push(lerpV(v1,v2, i/tiles));\n\t}\n\treturn l1;\n}", "function tu(a,b){this.IY=[];this.Dxa=a;this.Ila=b||null;this.gK=this.Tf=!1;this.nk=void 0;this.Gfa=this.KKa=this.i1=!1;this.y_=0;this.Tc=null;this.rP=0}", "function wc(a,b){this.Ua=[];this.pd=a;this.Hc=b||null}", "function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n };\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n };\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }", "function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S;\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n };\n } else {\n var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S, coshr0 = cosh(r0), u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n };\n }\n i.duration = S * 1000 * rho / Math.SQRT2;\n return i;\n }", "function crossProduct(p1, p2, p3) {\n return (p2.x - p1.x)*(p3.y - p1.y) - (p2.y - p1.y)*(p3.x - p1.x)\n}", "function parenv(a, b, env){\n for (var i = 0; i < a.length; i++){\n put(a[i], b[i], env);\n }\n return env;\n }", "function apMakePlis(pairprob) {\n pairprob = pairprob || [];\n var n = Math.floor(pairprob.length/3);\n var plis = new Array(n);\n for (var i=0; i<n; i++) {\n var i3 = i*3;\n plis[i]=[Number(pairprob[i3]),Number(pairprob[i3+1]),Number(pairprob[i3+2])];\n }\n return plis;\n}", "function P(x, y, z, w) {\r\n if (w === void 0) { w = 1; }\r\n return (new V4([x, y, z, w]));\r\n }", "function input () {\n alpha01 = inputNumber(ip1,1,true,-10,10)*DEG; // Anfangsposition von Pendel 1 (Bogenmaß)\n alpha02 = inputNumber(ip2,1,true,-10,10)*DEG; // Anfangsposition von Pendel 2 (Bogenmaß)\n }", "function len (p1, p2) {\n return Math.sqrt((p2.x - p1.x) * (p2.x - p1.x) + (p2.y - p1.y) * (p2.y - p1.y))\n }", "function nearStitching(after0U, before1U, uv) {\n\t\tif(uv.x >= 0.8) {\n\t\t\tbefore1U.push(uv);\n\t\t}\n\t\t\n\t\tif(uv.x <= 0.2) {\n\t\t\tafter0U.push(uv);\n\t\t}\n\t}", "function Vp(a,b){this.c=[];this.n=a;this.g=b||null}", "function map(x, x0, x1, y0, y1) {\r\n return y0 + (y1 - y0) * (1.0 * x - x0) / (x1 - x0);\r\n}", "function setup() {\n cnv = createCanvas(800, 600);\n cnv.mousePressed(canvasPressed);\n background('grey');\n\n\n //---------------------------------------create pattens-----------------------------------------------\n h1Pat = [1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1];\n h2Pat = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n snPat = [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1];\n shPat = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n k1Pat = [1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0];\n k2Pat = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0];\n stepPat = [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];\n\n\n //-------------------------------------------declare important variables------------------------------\n trackAMT = 6;\n beatLength = 16;\n r = 20;\n indexClicked = 0;\n trackClicked = 0;\n cellWidth = width / beatLength;\n cellHeight = height / trackAMT;\n buttonCenters = [];\n //--------------------------------------------array of track listener functions ------------------------------//\n //-------------------------------------calculate indexClicked and hard code trackClicked-----------------------//\n trackListeners = [\n function track1Listener(x1, y1, x2, y2) {\n let d = dist(x1, y1, x2, y2);\n if (d < r) {\n indexClicked = floor(beatLength * mouseX / width);\n trackClicked = 1;\n }\n },\n function track2Listener(x1, y1, x2, y2) {\n let d = dist(x1, y1, x2, y2);\n if (d < r) {\n indexClicked = floor(beatLength * mouseX / width);\n trackClicked = 2;\n }\n },\n function track3Listener(x1, y1, x2, y2) {\n let d = dist(x1, y1, x2, y2);\n if (d < r) {\n indexClicked = floor(beatLength * mouseX / width);\n trackClicked = 3;\n }\n },\n function track4Listener(x1, y1, x2, y2) {\n let d = dist(x1, y1, x2, y2);\n if (d < r) {\n indexClicked = floor(beatLength * mouseX / width);\n trackClicked = 4;\n }\n },\n function track5Listener(x1, y1, x2, y2) {\n let d = dist(x1, y1, x2, y2);\n if (d < r) {\n indexClicked = floor(beatLength * mouseX / width);\n trackClicked = 5;\n }\n },\n function track6Listener(x1, y1, x2, y2) {\n let d = dist(x1, y1, x2, y2);\n if (d < r) {\n indexClicked = floor(beatLength * mouseX / width);\n trackClicked = 6;\n }\n },\n ];\n}", "function SPVTL(a, state) {\n var stack = state.stack;\n var p2i = stack.pop();\n var p1i = stack.pop();\n var p2 = state.z2[p2i];\n var p1 = state.z1[p1i];\n\n if (exports.DEBUG) {\n console.log('SPVTL[' + a + ']', p2i, p1i);\n }\n\n var dx;\n var dy;\n\n if (!a) {\n dx = p1.x - p2.x;\n dy = p1.y - p2.y;\n } else {\n dx = p2.y - p1.y;\n dy = p1.x - p2.x;\n }\n\n state.pv = state.dpv = getUnitVector(dx, dy);\n }", "function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }", "function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }", "function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }", "function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n };\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n };\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }", "function drawPaddles() {\n console.log(p1PadMove);\n player1Paddle.make();\n player2Paddle.make();\n player1Paddle.ballPad1Collision();\n player2Paddle.ballPad2Collision();\n}", "calculatePositions() {\n this.x1 = this.from.getCenterX()\n this.y1 = this.from.getCenterY()\n this.x2 = this.to.getCenterX()\n this.y2 = this.to.getCenterY()\n }", "function __WEBPACK_DEFAULT_EXPORT__(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000;\n\n return i;\n}", "function __WEBPACK_DEFAULT_EXPORT__(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000;\n\n return i;\n}", "function pb(a,b,c){this.a=a;this.b=b||1;this.h=c||1}", "function overlap1D(x0,x1,y0,y1){\n\treturn !((x0 > y0 && x1 > y0) || (y0 > x0 && y0 > x1))\n}", "function updateP(){\n p.mX = mouseX; \n if(mouseY>p.maxY) p.mY = mouseY;\n p.x = p.mX - p.width/2;\n p.y = p.mY - p.height/2;\n p.x1 = p.x + p.width;\n p.y1 = p.y + p.height;\n}", "function PitchedPresets(){\n\n\tthis.input = audioCtx.createGain();\n\tthis.output = audioCtx.createGain();\n\tthis.startArray = [];\n\n}", "function map_point(p, q, a, b, x)\r\n{\r\n\tif (p.length != q.length || q.length != x.length)\r\n\t\talert(\"inconsistent dimensions for p, q and x\");\r\n\telse if (a.length != b.length)\r\n\t\talert(\"inconsistent dimensions for a and b\");\r\n\t\r\n\tif (typeof p == \"number\"){\r\n\t\tif (q!=p)\r\n\t\t\tvar alpha = (x-p)/(q-p);\t\t//for scalar values\r\n\t\telse\r\n\t\t\talert(\"Point X is invalid\");\t\t\r\n\t}\r\n\telse\r\n\t\tvar alpha = (x[0] - p[0])/(q[0] - p[0]); \r\n\t\r\n\tif (typeof a == \"number\"){\r\n\t\tvar temp = mix([a,0], [b,0], alpha);\t//for scalar values\r\n\t\treturn temp[0];\r\n\t}\r\n\telse\r\n\t\treturn mix(a, b, alpha); //for vectors\r\n}", "function doConvexPolygonsOverlapALot(polygon1, polygon2) {\n\n let newPoly1 = [];\n let newPoly2 = [];\n centerOfPolygon1 = createVector(0, 0);\n for (let point of polygon1) {\n centerOfPolygon1.x += point.x;\n centerOfPolygon1.y += point.y;\n }\n\n centerOfPolygon1.x /= polygon1.length;\n centerOfPolygon1.y /= polygon1.length;\n\n\n centerOfPolygon2 = createVector(0, 0);\n for (let point of polygon2) {\n centerOfPolygon2.x += point.x;\n centerOfPolygon2.y += point.y;\n }\n centerOfPolygon2.x /= polygon2.length;\n centerOfPolygon2.y /= polygon2.length;\n\n\n //shrink each polygon a little bit\n //like by 20%\n\n for (let point of polygon1) {\n\n let movementPoint = p5.Vector.sub(centerOfPolygon1, point);\n if (movementPoint.mag() > 7) {\n movementPoint.normalize();\n movementPoint.mult(7);\n } else {\n movementPoint.mult(0.7);\n }\n\n\n let newPoint = p5.Vector.sub(point, centerOfPolygon1);\n newPoint = p5.Vector.add(newPoint, centerOfPolygon1);\n newPoly1.push(newPoint);\n }\n\n for (let point of polygon2) {\n\n let movementPoint = p5.Vector.sub(centerOfPolygon2, point);\n if (movementPoint.mag() > 7) {\n movementPoint.normalize();\n movementPoint.mult(7);\n } else {\n movementPoint.mult(0.7);\n }\n\n\n let newPoint = p5.Vector.sub(point, centerOfPolygon2);\n newPoint = p5.Vector.add(newPoint, centerOfPolygon2);\n newPoly2.push(newPoint);\n\n\n }\n // print(newPoly1,newPoly2);\n\n return doConvexPolygonsOverlap(newPoly1, newPoly2);\n\n}", "initializeJunctionPhases () {\n for (let i = 0; i < this.n - 1; i ++) {\n let u1 = this.sculpture.units.children[i];\n let u2 = this.sculpture.units.children[i+1];\n if (u1.isEmpty || u2.isEmpty) {\n continue;\n }\n\n }\n }", "function doSomething(p) { //p รับค่าจาก per2\n //p=per2 (memory address of per2 to p)\n p.name = 'Mary'; //pers2.name='Mary'\n\n}", "function setup() {\n\t// createCanvas must be the first statement\n createCanvas(width, height); \n stroke(255); // Set line drawing color to white\n frameRate(60);\n p_s = [];\n p_s2 = [];\n var sum = 0;\n for (var i = 0; i < 26; i++) {\n p_s[i] = random();\n sum += p_s[i];\n\n var sum2 = 0;\n p_s2[i] = [];\n for (var j = 0; j < 26; j++) {\n p_s2[i][j] = random();\n sum2 += p_s2[i][j];\n }\n\n for (var j = 0; j < 26; j++) {\n p_s2[i][j] /= sum2;\n }\n }\n\n for (var i = 0; i < 26; i++) {\n p_s[i] /= sum;\n }\n}", "function ab2p(ab) {\n var pt = carpet.ab2xy(ab[0], ab[1], true);\n return [xa.c2p(pt[0]), ya.c2p(pt[1])];\n }", "function points(twoPointers, threePointers) {\n return twoPointers * 2 + threePointers * 3;\n}", "function xy2(a) {\n console.log(\"xy\");\n console.log(a.id);\n var u = Math.floor((a.id - 1) /2 / b_map[0].length );\n var d = ((a.id - 1) / 2 ) % b_map[0].length ;\n console.log(\"u\", u, \"d\", d);\n return [u, d];\n}", "generateBindPoseData() {\n//-------------------\n// We need to retain TR xforms for both the bind pose and its inverse.\nthis.bindPoseTRX.copyTRX(this.globalTRX);\nthis.invBindPoseTRX.copyTRX(this.globalTRX);\nreturn this.invBindPoseTRX.setInvert();\n}", "function lerp(a0, a1, w) {\n return (1.0 - w)*a0 + w*a1;\n }", "function usAndNumberBeetweenUs (x,y)\n{\n\n\n\n}", "function doesIntersect(p0, b0, p1, b1) {\r\n\t\tif(p0.x + b0.width - 1 < p1.x) return false;\r\n\t\tif(p0.y + b0.height - 1 < p1.y) return false;\r\n\t\t\r\n\t\tif(p1.x + b1.width - 1 < p0.x) return false;\r\n\t\tif(p1.y + b1.height - 1 < p0.y) return false;\r\n\t\t\r\n\t\treturn true;\r\n\t}", "function verify(v, h, P) {\n /* Y = v abs(P) + h G */\n var d = new Array(32);\n var p = [createUnpackedArray(), createUnpackedArray()];\n var s = [createUnpackedArray(), createUnpackedArray()];\n var yx = [createUnpackedArray(), createUnpackedArray(), createUnpackedArray()];\n var yz = [createUnpackedArray(), createUnpackedArray(), createUnpackedArray()];\n var t1 = [createUnpackedArray(), createUnpackedArray(), createUnpackedArray()];\n var t2 = [createUnpackedArray(), createUnpackedArray(), createUnpackedArray()];\n var vi = 0, hi = 0, di = 0, nvh = 0, i, j, k;\n /* set p[0] to G and p[1] to P */\n set(p[0], 9);\n unpack(p[1], P);\n /* set s[0] to P+G and s[1] to P-G */\n /* s[0] = (Py^2 + Gy^2 - 2 Py Gy)/(Px - Gx)^2 - Px - Gx - 486662 */\n /* s[1] = (Py^2 + Gy^2 + 2 Py Gy)/(Px - Gx)^2 - Px - Gx - 486662 */\n x_to_y2(t1[0], t2[0], p[1]); /* t2[0] = Py^2 */\n sqrt(t1[0], t2[0]); /* t1[0] = Py or -Py */\n j = is_negative(t1[0]); /* ... check which */\n add(t2[0], t2[0], C39420360); /* t2[0] = Py^2 + Gy^2 */\n mul(t2[1], BASE_2Y, t1[0]); /* t2[1] = 2 Py Gy or -2 Py Gy */\n sub(t1[j], t2[0], t2[1]); /* t1[0] = Py^2 + Gy^2 - 2 Py Gy */\n add(t1[1 - j], t2[0], t2[1]); /* t1[1] = Py^2 + Gy^2 + 2 Py Gy */\n cpy(t2[0], p[1]); /* t2[0] = Px */\n sub(t2[0], t2[0], C9); /* t2[0] = Px - Gx */\n sqr(t2[1], t2[0]); /* t2[1] = (Px - Gx)^2 */\n recip(t2[0], t2[1], 0); /* t2[0] = 1/(Px - Gx)^2 */\n mul(s[0], t1[0], t2[0]); /* s[0] = t1[0]/(Px - Gx)^2 */\n sub(s[0], s[0], p[1]); /* s[0] = t1[0]/(Px - Gx)^2 - Px */\n sub(s[0], s[0], C486671); /* s[0] = X(P+G) */\n mul(s[1], t1[1], t2[0]); /* s[1] = t1[1]/(Px - Gx)^2 */\n sub(s[1], s[1], p[1]); /* s[1] = t1[1]/(Px - Gx)^2 - Px */\n sub(s[1], s[1], C486671); /* s[1] = X(P-G) */\n mul_small(s[0], s[0], 1); /* reduce s[0] */\n mul_small(s[1], s[1], 1); /* reduce s[1] */\n /* prepare the chain */\n for (i = 0; i < 32; i++) {\n vi = (vi >> 8) ^ (v[i] & 0xff) ^ ((v[i] & 0xff) << 1);\n hi = (hi >> 8) ^ (h[i] & 0xff) ^ ((h[i] & 0xff) << 1);\n nvh = ~(vi ^ hi);\n di = (nvh & ((di & 0x80) >> 7)) ^ vi;\n di ^= nvh & ((di & 0x01) << 1);\n di ^= nvh & ((di & 0x02) << 1);\n di ^= nvh & ((di & 0x04) << 1);\n di ^= nvh & ((di & 0x08) << 1);\n di ^= nvh & ((di & 0x10) << 1);\n di ^= nvh & ((di & 0x20) << 1);\n di ^= nvh & ((di & 0x40) << 1);\n d[i] = di & 0xff;\n }\n di = ((nvh & ((di & 0x80) << 1)) ^ vi) >> 8;\n /* initialize state */\n set(yx[0], 1);\n cpy(yx[1], p[di]);\n cpy(yx[2], s[0]);\n set(yz[0], 0);\n set(yz[1], 1);\n set(yz[2], 1);\n /* y[0] is (even)P + (even)G\n * y[1] is (even)P + (odd)G if current d-bit is 0\n * y[1] is (odd)P + (even)G if current d-bit is 1\n * y[2] is (odd)P + (odd)G\n */\n vi = 0;\n hi = 0;\n /* and go for it! */\n for (i = 32; i-- !== 0;) {\n vi = (vi << 8) | (v[i] & 0xff);\n hi = (hi << 8) | (h[i] & 0xff);\n di = (di << 8) | (d[i] & 0xff);\n for (j = 8; j-- !== 0;) {\n mont_prep(t1[0], t2[0], yx[0], yz[0]);\n mont_prep(t1[1], t2[1], yx[1], yz[1]);\n mont_prep(t1[2], t2[2], yx[2], yz[2]);\n k = (((vi ^ (vi >> 1)) >> j) & 1) + (((hi ^ (hi >> 1)) >> j) & 1);\n mont_dbl(yx[2], yz[2], t1[k], t2[k], yx[0], yz[0]);\n k = ((di >> j) & 2) ^ (((di >> j) & 1) << 1);\n mont_add(t1[1], t2[1], t1[k], t2[k], yx[1], yz[1], p[(di >> j) & 1]);\n mont_add(t1[2], t2[2], t1[0], t2[0], yx[2], yz[2], s[(((vi ^ hi) >> j) & 2) >> 1]);\n }\n }\n k = (vi & 1) + (hi & 1);\n recip(t1[0], yz[k], 0);\n mul(t1[1], yx[k], t1[0]);\n var Y = [];\n pack(t1[1], Y);\n return Y;\n }", "function SPVTL(a, state) {\n const stack = state.stack;\n const p2i = stack.pop();\n const p1i = stack.pop();\n const p2 = state.z2[p2i];\n const p1 = state.z1[p1i];\n\n if (exports.DEBUG) console.log('SPVTL[' + a + ']', p2i, p1i);\n\n let dx;\n let dy;\n\n if (!a) {\n dx = p1.x - p2.x;\n dy = p1.y - p2.y;\n } else {\n dx = p2.y - p1.y;\n dy = p1.x - p2.x;\n }\n\n state.pv = state.dpv = getUnitVector(dx, dy);\n}", "function pushQuad(v, p1, p2, p3, p4) {\n v.push(p1[0], p1[1], p1[2], p1[3], p1[4], p1[5], p1[6], p1[7], p1[8], p1[9], p1[10], p1[11]);\n v.push(p2[0], p2[1], p2[2], p2[3], p2[4], p2[5], p2[6], p2[7], p2[8], p2[9], p2[10], p2[11]);\n v.push(p3[0], p3[1], p3[2], p3[3], p3[4], p3[5], p3[6], p3[7], p3[8], p3[9], p3[10], p3[11]);\n \n v.push(p3[0], p3[1], p3[2], p3[3], p3[4], p3[5], p3[6], p3[7], p3[8], p3[9], p3[10], p3[11]);\n v.push(p4[0], p4[1], p4[2], p4[3], p4[4], p4[5], p4[6], p4[7], p4[8], p4[9], p4[10], p4[11]);\n v.push(p1[0], p1[1], p1[2], p1[3], p1[4], p1[5], p1[6], p1[7], p1[8], p1[9], p1[10], p1[11]);\n}", "function compareP(a, b) {\n if (a.Points > b.Points)\n return -1;\n if (a.Points < b.Points)\n return 1;\n\n if (a.GD < b.GD)\n return -1;\n if (a.GD > b.GD)\n return 1;\n if (a.GF > b.GF)\n return -1;\n if (a.GF < b.GF)\n return 1;\n return 0;\n }", "intersectionCheck(p3, p4) {\n let p0_x = this.p1.position[0];\n let p0_y = this.p1.position[2];\n let p1_x = this.p2.position[0];\n let p1_y = this.p2.position[2];\n let p2_x = p3.position[0];\n let p2_y = p3.position[2];\n let p3_x = p4.position[0];\n let p3_y = p4.position[2];\n let s1_x = p1_x - p0_x;\n let s1_y = p1_y - p0_y;\n let s2_x = p3_x - p2_x;\n let s2_y = p3_y - p2_y;\n let s = (-s1_y * (p0_x - p2_x) + s1_x * (p0_y - p2_y)) / (-s2_x * s1_y + s1_x * s2_y);\n let t = (s2_x * (p0_y - p2_y) - s2_y * (p0_x - p2_x)) / (-s2_x * s1_y + s1_x * s2_y);\n if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {\n let x_result = p0_x + (t * s1_x);\n let y_Result = p0_y + (t * s1_y);\n return new Point(vec3.fromValues(x_result, 0, y_Result));\n }\n return null;\n }", "function getPelnas2(x1, x2){\nvar pelnas = x1 - x2;\nreturn pelnas;\n}", "function qh(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}", "function samplePositionTetra(p0,p1,p2,p3) {\n\n let s = Math.random();\n let t = Math.random();\n let u = Math.random();\n\n if(s + t > 1.0) \n { \n s = 1.0 - s;\n t = 1.0 - t;\n }\n\n if(t + u > 1.0) \n { \n let tmp = u;\n u = 1.0 - s - t;\n t = 1.0 - tmp;\n }\n else if(s + t + u > 1.0) \n {\n let tmp = u;\n u = s + t + u - 1.0;\n s = 1.0 - t - tmp;\n }\n let a = 1.0-s-t-u;\n\n let s0 = p0.clone();\n let s1 = p1.clone();\n let s2 = p2.clone();\n let s3 = p3.clone();\n\n s0.multiplyScalar(a);\n s1.multiplyScalar(s);\n s2.multiplyScalar(t);\n s3.multiplyScalar(u);\n\n let v1 = new THREE.Vector3(0.0, 0.0, 0.0);\n let v2 = new THREE.Vector3(0.0, 0.0, 0.0);\n let vRes = new THREE.Vector3(0.0, 0.0, 0.0);\n v1.addVectors(s0,s1);\n v2.addVectors(s2,s3);\n vRes.addVectors(v1,v2);\n return vRes;\n}", "function dir( p0, p1 ) {\n return norm( sub( p0, p1 ) );\n}", "function ab2p(ab) {\n var pt = carpet.ab2xy(ab[0], ab[1], true);\n return [xa.c2p(pt[0]), ya.c2p(pt[1])];\n }" ]
[ "0.60834116", "0.5920651", "0.5779755", "0.5689053", "0.56599534", "0.5659321", "0.5597352", "0.55253756", "0.55253756", "0.55253756", "0.55253756", "0.5474401", "0.54669297", "0.5466692", "0.54463005", "0.5383259", "0.53486145", "0.5294024", "0.5282052", "0.52651596", "0.52380794", "0.52379066", "0.5219425", "0.5211204", "0.5192173", "0.51903135", "0.5180029", "0.5157227", "0.5155881", "0.5155444", "0.51372117", "0.5130135", "0.51247704", "0.511022", "0.5106027", "0.51057434", "0.50979877", "0.5094364", "0.5086771", "0.50801075", "0.5078168", "0.50684774", "0.5056445", "0.505328", "0.50397354", "0.50383586", "0.5029987", "0.5028195", "0.5027146", "0.50241524", "0.50181836", "0.5013689", "0.50124586", "0.5010761", "0.50070375", "0.49948034", "0.49840128", "0.49799323", "0.49744835", "0.49739718", "0.49737376", "0.49565613", "0.49479535", "0.4942785", "0.49265033", "0.49106893", "0.49103254", "0.48990044", "0.48990044", "0.48990044", "0.4893904", "0.48926017", "0.48924676", "0.48900753", "0.48900753", "0.4881487", "0.48793158", "0.48712066", "0.48620763", "0.4860443", "0.48584378", "0.48578757", "0.4857708", "0.48568937", "0.48567766", "0.48555297", "0.48547", "0.4851897", "0.48498896", "0.48456895", "0.48427796", "0.4841888", "0.48356244", "0.48355025", "0.48350292", "0.4834684", "0.48346418", "0.48300195", "0.4829545", "0.4828991", "0.4822047" ]
0.0
-1
Computes the decimal coefficient and exponent of the specified number x with significant digits p, where x is positive and p is in [1, 21] or undefined. For example, formatDecimal(1.23) returns ["123", 0].
function formatDecimal(x, p) { if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity var i, coefficient = x.slice(0, i); // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). return [ coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1) ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }", "function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }", "function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }", "function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }", "function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }", "function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }", "function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }", "function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }", "function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }", "function formatDecimal$1(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimal(x, p) {\n\t if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\t var i, coefficient = x.slice(0, i);\n\n\t // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n\t // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\t return [\n\t coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n\t +x.slice(i + 1)\n\t ];\n\t }", "function formatDecimal(x, p) {\n\t if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\t var i, coefficient = x.slice(0, i);\n\n\t // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n\t // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\t return [\n\t coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n\t +x.slice(i + 1)\n\t ];\n\t }", "function formatDecimal(x, p) {\n\t if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\t var i, coefficient = x.slice(0, i);\n\n\t // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n\t // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\t return [\n\t coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n\t +x.slice(i + 1)\n\t ];\n\t }", "function formatDecimal (x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n }", "function formatDecimal(x, p) {\n\t if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\t var i, coefficient = x.slice(0, i);\n\t\n\t // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n\t // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\t return [\n\t coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n\t +x.slice(i + 1)\n\t ];\n\t }", "function formatDecimal(x, p) {\n\t if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\t var i, coefficient = x.slice(0, i);\n\t\n\t // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n\t // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\t return [\n\t coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n\t +x.slice(i + 1)\n\t ];\n\t }", "function formatDecimal(x, p) {\n\t if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\t var i, coefficient = x.slice(0, i);\n\t\n\t // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n\t // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\t return [\n\t coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n\t +x.slice(i + 1)\n\t ];\n\t }", "function formatDecimal(x, p) {\n\t if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\t var i, coefficient = x.slice(0, i);\n\n\t // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n\t // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\t return [\n\t coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n\t +x.slice(i + 1)\n\t ];\n\t}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}", "function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null;\n // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n }", "function formatDecimal(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}", "function formatRounded(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}", "function threeDecimalPoints(number){\n var s = number.toString();\n var i;\n for(i = 0;i<s.length;i++){\n if(s[i]=='.'){\n break;\n }\n }\n if(i>=s.length-3){\n for(var j=0;j<i-s.length+3;j++){\n s.concat('0');\n }\n return s;\n }else{\n return s.substring(0,i+4);\n }\n }", "function exponent(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}", "function formatDecimal(value, decimals, keepZero) {\n if (isNaN(value)) {\n \t// this server-side demo Data Adapter uses \",\" as a decimal separator\n value = convertCommaToDot(value);\n }\n var mul = new String(\"1\");\n var zero = new String(\"0\");\n for (var i = decimals; i > 0; i--) {\n mul += zero;\n }\n value = Math.round(value * mul);\n value = value / mul;\n var strVal = new String(value);\n if (!keepZero) {\n return strVal;\n }\n\n var nowDecimals = 0;\n var dot = strVal.indexOf(\".\");\n if (dot == -1) {\n strVal += \".\";\n } else {\n nowDecimals = strVal.length - dot - 1;\n }\n for (var i = nowDecimals; i < decimals; i++) {\n strVal = strVal + zero;\n }\n\n return strVal;\n}", "function getDecimalPoints(value) {\r\n var index = value.toString().indexOf(\".\");\r\n return index === -1 ? 0 : value.toString().length - index - 1;\r\n }", "function decimals(number, decPoints){\n\tconst positions = Math.pow(10, decPoints);\n\treturn Math.round(number * positions) / positions;\n}", "function formatDecimal(val, n) {\n n = n || 2;\n var str = \"\" + Math.round ( parseFloat(val) * Math.pow(10, n) );\n while (str.length <= n) {\n str = \"0\" + str;\n }\n var pt = str.length - n;\n return str.slice(0,pt) + \".\" + str.slice(pt);\n}", "function formatDecimal(val, n) {\n n = n || 2;\n var str = \"\" + Math.round ( parseFloat(val) * Math.pow(10, n) );\n while (str.length <= n) {\n str = \"0\" + str;\n }\n var pt = str.length - n;\n return str.slice(0,pt) + \".\" + str.slice(pt);\n }", "function formatDecimal(val, n) {\r\n\t\t\tn = n || 2;\r\n\t\t\t\tvar str = \"\" + Math.round ( parseFloat(val) * Math.pow(10, n) );\r\n\t\t\t\twhile (str.length <= n) {\r\n\t\t\t\t\tstr = \"0\" + str;\r\n\t\t\t\t}\r\n\t\t\t\tvar pt = str.length - n;\r\n\t\t\treturn str.slice(0,pt) + \".\" + str.slice(pt);\r\n\t\t}", "function formatDecimal(val, n) {\n n = n || 2;\n var str = \"\" + Math.round(parseFloat(val) * Math.pow(10, n));\n while (str.length <= n) {\n str = \"0\" + str;\n }\n var pt = str.length - n;\n return str.slice(0, pt) + \".\" + str.slice(pt);\n }", "function getMultiplier(decimals) {\n if (typeof (decimals) !== \"number\") {\n try {\n decimals = __WEBPACK_IMPORTED_MODULE_3__bignumber__[\"a\" /* BigNumber */].from(decimals).toNumber();\n }\n catch (e) { }\n }\n if (typeof (decimals) === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return (\"1\" + zeros.substring(0, decimals));\n }\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n}", "function convertToDecimalFormat(value, numberOfDecimals) {\n var decimal = '.';\n\n for (var i = 0; i < numberOfDecimals; i++) {\n decimal = decimal + '0';\n }\n /* if the user didn't add a dot, we add one with 3 zeros */\n if (value.indexOf('.') == -1) value += decimal;\n /* Otherwise, we check how many numbers there are after the dot\n and make sure there's at least 3*/\n if (value.substring(value.indexOf('.') + 1).length < numberOfDecimals)\n while (value.substring(value.indexOf('.') + 1).length < numberOfDecimals)\n value += '0';\n return value;\n}", "function number_format(number, decimals, dec_point, thousands_sep) {\r\n\r\n number = (number + '').replace(/[^0-9+\\-Ee.]/g, '');\r\n var n = !isFinite(+number) ? 0 : +number,\r\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\r\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,\r\n dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\r\n s = '',\r\n toFixedFix = function (n, prec) {\r\n var k = Math.pow(10, prec);\r\n return '' + Math.round(n * k) / k;\r\n };\r\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\r\n if (s[0].length > 3) {\r\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\r\n }\r\n if ((s[1] || '').length < prec) {\r\n s[1] = s[1] || '';\r\n s[1] += new Array(prec - s[1].length + 1).join('0');\r\n }\r\n return s.join(dec);\r\n}", "function getMultiplier(decimals) {\n if (typeof (decimals) !== \"number\") {\n try {\n decimals = bignumber_1.BigNumber.from(decimals).toNumber();\n }\n catch (e) { }\n }\n if (typeof (decimals) === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return (\"1\" + zeros.substring(0, decimals));\n }\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n}", "function getMultiplier(decimals) {\n if (typeof (decimals) !== \"number\") {\n try {\n decimals = bignumber_1.BigNumber.from(decimals).toNumber();\n }\n catch (e) { }\n }\n if (typeof (decimals) === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return (\"1\" + zeros.substring(0, decimals));\n }\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n}", "function getMultiplier(decimals) {\n if (typeof (decimals) !== \"number\") {\n try {\n decimals = _bignumber__WEBPACK_IMPORTED_MODULE_3__[/* BigNumber */ \"a\"].from(decimals).toNumber();\n }\n catch (e) { }\n }\n if (typeof (decimals) === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return (\"1\" + zeros.substring(0, decimals));\n }\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n}", "function getMultiplier(decimals) {\n if (typeof (decimals) !== \"number\") {\n try {\n decimals = bignumber_1.BigNumber.from(decimals).toNumber();\n }\n catch (e) { }\n }\n if (typeof (decimals) === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return (\"1\" + zeros.substring(0, decimals));\n }\n return errors.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n}", "function number_format(number, decimals, dec_point, thousands_point) {\n\t\tif (number == null || !isFinite(number)) {\n\t\t\tthrow new TypeError(\"number is not valid\");\n\t\t}\n\t\n\t\tif (!decimals) {\n\t\t\tvar len = number.toString().split('.').length;\n\t\t\tdecimals = len > 1 ? len : 0;\n\t\t}\n\t\n\t\tif (!dec_point) {\n\t\t\tdec_point = '.';\n\t\t}\n\t\n\t\tif (!thousands_point) {\n\t\t\tthousands_point = ',';\n\t\t}\n\t\n\t\tnumber = parseFloat(number).toFixed(decimals);\n\t\n\t\tnumber = number.replace(\".\", dec_point);\n\t\n\t\tvar splitNum = number.split(dec_point);\n\t\tsplitNum[0] = splitNum[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousands_point);\n\t\tnumber = splitNum.join(dec_point);\n\t\n\t\treturn number;\n\t}", "function _default(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}", "function _default(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}", "function _default(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}", "function _default(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}", "function _default(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}", "function number_format(number, decimals, dec_point, thousands_sep)\r\n{\r\n\tvar n = !isFinite(+number) ? 0 : +number, \r\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\r\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\r\n s = '',\r\n toFixedFix = function (n, prec) {\r\n var k = Math.pow(10, prec);\r\n return '' + Math.round(n * k) / k; };\r\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\r\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\r\n if (s[0].length > 3) {\r\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep); }\r\n if ((s[1] || '').length < prec) {\r\n s[1] = s[1] || '';\r\n s[1] += new Array(prec - s[1].length + 1).join('0');\r\n }\r\n\treturn s.join(dec);\r\n}", "function formatNumber(x) {\n var parts = x.toString().split(\".\");\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n return parts.join(\".\");\n}", "function formatNumber(x) {\n var parts = x.toString().split(\".\");\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n return parts.join(\".\");\n}", "function formatNumber(number, decimals, dec_point, thousands_sep) {\n number = (number + '').replace(/[^0-9+-Ee.]/g, '');\n var n = !isFinite(+number) ? 0 : +number,\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,\n dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\n s = '',\n toFixedFix = function (n, prec) {\n var k = Math.pow(10, prec);\n return '' + Math.round(n * k) / k;\n };\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/B(?=(?:d{3})+(?!d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n return s.join(dec);\n}", "function presicion_method(){\n var number=123456.7890;\n document.getElementById(\"presicion_method\").innerHTML = number.toPrecision(7);\n}", "function insertDecimal(num) {\n return (num / 100).toFixed(8);\n}", "function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48;) ++i;\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48;) --len;\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n e = e - i - 1;\r\n x.e = mathfloor(e / LOG_BASE);\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external && (x.e > MAX_E || x.e < -MAX_E)) throw Error(exponentOutOfRange + e);\r\n } else {\r\n\r\n // Zero.\r\n x.s = 0;\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }", "function ToRawPrecision (x, minPrecision, maxPrecision) {\n var\n // 1. Let p be maxPrecision.\n p = maxPrecision;\n\n // 2. If x = 0, then\n if (x === 0) {\n var\n // a. Let m be the String consisting of p occurrences of the character \"0\".\n m = arrJoin.call(Array (p + 1), '0'),\n // b. Let e be 0.\n e = 0;\n }\n // 3. Else\n else {\n // a. Let e and n be integers such that 10ᵖ⁻¹ ≤ n < 10ᵖ and for which the\n // exact mathematical value of n × 10ᵉ⁻ᵖ⁺¹ – x is as close to zero as\n // possible. If there are two such sets of e and n, pick the e and n for\n // which n × 10ᵉ⁻ᵖ⁺¹ is larger.\n var\n e = log10Floor(Math.abs(x)),\n\n // Easier to get to m from here\n f = Math.round(Math.exp((Math.abs(e - p + 1)) * Math.LN10)),\n\n // b. Let m be the String consisting of the digits of the decimal\n // representation of n (in order, with no leading zeroes)\n m = String(Math.round(e - p + 1 < 0 ? x * f : x / f));\n }\n\n // 4. If e ≥ p, then\n if (e >= p)\n // a. Return the concatenation of m and e-p+1 occurrences of the character \"0\".\n return m + arrJoin.call(Array(e-p+1 + 1), '0');\n\n // 5. If e = p-1, then\n else if (e === p - 1)\n // a. Return m.\n return m;\n\n // 6. If e ≥ 0, then\n else if (e >= 0)\n // a. Let m be the concatenation of the first e+1 characters of m, the character\n // \".\", and the remaining p–(e+1) characters of m.\n m = m.slice(0, e + 1) + '.' + m.slice(e + 1);\n\n // 7. If e < 0, then\n else if (e < 0)\n // a. Let m be the concatenation of the String \"0.\", –(e+1) occurrences of the\n // character \"0\", and the string m.\n m = '0.' + arrJoin.call(Array (-(e+1) + 1), '0') + m;\n\n // 8. If m contains the character \".\", and maxPrecision > minPrecision, then\n if (m.indexOf(\".\") >= 0 && maxPrecision > minPrecision) {\n var\n // a. Let cut be maxPrecision – minPrecision.\n cut = maxPrecision - minPrecision;\n\n // b. Repeat while cut > 0 and the last character of m is \"0\":\n while (cut > 0 && m.charAt(m.length-1) === '0') {\n // i. Remove the last character from m.\n m = m.slice(0, -1);\n\n // ii. Decrease cut by 1.\n cut--;\n }\n\n // c. If the last character of m is \".\", then\n if (m.charAt(m.length-1) === '.')\n // i. Remove the last character from m.\n m = m.slice(0, -1);\n }\n // 9. Return m.\n return m;\n}", "function parseDecimal(x, str) {\n var e, i, len;\n\n // Decimal point?\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\n\n // Exponential form?\n if ((i = str.search(/e/i)) > 0) {\n\n // Determine exponent.\n if (e < 0) e = i;\n e += +str.slice(i + 1);\n str = str.substring(0, i);\n } else if (e < 0) {\n\n // Integer.\n e = str.length;\n }\n\n // Determine leading zeros.\n for (i = 0; str.charCodeAt(i) === 48;) ++i;\n\n // Determine trailing zeros.\n for (len = str.length; str.charCodeAt(len - 1) === 48;) --len;\n str = str.slice(i, len);\n\n if (str) {\n len -= i;\n e = e - i - 1;\n x.e = mathfloor(e / LOG_BASE);\n x.d = [];\n\n // Transform base\n\n // e is the base 10 exponent.\n // i is where to slice str to get the first word of the digits array.\n i = (e + 1) % LOG_BASE;\n if (e < 0) i += LOG_BASE;\n\n if (i < len) {\n if (i) x.d.push(+str.slice(0, i));\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\n str = str.slice(i);\n i = LOG_BASE - str.length;\n } else {\n i -= len;\n }\n\n for (; i--;) str += '0';\n x.d.push(+str);\n\n if (external && (x.e > MAX_E || x.e < -MAX_E)) throw Error(exponentOutOfRange + e);\n } else {\n\n // Zero.\n x.s = 0;\n x.e = 0;\n x.d = [0];\n }\n\n return x;\n }", "function multiplier(x){var parts=x.toString().split('.');if(parts.length<2){return 1;}return Math.pow(10,parts[1].length);}", "function noExponents(num) {\r\n var numStr = num.toString();\r\n var numParts = numStr.split(/[eE]/);\r\n\r\n if(numParts.length === 1) {\r\n return numParts[0];\r\n }\r\n\r\n var left = numParts[0];\r\n var right = numParts[1];\r\n\r\n var minus;\r\n if(left[0]==='-') {\r\n minus = left[0];\r\n left = left.substr(1, left.length);\r\n } else {\r\n minus = '';\r\n }\r\n\r\n var mag = Number(right) + 1;\r\n\r\n //left = decimalNumberService.cutExtraZeros(left, 0);\r\n var magOffset = left.indexOf('.');\r\n if(magOffset > 1) {\r\n mag += (magOffset - 1);\r\n }\r\n\r\n var leftDigits = left.replace('.', '');\r\n var z = '';\r\n\r\n // result < 1 => 0.xxx\r\n if(mag < 0) {\r\n z = minus + '0.';\r\n while(mag++) {\r\n z += '0';\r\n }\r\n return z + leftDigits;\r\n }\r\n\r\n var zeroCount = mag - leftDigits.length;\r\n if(zeroCount > 0) {\r\n // result >= 1\r\n for(var i=0; i<zeroCount; i++) {\r\n z += '0';\r\n }\r\n return minus + leftDigits + z;\r\n } else if(zeroCount===0) { \r\n return minus + leftDigits;\r\n } else {\r\n // decPos can't be negative here\r\n var decPos = leftDigits.length + zeroCount;\r\n var decimalResult;\r\n if(decPos === 0) {\r\n decimalResult = '0.' + leftDigits;\r\n } else {\r\n decimalResult = leftDigits.substr(0, decPos) + '.' + leftDigits.substr(decPos, leftDigits.length);\r\n }\r\n return minus + decimalResult;\r\n }\r\n }", "static toDecimalString(value) {\n const stringValue = value.toString()\n if (stringValue.match(/^-?\\d+$/)) {\n return stringValue\n }\n\n return value.toFixed(2).replace(/0+$/g, '').replace(/\\.$/g, '')\n }", "function genericFormat(input, precision, thousands, decimal) {\n\n var zeroes = \"000000000000000000000000000000\";\n\n var parts = input.toString().split('.');\n parts[0] = parts[0].split(/(?=(?:\\d{3})+(?:\\.|$))/g).join(thousands);\n\n if (precision) {\n \n //TODO: add optional rounding parameter\n \n if (parts[1]) {\n if (parts[1].length >= precision) {\n parts[1] = parts[1].substring(0, precision);\n } else {\n parts[1] = parts[1] + zeroes.substring(0, precision - parts[1].length);\n }\n } else {\n parts[1] = zeroes.substring(0, precision);\n }\n }\n if(parts[1] && precision !== 0) {\n return parts[0] + decimal + parts[1];\n }\n else {\n return parts[0];\n }\n }", "function numberFormat(number, decimals, decPoint, thousandsSep) {\n decimals = isNaN(decimals) ? 2 : Math.abs(decimals);\n decPoint = decPoint === undefined ? '.' : decPoint;\n thousandsSep = thousandsSep === undefined ? ',' : thousandsSep;\n var sign = number < 0 ? '-' : '';\n number = Math.abs(+number || 0);\n var intPart = parseInt(number.toFixed(decimals), 10) + '';\n var j = intPart.length > 3 ? intPart.length % 3 : 0;\n return sign + (j ? intPart.substr(0, j) + thousandsSep : '') + intPart.substr(j).replace(/(\\d{3})(?=\\d)/g, '$1' + thousandsSep) + (decimals ? decPoint + Math.abs(number - intPart).toFixed(decimals).slice(2) : '');\n}", "function numberWithDots(x) {\n var parts = x.toString().split(\".\");\n // console.log(parts)\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n return parts.join(\".\");\n }", "function decimal() {\n let currentNumber = document.getElementById('calc').value;\n if ( currentNumber === '0' ) {\n currentNumber = '0.';\n numInputs.push(currentNumber);\n } else if ( currentNumber.indexOf('.') === -1 ) {\n currentNumber = currentNumber + '.';\n numInputs[numInputs.length - 1] = currentNumber;\n }\n document.getElementById('calc').value = currentNumber;\n createHist();\n clearOp();\n}", "toFixed(digits = 0) {\n if (digits < 0) {\n throw new RangeError('toFixed() digits argument must be non-negative');\n }\n\n if (this.isZero()) {\n return '0' + (digits > 1 ? '.' + '0'.repeat(digits) : '');\n }\n let {sign, accuracy} = this;\n let string = this.toString();\n let padding = digits - accuracy;\n if (padding < 0) {\n let rounding = +string.charAt(string.length + padding);\n if (rounding >= 5) {\n string = this.add(Decimal.exp(-digits).set('sign', sign)).toString();\n }\n return string.slice(0, padding).replace(/\\.$/, '');\n } else if (padding > 0) {\n return string + (this.isReal() ? '' : '.') + '0'.repeat(padding);\n }\n return string;\n }", "function numberDecimals(x, n){\n return Number(removeAll(x, \",\")).toFixed(n);\n }", "function formatDecimal(input, decimalPlaces) {\n var output = input;\n if (typeof output !== \"string\" && typeof output !== \"number\") {\n output = \"\" + output;\n }\n if (typeof output === \"string\") {\n output = output.replace(nonDecimalCharacters, '');\n if (output === \"\") {\n return input;\n }\n if (!$.isNumeric(output)) {\n return input;\n }\n output = +output; //convert to number\n if (output > Number.MAX_SAFE_INTEGER) {\n //way too high, something is wrong, return original\n return input;\n }\n }\n return output.toFixed(decimalPlaces);\n }", "function nwp(v, p) {\n\tvar parts = v.toFixed(p).split('.');\n\tparts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n\treturn parts.join('.');\n}", "function floatToString(n, prec) {\n if (typeof prec === 'number' && prec > 0) {\n var x = Math.pow(10, prec);\n\n // Get left and right of decimal point\n var left = Math.floor(n);\n var right = (Math.round(n*x) / x).toString().split('.')[1];\n\n // Pad by extra zeros\n if (right.length < prec) right += repeat('0', prec-right.length);\n\n return left + \".\" + right;\n }\n else\n return n.toString();\n}", "function decimal (point) {\n if (calcDisplay.waitForSecondOperand === true) {\n calcDisplay.displayValue = '0.';\n calcDisplay.waitForSecondOperand = false;\n return;\n }\n if (!calcDisplay.displayValue.includes(point)) {\n calcDisplay.displayValue += point;\n }\n}", "function set_number_format(amount, decimals) {\n amount += '';\n amount = parseFloat(amount.replace(/[^0-9\\.]/g, ''));\n decimals = decimals || 0;\n if (isNaN(amount) || amount === 0)\n return parseFloat(0).toFixed(decimals);\n amount = '' + amount.toFixed(decimals);\n var amount_parts = amount.split('.'),\n regexp = /(\\d+)(\\d{3})/;\n while (regexp.test(amount_parts[0]))\n amount_parts[0] = amount_parts[0].replace(regexp, '$1' + ' ' + '$2');\n return amount_parts.join('.');\n }", "function numberWithCommas(x) {\n var parts = x.toFixed(2).toString().split(\".\");\n \n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n \n return parts.join(\".\");\n }", "function decimal(num) {\n // convert to a string\n num = '' + num;\n\n // find decimal point\n var dec = num.indexOf('.');\n\n if (dec >= 0) {\n // take out the decimal point\n num = num.replace('.', '');\n var precision = num.length - dec;\n } else {\n var precision = 0;\n }\n\n return new Decimal(bigint(num), precision);\n}", "function format(expr, decplaces)\n{\n // evaluate the incoming expression\n var val = eval(expr);\n\n // raise the value by power of 10 times the number of decimal places;\n // round to an integer: convert to string\n var str= \"\" + Math.round(val*Math.pow(10, decplaces));\n // pad small value strings with zeros to the left of rounded number\n while (str.length <= decplaces)\n {\n str = \"0\" + str;\n }\n // establish location of decimal point\n var decpoint = str.length - decplaces;\n // assemble final result from:\n // (a) the string up to the positon of the decimal point;\n // (b) the decimal point; and\n // (c) the balance of the string. Return finished product.\n return str.substring(0,decpoint) + \".\" + str.substring(decpoint, str.length);\n}", "function DecimalImply(value, precision) {\n return DecimalPad(value, precision).replace('.', '');\n}", "function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }", "function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }", "function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }", "function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }", "function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }", "function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }", "function addDecimal() {\n if (this.currentInput.length == 0) {\n //no leading \".\", use \"0.\"\n this.currentInput = \"0.\";\n }\n else {\n // First make sure one doesn't exist\n if (this.currentInput.indexOf(\".\") == -1) {\n this.currentInput = this.currentInput + \".\";\n }\n }\n this.displayCurrentInput();\n}", "function parseDecimal(x, str) {\n var e, i, len;\n\n // Decimal point?\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\n\n // Exponential form?\n if ((i = str.search(/e/i)) > 0) {\n\n // Determine exponent.\n if (e < 0) e = i;\n e += +str.slice(i + 1);\n str = str.substring(0, i);\n } else if (e < 0) {\n\n // Integer.\n e = str.length;\n }\n\n // Determine leading zeros.\n for (i = 0; str.charCodeAt(i) === 48; i++);\n\n // Determine trailing zeros.\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\n str = str.slice(i, len);\n\n if (str) {\n len -= i;\n x.e = e = e - i - 1;\n x.d = [];\n\n // Transform base\n\n // e is the base 10 exponent.\n // i is where to slice str to get the first word of the digits array.\n i = (e + 1) % LOG_BASE;\n if (e < 0) i += LOG_BASE;\n\n if (i < len) {\n if (i) x.d.push(+str.slice(0, i));\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\n str = str.slice(i);\n i = LOG_BASE - str.length;\n } else {\n i -= len;\n }\n\n for (; i--;) str += '0';\n x.d.push(+str);\n\n if (external) {\n\n // Overflow?\n if (x.e > x.constructor.maxE) {\n\n // Infinity.\n x.d = null;\n x.e = NaN;\n\n // Underflow?\n } else if (x.e < x.constructor.minE) {\n\n // Zero.\n x.e = 0;\n x.d = [0];\n // x.constructor.underflow = true;\n } // else x.constructor.underflow = false;\n }\n } else {\n\n // Zero.\n x.e = 0;\n x.d = [0];\n }\n\n return x;\n }", "function defineDecimals( num, decimals = 2 ) {\n // .toFixed(decimals)\n return (num).toFixed(decimals)\n }", "function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }", "function parseDecimal(x, str) {\n var e, i, len;\n\n // Decimal point?\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\n\n // Exponential form?\n if ((i = str.search(/e/i)) > 0) {\n\n // Determine exponent.\n if (e < 0) e = i;\n e += +str.slice(i + 1);\n str = str.substring(0, i);\n } else if (e < 0) {\n\n // Integer.\n e = str.length;\n }\n\n // Determine leading zeros.\n for (i = 0; str.charCodeAt(i) === 48; i++);\n\n // Determine trailing zeros.\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\n str = str.slice(i, len);\n\n if (str) {\n len -= i;\n x.e = e = e - i - 1;\n x.d = [];\n\n // Transform base\n\n // e is the base 10 exponent.\n // i is where to slice str to get the first word of the digits array.\n i = (e + 1) % LOG_BASE;\n if (e < 0) i += LOG_BASE;\n\n if (i < len) {\n if (i) x.d.push(+str.slice(0, i));\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\n str = str.slice(i);\n i = LOG_BASE - str.length;\n } else {\n i -= len;\n }\n\n for (; i--;) str += '0';\n x.d.push(+str);\n\n if (external) {\n\n // Overflow?\n if (x.e > x.constructor.maxE) {\n\n // Infinity.\n x.d = null;\n x.e = NaN;\n\n // Underflow?\n } else if (x.e < x.constructor.minE) {\n\n // Zero.\n x.e = 0;\n x.d = [0];\n // x.constructor.underflow = true;\n } // else x.constructor.underflow = false;\n }\n } else {\n\n // Zero.\n x.e = 0;\n x.d = [0];\n }\n\n return x;\n }", "function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n}", "function Fmt(x) { \n var v\n if(x>0) { v=''+(x+0.00000001) } else { v=''+(x-0.00000000) };\n return v.substring(0,v.indexOf('.')+8)\n}" ]
[ "0.8267669", "0.8267669", "0.82674587", "0.82674587", "0.82674587", "0.82674587", "0.82674587", "0.82674587", "0.82674587", "0.8245311", "0.823352", "0.823352", "0.823352", "0.821987", "0.821662", "0.821662", "0.821662", "0.81836796", "0.80449224", "0.80319804", "0.80319804", "0.80319804", "0.80319804", "0.80319804", "0.80319804", "0.80319804", "0.80319804", "0.80319804", "0.80319804", "0.80319804", "0.80319804", "0.7979368", "0.64336544", "0.63972664", "0.62922424", "0.6245105", "0.6028128", "0.6013908", "0.5995013", "0.59526926", "0.5947447", "0.59420586", "0.593145", "0.58098435", "0.57981277", "0.5797589", "0.5796385", "0.5796385", "0.57776725", "0.57756203", "0.5766116", "0.5753817", "0.5753817", "0.5753817", "0.5753817", "0.5753817", "0.57364506", "0.57327485", "0.57327485", "0.5718286", "0.5708862", "0.57021403", "0.56978256", "0.56975335", "0.5686516", "0.5672958", "0.5669484", "0.56591034", "0.5652193", "0.56489867", "0.564688", "0.5643843", "0.5627154", "0.560695", "0.55987316", "0.5595846", "0.5578629", "0.557485", "0.554846", "0.5542858", "0.55401593", "0.55331457", "0.5529787", "0.5528792", "0.5528792", "0.5528792", "0.5528792", "0.5528792", "0.5528792", "0.55254316", "0.55199164", "0.551932", "0.5515131", "0.55138725", "0.55087596", "0.5500637" ]
0.82380456
14
Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
function formatTrim(s) { out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { switch (s[i]) { case ".": i0 = i1 = i; break; case "0": if (i0 === 0) i0 = i; i1 = i; break; default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break; } } return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stripZero(num){\n return parseFloat(a.toFixed(4));\n}", "function removeZeros(value) {\n if (value.indexOf('.') !== -1) {\n while (value[value.length - 1] === '0') {\n value = value.substring(0, value.length - 1);\n }\n if (value[value.length - 1] === '.') {\n value = value.substring(0, value.length - 1);\n }\n }\n return value;\n}", "static removeLeftZeros(value) {\n while (value.startsWith('0')) {\n value = value.substring(1, value.length);\n }\n return value;\n }", "function removeZeros(x) {\n var res;\n try {\n res = x.replace(/\\+0/g, '').replace(/\\+ 0/g, '');\n } catch (e) {\n res = x;\n }\n\n return res;\n}", "function removeTrailingZeroes(value) {\n while (value.charAt(value.length - 1) === '0') {\n value = value.slice(0, -1);\n }\n if (value.charAt(value.length - 1) === '.') {\n value = value.slice(0, -1);\n }\n return value;\n }", "function removeLeadingZero(nr)\n{\n\tif(nr.substring(0,1) == \"0\")\t\t\t\n\t\tnr = nr.substring(1, (nr.length));\n\t\t\t\t\n\treturn nr;\n}", "function preserveZerosNF(val)\n{\n\tvar i;\n\n\t// make a string - to preserve the zeros at the end\n\tval = val + '';\n\tif (this.places <= 0) return val; // leave now. no zeros are necessary - v1.0.1 less than or equal\n\t\n\tvar decimalPos = val.indexOf('.');\n\tif (decimalPos == -1)\n\t{\n\t\tval += '.';\n\t\tfor (i=0; i<this.places; i++)\n\t\t{\n\t\t\tval += '0';\n\t\t}\n\t}\n\telse\n\t{\n\t\tvar actualDecimals = (val.length - 1) - decimalPos;\n\t\tvar difference = this.places - actualDecimals;\n\t\tfor (i=0; i<difference; i++)\n\t\t{\n\t\t\tval += '0';\n\t\t}\n\t}\n\t\n\treturn val;\n}", "function stripLeadingZeroes(s) {\n if (s === null || s.length === 0) {\n return \"0\";\n } else {\n for (let i = 0; i < s.length; i++) {\n if (s[i] !== \"0\") {\n return s.substring(i);\n }\n }\n return s; // nothing to strip\n }\n }", "function noBoringZeros(x) {\n let a = x.toString().split('');\n for(let i = a.length -1; i >= 0; i--){\n if (a[i] == 0){\n a.pop()\n }else{\n break\n }\n }\n return Number(a.join(''))\n }", "function eRemoveLeadingZeros(p) {\n let lzCount = 0;\n for (let i = 0; i <= p.length - 1; i++) {\n if (eSign(p[i]) !== 0) {\n break;\n }\n lzCount++;\n }\n if (lzCount !== 0) {\n p = p.slice(lzCount);\n }\n return p;\n}", "function shrinkToZero(val) {\n if (Math.abs(val) < 1e-5) {\n return 0\n } else {\n return val\n }\n}", "function formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\":\n i0 = i1 = i;\n break;\n case \"0\":\n if (i0 === 0) i0 = i;\n i1 = i;\n break;\n default:\n if (!+s[i]) break out;\n if (i0 > 0) i0 = 0;\n break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n }", "function formatTrim (s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\":\n i0 = i1 = i;\n break;\n\n case \"0\":\n if (i0 === 0) i0 = i;\n i1 = i;\n break;\n\n default:\n if (i0 > 0) {\n if (!+s[i]) break out;\n i0 = 0;\n }\n\n break;\n }\n }\n\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n }", "function formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n }", "function formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n }", "function formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n }", "function zeroSuppress (num, digit) {\r\n var tmp = num.toString();\r\n while(tmp.length < digit) tmp = \"0\" + tmp;\r\n return tmp\r\n}", "function formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n }", "function formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}", "function formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}", "function formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}", "function removeZeros(code){\n var l = code.length\n var i = 0;\n for(; i < l; i++){\n\tif(code[i] !== '0')\n\t break;\n }\n return code.substr(i,l-i);\n}", "function trimLeadingZeros(sectionText) {\n if (sectionText) {\n var replacedText = sectionText;\n for (var i = 0; i < replacedText.length; i += 1) {\n if (sectionText[i] === ' ') {\n replacedText = replacedText.replace(' ', '&nbsp;');\n } else {\n break;\n }\n }\n return replacedText;\n }\n return sectionText;\n}", "function trimTrailingZeros(sectionText) {\n if (sectionText) {\n var replacedText = sectionText;\n for (var i = replacedText.length - 1; i >= 0; i -= 1) {\n if (replacedText[i] === ' ') {\n replacedText = replacedText.substring(0, i) + '&nbsp;' + replacedText.substring(i + 1);\n } else {\n break;\n }\n }\n return replacedText;\n }\n return sectionText;\n}", "function removeZeroValues() {\n\t\n\n\tvar removeItem = 0;\n\n\tinputDigits = jQuery.grep(inputDigits, function(value) {\n\t return value != removeItem;\n\t});\n}", "function formatTrim(s) {\n\t out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n\t switch (s[i]) {\n\t case \".\": i0 = i1 = i; break;\n\t case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n\t default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;\n\t }\n\t }\n\t return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n\t}", "function formatTrim$1(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}", "function removeTrailingZeros(s) {\n if (!s) return '';\n var len = s.length;\n var i = len - 1;\n\n while ( i >= 0 && s[i] === 'I') {\n i--;\n }\n\n return s.substring(0 , i + 1);\n }", "function zeroTrim (str) {\n str = String(str)\n var start = -1\n var len = str.length\n var end = len\n\n while (start < len && str[++start] === ZERO_CHAR) {}\n while (end > 0 && str[--end] === ZERO_CHAR) {}\n\n if (start >= len || end < 0) return ''\n return str.substring(start, end + 1)\n}", "function deletingZero() {\r\n for (let i = 0; i < valueCols.length; i++) {\r\n let value = valueCols[i].value;\r\n if (value > 0) {\r\n if (value[0] === \"0\") {\r\n valueCols[i].value = value.slice(1);\r\n }\r\n }\r\n }\r\n}", "function removeZeros(array) {\n\tfor (let i = 0; i <array.length-1; i++) {\n if (array[i] == 0) {\n array.splice(i, 1);\n //josharray[i] = '*';\n }\n\t\n}\nfor (let i = 0; i < array.length;i++) {\n if (array[i] === 0) {\n array[i] = '*';\n }\n}\nreturn array;\n}", "function omitZeroPValueNotation(p)\n{\n //only in case that p is one, first digit shouldn't be omitted\n if (p == 1)\n return p;\n else\n {\n var newP = p;\n newP = newP.replace(\"0\", '');\n return newP;\n }\n}", "function removeZero() {\r\n var value = document.getElementById(\"output\").innerHTML;\r\n if (value == \"0\") {\r\n value = \" \"\r\n document.getElementById(\"output\").innerHTML = value;\r\n }\r\n}", "trim() {\n var i, j, n, r, v1 = this;\n n = v1.length;\n i = 0;\n while (i < n && v1[i] == 0)\n i++;\n if (i == 0)\n return v1;\n for(j = i; j < n; j++)\n v1[j - i] = v1[j];\n v1.length = n - i;\n v1.__proto__.emin += i;\n return v1;\n }", "function dumpZeros() {\n $('[id*=LBL_AP]').each(function () { if ($(this).text() == '.00') { $(this).text('') } });\n}", "function noBoringZeros(n) {\n if(n===0) return n;\n let derp = n.toString().split('');\n for(var i = derp.length - 1; i > -1; i--){\n if(derp[i] != \"0\"){ break; }\n if(derp[i] === \"0\"){derp.pop();}\n }\n return parseInt(derp.join(\"\"));\n}", "function prefixUnitZero(val) {\n let newVal = val;\n if(val < 0) {\n newVal = val / -1;\n }\n newVal = newVal < 10 ? `0${newVal}` : newVal;\n if(val < 0) {\n newVal = `-${newVal}`;\n }\n return newVal;\n}", "function trimNumber(number){\n\t\treturn parseFloat(number.toFixed(2));\n\t}", "function removePrecedingZero(minutes) {\n if (minutes.charAt(0) == \"0\") {\n return minutes.charAt(1);\n } else {\n return minutes;\n }\n}", "function removeZeroes(row) {\n return row.filter(function(number) {\n return number !== 0\n })\n}", "function removeHeadingZeros(STR){\n\tvar sAux = '';\n\tSTR = new String(STR); \n\tvar i = 0;\n\twhile (i < STR.length ){\n\t\tif ((STR.charAt(i)!='.') && (STR.charAt(i)!=',')){\n\t\t\tsAux += STR.charAt(i);\n\t\t}\n\t\ti++\n\t}\n STR = new String(sAux);\n sAux = '';\n i = 0;\n while (i < STR.length ){\n if (STR.charAt(i) != '0'){\n sAux = STR.substring(i,STR.length)\n\t i = STR.length;\n\t}\n i++;\n }\n return sAux;\n}", "function removeZeros(array) {\n\tlet flag=[]\n\tlet i;\n\tfor(i=0;i<array.length;i++){\n\t\tif(array[i]!==0){\n\t\t\tflag.push(array[i]);\n\t\t\t\n\t\t}\telse if(flag[(flag.length-1)]!==\"*\"){\n\t\t\tflag.push(\"*\");\n\t\t}\n\t\t\n\t\t}\t\n\t\treturn flag;\n\t}", "function noBoringZeros(n) {\n // your code\n if (n === 0) return 0;\n const spreadNum = n.toString().split(\"\")\n while (spreadNum[spreadNum.length - 1] === '0') {\n spreadNum.pop()\n }\n return Number(spreadNum.join(''))\n}", "function removeZero() {\n let result1 = document.querySelector(\"#display1\").innerHTML;\n if (result1.startsWith(\"0\")) {\n document.querySelector(\"#display1\").innerHTML = \"\";\n calculate = \"\";\n } \n}", "function noNegs(x) {\n for (var i=0; i<x.length; i++) {\n if (x[i]<0) {\n x[i]=0;\n }\n }\n return x;\n}", "function deleteZeroBetweenToLeft(){\n\t for(let i=0; i< 4; i++){\n\t \t resultTemp[i] = resultTemp[i].filter((item)=>{\n\t \t \t if(item != 0){\n\t \t \t \t return item;\n\t \t \t }\n\t \t });\n\t \t while(resultTemp[i].length != 4){\n\t \t \t resultTemp[i].push(0);\n\t \t }\n\t }\n}", "function trailingZeros(mantissa) {\n\t var zeros = 0;\n\t for (var i = mantissa.length - 1; i >= 0; i--) {\n\t var c = mantissa.charAt(i);\n\t if (c == \"0\") {\n\t zeros++;\n\t } else {\n\t return zeros;\n\t }\n\t }\n\t return zeros;\n\t}", "function removeLeadingZero(el) {\n if (!isNaN(document.getElementById(\"output\").value[1]) && document.getElementById(\"output\").value[0] == \"0\" && document.getElementById(\"output\").value.length > 1) { \n display = display.slice(1)\n document.getElementById(\"output\").value = document.getElementById(\"output\").value.slice(1)\n lastDigitClicked = lastDigitClicked.slice(1)\n }\n}", "function removeZeros(arr) {\n return arr.filter((x) => x);\n}", "function trimNulls(str) {\n return str.replace(/\\0/g, '');\n}", "function realRemoveZeros(array) {\n const head = [];\n const tail = [];\n for (const e of array) {\n if (e === 0 || e === \"0\") {\n tail[tail.length] = e;\n } else {\n head[head.length] = e;\n }\n }\n return [...head, ...tail];\n}", "function autoStrip(s, settings, strip_zero) {\n if (settings.aSign) { /** remove currency sign */\n while (s.indexOf(settings.aSign) > -1) {\n s = s.replace(settings.aSign, '');\n }\n }\n s = s.replace(settings.skipFirstAutoStrip, '$1$2'); /** first replace anything before digits */\n s = s.replace(settings.skipLastAutoStrip, '$1'); /** then replace anything after digits */\n s = s.replace(settings.allowedAutoStrip, ''); /** then remove any uninterested characters */\n if (settings.altDec) {\n s = s.replace(settings.altDec, settings.aDec);\n } /** get only number string */\n var m = s.match(settings.numRegAutoStrip);\n s = m ? [m[1], m[2], m[3]].join('') : '';\n if ((settings.lZero === 'allow' || settings.lZero === 'keep') && strip_zero !== 'strip') {\n var parts = [],\n nSign = '';\n parts = s.split(settings.aDec);\n if (parts[0].indexOf('-') !== -1) {\n nSign = '-';\n parts[0] = parts[0].replace('-', '');\n }\n if (parts[0].length > settings.mInt && parts[0].charAt(0) === '0') { /** strip leading zero if need */\n parts[0] = parts[0].slice(1);\n }\n s = nSign + parts.join(settings.aDec);\n }\n if ((strip_zero && settings.lZero === 'deny') || (strip_zero && settings.lZero === 'allow' && settings.allowLeading === false)) {\n var strip_reg = '^' + settings.aNegRegAutoStrip + '0*(\\\\d' + (strip_zero === 'leading' ? ')' : '|$)');\n strip_reg = new RegExp(strip_reg);\n s = s.replace(strip_reg, '$1$2');\n }\n return s;\n }", "function autoStrip(s, settings, strip_zero) {\n if (settings.aSign) { /** remove currency sign */\n while (s.indexOf(settings.aSign) > -1) {\n s = s.replace(settings.aSign, '');\n }\n }\n s = s.replace(settings.skipFirstAutoStrip, '$1$2'); /** first replace anything before digits */\n s = s.replace(settings.skipLastAutoStrip, '$1'); /** then replace anything after digits */\n s = s.replace(settings.allowedAutoStrip, ''); /** then remove any uninterested characters */\n if (settings.altDec) {\n s = s.replace(settings.altDec, settings.aDec);\n } /** get only number string */\n var m = s.match(settings.numRegAutoStrip);\n s = m ? [m[1], m[2], m[3]].join('') : '';\n if ((settings.lZero === 'allow' || settings.lZero === 'keep') && strip_zero !== 'strip') {\n var parts = [],\n nSign = '';\n parts = s.split(settings.aDec);\n if (parts[0].indexOf('-') !== -1) {\n nSign = '-';\n parts[0] = parts[0].replace('-', '');\n }\n if (parts[0].length > settings.mInt && parts[0].charAt(0) === '0') { /** strip leading zero if need */\n parts[0] = parts[0].slice(1);\n }\n s = nSign + parts.join(settings.aDec);\n }\n if ((strip_zero && settings.lZero === 'deny') || (strip_zero && settings.lZero === 'allow' && settings.allowLeading === false)) {\n var strip_reg = '^' + settings.aNegRegAutoStrip + '0*(\\\\d' + (strip_zero === 'leading' ? ')' : '|$)');\n strip_reg = new RegExp(strip_reg);\n s = s.replace(strip_reg, '$1$2');\n }\n return s;\n }", "function autoStrip(s, settings, strip_zero) {\n if (settings.aSign) { /** remove currency sign */\n while (s.indexOf(settings.aSign) > -1) {\n s = s.replace(settings.aSign, '');\n }\n }\n s = s.replace(settings.skipFirstAutoStrip, '$1$2'); /** first replace anything before digits */\n s = s.replace(settings.skipLastAutoStrip, '$1'); /** then replace anything after digits */\n s = s.replace(settings.allowedAutoStrip, ''); /** then remove any uninterested characters */\n if (settings.altDec) {\n s = s.replace(settings.altDec, settings.aDec);\n } /** get only number string */\n var m = s.match(settings.numRegAutoStrip);\n s = m ? [m[1], m[2], m[3]].join('') : '';\n if ((settings.lZero === 'allow' || settings.lZero === 'keep') && strip_zero !== 'strip') {\n var parts = [],\n nSign = '';\n parts = s.split(settings.aDec);\n if (parts[0].indexOf('-') !== -1) {\n nSign = '-';\n parts[0] = parts[0].replace('-', '');\n }\n if (parts[0].length > settings.mInt && parts[0].charAt(0) === '0') { /** strip leading zero if need */\n parts[0] = parts[0].slice(1);\n }\n s = nSign + parts.join(settings.aDec);\n }\n if ((strip_zero && settings.lZero === 'deny') || (strip_zero && settings.lZero === 'allow' && settings.allowLeading === false)) {\n var strip_reg = '^' + settings.aNegRegAutoStrip + '0*(\\\\d' + (strip_zero === 'leading' ? ')' : '|$)');\n strip_reg = new RegExp(strip_reg);\n s = s.replace(strip_reg, '$1$2');\n }\n return s;\n }", "function zeros(val) {\n if (/^-*0+$/.test(val.toString())) {\n return '0';\n }\n return val;\n}", "function zeros(val) {\n if (/^-*0+$/.test(val.toString())) {\n return '0';\n }\n return val;\n}", "function zeros(val) {\n if (/^-*0+$/.test(val.toString())) {\n return '0';\n }\n return val;\n}", "function strip(number) {\n return (parseFloat(number.toPrecision(2)));\n }", "function trailingZeros(mantissa) {\n var zeros = 0;\n\n for (var i = mantissa.length - 1; i >= 0; i--) {\n var c = mantissa.charAt(i);\n\n if (c == \"0\") {\n zeros++;\n } else {\n return zeros;\n }\n }\n\n return zeros;\n}", "function withLeadingZero2Dig(s) {\n return (\"0\" + s).slice(-2);\n }", "function removeDecimal(number){\n return Math.round(number)\n }", "function chop(x, tol=1e-7) { return abs(x) < tol ? 0 : x }", "function trailingZeros(n) {\n let result = 0;\n let power = 1;\n while (Math.floor(n / Math.pow(5, power)) > 0) {\n result += Math.floor(n / Math.pow(5, power));\n power++;\n }\n return result;\n}", "function floorToZero(x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n}", "function unpad(a) {\n a = ethjs_util_1.default.stripHexPrefix(a);\n var first = a[0];\n while (a.length > 0 && first.toString() === '0') {\n a = a.slice(1);\n first = a[0];\n }\n return a;\n}", "function replaceWithZero(arr){\n for(var i = 0; i < arr.length; i++){\n if(arr[i] < 0){\n arr[i] = 0;\n }\n }\n return arr;\n}", "function removeZeros(data) {\n $.each(data.datasets, function (i, dataset) {\n arraylength = dataset.data.length;\n $.each(dataset.data, function (i, number) {\n if (number > 0)\n valueindex = (i + 1);\n if (i == (arraylength - 1))\n lastvalueindex = valueindex;\n })\n var newdata = (dataset.data.slice(0, valueindex));\n dataset.data = newdata;\n if (i == 0) {\n newvalueindex = lastvalueindex;\n } else {\n if (lastvalueindex > newvalueindex)\n newvalueindex = lastvalueindex\n }\n })\n data.labels = data.labels.slice(0, newvalueindex)\n return data;\n}", "function doubleZero(){\n if (foo.register === '0' || foo.register.length > 8) {\n return;\n } else {\n foo.key = '00';\n };\n foo.numPad();\n return;\n }", "function truncate(value)\n {\n if (value < 0) {\n return Math.ceil(value);\n }\n \n return Math.floor(value);\n }", "function zeroIt(a) { return( a < 10 ? \"0\"+a : a ); }", "function checkZerosBeforeNumber(num){\r\n\tif (num[0] == 0 && num[1] != \".\") {return num.substr(1)} else return num;\r\n}", "function moveZeros(arr) {\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tif (arr[i] === 0) {\n\t\t\tarr.push(arr[i]);\n\t\t\tarr.splice(i, 1);\n\t\t}\n\t}\n\treturn arr;\n}", "function dividePositiveZero(input) {\n return input / 0;\n}", "function fixRate(rate, allowedPrecision) {\n\n var decimalLength = rate.split('.')[1] ? rate.split('.')[1].length : 0;\n\n if (decimalLength < allowedPrecision) {\n\n rate = !_.contains(rate, '.') ? rate + '.' : rate;\n\n var howManyZeroToAdd = allowedPrecision - decimalLength;\n\n for (var i = 0; i < howManyZeroToAdd; i++) {\n rate += \"0\";\n }\n }\n\n return rate;\n }", "function transformIntoZero(value) {\n if (value === \"\") { return 0 }\n else {\n return value;\n }\n}", "function DecimalImply(value, precision) {\n return DecimalPad(value, precision).replace('.', '');\n}", "function imtrim(s) \n{\n s = s.replace(/(^\\s*)|(\\s*$)/gi,\"\");\n s = s.replace(/[ ]{2,}/gi,\" \");\n s = s.replace(/\\n /,\"\\n\");\n return s;\n}", "function xTrim(s) {\r\n return s.replace(/^\\s+|\\s+$/g, '');\r\n}", "function zeroAlpha (data) {\n for (var i = 0, n = data.length; i < n; i += 4) {\n data[i+3] = 0;\n }\n}", "function trim( value )\n{\n\n return LTrim(RTrim(value));\n\n}", "function trim( value ) {\n\n return LTrim(RTrim(value));\n\n}", "function downRound(v) {\n return Math.round(v - 0.0001);\n }", "function trim( value )\r\n{\r\n return LTrim(RTrim(value));\r\n}", "function trim( value ) {\r\n return LTrim(RTrim(value));\r\n}", "function cleanNum(val) {\n return val.toFixed(2);\n }", "function trim (zeichenkette) {\n return zeichenkette.replace (/^\\s+/, '').replace (/\\s+$/, '');\n}", "function prependZero(param) {\n\tif (String(param).length < 2) {\n\t\treturn \"0\" + String(param);\n\t}\n\treturn param;\n}", "function trimTiming(time, startTime) {\n\t\tif (typeof time !== \"number\") {\n\t\t\ttime = 0;\n\t\t}\n\n\t\tif (typeof startTime !== \"number\") {\n\t\t\tstartTime = 0;\n\t\t}\n\n\t\t// strip from microseconds to milliseconds only\n\t\tvar timeMs = Math.round(time ? time : 0),\n\t\t startTimeMs = Math.round(startTime ? startTime : 0);\n\n\t\treturn timeMs === 0 ? 0 : (timeMs - startTimeMs);\n\t}", "function trim( value ) {\r\n\t\r\n return LTrim(RTrim(value));\r\n\t\r\n }", "function myTrim(x) {\n \n return x.replace(/^\\s+|\\s+$/gm,'');\n }", "function trim( value ) {\n return LTrim(RTrim(value));\n}", "function formatMsisdnWithoutZero(msisdn) {\n\tvar msisdnValue = null;\n\n\tif (msisdn == null || $.trim(msisdn) == \"\") {\n\t\treturn msisdnValue;\n\t}\n\n\tmsisdn = $.trim(msisdn)\n\tif (msisdn.startsWith(\"0\")) {\n\t\tmsisdnValue = msisdn.substring(1);\n\t} else if (msisdn.startsWith(\"84\")) {\n\t\tmsisdnValue = msisdn.substring(2);\n\t} else if(msisdn.startsWith(\"+84\")){\n\t\tmsisdnValue = msisdn.substring(3);\n\t}\n\telse {\n\t\tmsisdnValue = msisdn;\n\t}\n\n//\tif (msisdnValue.length < 9 || msisdnValue.length > 10) {\n//\t\tmsisdnValue = null;\n//\t}\n\t\n\treturn msisdnValue;\n}", "function StripExtraDigits(digits)\n{\n\tvar strDigits = digits.toString();\n\t\n\t// Remove all trailing 0\n\twhile (strDigits.endsWith('0'))\n\t{\t\n\t\tstrDigits = strDigits.toString().slice(0,-1);\n\t}\n\t\n\t// If all digits after the decimal were removed, also remove the decimal\n\tif (strDigits.endsWith('.'))\n\t{\n\t\tstrDigits = strDigits.toString().slice(0,-1);\n\t}\n\t\n\treturn strDigits;\n}", "function trimCell(cell) {\n\t\tvar bogus = cell.getBogus();\n\t\tif (bogus) {\n\t\t\tbogus.remove();\n\t\t}\n\t\tcell.trim();\n\t}", "function trim( value ) {\r\n\t\r\n\treturn LTrim(RTrim(value));\r\n\t\r\n}", "function trim( value )\r\n{\r\n\t\r\n\treturn LTrim(RTrim(value));\r\n\t\r\n}", "function trim(value) {\n return LTrim(RTrim(value));\n}" ]
[ "0.68889534", "0.6851092", "0.65857196", "0.6565163", "0.64634806", "0.63949716", "0.6363541", "0.6351559", "0.63513404", "0.6247222", "0.62280047", "0.62115145", "0.619423", "0.61817855", "0.6175368", "0.6175368", "0.6171408", "0.6171158", "0.6164902", "0.6164902", "0.6164902", "0.6150462", "0.61494297", "0.61254984", "0.61246103", "0.6124426", "0.6111476", "0.6102569", "0.60986215", "0.60705185", "0.59983253", "0.59956133", "0.5903639", "0.58843374", "0.5865828", "0.58316153", "0.5771966", "0.5747449", "0.5737121", "0.57276976", "0.57178205", "0.56809014", "0.56321293", "0.5612511", "0.5597029", "0.55913985", "0.5586226", "0.55856436", "0.55508924", "0.55393463", "0.55226195", "0.55172926", "0.55172926", "0.55172926", "0.55138046", "0.55138046", "0.55138046", "0.54994285", "0.5474549", "0.538209", "0.5322942", "0.53093725", "0.52765083", "0.52474093", "0.5231181", "0.5228216", "0.5218551", "0.5215882", "0.52115256", "0.5188666", "0.5187176", "0.5182467", "0.51801044", "0.5176872", "0.5174317", "0.5172297", "0.51681286", "0.5163409", "0.5158635", "0.5144999", "0.51303726", "0.5120018", "0.51171327", "0.51066667", "0.510477", "0.5104185", "0.5101047", "0.5099214", "0.5093025", "0.50909597", "0.50892967", "0.5088918", "0.50869465", "0.5086196", "0.5081827", "0.5080243", "0.50730467" ]
0.6158505
23
deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].
function continuous(deinterpolate, reinterpolate) { var domain = unit, range$$1 = unit, interpolate$$1 = d3Interpolate.interpolate, clamp = false, piecewise, output, input; function rescale() { piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap; output = input = null; return scale; } function scale(x) { return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x); } scale.invert = function(y) { return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y); }; scale.domain = function(_) { return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice(); }; scale.range = function(_) { return arguments.length ? (range$$1 = slice.call(_), rescale()) : range$$1.slice(); }; scale.rangeRound = function(_) { return range$$1 = slice.call(_), interpolate$$1 = d3Interpolate.interpolateRound, rescale(); }; scale.clamp = function(_) { return arguments.length ? (clamp = !!_, rescale()) : clamp; }; scale.interpolate = function(_) { return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1; }; return rescale(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _interpolate(a, b, t) {\n\t return ((1 - t) * a) + (t * b);\n\t }", "function _interpolate(a, b, t) {\n return ((1 - t) * a) + (t * b);\n }", "function _interpolate(a, b, t) {\n return ((1 - t) * a) + (t * b);\n }", "function continuous(deinterpolate,reinterpolate){var domain=unit,range$$1=unit,interpolate$$1=d3Interpolate.interpolate,clamp=false,piecewise,output,input;function rescale(){piecewise=Math.min(domain.length,range$$1.length)>2?polymap:bimap;output=input=null;return scale;}function scale(x){return(output||(output=piecewise(domain,range$$1,clamp?deinterpolateClamp(deinterpolate):deinterpolate,interpolate$$1)))(+x);}scale.invert=function(y){return(input||(input=piecewise(range$$1,domain,deinterpolateLinear,clamp?reinterpolateClamp(reinterpolate):reinterpolate)))(+y);};scale.domain=function(_){return arguments.length?(domain=map$1.call(_,number),rescale()):domain.slice();};scale.range=function(_){return arguments.length?(range$$1=slice.call(_),rescale()):range$$1.slice();};scale.rangeRound=function(_){return range$$1=slice.call(_),interpolate$$1=d3Interpolate.interpolateRound,rescale();};scale.clamp=function(_){return arguments.length?(clamp=!!_,rescale()):clamp;};scale.interpolate=function(_){return arguments.length?(interpolate$$1=_,rescale()):interpolate$$1;};return rescale();}", "function interpolate(x, domain0, domain1) {\n if (domain0 === domain1) {\n return x === domain0 ? 0 : Infinity;\n }\n return (x - domain0) / (domain1 - domain0);\n}", "function continuous(deinterpolate,reinterpolate){var domain=unit,range$$1=unit,interpolate$$1=d3Interpolate.interpolate,clamp=false,piecewise,output,input;function rescale(){piecewise=Math.min(domain.length,range$$1.length)>2?polymap:bimap;output=input=null;return scale}function scale(x){return(output||(output=piecewise(domain,range$$1,clamp?deinterpolateClamp(deinterpolate):deinterpolate,interpolate$$1)))(+x)}scale.invert=function(y){return(input||(input=piecewise(range$$1,domain,deinterpolateLinear,clamp?reinterpolateClamp(reinterpolate):reinterpolate)))(+y)};scale.domain=function(_){return arguments.length?(domain=map$1.call(_,number),rescale()):domain.slice()};scale.range=function(_){return arguments.length?(range$$1=slice.call(_),rescale()):range$$1.slice()};scale.rangeRound=function(_){return range$$1=slice.call(_),interpolate$$1=d3Interpolate.interpolateRound,rescale()};scale.clamp=function(_){return arguments.length?(clamp=!!_,rescale()):clamp};scale.interpolate=function(_){return arguments.length?(interpolate$$1=_,rescale()):interpolate$$1};return rescale()}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = _d3Interpolate.interpolate,\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function (y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function (_) {\n return arguments.length ? (domain = _array.map.call(_, _number.default), rescale()) : domain.slice();\n };\n\n scale.range = function (_) {\n return arguments.length ? (range = _array.slice.call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function (_) {\n return range = _array.slice.call(_), interpolate = _d3Interpolate.interpolateRound, rescale();\n };\n\n scale.clamp = function (_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function (_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate$$1) {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate$$1) : reinterpolate$$1)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = map$3.call(_, number$2), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice$5.call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = slice$5.call(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate$$1) {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate$$1) : reinterpolate$$1)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = map$3.call(_, number$2), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice$5.call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = slice$5.call(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolate\"],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_2__[\"map\"].call(_, _number__WEBPACK_IMPORTED_MODULE_4__[\"default\"]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRound\"], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolate\"],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_2__[\"map\"].call(_, _number__WEBPACK_IMPORTED_MODULE_4__[\"default\"]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRound\"], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolate\"],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_2__[\"map\"].call(_, _number__WEBPACK_IMPORTED_MODULE_4__[\"default\"]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRound\"], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolate\"],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_2__[\"map\"].call(_, _number__WEBPACK_IMPORTED_MODULE_4__[\"default\"]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = _array__WEBPACK_IMPORTED_MODULE_2__[\"slice\"].call(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateRound\"], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"b\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"c\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"b\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"c\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"b\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"c\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"e\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"r\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"r\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"r\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"r\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"r\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"r\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"r\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"r\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"d\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"d\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"d\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"d\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"d\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"d\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"f\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"f\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"a\" /* interpolate */],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"t\" /* interpolateRound */], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"interpolate\"],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"interpolateRound\"], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"interpolate\"],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"interpolateRound\"], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"interpolate\"],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"interpolateRound\"], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"interpolate\"],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"a\" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"a\" /* default */]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"b\" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"interpolateRound\"], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n\t var domain = unit,\n\t range$$1 = unit,\n\t interpolate$$1 = d3Interpolate.interpolate,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\t\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\t\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n\t }\n\t\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\t\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice();\n\t };\n\t\n\t scale.range = function(_) {\n\t return arguments.length ? (range$$1 = slice.call(_), rescale()) : range$$1.slice();\n\t };\n\t\n\t scale.rangeRound = function(_) {\n\t return range$$1 = slice.call(_), interpolate$$1 = d3Interpolate.interpolateRound, rescale();\n\t };\n\t\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\t\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n\t };\n\t\n\t return rescale();\n\t}", "function continuous(deinterpolate, reinterpolate) {\n\t var domain = unit,\n\t range$$1 = unit,\n\t interpolate$$1 = d3Interpolate.interpolate,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\t\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\t\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n\t }\n\t\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\t\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice();\n\t };\n\t\n\t scale.range = function(_) {\n\t return arguments.length ? (range$$1 = slice.call(_), rescale()) : range$$1.slice();\n\t };\n\t\n\t scale.rangeRound = function(_) {\n\t return range$$1 = slice.call(_), interpolate$$1 = d3Interpolate.interpolateRound, rescale();\n\t };\n\t\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\t\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n\t };\n\t\n\t return rescale();\n\t}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range$$1 = unit,\n interpolate$$1 = interpolateValue,\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = map$3.call(_, number$1), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range$$1 = slice$4.call(_), rescale()) : range$$1.slice();\n };\n\n scale.rangeRound = function(_) {\n return range$$1 = slice$4.call(_), interpolate$$1 = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range$$1 = unit,\n interpolate$$1 = interpolateValue,\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = map$3.call(_, number$1), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range$$1 = slice$1.call(_), rescale()) : range$$1.slice();\n };\n\n scale.rangeRound = function(_) {\n return range$$1 = slice$1.call(_), interpolate$$1 = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"interpolate\"],\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__[\"map\"].call(_, __WEBPACK_IMPORTED_MODULE_4__number__[\"default\"]), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__[\"slice\"].call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = __WEBPACK_IMPORTED_MODULE_2__array__[\"slice\"].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__[\"interpolateRound\"], rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit, range$$1 = unit, interpolate$$1 = d3Interpolate.interpolate, clamp = false, piecewise, output, input;\n function rescale() {\n piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n function scale(x) {\n return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n }\n scale.invert = function (y) {\n return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n scale.domain = function (_) {\n return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice();\n };\n scale.range = function (_) {\n return arguments.length ? (range$$1 = slice.call(_), rescale()) : range$$1.slice();\n };\n scale.rangeRound = function (_) {\n return (range$$1 = slice.call(_), interpolate$$1 = d3Interpolate.interpolateRound, rescale());\n };\n scale.clamp = function (_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n scale.interpolate = function (_) {\n return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n };\n return rescale();\n }", "function continuous(deinterpolate$$, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate = d3Interpolate.interpolate,\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate$$) : deinterpolate$$, interpolate)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolate, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice.call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = slice.call(_), interpolate = d3Interpolate.interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n return rescale();\n }", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate$$1 = interpolateValue,\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = map$3.call(_, number$2), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice$5.call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = slice$5.call(_), interpolate$$1 = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n };\n\n return rescale();\n}", "function continuous(deinterpolate, reinterpolate) {\n\t var domain = unit,\n\t range$$1 = unit,\n\t interpolate$$1 = d3Interpolate.interpolate,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n\t }\n\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice();\n\t };\n\n\t scale.range = function(_) {\n\t return arguments.length ? (range$$1 = slice.call(_), rescale()) : range$$1.slice();\n\t };\n\n\t scale.rangeRound = function(_) {\n\t return range$$1 = slice.call(_), interpolate$$1 = d3Interpolate.interpolateRound, rescale();\n\t };\n\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n\t };\n\n\t return rescale();\n\t}", "function continuous(deinterpolate, reinterpolate) {\n\t var domain = unit,\n\t range$$1 = unit,\n\t interpolate$$1 = d3Interpolate.interpolate,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n\t }\n\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice();\n\t };\n\n\t scale.range = function(_) {\n\t return arguments.length ? (range$$1 = slice.call(_), rescale()) : range$$1.slice();\n\t };\n\n\t scale.rangeRound = function(_) {\n\t return range$$1 = slice.call(_), interpolate$$1 = d3Interpolate.interpolateRound, rescale();\n\t };\n\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n\t };\n\n\t return rescale();\n\t}", "function continuous(deinterpolate, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate$$1 = value,\n clamp = false,\n piecewise$$1,\n output,\n input;\n\n function rescale() {\n piecewise$$1 = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise$$1(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise$$1(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = map$3.call(_, number$4), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice$3.call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = slice$3.call(_), interpolate$$1 = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n };\n\n return rescale();\n }", "function continuous(deinterpolate, reinterpolate) {\n\t var domain = unit,\n\t range$$1 = unit,\n\t interpolate$$1 = interpolateValue,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\t\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\t\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n\t }\n\t\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\t\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$3.call(_, number$1), rescale()) : domain.slice();\n\t };\n\t\n\t scale.range = function(_) {\n\t return arguments.length ? (range$$1 = slice$4.call(_), rescale()) : range$$1.slice();\n\t };\n\t\n\t scale.rangeRound = function(_) {\n\t return range$$1 = slice$4.call(_), interpolate$$1 = interpolateRound, rescale();\n\t };\n\t\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\t\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n\t };\n\t\n\t return rescale();\n\t}", "function continuous(deinterpolate, reinterpolate) {\n\t var domain = unit,\n\t range$$1 = unit,\n\t interpolate$$1 = d3Interpolate.interpolate,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n\t }\n\n\t scale.invert = function (y) {\n\t return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\n\t scale.domain = function (_) {\n\t return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice();\n\t };\n\n\t scale.range = function (_) {\n\t return arguments.length ? (range$$1 = slice.call(_), rescale()) : range$$1.slice();\n\t };\n\n\t scale.rangeRound = function (_) {\n\t return range$$1 = slice.call(_), interpolate$$1 = d3Interpolate.interpolateRound, rescale();\n\t };\n\n\t scale.clamp = function (_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\n\t scale.interpolate = function (_) {\n\t return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n\t };\n\n\t return rescale();\n\t }", "function continuous(deinterpolate, reinterpolate) {\n\t var domain = unit,\n\t range$$1 = unit,\n\t interpolate$$1 = d3Interpolate.interpolate,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n\t }\n\n\t scale.invert = function (y) {\n\t return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\n\t scale.domain = function (_) {\n\t return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice();\n\t };\n\n\t scale.range = function (_) {\n\t return arguments.length ? (range$$1 = slice.call(_), rescale()) : range$$1.slice();\n\t };\n\n\t scale.rangeRound = function (_) {\n\t return range$$1 = slice.call(_), interpolate$$1 = d3Interpolate.interpolateRound, rescale();\n\t };\n\n\t scale.clamp = function (_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\n\t scale.interpolate = function (_) {\n\t return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n\t };\n\n\t return rescale();\n\t }", "function continuous(deinterpolate, reinterpolate) {\n\t var domain = unit,\n\t range$$1 = unit,\n\t interpolate$$1 = interpolateValue,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n\t }\n\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$3.call(_, number$1), rescale()) : domain.slice();\n\t };\n\n\t scale.range = function(_) {\n\t return arguments.length ? (range$$1 = slice$4.call(_), rescale()) : range$$1.slice();\n\t };\n\n\t scale.rangeRound = function(_) {\n\t return range$$1 = slice$4.call(_), interpolate$$1 = interpolateRound, rescale();\n\t };\n\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n\t };\n\n\t return rescale();\n\t}", "function continuous(deinterpolate, reinterpolate) {\n\t var domain = unit,\n\t range$$1 = unit,\n\t interpolate$$1 = interpolateValue,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n\t }\n\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$3.call(_, number$1), rescale()) : domain.slice();\n\t };\n\n\t scale.range = function(_) {\n\t return arguments.length ? (range$$1 = slice$4.call(_), rescale()) : range$$1.slice();\n\t };\n\n\t scale.rangeRound = function(_) {\n\t return range$$1 = slice$4.call(_), interpolate$$1 = interpolateRound, rescale();\n\t };\n\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n\t };\n\n\t return rescale();\n\t}", "function continuous(deinterpolate$$, reinterpolate) {\n\t var domain = unit,\n\t range = unit,\n\t interpolate = d3Interpolate.interpolate,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate$$) : deinterpolate$$, interpolate)))(+x);\n\t }\n\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range, domain, deinterpolate, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$1.call(_, number), rescale()) : domain.slice();\n\t };\n\n\t scale.range = function(_) {\n\t return arguments.length ? (range = slice.call(_), rescale()) : range.slice();\n\t };\n\n\t scale.rangeRound = function(_) {\n\t return range = slice.call(_), interpolate = d3Interpolate.interpolateRound, rescale();\n\t };\n\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate = _, rescale()) : interpolate;\n\t };\n\n\t return rescale();\n\t }", "function continuous(deinterpolate$$, reinterpolate) {\n var domain = unit,\n range = unit,\n interpolate$$ = interpolate,\n clamp = false,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate$$) : deinterpolate$$, interpolate$$)))(+x);\n }\n\n scale.invert = function(y) {\n return (input || (input = piecewise(range, domain, deinterpolate, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = map$2.call(_, number$1), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice$3.call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = slice$3.call(_), interpolate$$ = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, rescale()) : clamp;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate$$ = _, rescale()) : interpolate$$;\n };\n\n return rescale();\n }", "function continuous(deinterpolate, reinterpolate) {\n\t var domain = unit,\n\t range$$1 = unit,\n\t interpolate$$1 = interpolate,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range$$1.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range$$1, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);\n\t }\n\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range$$1, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$3.call(_, number$1), rescale()) : domain.slice();\n\t };\n\n\t scale.range = function(_) {\n\t return arguments.length ? (range$$1 = slice$3.call(_), rescale()) : range$$1.slice();\n\t };\n\n\t scale.rangeRound = function(_) {\n\t return range$$1 = slice$3.call(_), interpolate$$1 = interpolateRound, rescale();\n\t };\n\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;\n\t };\n\n\t return rescale();\n\t}", "function continuous(deinterpolate$$, reinterpolate) {\n\t var domain = unit,\n\t range = unit,\n\t interpolate$$ = interpolate,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\t\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\t\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate$$) : deinterpolate$$, interpolate$$)))(+x);\n\t }\n\t\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range, domain, deinterpolate, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\t\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$2.call(_, number$1), rescale()) : domain.slice();\n\t };\n\t\n\t scale.range = function(_) {\n\t return arguments.length ? (range = slice$3.call(_), rescale()) : range.slice();\n\t };\n\t\n\t scale.rangeRound = function(_) {\n\t return range = slice$3.call(_), interpolate$$ = interpolateRound, rescale();\n\t };\n\t\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\t\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate$$ = _, rescale()) : interpolate$$;\n\t };\n\t\n\t return rescale();\n\t }", "function continuous(deinterpolate$$, reinterpolate) {\n\t var domain = unit,\n\t range = unit,\n\t interpolate$$ = interpolate,\n\t clamp = false,\n\t piecewise,\n\t output,\n\t input;\n\t\n\t function rescale() {\n\t piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n\t output = input = null;\n\t return scale;\n\t }\n\t\n\t function scale(x) {\n\t return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate$$) : deinterpolate$$, interpolate$$)))(+x);\n\t }\n\t\n\t scale.invert = function(y) {\n\t return (input || (input = piecewise(range, domain, deinterpolate, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n\t };\n\t\n\t scale.domain = function(_) {\n\t return arguments.length ? (domain = map$2.call(_, number$1), rescale()) : domain.slice();\n\t };\n\t\n\t scale.range = function(_) {\n\t return arguments.length ? (range = slice$3.call(_), rescale()) : range.slice();\n\t };\n\t\n\t scale.rangeRound = function(_) {\n\t return range = slice$3.call(_), interpolate$$ = interpolateRound, rescale();\n\t };\n\t\n\t scale.clamp = function(_) {\n\t return arguments.length ? (clamp = !!_, rescale()) : clamp;\n\t };\n\t\n\t scale.interpolate = function(_) {\n\t return arguments.length ? (interpolate$$ = _, rescale()) : interpolate$$;\n\t };\n\t\n\t return rescale();\n\t }", "function unlerp(a, b, y) {\n\treturn (y-a)/(b-a);\n}", "function vInterpolate(a, b, fraction) {\n var rval = { x: a.x + (b.x - a.x) * fraction, y: a.y + (b.y - a.y) * fraction, z: a.z + (b.z - a.z) * fraction };\n return rval;\n}", "function interpolateX(y, y0, y1){\n return (y - y0) / (y1 - y0);\n }", "function interpolateX(y, y0, y1){\n return (y - y0) / (y1 - y0);\n }", "function interpolate(p0, p1, t) {\n return new Vector(\n p0.x * (1 - t) + p1.x * t,\n p0.y * (1 - t) + p1.y * t);\n }", "function interpolateBetween(a, b) {\n var d = Math.max(-1, Math.min(1, dot(a, b))),\n s = d < 0 ? -1 : 1,\n θ = Math.acos(s * d),\n sinθ = Math.sin(θ);\n return sinθ ? function(t) {\n var A = s * Math.sin((1 - t) * θ) / sinθ,\n B = Math.sin(t * θ) / sinθ;\n return [\n a[0] * A + b[0] * B,\n a[1] * A + b[1] * B,\n a[2] * A + b[2] * B,\n a[3] * A + b[3] * B\n ];\n } : function() { return a; };\n}", "function interpolate(a, b, idx, steps) {\n return +a + ((+b - +a) * (idx / steps));\n }", "static Lerp(a, b, t) {\n return a * (1.0 - t) + b * t;\n }", "function lerp(a, b, t) {\n return a * (1.0 - t) + b * t;\n}", "function interpolate(value,xL,xR,yL,yR){\n return (value-xL)*(yR-yL)/(xR-xL) + yL;\n}", "function sk_linearInterp( x1, x2, y1, y2, x)\n{\n if( x1 == x2)\n throw \"x1 (\" + String(x1) + \") and x2 (\" + String(x2) + \") must NOT no equal.\"; \n\n return ( y1 * ( x2 - x) + y2 * ( x - x1)) / ( x2 - x1);\n}", "function lerp(a, b, t) {\n return a + t * (b - a);\n}", "function lerp(t,A,B) { return A + t*(B-A) }", "function lerp(a, b, t) {\n return a + (b - a) * t\n}", "function lerp_element(a, b, t) {\n\treturn a+t*(b-a);\n}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0],\n d1 = domain[1],\n r0 = range[0],\n r1 = range[1];\n if (d1 < d0) {\n d0 = normalize(d1, d0);\n r0 = interpolate(r1, r0);\n } else {\n d0 = normalize(d0, d1);\n r0 = interpolate(r0, r1);\n }\n return function (x) {\n return r0(d0(x));\n };\n}", "function lerp(a, b, x) {\n\treturn a+x*(b-a);\n}", "function interpolatePair(a, b, proportion) {\n\t\treturn {\n\t\t\tdate: lerpDate(a.date, b.date, proportion),\n\t\t\tvalue1: lerp(a.value1, b.value1, proportion),\n\t\t\tvalue2: lerp(a.value2, b.value2, proportion)\n\t\t}\n\t}", "function bimap(domain, range, interpolate) {\n\t var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n\t if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n\t else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n\t return function(x) { return r0(d0(x)); };\n\t}", "interpolate_( /* i1, t0, t, t1 */ ) {\n\n\t\tthrow new Error( 'call to abstract method' );\n\t\t// implementations shall return this.resultBuffer\n\n\t}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n }", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n }", "function lerp(a, b, x) {\n return (a + x * (b - a));\n}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) {\n return r0(d0(x));\n };\n}", "interpolate(y2, y1, y3, n) {\n /* Equation from Astronomical Algorithms page 24 */\n const a = y2 - y1;\n const b = y3 - y2;\n const c = b - a;\n return y2 + n / 2 * (a + b + n * c);\n }", "function lerp(a,b,t) {\n\n\t\t//x axis\n\t\tvar x = a.x + t * (b.x - a.x);\n\n\t\t//y axis\n\t\tvar y = a.y + t * (b.y - a.y);\n\n\t\tvar ret = new Vector2();\n\t\tret.x = x;\n\t\tret.y = y;\n\n\t\treturn ret;\n\n\t}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}", "function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}" ]
[ "0.67090166", "0.6664758", "0.6664758", "0.63704807", "0.63488925", "0.6339267", "0.6263025", "0.62424994", "0.62424994", "0.6228663", "0.6228663", "0.6228663", "0.6228663", "0.6223167", "0.6223167", "0.6223167", "0.62195826", "0.6211459", "0.6211459", "0.6211459", "0.6211459", "0.6211459", "0.6211459", "0.6211459", "0.6211459", "0.6206394", "0.6206394", "0.6206394", "0.6206394", "0.6206394", "0.6206394", "0.62057304", "0.62057304", "0.6204972", "0.6160237", "0.6160237", "0.6160237", "0.6160237", "0.615098", "0.615098", "0.6139472", "0.6137802", "0.6120528", "0.6119494", "0.61150193", "0.60832167", "0.60652345", "0.60652345", "0.60238457", "0.60002565", "0.5995448", "0.5995448", "0.59220517", "0.59220517", "0.5911446", "0.58888257", "0.5885987", "0.5801576", "0.5801576", "0.5794404", "0.5717541", "0.5682258", "0.5682258", "0.56120217", "0.5607676", "0.5588261", "0.5532768", "0.5521355", "0.5507285", "0.54716766", "0.5451712", "0.54380506", "0.54250044", "0.5400678", "0.53349286", "0.53204167", "0.527024", "0.52593696", "0.52453214", "0.5235148", "0.5235148", "0.5229985", "0.5222715", "0.5200139", "0.5199762", "0.517941", "0.517941", "0.517941", "0.517941", "0.517941", "0.517941", "0.517941", "0.517941", "0.517941" ]
0.6310586
9
Should skip false boolean attributes.
function shouldSkip(name, value) { var attrType = __properties_929[name]; return value == null || (attrType === __types_929.BOOLEAN && !value) || (attrType === __types_929.OVERLOADED_BOOLEAN && value === false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shouldSkip(name, value) {\n\tvar attrType = properties[name];\n\treturn value == null ||\n\t(attrType === types.BOOLEAN && !value) ||\n\t(attrType === types.OVERLOADED_BOOLEAN && value === false);\n}", "function skip_attr(a) {\n return a==='supported' || a==='concrete' || a==='parents';\n}", "function FalseSpecification() {}", "function clearFalse (opts) {\n for(var k in opts)\n if(opts[k] === false)\n delete opts[k]\n return opts\n }", "setBooleanAttribute(element, attributeName, value) {\n value ? element.setAttribute(attributeName, \"\") : element.removeAttribute(attributeName);\n }", "function falseValues(value) {\n if (Boolean(value)) {\n return true;\n } else {\n return false;\n }\n }", "get disabled() {return booleanAttribute.get(this, 'disabled');}", "function isDisabledFor(metadata/*:MetadataTreeNode*/)/*:Boolean*/ {\n return false;\n }", "function isFalse(bool){\n return false;\n }", "function Booleans(){\n return false;\n}", "function sc_not(b) {\n return b === false;\n}", "static get observedAttributes() {\n return ['checked', 'disabled'];\n }", "function getForBoolean () {\n if (dataFrom === undefined) {\n from[attribute] = false;\n } else {\n from[attribute] = strToBool(dataFrom);\n }\n from[attribute] = boolToNum(from[attribute]);\n to[attribute] = boolToNum(strToBool(dataTo));\n partialSetAttribute = function (value) {\n el.setAttribute(attribute, !!value[attribute]);\n };\n }", "supportsBooleanValues() {\n return true;\n }", "negate() {\n this._truth = !this._truth;\n }", "negate() {\n this._truth = !this._truth;\n }", "function returnFalse() {\n return false;\n }", "function welcomeToBooleans() {\n return false;\n}", "function shouldIgnoreValue(propertyInfo,value){return value==null||propertyInfo.hasBooleanValue&&!value||propertyInfo.hasNumericValue&&isNaN(value)||propertyInfo.hasPositiveNumericValue&&value<1||propertyInfo.hasOverloadedBooleanValue&&value===false;}", "function shouldIgnoreValue(propertyInfo,value){return value==null||propertyInfo.hasBooleanValue&&!value||propertyInfo.hasNumericValue&&isNaN(value)||propertyInfo.hasPositiveNumericValue&&value<1||propertyInfo.hasOverloadedBooleanValue&&value===false;}", "function shouldIgnoreValue(propertyInfo,value){return value==null||propertyInfo.hasBooleanValue&&!value||propertyInfo.hasNumericValue&&isNaN(value)||propertyInfo.hasPositiveNumericValue&&value<1||propertyInfo.hasOverloadedBooleanValue&&value===false;}", "untouched() {\n return this.validateFlags.every((v) => !!v.untouched);\n }", "function shouldSetAttribute(name,value){if(isReservedProp(name)){return false;}if(name.length>2&&(name[0]==='o'||name[0]==='O')&&(name[1]==='n'||name[1]==='N')){return false;}if(value===null){return true;}switch(typeof value==='undefined'?'undefined':_typeof(value)){case'boolean':return shouldAttributeAcceptBooleanValue(name);case'undefined':case'number':case'string':case'object':return true;default:// function, symbol\nreturn false;}}", "function shouldSetAttribute(name,value){if(isReservedProp(name)){return false;}if(name.length>2&&(name[0]==='o'||name[0]==='O')&&(name[1]==='n'||name[1]==='N')){return false;}if(value===null){return true;}switch(typeof value==='undefined'?'undefined':_typeof(value)){case'boolean':return shouldAttributeAcceptBooleanValue(name);case'undefined':case'number':case'string':case'object':return true;default:// function, symbol\nreturn false;}}", "function removeFalseVar(value) {\n return Boolean(value);\n}", "function returnFalse() {\n return false;\n }", "function getForBoolean () {\n\t if (dataFrom === undefined) {\n\t from[attribute] = false;\n\t } else {\n\t from[attribute] = strToBool(dataFrom);\n\t }\n\t from[attribute] = boolToNum(from[attribute]);\n\t to[attribute] = boolToNum(strToBool(dataTo));\n\t partialSetAttribute = function (value) {\n\t el.setAttribute(attribute, !!value[attribute]);\n\t };\n\t }", "function returnFalse() {\n return false;\n }", "function isFalsy(input){\n\n}", "beFalse() {\n return this._assert(\n this._actual === false, '${actual} is false.',\n '${actual} is not false.');\n }", "function shouldSetAttribute(name,value){if(isReservedProp(name)){return false;}if(name.length>2&&(name[0]==='o'||name[0]==='O')&&(name[1]==='n'||name[1]==='N')){return false;}if(value===null){return true;}switch(typeof value==='undefined'?'undefined':_typeof(value)){case'boolean':return shouldAttributeAcceptBooleanValue(name);case'undefined':case'number':case'string':case'object':return true;default:// function, symbol\n\treturn false;}}", "function changeBooleansToFalse() {\r\n demo = false;\r\n isLegalMovement = false;\r\n isBlackToolInsideJump = false;\r\n isWhiteToolInsideJump = false;\r\n isForcedJump = false;\r\n isToolTaken = false;\r\n isExtraForcedJump = false;\r\n}", "function disableRepairAgentInputs($boolean)\r\n{\r\n $('#claimdetails-repairagentname-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentphone-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentemail-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentunithouse-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentstreet-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentsuburbcity-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentstate-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentpostcode-input').prop('disabled', $boolean);\r\n}", "function\nXATS2JS_bool_neg\n (b0)\n{ return !b0 ; }", "function disableRepairAgentInputs($boolean)\r\n {\r\n $('#claimdetails-repairagentname-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentphone-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentemail-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentunithouse-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentstreet-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentsuburbcity-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentstate-input').prop('disabled', $boolean);\r\n $('#claimdetails-repairagentpostcode-input').prop('disabled', $boolean);\r\n }", "function attributeIsPresent(value) {\n if (value === true || value === false) {\n return value;\n }\n return !lang_1.isBlank(value);\n}", "function defineBooleanAttribute(key,handler){var attr=$attrs.$normalize('md-'+key);if(handler)defineProperty(key,handler);if($attrs.hasOwnProperty(attr))updateValue($attrs[attr]);$attrs.$observe(attr,updateValue);function updateValue(newValue){ctrl[key]=newValue!=='false';}}", "set removeNullAttributes(val) { this._removeNulls = typeof val === 'boolean' ? val : true }", "function not(b){ return !b; }", "function notNot(bool) {\n return !!(bool);\n }", "function returnFalse() {\n\t\t\treturn false;\n\t\t}", "function returnFalse() {\n\t\t\treturn false;\n\t\t}", "function returnFalse() {\n\t\t\treturn false;\n\t\t}", "function returnFalse() {\n\t\t\treturn false;\n\t\t}", "function toggleBooleanValueWithoutIf(data)\n{\n if(typeof data !== 'boolean'){\n return \"This function is meant to work wth boolean data only.\";\n } else {\n data = !data;\n return data;\n }\n}", "_enableProperties() {\n if (!this.hasAttribute(DISABLED_ATTR)) {\n if (!this.__dataEnabled) {\n super._initializeProperties();\n }\n\n super._enableProperties();\n }\n }", "function not(a){\r\n return (a === true) ? false :\r\n (a === false) ? true : error(not);\r\n}", "enterFalseBoolean(ctx) {\n }", "function booleanTransformer(v) {\n return v !== \"false\";\n}", "static fromBoolean(value) {\n return new DynamoAttributeValue({ BOOL: value });\n }", "function not(x) { return !x; }", "get required() { return !!this._required; }", "get required() { return !!this._required; }", "function shouldIgnoreValue(propertyInfo, value) {\n\t return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n\t}", "isOriginal(){\r\n return this.isOriginalBool;\r\n }", "get disabled () {\r\n return this.hasAttribute('disabled')\r\n }", "function boolNot(value) {\n if (value === true) return false;\n else if (value === false) return true;\n else return value;\n}", "function trueOrFalse() {\n if (fiveDayWeather === undefined) {\n return false;\n } else {\n return true;\n }\n }", "function returnFalse() {\n\t\treturn false;\n\t}", "preset () { return false }", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n }", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n }", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n }", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n }", "isStrict(){\n let component = this.props.component\n let key = this.props.attribute\n return component.state.data[key].strict\n }", "get boolValue() {}", "function skip() {\n this.shouldSkip = true;\n}", "function isFalse(bool) {\n return !bool;\n }", "get isSkipped() { return (this.flags & 2 /* NodeFlag.Skipped */) > 0; }", "get isNotNullable() {\n if (this._isNotNullable) return this._isNotNullable;\n return (this._isNotNullable = !!(typeof this.knexOptions.isNotNullable === 'undefined'\n ? true\n : this.knexOptions.isNotNullable));\n }", "function trueOrFalse() {\n if (todayWeather === undefined) {\n return false;\n } else {\n return true;\n }\n }", "function returnFalse() {\n\treturn false;\n}", "function coerceBooleanProperty(value) {\n return value != null && \"\" + value !== 'false';\n}", "function isFalse(boolean){\n return boolean == 0;\n}", "hasRequiredAttrs() {\n for (let n in this.attrs)\n if (this.attrs[n].isRequired)\n return true;\n return false;\n }", "function isFalsy(input) {\n return ((bool) || (!bool)) !== true;\n }", "default() {\n return !this.filled && !this.stroke && !this.text && !this.subtle;\n }", "get disabled() {\n return this.hasAttribute('disabled')\n }", "function test_native_false_exact_string_false(){ assertFalse(false == 'false'); }", "function IconWidget_isDisabled()\n{\n\treturn this.dis?this.dis:false\n}", "function defineBooleanAttribute (key, handler) {\n var attr = $attrs.$normalize('md-' + key);\n if (handler) defineProperty(key, handler);\n if ($attrs.hasOwnProperty(attr)) updateValue($attrs[attr]);\n $attrs.$observe(attr, updateValue);\n function updateValue (newValue) {\n ctrl[ key ] = newValue !== 'false';\n }\n }", "function defineBooleanAttribute (key, handler) {\n var attr = $attrs.$normalize('md-' + key);\n if (handler) defineProperty(key, handler);\n if ($attrs.hasOwnProperty(attr)) updateValue($attrs[attr]);\n $attrs.$observe(attr, updateValue);\n function updateValue (newValue) {\n ctrl[ key ] = newValue !== 'false';\n }\n }", "function defineBooleanAttribute (key, handler) {\n var attr = $attrs.$normalize('md-' + key);\n if (handler) defineProperty(key, handler);\n if ($attrs.hasOwnProperty(attr)) updateValue($attrs[attr]);\n $attrs.$observe(attr, updateValue);\n function updateValue (newValue) {\n ctrl[ key ] = newValue !== 'false';\n }\n }", "function flse() {\r\n return { generalType: \"bool\", type: FALSE, toString: function () { return \"false\"; } };\r\n}", "isDisabled() {\n let disabled = false;\n let appliedFilters = (this.props.appliedFilters) ? Object.keys(this.props.appliedFilters) : [];\n\n if (this.props.disabled || this.state.disabled) disabled = true;\n\n if (this.props.disabledBy) {\n this.props.disabledBy.forEach(field => {\n if (appliedFilters.indexOf(field) >= 0) disabled = true;\n });\n }\n\n return disabled;\n }", "function defaultBooleanValue(v) { }", "function skip() {\n\t this.shouldSkip = true;\n\t}", "function skip() {\n\t this.shouldSkip = true;\n\t}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}", "function shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}" ]
[ "0.72779316", "0.6685473", "0.6618591", "0.6332508", "0.6295732", "0.6279915", "0.6261553", "0.6180319", "0.61388403", "0.6120033", "0.6093414", "0.60127616", "0.60116357", "0.599246", "0.59682345", "0.59682345", "0.5965536", "0.59626603", "0.59621686", "0.59621686", "0.59621686", "0.59269726", "0.59172416", "0.59172416", "0.5909661", "0.590903", "0.58995235", "0.58901954", "0.5873861", "0.5862137", "0.58571684", "0.58451176", "0.58367616", "0.5832511", "0.5823047", "0.5810694", "0.5793993", "0.57736355", "0.5760728", "0.57473695", "0.5725525", "0.5725525", "0.5725525", "0.5725525", "0.57247216", "0.57216156", "0.5721584", "0.5716139", "0.5701102", "0.5690618", "0.5677547", "0.5650715", "0.5650715", "0.56489503", "0.5648778", "0.5646769", "0.56403023", "0.56381", "0.5637932", "0.56263983", "0.56131303", "0.56131303", "0.56131303", "0.56131303", "0.55923975", "0.55843514", "0.55821604", "0.55600345", "0.5556285", "0.55558705", "0.55544335", "0.5550794", "0.5532635", "0.551636", "0.55100054", "0.5500948", "0.5498467", "0.54962265", "0.5491879", "0.5491667", "0.5490375", "0.5490375", "0.5490375", "0.54900193", "0.54879445", "0.5472826", "0.54668033", "0.54668033", "0.54657096", "0.54657096", "0.54657096", "0.54657096", "0.54657096", "0.54657096", "0.54657096", "0.54657096", "0.54657096", "0.54657096", "0.54657096", "0.54657096" ]
0.70946777
1